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 generates a clean, responsive HTML webpage using Jinja2 templates and Tailwind CSS.
📋 Usage
MiniBook can be used to create an HTML page from a list of links.
Example
Create an HTML page with a custom title and three links:
minibook --title "My Favorite Sites" \
--links '{"python": "https://www.python.org", "github": "https://www.github.com", "wikipedia": "https://www.wikipedia.org"}'
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/book@main
with:
title: "My Documentation"
subtitle: "Documentation for my project"
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" |
subtitle |
Description of the minibook | No | "" |
links |
JSON formatted links | Yes | N/A |
template |
Path to a custom Jinja2 template file for HTML output | 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 and Deploy to GitHub Pages
uses: tschm/minibook/.github/actions/book@main
with:
title: "Project Documentation"
subtitle: "Documentation and useful links for the project"
links: |
{
"GitHub": "https://github.com/username/repo",
"API Reference": "./api/index.html",
"User Guide": "./guide/index.html"
}
👥 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.11.tar.gz.
File metadata
- Download URL: minibook-0.0.11.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3649be4edeb6519644b90651eedf867a6a822c276686f46167cc6ba5a63709c0
|
|
| MD5 |
e4f4107c1529184ccd9bd14e60dd45bb
|
|
| BLAKE2b-256 |
ff3d19f455de01b5a4fd316de3073f7d808c9e639b413c488e8d96c56def15c2
|
Provenance
The following attestation bundles were made for minibook-0.0.11.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.11.tar.gz -
Subject digest:
3649be4edeb6519644b90651eedf867a6a822c276686f46167cc6ba5a63709c0 - Sigstore transparency entry: 253061011
- Sigstore integration time:
-
Permalink:
tschm/minibook@f10e20191a9b68b1d9b7778731a2cb2184d026ce -
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@f10e20191a9b68b1d9b7778731a2cb2184d026ce -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file minibook-0.0.11-py3-none-any.whl.
File metadata
- Download URL: minibook-0.0.11-py3-none-any.whl
- Upload date:
- Size: 7.7 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 |
da7e9f79c4db94fd7e47292bca6acdb36388bebf74b280c36293e641c22c3540
|
|
| MD5 |
b9f631d66bbc334bebc5a81df77de677
|
|
| BLAKE2b-256 |
38fb4a40a11c208fbd838aa02a95ccaa9c29de91a5b35f109e7d285817175f3c
|
Provenance
The following attestation bundles were made for minibook-0.0.11-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.11-py3-none-any.whl -
Subject digest:
da7e9f79c4db94fd7e47292bca6acdb36388bebf74b280c36293e641c22c3540 - Sigstore transparency entry: 253061025
- Sigstore integration time:
-
Permalink:
tschm/minibook@f10e20191a9b68b1d9b7778731a2cb2184d026ce -
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@f10e20191a9b68b1d9b7778731a2cb2184d026ce -
Trigger Event:
workflow_dispatch
-
Statement type: