Name | cpfr-rattlesnake JSON |
Version |
1.0.4
JSON |
| download |
home_page | |
Summary | A simple static-site generator for Python3, using markdown and the Jinja2 templating engine |
upload_time | 2023-12-09 10:10:54 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
static site generator
website
gitlab pages
jinja
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Rattlesnake Static Site Generator
Rattlesnake is a static website generator.
It is written in the Python programming language and utilizes the Jinja templating engine, pySCSS for SCSS support, as well as the pyYaml library for parsing config files.
See <a href="https://pac4.gitlab.io/rattlesnake/">https://pac4.gitlab.io/rattlesnake/</a> for more information.
## Usage
Rattlesnake needs the following things:
- A `config.yml` file that contains configuration properties and variables for the site rendering
- A `src` folder that contains the source files for the website.
- It generates a `build` directory that will contain the ready-to-deploy website after running the build script.
The build follows the convention that files starting with an underscore (e.g. `_header.html`) are not built as pages, but used as template files via *Jinja*. All HTML files not starting with an underscore will be converted into pages. Files with the name `index.html` will keep their relative path. However, all other HTML files will be moved into a directory with the same name as the original file (without extension) and stored as an `index.html` inside that folder. This means that a file `./src/about.html` will be processed into a file `./build/about/index.html`. This is due to the way the browser and the web server handle paths. This creates nicer looking URLs (`https://youwebsite.org/about` instead of `https://youwebsite.org/about.html`).
## Command-Line Interface
```
usage: rattlesnake [-h] [-w] [-o OUTPUT_DIR] [-p PORT] [-c CONFIG_FILE] [-a ADDITIONAL_CONFIG] [source_dir]
This tool converts your markdown text and HTML into a static website.
positional arguments:
source_dir
options:
-h, --help show this help message and exit
-w, --watch
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
-p PORT, --port PORT
-c CONFIG_FILE, --config-file CONFIG_FILE
-a ADDITIONAL_CONFIG, --additional-config ADDITIONAL_CONFIG
```
- By default, `./src` is used as the input directory. This can be changed by specifying a different path as the first argument.
- By default, `./build` is used as the output directory. This can be changed by specifying a different path using the `--output-dir` option.
- By default, `./config.yml` is used as the config file for parameters and template variables. This can be changed by specifying a different file path using the `--config-file` option.
- The `--watch` option keeps the script running after the build process and watches the source directory for file changes. Further, it starts an HTTP server that serves the built website.
- The `--port` option allows the user to specify a port if the --watch flag is given. If no custom port is provided, port `8000` is used.
- The `--additional-config` option can be used in order to load an additional config yaml file that supplement or overrides the default values. This can be useful for different deployment targets.
# Version History
- 1.0.4: adding fenced code blocks to markdown parsing
- 1.0.3: introducing meta-variables for page paths
- `_target_path` points to the path of the page relative to the website's base url
- `_source_path` points to the path of the source file relative to the input directory
- 1.0.2: Bugfixes
- directories starting with an underscore are also skipped (not just files)
- adding date formatting filter to Jinja parser (`{{ some_date | format_date("%d.%m.%Y") }}`)
- 1.0.0: Initial Implementation
Raw data
{
"_id": null,
"home_page": "",
"name": "cpfr-rattlesnake",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "static site generator,website,gitlab pages,jinja",
"author": "",
"author_email": "Carsten Pfeffer <pfeffer.carsten@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c3/29/a317d431be98c3f0fd1f6aa1c6e3cbc75bd4815017bedc26caf648e2da21/cpfr-rattlesnake-1.0.4.tar.gz",
"platform": null,
"description": "# Rattlesnake Static Site Generator\nRattlesnake is a static website generator.\nIt is written in the Python programming language and utilizes the Jinja templating engine, pySCSS for SCSS support, as well as the pyYaml library for parsing config files.\n\nSee <a href=\"https://pac4.gitlab.io/rattlesnake/\">https://pac4.gitlab.io/rattlesnake/</a> for more information.\n\n## Usage\n\nRattlesnake needs the following things:\n\n- A `config.yml` file that contains configuration properties and variables for the site rendering\n- A `src` folder that contains the source files for the website.\n- It generates a `build` directory that will contain the ready-to-deploy website after running the build script.\n\nThe build follows the convention that files starting with an underscore (e.g. `_header.html`) are not built as pages, but used as template files via *Jinja*. All HTML files not starting with an underscore will be converted into pages. Files with the name `index.html` will keep their relative path. However, all other HTML files will be moved into a directory with the same name as the original file (without extension) and stored as an `index.html` inside that folder. This means that a file `./src/about.html` will be processed into a file `./build/about/index.html`. This is due to the way the browser and the web server handle paths. This creates nicer looking URLs (`https://youwebsite.org/about` instead of `https://youwebsite.org/about.html`). \n\n## Command-Line Interface\n```\nusage: rattlesnake [-h] [-w] [-o OUTPUT_DIR] [-p PORT] [-c CONFIG_FILE] [-a ADDITIONAL_CONFIG] [source_dir]\n\nThis tool converts your markdown text and HTML into a static website.\n\npositional arguments:\n source_dir\n\noptions:\n -h, --help show this help message and exit\n -w, --watch\n -o OUTPUT_DIR, --output-dir OUTPUT_DIR\n -p PORT, --port PORT\n -c CONFIG_FILE, --config-file CONFIG_FILE\n -a ADDITIONAL_CONFIG, --additional-config ADDITIONAL_CONFIG\n```\n\n- By default, `./src` is used as the input directory. This can be changed by specifying a different path as the first argument.\n- By default, `./build` is used as the output directory. This can be changed by specifying a different path using the `--output-dir` option.\n- By default, `./config.yml` is used as the config file for parameters and template variables. This can be changed by specifying a different file path using the `--config-file` option.\n- The `--watch` option keeps the script running after the build process and watches the source directory for file changes. Further, it starts an HTTP server that serves the built website.\n- The `--port` option allows the user to specify a port if the --watch flag is given. If no custom port is provided, port `8000` is used.\n- The `--additional-config` option can be used in order to load an additional config yaml file that supplement or overrides the default values. This can be useful for different deployment targets.\n\n# Version History\n\n- 1.0.4: adding fenced code blocks to markdown parsing\n- 1.0.3: introducing meta-variables for page paths\n - `_target_path` points to the path of the page relative to the website's base url\n - `_source_path` points to the path of the source file relative to the input directory\n- 1.0.2: Bugfixes\n - directories starting with an underscore are also skipped (not just files)\n - adding date formatting filter to Jinja parser (`{{ some_date | format_date(\"%d.%m.%Y\") }}`)\n- 1.0.0: Initial Implementation\n",
"bugtrack_url": null,
"license": "",
"summary": "A simple static-site generator for Python3, using markdown and the Jinja2 templating engine",
"version": "1.0.4",
"project_urls": null,
"split_keywords": [
"static site generator",
"website",
"gitlab pages",
"jinja"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1fcb0544a110a71213f619f35ab2d090bd24ee263e57ebce6709f76ad433950e",
"md5": "1c6bdec50cadecb0ccae6afd1e9f115b",
"sha256": "b1ac2e0f227aabab8014c5d740a86f62d93fcce8d7f5aa8eb500d2e6974152f9"
},
"downloads": -1,
"filename": "cpfr_rattlesnake-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c6bdec50cadecb0ccae6afd1e9f115b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7513,
"upload_time": "2023-12-09T10:10:52",
"upload_time_iso_8601": "2023-12-09T10:10:52.668704Z",
"url": "https://files.pythonhosted.org/packages/1f/cb/0544a110a71213f619f35ab2d090bd24ee263e57ebce6709f76ad433950e/cpfr_rattlesnake-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c329a317d431be98c3f0fd1f6aa1c6e3cbc75bd4815017bedc26caf648e2da21",
"md5": "04cba4c1ffbcd40ddb87a35bf27a9bdd",
"sha256": "96e9ec5f6471626a509d7ba60c8d4094c5547777827cda4bd68bae47277a2bce"
},
"downloads": -1,
"filename": "cpfr-rattlesnake-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "04cba4c1ffbcd40ddb87a35bf27a9bdd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8273,
"upload_time": "2023-12-09T10:10:54",
"upload_time_iso_8601": "2023-12-09T10:10:54.709874Z",
"url": "https://files.pythonhosted.org/packages/c3/29/a317d431be98c3f0fd1f6aa1c6e3cbc75bd4815017bedc26caf648e2da21/cpfr-rattlesnake-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 10:10:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cpfr-rattlesnake"
}