This gem contains utilities to aid in the running of a number station.
Create the initial configuration:
number_station create_configThis creates ~/number_station/conf.yaml and copies template files (intro_message.txt, outro_message.txt, repeat_message.txt) to the same directory.
Manage agents using the agents subcommand:
Create an agent:
number_station agents create NAME [--location LOCATION] [--handler HANDLER]Activate/Deactivate:
number_station agents activate NAME [--start-date DATE]
number_station agents deactivate NAME [--end-date DATE]Update handler codeword:
number_station agents update-handler NAME HANDLERView agents:
number_station agents list # Active agents only
number_station agents list-all # All agents with history
number_station agents stats # Detailed statisticsCreate pads:
number_station pad create [--name AGENT] [--numpads NUM] [--length LENGTH]If --name is provided, creates pad in ~/number_station/pads/AGENT/ directory.
Defaults: 500 pads, 500 characters. Pad length is automatically rounded up to the nearest multiple of 5.
View pad statistics:
number_station pad stats [--path PATH]Shows pad statistics grouped by agent, including unconsumed pad counts.
Convert pad to AsciiDoc:
number_station convert_pad_to_asciidoc --padpath PAD_FILEConverts a pad file to AsciiDoc format with each pad as a chapter. Output saved as FILENAME.asciidoc.
Pads are formatted in groups of 5 characters with page breaks after every 2nd pad.
Convert pad to LaTeX:
number_station convert_pad_to_latex --padpath PAD_FILEConverts a pad file to LaTeX format with landscape orientation. Output saved as FILENAME.tex.
Pads are formatted in groups of 5 characters, arranged in a 2x2 grid (4 pads per page), with each pad taking up one quadrant of the page.
Convert to PDF:
number_station convert_to_pdf INPUT_FILEConverts an AsciiDoc (.asciidoc or .adoc) or LaTeX (.tex) file to PDF.
+ For AsciiDoc files: Uses asciidoctor-pdf. Requires asciidoctor-pdf gem to be installed.
+ For LaTeX files: Uses pdflatex. Requires a LaTeX distribution (e.g., texlive) to be installed.
+
Output saved as FILENAME.pdf in the same directory.
Encrypt:
number_station encrypt [MESSAGE] [--file FILE] [--agent AGENT] [--padpath PADPATH] [--numpad NUMPAD]If --agent is provided, searches for oldest pad in agent-specific directory.
Only active agents can encrypt messages.
Decrypt:
number_station decrypt [MESSAGE] [--file FILE] [--padpath PADPATH] [--numpad NUMPAD]Convert to phonetic:
number_station convert_to_phonetic FILE [--intro INTRO_FILE] [--outro OUTRO_FILE] [--repeat REPEAT_FILE]Converts encrypted message to phonetic alphabet. Output saved as FILENAME_phonetic.txt.
Intro, outro, and repeat messages are included as-is (not converted).
Convert to espeak XML:
number_station convert_to_espeak PHONETIC_FILEGenerates GLaDOS-style espeak XML file. Output saved as FILENAME.xml.
Generate MP3:
number_station convert_to_mp3 XML_FILEConverts XML to MP3 using espeak and ffmpeg. Output saved as FILENAME.mp3.
Play audio:
number_station espeak XML_FILEPlays the XML file using espeak with GLaDOS voice settings.
Contributions are welcome, please fork the repo, create a branch, add your code, and make a PR against master on this repo. For more information see CONTRIBUTING.asciidoc
number_station is distributed under the GPL 3.0 licence. For more information see the COPYING.asciidoc file.