A wrapper to grab multiple mdBook together, and serve them altogether on a static site.
.
├── covers # directory where covers are stored
├── src
│ ├── cover.png # default cover for your books
│ ├── data.js # data wrapped by `manager.py`
│ ├── data.json # CONFIGURATION where you specify list of books and their directory
│ ├── script.js # JS for formatting the page
│ └── ...
├── index.html # Homepage / Bookshelf
├── manager.py # Manager to clear / export / serve books
└── ...{
"title": "Bookshelf",
"books": {
"book_code_1": {
"title": "Awesome Title 1",
"path": "absolute_dir_to_mdbook/book"
},
"book_code_2": {
"title": "Awesome Title 2",
"path": "absolute_dir_to_mdbook2/book"
}
}
}absolute_dir_to_mdbook
├── cover.png # Book cover, automatically generated if needed
├── book
│ ├── index.html # Home page for the book
│ └── ...
└── ...- Clearing all subdirectories
python manager.py clear
- deletes / unlinks all subdirectories except
src - this operation is done before
serveandexportcommand as well ⚠️ don't leave any valuable files in subdirectories!
- deletes / unlinks all subdirectories except
- Serving mdBooks
python manager.py serve
- creates junction (
mklink /J) to book directory - all book data can be accessed from
index.html
- creates junction (
- Exporting mdBooks
python manager.py export
- copies all books into subdirectory
- modifies path from
data.jsaccordingly - this folder can now be uploaded online for perfectly static service
- While it was designed for mdBook, it can serve as a bookshelf for any con
- For the spirit of mdBook,
manager.pywillhopefullybe rewritten in Rust. - Features to add
- editing
data.jsonthroughmanager.py- adding new books
- editing book information
- deleting books
- Some customization option (e.g. title, theme change) for
index.html
- editing
- I'm open for collaboration || suggestions
- mdBook
- Arthur's work on O'Really-like cover generator