Log In  

Cart #man-0 | 2024-03-18 | Embed ▽ | No License
14

Documentation at your fingertips!

This cart installs the man terminal utility for reading documentation within picotron itself.

Something not documented? man will intelligently search the Fandom Wiki! 😱

Installation

  1. Setup yotta:

    • In the terminal
    • load #yotta
    • Press Ctrl-r
    • Press x to install
  2. Install this package:
    • In the terminal
    • yotta util install #man

This will install the following files for you:

appdata
└── system
    ├── lib
    │   └── man.lua  # The `man()` function for library usage
    ├── man/         # Man files live here
    └── util
        └── man.lua  # The `man` terminal utility

Usage

In the Picotron terminal, run man.

NAME
    man -- format and display the manual pages

SYNOPSIS
    man [section] name

DESCRIPTION
    man formats and displays the manual pages. If you specify section, man only looks in that section of the manual. name is normally the name of the manual page, which is typically the name of a command, function, or file.

    See below for a description of where man looks for the manual page files.

MANUAL SECTIONS
    The standard sections of the manual include:

    1        User Commands from /appdata/system/util

    2        System Calls such as fetch

    3        Picotron Lua Library Functions

    wiki    Wiki pages from https://pico-8.fandom.com

P8SCII FORMATTING
    man understands most of p8scii formatting. The \a command to play audio is not supported.

SEARCH PATH FOR MANUAL PAGES
    man searches /appdata/system/man for local manual pages in the format <name>.<section>.

WIKI PAGES
    When section is 'wiki', or local manual pages are not found, man will return the first search result from the unofficial PICO-8 wiki: https://pico-8.fandom.com

AUTHOR
    Created by Jess Telford <[email protected]>

Contributing

The code is on GitHub, and I'd love help documenting more of the picotron system so everyone can benefit!

Please open PRs and issues with suggestions ❤️

P#143718 2024-03-18 17:08 ( Edited 2024-03-18 17:20)

to clarify, this can be installed and used without yotta, yes?

P#143739 2024-03-18 18:21

While it's very cool that this can pull from the wiki, won't those results be specific to PICO-8?

P#143740 2024-03-18 18:28

@merwok anything installable via yotta can be installed manually - you can load the cartridge from the BBS, and look inside /ram/cart/exports/ - this directory tree gets merged over your picotron drive root. don't just cp it - cp will clobber target directories, not merge them! so, in this case, you can:

> load #man
> mkdir /appdata/system/man
> mkdir /appdata/system/util
> cp /ram/cart/exports/appdata/system/man/man.1 /appdata/system/man/man.1
> cp /ram/cart/exports/appdata/system/util/man.lua /appdata/system/util/man.lua

or, if you're willing to use my merge utility (self-installing or yottable):

> load #man
> merge /ram/cart/exports /

(plus you can then merge -u /ram/cart/exports / to "uninstall")

P#143744 2024-03-18 19:04

This is really cool! Thank you!
I've added a man page to yotta to live alongside the "info viewer" manual and will be following-up on other utilities and stuff in the future. I love that it automatically word-wraps, that's a big help. I did manual word wrapping on the yotta_manual.txt and it was a pain.

Love to have some local documentation on my toy computer for those long plane rides :) Not getting me for those in-flight Wi-Fi charges, airline.

P#143746 2024-03-18 19:07

what is /ram/cart/exports?

P#143784 2024-03-18 23:25

@merwok when you load a picotron cartridge using load (like load #man to get this cart from the BBS) it will be downloaded then made your 'active cart'. active cart data can be found in a directory on your picotron: /ram/cart

inside that cart is a folder called 'exports'. this is the stuff intended to be taken out of the cart for one reason or another - either to be used in other carts, or to be installed to the system. you can do either of those things yourself manually, or use a tool to do it for you.

you can find details here: https://www.lexaloffle.com/dl/docs/picotron_filesystem.html#Working_Cartridge

P#143787 2024-03-19 00:36

@ahrotahn How to install resources from the "exports" folder into the picotron system or use them in other cartridges? time calculator

P#146246 2024-04-10 06:26

This great! Keep this updated!

But I had a problem, I clicked X to install, then clicked O to open folder and the main terminal got bugged. I could still open a new windowed one but strange right? By the way great tool

P#146453 2024-04-12 12:08

[Please log in to post a comment]