Documentation ¶
Overview ¶
Retrotxt for the terminal. Read legacy code page and ANSI encoded text files in a modern Unicode terminal.
Text files and art created before the adoption of Unicode often fail to display on modern systems. Use RetroTxt to print legacy text on modern terminals. Or save it to a Unicode file for use in other apps. Otherwise, when using most terminal apps, legacy text is often malformed and unreadable.
Features ¶
- Print legacy code page encoded texts in a modern terminal.
- Print or export the details of the text files.
- Print or export the SAUCE metadata of a file.
- Transform legacy encoded texts and text art into UTF-8 documents for use on the web or with modern systems.
- Lookup and print code page character tables for dozens of encodings.
- Support for ISO, PC-DOS/Windows code pages plus IBM EBCDIC, Macintosh, and ShiftJIS.
- Use io redirection with piping support.
Usage:
retrotxt [command]
The commands are:
dec Conversion of decimal to hexadecimal numbers hex Conversion of hexadecimal to decimal numbers lang List the natural languages of legacy code pages list List the legacy code pages that Retrotxt can convert to UTF-8 table Display one or more code page tables showing all the characters in use tables Display the characters of every code page table in use info Information on a text file view Print a text file to the terminal using standard output dump Dump the hex data of files to the terminal example List the included sample text files available for use with the info and view commands
Examples ¶
To display information about a text file:
retrotxt info [filenames]
To display information about a file in JSON format:
retrotxt info [filenames] --format json
To display a text file to the terminal:
retrotxt view [filenames]
To display a text file to the terminal by supplying the source encoding:
retrotxt view [filenames] --input iso-8859-1
To list the sample text files:
retrotxt example
To list the supported code page encodings with names and aliases:
retrotxt list
To list the supported code pages and characters as tables:
retrotxt tables
To list the a code page and characters as a table:
retrotxt table [code page names or aliases]
To list both the table of Code Page 437 and ISO 8859-1 using aliases:
retrotxt table cp437 latin1
To list the target natural languages of the supported code pages:
retrotxt lang
Directories ¶
Path | Synopsis |
---|---|
Package byter provides functions that manipulate or return byte arrays.
|
Package byter provides functions that manipulate or return byte arrays. |
Package cmd handles the terminal interface, user flags and arguments.
|
Package cmd handles the terminal interface, user flags and arguments. |
example
Package example provides help usage examples for the cmd package.
|
Package example provides help usage examples for the cmd package. |
hexa
Package hexa provides rudimental hexadecimal conversion functions.
|
Package hexa provides rudimental hexadecimal conversion functions. |
internal/flag
Package flag provides the command flags handlers.
|
Package flag provides the command flags handlers. |
internal/format
Package format handles the text output, syntax options.
|
Package format handles the text output, syntax options. |
internal/info
Package info provides the info command run function.
|
Package info provides the info command run function. |
internal/view
Package view provides the view command run function.
|
Package view provides the view command run function. |
list
Package list provides the list command run function.
|
Package list provides the list command run function. |
online
Package online is for simple HTTP interactions with the GitHub API.
|
Package online is for simple HTTP interactions with the GitHub API. |
update
Package update provides the ability to check GitHub for the newest release tag.
|
Package update provides the ability to check GitHub for the newest release tag. |
version
Package version provides the stdout template for the version flag.
|
Package version provides the stdout template for the version flag. |
Package convert extends the interface for the character encodings that transform text to and from Unicode UTF-8.
|
Package convert extends the interface for the character encodings that transform text to and from Unicode UTF-8. |
Package fsys handles the opening, reading and writing of files.
|
Package fsys handles the opening, reading and writing of files. |
Package info that extracts and returns file statistics and metadata.
|
Package info that extracts and returns file statistics and metadata. |
internal
|
|
Package logs handles the formatting and returning of errors.
|
Package logs handles the formatting and returning of errors. |
Package meta handles the metadata generated through the go builder using ldflags.
|
Package meta handles the metadata generated through the go builder using ldflags. |
Package nl provides line break characters for multiple system and microcomputer platforms.
|
Package nl provides line break characters for multiple system and microcomputer platforms. |
Package sample opens and encodes the example embedded text files.
|
Package sample opens and encodes the example embedded text files. |
Package table creates a table of all the characters in the named 8-bit character set.
|
Package table creates a table of all the characters in the named 8-bit character set. |
Package term provides colors and text formatting for the terminal.
|
Package term provides colors and text formatting for the terminal. |
Package xud provides X User Defined, character encodings.
|
Package xud provides X User Defined, character encodings. |