Name | squishie JSON |
Version |
0.5.2
JSON |
| download |
home_page | None |
Summary | Squish multiple Pandoc-flavored Markdown files into one super squished document. |
upload_time | 2025-08-17 23:32:46 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Apache-2.0 |
keywords |
pandoc
markdown
documentation
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# squishie
<!-- BADGIE TIME -->
[](https://gitlab.com/saferatday0/sandbox/squishie/-/commits/main)
[](https://gitlab.com/saferatday0/sandbox/squishie/-/commits/main)
[](https://gitlab.com/saferatday0/sandbox/squishie/-/releases)
[](https://github.com/pre-commit/pre-commit)
[](https://gitlab.com/saferatday0/cici)
[](https://github.com/prettier/prettier)
<!-- END BADGIE TIME -->
Squish multiple Pandoc-flavored Markdown files into one super squished document.
## Installation
```sh
python3 -m pip install squishie
```
## Usage
Create a directory with your Markdown files:
```console
$ tree
.
├── doc1.md
└── doc2.md
0 directories, 2 files
```
Each Markdown file should have Pandoc-compatible front matter. For example,
`doc1.md` has the following contents:
```yaml
# doc1.md
---
title: Doc 1
---
This is some text.
```
Add a squishie document file to the directory:
```yaml
# config.yaml
title: My squished document
version: "1.2.3"
sections:
- file: doc1.md
- file: doc2.md
```
Your directory should now look like this:
```console
$ tree
.
├── squishie.yaml
├── doc1.md
└── doc2.md
0 directories, 2 files
```
Run `squishie` with the `-c`/`--config` option to render the final document:
```sh
squishie -c squishie.yaml
```
```console
$ squishie -c squishie.yaml
---
title: My squished document
version: 1.2.3
---
# Doc 1
This is some text.
# Doc 2
This is different text.
```
Add the `-o`/`--output` option to write the output to a file:
```sh
squishie -c squishie.yaml -o my-squished-document.md
```
It is also possible to add subsections:
```yaml
sections:
# ...
- title: Subsection
sections:
- file: doc3.md
- title: Subsubsection
sections:
- file: doc4.md
```
The header level of a document is automatically adjusted based on the document's
position in the overall section tree.
### Page and section titles
A title can be added to a page or section with the `title` keyword:
```yaml
sections:
- file: doc1.md
title: My Title
```
For each header, an anchor and attribute is also added. **Pandoc
`header_attributes` or `attributes` must be enabled**. The following Markdown is
generated:
```markdown
# [My Title](#my-title) {#my-title}
```
The generated anchors can be customized with the `anchor` keyword:
```yaml
sections:
- file: doc1.md
title: My Title
anchor: different-anchor
```
This will produce the following markdown:
```markdown
# [My Title](#different-anchor) {#different-anchor}
```
`squishie` automatically adds the header anchor as an attribute, but you can add
additional attributes with the `attributes` keyword:
```yaml
sections:
- file: doc1.md
title: My Title
attributes: .bg-blue .text-white
```
This produces the following markdown:
```markdown
# [My Title](#my-title) {#my-title .bg-blue .text-white}
```
If a page includes a title that you don't want to be shown, set `show_title` to
`false` to remove it from the output:
```yaml
sections:
- file: doc1.md
show_title: false
```
## License
Copyright 2025 UL Research Institutes.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
Raw data
{
"_id": null,
"home_page": null,
"name": "squishie",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pandoc, markdown, documentation",
"author": null,
"author_email": "Digital Safety Research Institute <contact@dsri.org>",
"download_url": "https://files.pythonhosted.org/packages/c5/ee/a224f120c469b7c63d713bf746669d8ac37964de0d774083062fe5ecaa70/squishie-0.5.2.tar.gz",
"platform": null,
"description": "# squishie\n\n<!-- BADGIE TIME -->\n\n[](https://gitlab.com/saferatday0/sandbox/squishie/-/commits/main)\n[](https://gitlab.com/saferatday0/sandbox/squishie/-/commits/main)\n[](https://gitlab.com/saferatday0/sandbox/squishie/-/releases)\n[](https://github.com/pre-commit/pre-commit)\n[](https://gitlab.com/saferatday0/cici)\n[](https://github.com/prettier/prettier)\n\n<!-- END BADGIE TIME -->\n\nSquish multiple Pandoc-flavored Markdown files into one super squished document.\n\n## Installation\n\n```sh\npython3 -m pip install squishie\n```\n\n## Usage\n\nCreate a directory with your Markdown files:\n\n```console\n$ tree\n.\n\u251c\u2500\u2500 doc1.md\n\u2514\u2500\u2500 doc2.md\n\n0 directories, 2 files\n```\n\nEach Markdown file should have Pandoc-compatible front matter. For example,\n`doc1.md` has the following contents:\n\n```yaml\n# doc1.md\n---\ntitle: Doc 1\n---\nThis is some text.\n```\n\nAdd a squishie document file to the directory:\n\n```yaml\n# config.yaml\ntitle: My squished document\nversion: \"1.2.3\"\n\nsections:\n - file: doc1.md\n - file: doc2.md\n```\n\nYour directory should now look like this:\n\n```console\n$ tree\n.\n\u251c\u2500\u2500 squishie.yaml\n\u251c\u2500\u2500 doc1.md\n\u2514\u2500\u2500 doc2.md\n\n0 directories, 2 files\n```\n\nRun `squishie` with the `-c`/`--config` option to render the final document:\n\n```sh\nsquishie -c squishie.yaml\n```\n\n```console\n$ squishie -c squishie.yaml\n---\ntitle: My squished document\nversion: 1.2.3\n---\n\n# Doc 1\n\nThis is some text.\n\n# Doc 2\n\nThis is different text.\n```\n\nAdd the `-o`/`--output` option to write the output to a file:\n\n```sh\nsquishie -c squishie.yaml -o my-squished-document.md\n```\n\nIt is also possible to add subsections:\n\n```yaml\nsections:\n # ...\n - title: Subsection\n sections:\n - file: doc3.md\n\n - title: Subsubsection\n sections:\n - file: doc4.md\n```\n\nThe header level of a document is automatically adjusted based on the document's\nposition in the overall section tree.\n\n### Page and section titles\n\nA title can be added to a page or section with the `title` keyword:\n\n```yaml\nsections:\n - file: doc1.md\n title: My Title\n```\n\nFor each header, an anchor and attribute is also added. **Pandoc\n`header_attributes` or `attributes` must be enabled**. The following Markdown is\ngenerated:\n\n```markdown\n# [My Title](#my-title) {#my-title}\n```\n\nThe generated anchors can be customized with the `anchor` keyword:\n\n```yaml\nsections:\n - file: doc1.md\n title: My Title\n anchor: different-anchor\n```\n\nThis will produce the following markdown:\n\n```markdown\n# [My Title](#different-anchor) {#different-anchor}\n```\n\n`squishie` automatically adds the header anchor as an attribute, but you can add\nadditional attributes with the `attributes` keyword:\n\n```yaml\nsections:\n - file: doc1.md\n title: My Title\n attributes: .bg-blue .text-white\n```\n\nThis produces the following markdown:\n\n```markdown\n# [My Title](#my-title) {#my-title .bg-blue .text-white}\n```\n\nIf a page includes a title that you don't want to be shown, set `show_title` to\n`false` to remove it from the output:\n\n```yaml\nsections:\n - file: doc1.md\n show_title: false\n```\n\n## License\n\nCopyright 2025 UL Research Institutes.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n<http://www.apache.org/licenses/LICENSE-2.0>\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Squish multiple Pandoc-flavored Markdown files into one super squished document.",
"version": "0.5.2",
"project_urls": {
"Home": "https://gitlab.com/saferatday0/sandbox/squishie",
"Issues": "https://gitlab.com/saferatday0/sandbox/squishie/-/issues"
},
"split_keywords": [
"pandoc",
" markdown",
" documentation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b579f0aab637501f9bad37a4c82f17d9ca0b40e2fe023635631259b1b9c3e97b",
"md5": "403c004acf865fa56fe39970710f98e5",
"sha256": "de9f020d63dc8449b1e3fb82d99fc44f47c400df39ebbf198e02ebbf0b271c83"
},
"downloads": -1,
"filename": "squishie-0.5.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "403c004acf865fa56fe39970710f98e5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11186,
"upload_time": "2025-08-17T23:32:44",
"upload_time_iso_8601": "2025-08-17T23:32:44.910914Z",
"url": "https://files.pythonhosted.org/packages/b5/79/f0aab637501f9bad37a4c82f17d9ca0b40e2fe023635631259b1b9c3e97b/squishie-0.5.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c5eea224f120c469b7c63d713bf746669d8ac37964de0d774083062fe5ecaa70",
"md5": "e97108e7b48f8f790485538789fd20d5",
"sha256": "7f810a0708893bc46d87b9e0911b99d96eea8903bb326c2863a598fd8a8edc36"
},
"downloads": -1,
"filename": "squishie-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "e97108e7b48f8f790485538789fd20d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11195,
"upload_time": "2025-08-17T23:32:46",
"upload_time_iso_8601": "2025-08-17T23:32:46.088079Z",
"url": "https://files.pythonhosted.org/packages/c5/ee/a224f120c469b7c63d713bf746669d8ac37964de0d774083062fe5ecaa70/squishie-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-17 23:32:46",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "saferatday0",
"gitlab_project": "sandbox",
"lcname": "squishie"
}