From 189c42ebea3b10fe836263cab001b807e3c5863b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 6 Jul 2020 18:16:53 -0600 Subject: [PATCH] Doc updates --- UPGRADE.md | 25 +--- docs/configuration/creating-config.md | 2 +- docs/configuration/directory-structure.md | 8 +- docs/configuration/menu-hjson.md | 4 +- misc/prompt_template.in.hjson | 170 ---------------------- 5 files changed, 16 insertions(+), 193 deletions(-) delete mode 100644 misc/prompt_template.in.hjson diff --git a/UPGRADE.md b/UPGRADE.md index 3898a320..0bedeb2e 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,29 +2,17 @@ This document covers basic upgrade notes for major ENiGMA½ version updates. # Before Upgrading -* Always back up your system! +* Always back up your system! (See [Administration](/docs/admin/administration.md)) * Seriously, always back up your system! -* At least back up the `db` directory and your `menu.hjson` (or renamed equivalent) # General Notes ## Configuration File Updates -In general, look at the `menu_template.in.hjson`, and `config_template.in.hjson` as well as the default `luciano_blocktronics/theme.hjson` files when you update. These files may come with new sections you wish to merge into your system! +In general, look at template menu files in `misc/menu_templates`, and `config_template.in.hjson` as well as the default `luciano_blocktronics/theme.hjson` files when you update. These files may come with new sections you wish to merge into your system! -### menu.hjson -Upgrades often come with changes to the default `menu_template.in.hjson`. It is wise to use a *different* file name for your BBS's version of this file and point to it via `config.hjson`. For example: - -```hjson -general: { - menuFile: my_bbs.hjson -} -``` - -After updating code, use a program such as DiffMerge to merge in updates to -`my_bbs.hjson` from the shipping `menu.hjson`. - -### theme.hjson -Any custom themes you have created may now be missing features as well. Take a look at the default `luciano_blocktronics/theme.hjson` file. You can use missing sections in your `theme.hjson` (which will generally correspond to sections you've also merged in to your `menu.hjson`). +### Menus & Theme Updates +Upgrades often come with changes to the default menu templates found in `misc/menu_tempaltes`. You can use these as references for changes and additions to the default menu sets. This also applies to the default `luciano_blocktronics` theme and it's `theme.hjson` file. +See [Updating](/docs/admin/updating.md) for details on menu files/etc. # Upgrading the Code Upgrading from GitHub is easy: @@ -33,7 +21,7 @@ Upgrading from GitHub is easy: cd /path/to/enigma-bbs git pull rm -rf npm_modules # do this any time you update Node.js itself -npm install +npm install # or simply 'yarn' ``` # Problems @@ -42,6 +30,7 @@ Report your issue on Xibalba BBS, hop in #enigma-bbs on FreeNode and chat, or # 0.0.11-beta to 0.0.12-beta * Be aware that `master` is now mainline! This means all `git pull`'s will yield the latest version. See [WHATSNEW](WHATSNEW.md) for more information. +* There is no longer a `prompt.hjson` file. Prompts are simply part of the menu set in the `prompts` section. # 0.0.10-alpha to 0.0.11-beta * Node.js 12.x LTS is now in use. Follow standard Node.js upgrade procedures (e.g.: `nvm install 12 && nvm use 12`). diff --git a/docs/configuration/creating-config.md b/docs/configuration/creating-config.md index 068ad5fa..432752b5 100644 --- a/docs/configuration/creating-config.md +++ b/docs/configuration/creating-config.md @@ -10,5 +10,5 @@ Your initial configuration skeleton can be created using the `oputil.js` command ./oputil.js config new ``` -You will be asked a series of questions to create an initial configuration, which will be saved to `/enigma-bbs-install-path/config/config.hjson`. This will also produce `config/-menu.hjson` and `config/-prompt.hjson` files (where `` is replaced by the name you provided in the steps above). See [Menu HJSON](menu-hjson.md) for more information. +You will be asked a series of questions to create an initial configuration, which will be saved to `/enigma-bbs-install-path/config/config.hjson`. This will also produce menu files under `config/menus/`. See [Menu HJSON](menu-hjson.md) for more information. diff --git a/docs/configuration/directory-structure.md b/docs/configuration/directory-structure.md index d968df17..e139be80 100644 --- a/docs/configuration/directory-structure.md +++ b/docs/configuration/directory-structure.md @@ -2,14 +2,16 @@ layout: page title: Directory Structure --- -All paths mentioned here are relative to the ENiGMA½ checkout directory. +All paths mentioned here are relative to the ENiGMA½ checkout directory. | Directory | Description | |---------------------|-----------------------------------------------------------------------------------------------------------| | `/art/general` | Non-theme art - welcome ANSI, logoff ANSI, etc. See [General Art]({{ site.baseurl }}{% link art/general.md %}). | `/art/themes` | Theme art. Themes should be in their own subdirectory and contain a theme.hjson. See [Themes]({{ site.baseurl }}{% link art/themes.md %}). -| `/config` | config.hjson, [menu.hjson]({{ site.baseurl }}{% link configuration/menu-hjson.md %}) and prompt.hjson storage. Also default path for SSL certs and public/private keys -| `/db` | All ENiGMA½ databases in Sqlite3 format +| `/config` | [config.hjson](config-hjson.md) system configuration. +| `/config/menus` | [menu.hjson](menu-hjson.md)storage. +| `/config/security` | D path for SSL certs and public/private keys. +| `/db` | All ENiGMA½ databases in Sqlite3 format. | `/docs` | These docs ;-) | `/dropfiles` | Dropfiles created for [local doors]({{ site.baseurl }}{% link modding/local-doors.md %}) | `/logs` | Logs. See [Monitoring Logs]({{ site.baseurl }}{% link troubleshooting/monitoring-logs.md %}) diff --git a/docs/configuration/menu-hjson.md b/docs/configuration/menu-hjson.md index d8d21af8..898fc315 100644 --- a/docs/configuration/menu-hjson.md +++ b/docs/configuration/menu-hjson.md @@ -3,7 +3,7 @@ layout: page title: Menu HSJON --- ## Menu HJSON -The core of a ENiGMA½ based BBS is `menu.hjson`. Note that when `menu.hjson` is referenced, we're actually talking about `config/yourboardname-menu.hjson` or similar. This file determines the menus (or screens) a user can see, the order they come in and how they interact with each other, ACS configuration, etc. Like all configuration within ENiGMA½, menu configuration is done in [HJSON](https://hjson.org/) format. See [HJSON General Information](hjson.md) for more information. +The core of a ENiGMA½ based BBS is `menu.hjson`. Note that when `menu.hjson` is referenced, we're actually talking about `config/menus/yourboardname-*.hjson`. These files determines the menus (or screens) a user can see, the order they come in and how they interact with each other, ACS configuration, etc. Like all configuration within ENiGMA½, menu configuration is done in [HJSON](https://hjson.org/) format. See [HJSON General Information](hjson.md) for more information. Entries in `menu.hjson` are often referred to as *blocks* or *sections*. Each entry defines a menu. A menu in this sense is something the user can see or visit. Examples include but are not limited to: @@ -13,6 +13,8 @@ Entries in `menu.hjson` are often referred to as *blocks* or *sections*. Each en Menu entries live under the `menus` section of `menu.hjson`. The *key* for a menu is it's name that can be referenced by other menus and areas of the system. +:information_source: Remember that the top level menu may include additional files using the `includes` directive. See [Configuration Files](config-files.md) for more information on this. + ## Common Menu Entry Members Below is a table of **common** menu entry members. These members apply to most entries, though entries that are backed by a specialized module (ie: `module: bbs_list`) may differ. See documentation for the module in question for particulars. diff --git a/misc/prompt_template.in.hjson b/misc/prompt_template.in.hjson deleted file mode 100644 index 4e451a1f..00000000 --- a/misc/prompt_template.in.hjson +++ /dev/null @@ -1,170 +0,0 @@ -{ - /* - ./\/\.' ENiGMA½ Prompt Configuration -/--/-------- - -- - - - _____________________ _____ ____________________ __________\_ / - \__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp! - // __|___// | \// |// | \// | | \// \ /___ /_____ - /____ _____| __________ ___|__| ____| \ / _____ \ - ---- \______\ -- |______\ ------ /______/ ---- |______\ - |______\ /__/ // ___/ - /__ _\ - <*> ENiGMA½ // HTTPS://GITHUB.COM/NUSKOOLER/ENIGMA-BBS <*> /__/ - - ------------------------------------------------------------------------------- - - This configuration is in HJSON (http://hjson.org/) format. Strict to-spec - JSON is also perfectly valid. Use 'hjson' from npm to convert to/from JSON. - - See http://hjson.org/ for more information and syntax. - - - If you haven't yet, copy the conents of this file to something like - sick_board_prompt.hjson. Point to it via config.hjson using the - 'general.promptFile' key: - - general: { promptFile: "sick_board_prompt.hjson" } - - */ - // :TODO: this entire file needs cleaned up a LOT - // :TODO: Convert all of this to HJSON - prompts: { - /* - userCredentials: { - "art" : "usercred", - "mci" : { - "ET1" : { - "argName" : "username", - "maxLength" : "@config:users.usernameMax" - }, - "ET2" : { - "submit" : true, - "argName" : "password", - "password" : true, - "maxLength" : "@config:users.passwordMax" - } - } - }, - "userLoginCredentials" : { - "art" : "USRCRED", - "mci" : { - "ET1" : { - "argName" : "username", - "maxLength" : "@config:users.usernameMax" - }, - "ET2" : { - "submit" : true, - "argName" : "password", - "password" : true, - "maxLength" : "@config:users.passwordMax" - } - } - }, - */ - - /* - loginSequenceFlavorSelect: { - art: LOGINSEL - mci: { - TM1: { - argName: promptValue - items: [ "yes", "no" ] - focus: true - focusItemIndex: 1 - hotKeys: { Y: 0, N: 1 } - hotKeySubmit: true - } - } - } - */ - - - "newAreaPostPrompt" : { - "art" : "message_area_new_post", - "mci" : { - "ET1" : { - "argName" : "to", - "width" : 20 - }, - "ET2" : { - "argName" : "subject", - "width" : 20 - } - } - }, - - /////////////////////////////////////////////////////////////////////// - // File Base Related - /////////////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////////////// - // Standard / Required - // - // Prompts in this section are considered "standard" and are required - // to be present - // - /////////////////////////////////////////////////////////////////////// - pause: { - // - // Any menu 'pause' will use this prompt - // - art: pause - config: { - trailingLF: no - } - /* - "mci" : { - // :TODO: Need special pause for a key MCI - // e.g. %PA -> themed prompt - } - - ...or maybe pause should just be special: - { - ... - "pause" true - // uses theme pause which can be art/inline/etc. - - } - - ... better, a special prompt - - GetKeyView - * echoKey : false - - */ - } - /*, - "standard" : { - // any menu 'pause' will display this, pause for a key, then erase and move on - "pause" : { - "art" : "pause" - // :TODO: support mci mappings - } - }, - "custom" : { - - }*/ - /* - see notes in menu_module.js also - ...how to allow for this to come from the theme first??? - same as custom vc drawing/etc.? ... - - { - "theme" : { - "inlineArt" : { - "something" : "%MC and |01Pipe codes here" - } - } - } - - "pause" : { - "art" : "@inline:simplePrompt", - // support pipe codes & MCI - "simplePrompt" : "--------/ Pause /----------------", - "mci" : { - - } - } - */ - } -}