38 lines
2.3 KiB
Markdown
38 lines
2.3 KiB
Markdown
# python-webgen
|
|
|
|
A set of python scripts and html templates to generate blog-style websites.
|
|
|
|
# Usage
|
|
|
|
For built in help, use the `--help` option.
|
|
|
|
## General Usage:
|
|
|
|
### Basic usage:
|
|
`python webgen.py <input folder> <output folder>`
|
|
This will use the default location for the template files (`./templates/`) and the css file (`./templates/stylesheet.css`).
|
|
This will also set the title to simply "Blog", use `--site_title` to change that.
|
|
|
|
### Example use:
|
|
`python webgen.py --site_title "Chloe's Blog" --title_all --css_file ~/css/custom_v2.css ~/Blog/posts/ ~/Blog/output/`
|
|
|
|
This will generate a site with a title of "Chloe's Blog," which will be applied to the HTML title of all the articles, in addition to the article title.
|
|
It will also use a custom CSS file from `~/css/custom_v2.css` which is different from the default.
|
|
The posts will come from a folder in the `~/Blog/posts/` folder and the completed HTML files will be placed in `~/Blog/output/`.
|
|
|
|
## Availible Arguments:
|
|
|
|
| Argument | Description |
|
|
|-----------------|-----------------------------------------------------------------------------------------------------------------------|
|
|
|`input_path` |The folder to read the markdown files from. |
|
|
|`output_path` |The folder to place the final HTML files in. |
|
|
|`--template_path`|The folder where the template HTML snippets are. Default: `./templates/` |
|
|
|`--css_file` |The location of a css file to copy to the output folder defined in `output_path`. Default: `./templates/stylesheet.css`|
|
|
|`--site_title` |The title shown on the main page. |
|
|
|`--title_all` |If enabled, add the main site title to the HTML Title field on the individual articles. |
|
|
|`-v` |More output. |
|
|
|
|
# TODO
|
|
- Add support for image folders
|
|
- Handle files correctly :3
|
|
- GUI interface?
|