Skip to main content

A minimalist document bundler designed for stitching hints, reminders and short docs.

Project description

Nanodoc
--------

Nanodoc is a minimalist document bundler designed for stiching hints, reminders and short docs.
Useful for prompts, personalized docs highlights for your teams or a note to your future self

No config, nothing to learn nor remember. Short , simple, sweet.

Features
--------

- No config, no tutorial, no pain.
- Combines multiple text files into a single document
- Adds clear title separators between pages
- Supports optional line numbering (per file or global)
- Can generate a table of contents
- Flexible file selection methods
- Customizable header styles and sequence numbering

Usage
-----

$ nanodoc file1.txt file2.txt


$ nanodoc -n file1.txt file2.txt # Per-file line numbering
$ nanodoc -nn file1.txt file2.txt # Global line numbering
$ nanodoc -nn --toc file1.txt file2.txt # Global numbering with TOC

File Selection Options
----------------------

Nanodoc is flexible in how you specify the files to bundle:

$ nanodoc <file-1>...<file-n> # individual files
$ nanodoc <dir-name> # all txt and md files in the dir will be included
$ nanodoc <dir-name> <file-1> # mix and match as yould like
$ nanodoc <bundle> # any .bundle.* file that is a list of paths, one per line
$ nanodoc <live-bundle> # a file that mixes text and file paths, where paths are replaced with their content

Get only parts of a file:

$ nanodoc readme.txt:L14-16,L30-50 # get the good parts only

Command Line Options
--------------------

- `-n`: Add per-file line numbering (01, 02, etc.)
- `-nn`: Add global line numbering: useful for referencing the full doc gen later
- `--toc`: Generate a table of contents at the beginning

Get fancy
---------

- `--seq`: numerical, roman or letter for ref the file sequence
- `--style`: nice (Human Readable (human-readable.txt), or file, or full-path

Save for later:
---------------

Generated a doc good enough to repeat, export the bundle

$nanodoc --export-bundle bestdocs.bundle.txt <file-1>...<file-n>

Keep it simple
--------------

Nothing to config.
Nothing to learn.
No tutorials to watch.

In fact, you've just went through the full documentation.
$ nanodoc --help # all there is


## Installation

nanodoc is available at a distributor near you:

# Using pip
pip install nanodoc

# Using Homebrew (macOS and Linux)
# First, add the tap (only needed once)
brew tap arthur-debert/nanodoc https://github.com/arthur-debert/nanodoc
brew install nanodoc
# To update to the latest version
brew update && brew upgrade nanodoc

# Using apt (Debian/Ubuntu) - Direct installation
wget https://github.com/arthur-debert/nanodoc/raw/main/Debian/python3-nanodoc_0.3.1-1_all.deb
sudo apt install ./python3-nanodoc_0.3.1-1_all.deb

# Using apt (Debian/Ubuntu) - Add as repository
# Add the repository to your sources
echo "deb [trusted=yes] https://raw.githubusercontent.com/arthur-debert/nanodoc/main/Debian ./" | sudo tee /etc/apt/sources.list.d/nanodoc.list
# Update package lists
sudo apt update
# Install the package
sudo apt install python3-nanodoc

# For more detailed APT installation instructions, see README-apt-repo.md

## Contributing

Contributions are welcome! Say hi, curse me for eternety or even send in something constructive.
Feel free to open issues or submit pull requests.

(just keep it short, we're nano people after all)

## License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanodoc-0.8.10.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanodoc-0.8.10-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file nanodoc-0.8.10.tar.gz.

File metadata

  • Download URL: nanodoc-0.8.10.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for nanodoc-0.8.10.tar.gz
Algorithm Hash digest
SHA256 63e8aef702a1f8aaf9b59d51a72e82782fcf7dc99d71a4aa5c3dc9d137b9596a
MD5 3a8ecb8e21bda2b9f952036e6f169400
BLAKE2b-256 de3dfd801db7125abbd86bee8cb63b434e75b2253686d22afdcbe3b3a5da8310

See more details on using hashes here.

File details

Details for the file nanodoc-0.8.10-py3-none-any.whl.

File metadata

  • Download URL: nanodoc-0.8.10-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for nanodoc-0.8.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1a4cfd7a711a5c645b766687e5d12e656ae29bde02f8c4f196b89dbc54a2c0
MD5 e2982b51012dfbf564479167cf90b391
BLAKE2b-256 406393643b1721ccf648a200eb6893adaad38c59fa00a25fec6758c49255aa0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page