A simple python
script to generate a README.md
file. Expose your project's structure and cli
usage in a programmatic way.
Easy to use in github actions, nix
derivations, or any other nix
build system.
This repo's README.md
was generated with readme-py
and github-actions
. Check out the the simple readme.yml
.
readme-py --dir --links --flake-show --header header.md --footer footer.md
An example generation of a README.md
can be generated with the following command:
nix run github:erictossell/readme-py -- --output TEST.md --author erictossell --repo readme-py --dir --links --usage --flake-info --flake-show --header header.md --footer footer.md
usage: readme-py [-h] [-a AUTHOR] [-r REPO] [-o OUTPUT] [-d] [-l] [-u] [-fs]
[-fi] [-hmd HEADER] [-fmd FOOTER] [-unr]
Generate README.md content.
options:
-h, --help show this help message and exit
-a AUTHOR, --author AUTHOR
GitHub username
-r REPO, --repo REPO GitHub repository name
-o OUTPUT, --output OUTPUT
Output file to write to, defaults to README.md
-d, --dir Include directory tree structure
-l, --links Turn directory tree into Markdown links
-u, --usage Include CLI application usage by building with nix
-fs, --flake-show Include nix flake show output
-fi, --flake-info Include nix flake info output
-hmd HEADER, --header HEADER
Path to a header markdown file
-fmd FOOTER, --footer FOOTER
Path to a footer markdown file
-unr, --use-nix-run Use nix and GitHub to run the CLI help command,
requires an author
Resolved URL: git+file:///home/runner/work/readme-py/readme-py?shallow=1
Locked URL: git+file:///home/runner/work/readme-py/readme-py?ref=refs/heads/main&rev=45ab52e057922b80448ff203d6d97b334e7fd0b7&shallow=1
Description: Readme generator
Path: /nix/store/8hqq3pd84alnlh2cm0cvx4krqdkdixzq-source
Revision: 45ab52e057922b80448ff203d6d97b334e7fd0b7
Last modified: 2024-05-12 00:11:18
Inputs:
├───flake-utils: github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a
│ └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e
├───nixpkgs: github:NixOS/nixpkgs/f1010e0469db743d14519a1efd37e23f8513d714
└───poetry2nix: github:nix-community/poetry2nix/291a863e866972f356967d0a270b259f46bf987f
├───flake-utils: github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a
│ └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e
├───nix-github-actions: github:nix-community/nix-github-actions/5163432afc817cf8bd1f031418d1869e4c9d5547
│ └───nixpkgs follows input 'poetry2nix/nixpkgs'
├───nixpkgs follows input 'nixpkgs'
├───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e
└───treefmt-nix: github:numtide/treefmt-nix/c6aaf729f34a36c445618580a9f95a48f5e4e03f
└───nixpkgs follows input 'poetry2nix/nixpkgs'
git+file:///home/runner/work/readme-py/readme-py?ref=refs/heads/main&rev=45ab52e057922b80448ff203d6d97b334e7fd0b7&shallow=1
├───devShells
│ ├───aarch64-darwin
│ │ └───default: development environment 'nix-shell'
│ ├───aarch64-linux
│ │ └───default: development environment 'nix-shell'
│ ├───x86_64-darwin
│ │ └───default: development environment 'nix-shell'
│ └───x86_64-linux
│ └───default: development environment 'nix-shell'
├───formatter
│ ├───aarch64-darwin: package 'nixpkgs-fmt-1.3.0'
│ ├───aarch64-linux: package 'nixpkgs-fmt-1.3.0'
│ ├───x86_64-darwin: package 'nixpkgs-fmt-1.3.0'
│ └───x86_64-linux: package 'nixpkgs-fmt-1.3.0'
└───packages
├───aarch64-darwin
│ ├───default: package 'python3.11-readme-py-0.1.0'
│ └───readme-py: package 'python3.11-readme-py-0.1.0'
├───aarch64-linux
│ ├───default: package 'python3.11-readme-py-0.1.0'
│ └───readme-py: package 'python3.11-readme-py-0.1.0'
├───x86_64-darwin
│ ├───default: package 'python3.11-readme-py-0.1.0'
│ └───readme-py: package 'python3.11-readme-py-0.1.0'
└───x86_64-linux
├───default: package 'python3.11-readme-py-0.1.0'
└───readme-py: package 'python3.11-readme-py-0.1.0'