How to use
RetroTxt employs an open sourced license with the complete source code available on GitHub. This page instructs on how to use the source in both Chromium based and Firefox web browsers.
Visual Studio Code is used to create RetroTxt, and so it has some .vscode
conveniences included in the package such as workspace settings and extension recommendations.
There are also Node.js with yarn (or npm) dependencies for the programming and build tools.
The source code is linted with ESLint and stylised using Prettier, an opinionated formatter.
Download
Download the RetroTxt source code onto your local computer.
Run the following Git or gh command in a terminal.
Install build dependencies with yarn
If the installation of the tools is successful, this command should return the web-ext
version number.
Convert and compact a Truetype font into WOFF2 for use by RetroTxt.
Run RetroTxt in Firefox with automatic extension reloading.
Web-ext command line tool to help build, run, and test WebExtensions.
For this to work Firefox needs to be installed on your computer and then RetroTxt on Firefox will reload whenever a change is made to this source code.
Analyse the source code for any errors using Mozilla's web-ext lint tool.
Use on Chrome, Edge, Brave and Chromium
I suggest that you create a new user profile for use and to edit the Extension.
Open a new tab and type in the address of the Extension.
- In the Extensions tab, toggle Developer mode
- Click the Load unpacked button
- Navigate to the local directory containing the RetroTxt source code and select OK
RetroTxt should load. The Options link behind the Details button and allows you to configure RetroTxt styling and behaviour.
Use on Firefox
Firefox is locked down and doesn't permit the loading of extensions outside of the Firefox Add-ons page.
Mozilla's web-ext
tool is the easiest method to bypass this with a dedicated web page but requires Node.js.
- Install Node.js if needed
cd RetroTxt
into the cloned RetroTxt directory- Copy the Firefox manifest
cp ext/json/manifest_firefox.json ext/manifest.json
yarn
to install web-ext and dependenciesyarn run web-ext run -s=ext
to load RetroTxt in Firefox with automatic extension reloading
Applying config file: ./package.json
Running web extension from /RetroTxt/ext
Use --verbose or open Tools > Web Developer > Browser Console to see logging
Installed /RetroTxt/ext as a temporary add-on
The extension will reload if any source file changes
Press R to reload (and Ctrl-C to quit)
To restore the the Chrome manifest after you have quit Firefox.
Use on Firefox Developer Edition
- Edit
ext/.web-ext-firefox.js
- Update
- Follow the above Use on Firefox instructions
Directory and file structure
These are the directories and files that comprise of RetroTxt.
.github/
Github repo settings..vscode/
Workspace settings for Visual Studio Code.docs/
Documentation in Material for MkDocs markdown.fonts/
Original font packages with documentation and licences..eslintrc.json
ESLint configuration file..gitattributes
The Git settings file for this repository..gitignore
The Git file to exclude items from being checked into this repository.LICENSE
A copy of the GNU Lesser General Public License, Version 3.package.json
Yarn configuration file (npm compatible).
-
ext/
The RetroTxt Extension root directory. -
ext/_locales/
Spelling differences for the UK and US English. ext/_locales/en_US/messages.json
Also includes shared variables for remote URLs and BBS software names.ext/assets/snaps/
PNG screenshots used by the Options samples tab.ext/assets/svg/material-icons.svg
SVG icons for the Options tab.-
ext/assets/
PNG icons for RetroTxt. -
ext/css/
Extension Cascading Style Sheets in CSS3 syntax. bulma.min.css
Bulma CSS framework used by the Options tab.fonts_home.css
Font faces and classes for the _Home computers_fonts.fonts_ibm.css
Font faces and classes for the IBM PC & family fonts.fonts_modern.css
Font faces and classes for the Modern fonts.layout.css
Base elements styles.options.css
Styles specific for the Options tab.retrotxt_loader.css
An animated spinner to display during the RetroTxt processing.retrotxt.css
Scanlines, text size, the Mona font face and cursor stylings.text_animation-off.css
For the Blinking cursor and text off Option.text_colors_4bit-ice.css
ANSI Select Graphic Rendition iCE Color classes.text_colors_4bit.css
ANSI Select Graphic Rendition colour classes.text_colors_8bit.css
Xterm 256 colours for ANSI colour classes.text_colors_bbs.css
Shared BBS colours and font styles.text_colors_blink.css
Simulate terminal blinking text.text_colors_c64.css
Commodore 64 ANSI color pallete.text_colors_cga_0.css
CGA 0 ANSI color pallete.text_colors_cga_1.css
CGA 1 ANSI color pallete.text_colors_gray.css
Monochrome ANSI color pallete.text_colors_iigs.css
Apple IIGS ANSI color pallete.text_colors_pcboard.css
PCBoard BBS colour classes.text_colors_pipe.css
Renegade BBS and other BBS software colours.text_colors_vga.css
VGA ANSI color pallete.text_colors_workbench.css
Amiga Workbench ANSI color pallete.text_colors_wviv-pipe.css
WVIV BBS and other BBS software colours.text_colors_xterm.css
Xterm ANSI color pallete.text_colors.css
Colours, text pair classes.text_ecma_48.css
ANSI Select Graphic Rendition function classes.-
text_pagewrap.css
For the ANSI Page wrap on option. -
ext/fonts/
Compressed fonts used in RetroTxt. -
ext/html/options.html
HTML5 template for the Options page. -
ext/json/
JSON, human-readable data stores. manifest_chrome.json
Extension manifest file for Chromium based browsers.-
manifest_firefox.json
Extension manifest file for Firefox browsers. -
ext/scripts/
Extension JavaScripts in ES6+ (ES2015) syntax. eventpage.js
Background functions and listeners that are completely isolated from all other scripts.functions.js
Shared functions accessible to non-isolated scripts.options.js
Isolated functions for the Options page located atext/html/options.html
.parse_ansi.js
Functions to handle ANSI and ECMA-48 controls.parse_dos.js
Functions to handle text encodings and DOS code pages.-
retrotxt.js
Invokes RetroTxt, handles the browser page display and SAUCE metadata. -
ext/test/
Unit and sample test files. example_files/
ASCII and ANSI text test cases for use with thefiles:///
protocol.example_files/bbs_sheets/
BBS text test cases for use with thefiles:///
protocol.index.html
Entry point for the QUnit tests.qunit.css
QUnit stylesheet.qunit.js
QUnit JavaScript testing framework application.tests-eventpage.js
QUnit tests forext/scripts/eventpage.js
.tests-functions.js
QUnit tests forext/scripts/functions.js
.tests-options.js
QUnit tests forext/scripts/options.js
.tests-parse_ansi.js
QUnit tests forext/scripts/parse_ansi.js
.tests-parse_dos.js
QUnit tests forext/scripts/parse_dos.js
.-
tests-retrotxt.js
QUnit tests forext/scripts/retrotxt.js
. -
ext/manifest.json
In use, Extension manifest file containing read-only metadata and configuration options. ext/.web-ext-chrome.js
web-ext configuration file for packaging a Chrome distribution package.ext/.web-ext-firefox.js
web-ext configuration file for packaging a Firefox distribution and all other web-ext commands.