Skip to main content

Doc site generator

Project description

bookit

Doc site generator

pypi

Overview

This Python program converts all files in a Git repository to markdown files. It's useful for creating doc sites of your code.

The converted markdown files are placed in a .bookit subdirectory. The directory structure inside .bookit is an exact mirror of the original repository.

Usage

python -m bookit /path/to/your/repo

How it works

Each file is converted into a markdown file, with the file name being the #title of the markdown file and the contents of the original file placed inside a code block, highlighted according to the original file's language.

Here's an example of the directory structure transformation:

Before:

repo/
├── README.md
├── file1.py
├── file2.js

After:

repo/
├── .bookit/
│ ├── file1.py.md
│ └── file2.py.md
├── README.md
├── file1.py
└── file2.js

DEV

Setup

make install

This will setup a virtualenv, upgrade pip, install dependencies, and install pre-commit

note: This does not activate your virtualenv! You must run source env/bin/activate to use the venv.

Test

make test

Format

make format
make lint

Version & Release

make version-<major/minor/patch>
make release

note Don't forget to git push with --tags

pre-commit

Setup

make install-pre-commit

Run all

make pre-commit

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

bookit-0.0.0.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file bookit-0.0.0.tar.gz.

File metadata

  • Download URL: bookit-0.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for bookit-0.0.0.tar.gz
Algorithm Hash digest
SHA256 3424e6370028fb1f2299536895d18f0bc598da5c1ff03df16fda9a5c73c72269
MD5 a1f784232c8076862a0d6fa5cd4a6c93
BLAKE2b-256 c08f3ed551ac8789d301bd45b35389bf62ab2fdf23fc4e3b962885c3ecd07207

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