TEXTNET Help Documentation
.--------------------------------------------------------------------------.
| TEXTNET 1.1 (Jul 8, 2025) - A Python-based Finger Client (RFC 1288) |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| The latest version of this documentation is always included within the |
| script itself and can be accessed using: |
| |
| textnet -helpdoc | less |
| or |
| textnet --helpdoc > filename.txt |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Description |
|--------------------------------------------------------------------------|
| |
| textnet is a Python-based finger client with support for additional |
| text-only protocols. Currently supported: |
| |
| * finger:// |
| * dict:// |
| * Quote of the Day |
| * whois |
| |
| Additional features include smart text wrapping, rendering finger output |
| as preformatted HTML with clickable links, and quick script editing using|
| the "-e" flag. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Finger Usage |
|--------------------------------------------------------------------------|
| |
| * textnet @domain.com # Query host |
| * textnet user@domain.com # Query specific user |
| * textnet @localhost # fingerd must be installed locally |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Command Line Options |
|--------------------------------------------------------------------------|
| |
| -v --version Show version info |
| -h --help, -?, /? Show this help message |
| -l --license Display full Blue Oak Model License 1.0.0 |
| -les --les Display 'About Les Earnest' |
| ------------------------------------------------------------------------ |
| -e --edit Open script with default editor (uses sudo)|
| -w --wrap Smart wrap (default: 80). Uses fold & less |
| -r --render Output HTML with clickable links |
| -t --timeout <seconds> Set connection timeout (default: 5 seconds)|
| ------------------------------------------------------------------------ |
| -q --qotd Query djxmmx.net: Quote of the Day server |
| -d --define <word> Define a word using WordNet at dict.org |
| -s --synonym <word> Query Moby Thesaurus at dict.org |
| -whois --whois <domain> Perform a WHOIS lookup on a domain |
| ------------------------------------------------------------------------ |
| -helpdoc --helpdoc Extended Help Documentation with Examples |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Configurable Environment Variables |
|--------------------------------------------------------------------------|
| |
| SCRIPT_MAX_BYTES Maximum bytes allowed per request (default: 100,000) |
| SCRIPT_EDITOR Editor used for -e / --edit (default: xed) |
| FIXED_WRAP_WIDTH Set terminal wrap width (default: 80) |
| SCRIPT_NAME Rename the script (default: "textnet") |
| |
| To change these defaults, simply edit the script and update the values. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Configurable Hard-Coded Defaults |
|--------------------------------------------------------------------------|
| |
| dict:// protocol: You can change the default host or dictionary used by |
| the -d (--define) flag by editing the script directly. Look for: |
| |
| "def define_word(word, host='dict.org'" and follow the comment there. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Installation |
|--------------------------------------------------------------------------|
| |
| * install: |
| chmod +x textnet |
| sudo install textnet /usr/local/bin |
| |
| * uninstall: |
| sudo rm /usr/local/bin/textnet |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Compatibility |
|--------------------------------------------------------------------------|
| |
| This script is primarily developed for Linux. |
| |
| All features are fully compatible with macOS. |
| |
| Nearly all features should work on Windows, though the script was not |
| specifically written for that platform. Windows support is best-effort |
| as I am unable to test on that system. |
| |
| For Windows users, there is currently only one known limitation: |
| |
| --wrap (relies on the Linux 'fold' command and is not supported) |
| |
| All other features are fully supported on Windows. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Changelog |
|--------------------------------------------------------------------------|
| |
| Version 1.1 (Jul 8, 2025) |
| - Added synonym flags (-s and --synonym) |
| |
| Version 1.0 (Jul 7, 2025) |
| - Initial public release |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Credits |
|--------------------------------------------------------------------------|
| |
| textnet was created and is maintained by: |
| https://640kb.neocities.org |
| |
| Copyright (c) 2025 https://640kb.neocities.org |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| License |
|--------------------------------------------------------------------------|
| |
| textnet is licensed under the Blue Oak Model License 1.0.0 |
| |
| https://blueoakcouncil.org/license/1.0.0 |
| |
| Run `textnet --license` to view the full license. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| T E X T N E T B Y E X A M P L E |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Finger Client: General Usage |
|--------------------------------------------------------------------------|
| |
| textnet @happynetbox.com |
| textnet user@happynetbox.com |
| |
| Basic finger usage, similar to most clients. |
| ------------------------------------------------------------------------ |
| textnet fingerverse@happynetbox.com | less |
| |
| Useful for reading long .plan files, like the 'fingerverse'. |
| ------------------------------------------------------------------------ |
| textnet -w username@plan.cat |
| |
| Uses the -w (--wrap) flag to ensure line breaks occur at word boundaries.|
| The default width is 80 columns but can be changed via an environment |
| variable. |
| ------------------------------------------------------------------------ |
| textnet @plan.cat | head -n 20 |
| |
| Some servers return large user lists. The 'head -n 20' command limits |
| the output to the first 20 lines. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Smart Word Wrap |
|--------------------------------------------------------------------------|
| |
| textnet -w user@plan.cat |
| textnet --wrap user@happynetbox.com |
| |
| Some finger responses may exceed your terminal width, causing lines to |
| wrap awkwardly and split words. |
| |
| The --wrap option enables smart word-wrapping and allows you to set the |
| terminal width where wrapping should occur. |
| |
| The default width is 80 columns but can be changed by setting the |
| FIXED_WRAP_WIDTH environment variable. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Text to HTML Rendering |
|--------------------------------------------------------------------------|
| |
| textnet -r user@plan.cat > output.html |
| textnet --render user@plan.cat > output.html |
| |
| This option converts the response to a simple HTML file. It adds |
| <html><pre> at the top, makes URLs clickable, and ends the file with |
| </pre></html>. |
| |
| The core purpose of this feature is to make links clickable. Text |
| formatting is otherwise left unchanged. |
| |
| Supported link protocols: |
| |
| http:// https:// finger:// gemini:// spartan:// gopher:// |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Word Lookup via the Dictionary Protocol |
|--------------------------------------------------------------------------|
| |
| textnet -d <word> |
| textnet --define <word> |
| |
| Looks up the word using dict.org and the WordNet (wn) dictionary. |
| |
| Both the server (dict.org) and the dictionary (wn) can be changed by |
| editing the script. Search for: |
| |
| def define_word(word, host='dict.org', timeout=5): |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Synonym Lookup via the Dictionary Protocol |
|--------------------------------------------------------------------------|
| |
| textnet -s <word> |
| textnet --synonym <word> |
| |
| Queries dict.org using the Moby Thesaurus for synonyms of the word. |
| |
| Both the server (dict.org) and the dictionary (moby-thesaurus) can be |
| changed by editing the script. Search for: |
| |
| def synonym_lookup(word, host='dict.org', timeout=5): |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| whois: Domain and IP Lookup |
|--------------------------------------------------------------------------|
| |
| textnet -whois example.com |
| textnet --whois 192.0.2.1 |
| |
| Performs WHOIS lookups on domains and IP addresses. |
| |
| WHOIS remains one of the few widely used text-based network protocols. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Instantly Edit This Script |
|--------------------------------------------------------------------------|
| |
| textnet -e |
| textnet --edit |
| |
| Use the -e or --edit flag alone; no additional parameters are needed. |
| |
| Opens this script in the default editor with sudo privileges (sudo for |
| Linux & macOS only). This lets you quickly edit the script without having|
| to locate it manually. |
| |
'--------------------------------------------------------------------------'
.--------------------------------------------------------------------------.
| Quote of the Day (server) |
|--------------------------------------------------------------------------|
| |
| textnet -q |
| textnet --quote |
| |
| Use the -q or --quote flag alone; no additional parameters are needed. |
| |
| Queries one of the last remaining 'Quote of the Day' (QOTD) servers |
| (RFC 865) for a random quote. |
| |
'--------------------------------------------------------------------------'