Minibook for reporting
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
📦 minibook
📚 MiniBook
MiniBook is a simple tool that creates a minibook from a list of links. It supports two different output formats:
- HTML - A clean, responsive webpage using Jinja2 templates and Tailwind CSS
- MkDocs - A complete MkDocs project structure that can be built into a static site
📋 Usage
MiniBook can be used to create either an HTML page or an MkDocs project from a list of links.
Examples
HTML Output
Create an HTML page with a custom title and three links:
minibook --title "My Favorite Sites" \
--format html \
--links '{"python": "https://www.python.org", "github": "https://www.github.com", "wikipedia": "https://www.wikipedia.org"}'
MkDocs Output
Create an MkDocs project with a custom title and three links:
minibook --title "My Favorite Sites" \
--format mkdocs \
--output minibook_site \
--links '{"python": "https://www.python.org", "github": "https://www.github.com", "wikipedia": "https://www.wikipedia.org"}'
After generating the MkDocs project, you can build and serve it using MkDocs:
cd minibook_site
mkdocs build # Build the site
mkdocs serve # Serve the site locally at http://127.0.0.1:8000/
Different JSON Formats for Links
MiniBook supports several JSON formats for the `links' parameter:
- Dictionary Format (used in previous examples):
minibook --title "My Favorite Sites" \
--links '{"python": "https://www.python.org", "github": "https://www.github.com", "wikipedia": "https://www.wikipedia.org"}'
- List of Objects Format:
minibook --title "My Favorite Sites" \
--links '[{"name": "Python", "url": "https://www.python.org"}, {"name": "GitHub", "url": "https://www.github.com"}, {"name": "Wikipedia", "url": "https://www.wikipedia.org"}]'
- List of Arrays Format:
minibook --title "My Favorite Sites" \
--links '[["Python", "https://www.python.org"], ["GitHub", "https://www.github.com"], ["Wikipedia", "https://www.wikipedia.org"]]'
- Multi-line JSON Format (useful in YAML files):
minibook --title "My Favorite Sites" \
--links '{
"Python": "https://www.python.org",
"GitHub": "https://www.github.com",
"Wikipedia": "https://www.wikipedia.org"
}'
These formats allow you to specify different names for each link, rather than using the URL as the name.
Validating Links
You can validate that all links are accessible before creating the minibook:
minibook --title "My Favorite Sites" \
--links '{"python": "https://www.python.org", "github": "https://www.github.com"}' \
--validate-links
This will check each link to ensure it's accessible. If any links are invalid, you'll be prompted to continue or abort.
🔄 GitHub Action
MiniBook is also available as a GitHub Action that you can use in your workflows to generate documentation sites.
Using the Action
To use the MiniBook action in your GitHub workflow:
- name: Generate Minibook
uses: tschm/minibook/.github/actions/minibook@main
with:
title: "My Documentation"
description: "Documentation for my project"
output: "docs"
links: |
{
"GitHub": "https://github.com",
"Tests": "./tests/index.html",
"API Reference": "./api/index.html"
}
Action Inputs
| Input | Description | Required | Default |
|---|---|---|---|
title |
Title of the minibook | No | "My Links" |
description |
Description of the minibook | No | "" |
output |
Output directory | Yes | N/A |
links |
JSON formatted links | Yes | N/A |
format |
Output format: html or mkdocs | No | "html" |
timestamp |
Fixed timestamp for testing purposes | No | "" |
Complete Example
Here's a complete workflow example that generates a minibook and deploys it to GitHub Pages:
name: "Documentation"
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate API docs
# Your API documentation generation step here
# This could be another action or custom script
- name: Generate Minibook
uses: tschm/minibook/.github/actions/minibook@main
with:
title: "Project Documentation"
description: "Documentation and useful links for the project"
output: "docs"
links: |
{
"GitHub": "https://github.com/username/repo",
"API Reference": "./api/index.html",
"User Guide": "./guide/index.html"
}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
👥 Contributing
- 🍴 Fork the repository
- 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
- 💾 Commit your changes (git commit -m 'Add some amazing feature')
- 🚢 Push to the branch (git push origin feature/amazing-feature)
- 🔍 Open a Pull Request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minibook-0.0.7.tar.gz.
File metadata
- Download URL: minibook-0.0.7.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee5d11bb9358b841f19e6433cb172024558b67555c3873a6fe20cd43e929d0b9
|
|
| MD5 |
b4da71fa6eabdd8e64ee4ba0eb728f33
|
|
| BLAKE2b-256 |
66e3ed3834e34ec694f6857950b564ea362a34feab5240e22b4bee3d6829dee8
|
Provenance
The following attestation bundles were made for minibook-0.0.7.tar.gz:
Publisher:
release.yml on tschm/minibook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minibook-0.0.7.tar.gz -
Subject digest:
ee5d11bb9358b841f19e6433cb172024558b67555c3873a6fe20cd43e929d0b9 - Sigstore transparency entry: 251928758
- Sigstore integration time:
-
Permalink:
tschm/minibook@af3eba3a33fa0b79e6b37a607f6fc19caaa28ee8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af3eba3a33fa0b79e6b37a607f6fc19caaa28ee8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file minibook-0.0.7-py3-none-any.whl.
File metadata
- Download URL: minibook-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ee8726c5609cd4f988fc7c442674879ec985c76f598537c00cd6d61814e218b
|
|
| MD5 |
2c905b3878193da618ed618c33ed04f6
|
|
| BLAKE2b-256 |
f57b76d8c53f5fb3f4d45a9cfa5f79302aefcf6ed5bbcac2ab23ded547a19500
|
Provenance
The following attestation bundles were made for minibook-0.0.7-py3-none-any.whl:
Publisher:
release.yml on tschm/minibook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minibook-0.0.7-py3-none-any.whl -
Subject digest:
2ee8726c5609cd4f988fc7c442674879ec985c76f598537c00cd6d61814e218b - Sigstore transparency entry: 251928766
- Sigstore integration time:
-
Permalink:
tschm/minibook@af3eba3a33fa0b79e6b37a607f6fc19caaa28ee8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af3eba3a33fa0b79e6b37a607f6fc19caaa28ee8 -
Trigger Event:
workflow_dispatch
-
Statement type: