0.0
No release in over 3 years
Low commit activity in last 3 years
(WIP) A collection of utilities to aid in running your own number station!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 13.0
~> 2.0

Runtime

~> 1.5
 Project Readme

number_station

This gem contains utilities to aid in the running of a number station.

Gem Version

Installation

gem install number_station

Usage

Configuration

Create the initial configuration:

number_station create_config

This creates ~/number_station/conf.yaml and copies template files (intro_message.txt, outro_message.txt, repeat_message.txt) to the same directory.

Agent Management

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 HANDLER

View agents:

number_station agents list              # Active agents only
number_station agents list-all          # All agents with history
number_station agents stats             # Detailed statistics

One-Time Pads

Create 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_FILE

Converts 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_FILE

Converts 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_FILE

Converts 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.

Message Encryption/Decryption

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]

Phonetic Conversion

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_FILE

Generates GLaDOS-style espeak XML file. Output saved as FILENAME.xml.

Generate MP3:

number_station convert_to_mp3 XML_FILE

Converts XML to MP3 using espeak and ffmpeg. Output saved as FILENAME.mp3.

Play audio:

number_station espeak XML_FILE

Plays the XML file using espeak with GLaDOS voice settings.

Contributing

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

Licence

number_station is distributed under the GPL 3.0 licence. For more information see the COPYING.asciidoc file.

Number Station Resources