# pandoc-styles
This script allows you to define styles for pandoc. In styles you can define, with which arguments pandoc should be invoked for different formats. In addition it allows to run scripts before and after a conversion and gives much power to these scripts and to filters.
- [pandoc-styles](#pandoc-styles)
- [Installation](#installation)
- [Requirements](#requirements)
- [Install](#install)
- [Setup](#setup)
- [Usage](#usage)
- [Defining Styles](#defining-styles)
- [Basic Usage](#basic-usage)
- [Inheritance](#inheritance)
- [Stylepacks](#stylepacks)
- [Advanced Feature](#advanced-feature)
- [Adressing files in the configuration folder](#adressing-files-in-the-configuration-folder)
- [Verbatim Variables](#verbatim-variables)
- [Preflight](#preflight)
- [Process Sass](#process-sass)
- [Add to template](#add-to-template)
- [Replace in template](#replace-in-template)
- [Replace in output](#replace-in-output)
- [Postflight](#postflight)
- [Filter](#filter)
- [Advanced Example](#advanced-example)
- [Commandline tools](#commandline-tools)
- [Creating stylepacks](#creating-stylepacks)
## Installation
### Requirements
To use this script, you need the following:
1. Python 3.6 or higher:
You can get [python here](https://www.python.org/).
2. Pandoc 2.11 or higher:
You can download [pandoc here](http://pandoc.org/index.html).
### Install
Now you need to install this script itself. Open the console and enter:
pip3 install pandoc_styles
pandoc-styles --init
### Setup
Depending on your system, you may have to configure some settings for everything to work.
Upon initialization this script created the directory "pandoc_styles" in your user folder. Inside you can find the config.yaml file. Set the option in there that are needed for your system.
## Usage
The "pandoc_styles" folder can be used as a central point to store styles, scripts, filter etc. Some subfolders are pre-created for you to use.
The "styles.yaml" file contains all the styles. Here you define your styles and the script looks here for styles specified in the metadata block of your files.
To use your styles, your source files need to have a metadata block. These commands in the block are recognized by this script:
- styles: A list of styles to be used for the file
- style-defintion: In addition of defining styles in the "styles.yaml" file, you can define a style here too. Style settings given here have precedence over those given in "styles.yaml"
- formats: A list of formats the source file should be converted to. If none is given, html- and pdf-files are build.
- destination: A directory to create the output in.
- output-name: The desired name of the outputfile without extension. In none is given, the filename is used.
- fields that exist in the style. They override the default given in the style.
If you convert all files in a folder as one document, these additional commands are available:
- file-list: Specify exactly which files in the folder should be converted.
- excluded-files: Exclude the listed files from beeing converted.
Then to convert your file, open the console and enter:
pandoc-styles "your_file"
Or if you want to convert all files in a folder as one document:
pandoc-styles -f
The commandline script has many optional parameters to be useful in macros, batch files etc. Enter
pandoc-styles -h
to see all the options.
## Defining Styles
### Basic Usage
Styles are written in yaml, just like pandoc metadata-blocks. A style is defined like this:
~~~yaml
Name:
format:
pandoc-option: value
pandoc-variable: value
~~~
"Name" is how the style is adressed. A style directly defined in the metadata-block has no name. "Format" specifies for which format the following commands should be invoked. There is a special value: "all". Everything under "all" is used in any format. Examples for formats are html, pdf, latex, epub etc.
Under the format you just enter pandoc options and variables. If a parameter is a flag, use "true". Parameters given the value "false" are ignored.
**A Basic example**
This is an example metadata-block in a source file:
~~~yaml
---
title: Example
author: John Doe
formats:
- html
- pdf
style-definition:
all:
toc: true
toc-depth: 3
highlight-style: tango
language: en
html:
standalone: true
pdf:
pdf-engine: xelatex
---
~~~
### Inheritance
A style can have a field named "inherit". This is a list of other styles it inherits from. Styles lower on the list update styles that are higher. The following rules are in place:
- Single values are replaced
- If a value is another dictionary, new values are appended to it, if a value exists, these rules are used again on it
- If a value is a list, new values are appended to it.
## Stylepacks
It is possible, to bundle all files necessary for a particular style and share this as a stylepack. You can install a stylepack either through extracting its contents into the styles folder inside the config folder or through the pandoc_styles_tools command line interface with the option `import` command.
To use a stylepack, include a field "stylepacks" in the matadata. It looks like this:
~~~
stylepacks:
- stylepack_1_name:
- style_1
- style2
- stylepack_2_name
~~~
If you do not specify styles from the stylepack, it uses its default style.
**Example**
[pandoc_styles: novel](https://github.com/dickloraine/pandoc_styles_novel) is a stylepack to create novels out of your source files. A documentation for using this stylepack is found on the github page and inside the style folder of the pack once installed. You can install it with this command:
~~~
pandoc-styles-tools import novel -u https://github.com/dickloraine/pandoc_styles_novel/releases/latest/download/novel.zip
~~~
## Advanced Feature
### Adressing files in the configuration folder
You can point to a file in the configuration directory, if you prepend the path with "~/". The script searches first for the given path and then looks in appropiatly named subfolders and finally in the "misc" subfolder. For example:
~~~yaml
filter:
- ~/test-filter.py
~~~
Would find the file "test-filter.py" in the subfolder "filter" in the configuration directory.
### Verbatim Variables
If you need template variables that should not be rendered in the output format (for example file paths), you can add these under the "verbatim-variables" field:
~~~yaml
verbatim-variables:
my-path: "my/path"
~~~
Some variables are predefiened and always usable in templates:
- config-dir: The path to the config dir
- stylepackName-dir: The path to the directory of the given stylepack
- temp-dir: The path to the currently used temporary directory
### Preflight
You can run other command-line apps and scripts before the conversion happens. Just enter the command-line command in the preflight field in the style definition. You can pass the files list to it with `<files>`. Explicitly mark the value as a string, to avoid any hassle with special characters. For example:
~~~yaml
Test-style:
html:
preflight:
- 'some_app -d -f <files>'
~~~
If you give it just a single python file, it assumes that it is a special preflight script. These are written in python and have access to the style infos and files that should be converted.
Here a basic example of a preflight script, that appends text given in the field "append-to-file" in the style definition to the end of the files:
~~~python
from pandoc_styles import run_preflight_script, file_read, file_write
def preflight(self):
text_to_append = self.cfg["append-to-file"]
if isinstance(text_to_append, list):
text_to_append = "\n".join(text_to_append)
file_write(self.files[-1], f"{file_read(self.files[-1])}\n{text_to_append}")
if __name__ == '__main__':
run_preflight_script(preflight)
~~~
Modify only the preflight function to include your code.
And to run it in your style definition:
~~~yaml
Test-style:
html:
preflight:
- append-to-file.py
append-to-file: "Test"
~~~
### Process Sass
You can point to sass-files that should be used for html output and this script converts them for you to css and uses that in the output. In addition you can define variables used in the sass file and specify, where the compiled css file shoud be copied.
~~~yaml
Test-style:
html:
sass:
files: ~/default.scss
output-path: temp
variables:
body-font-size: 10pt
~~~
"files" is a list of sass files to be included.
"output-path" can be "~/" to output to the css folder in the configuration folder, a relative path or "temp" to be used with the "self-contained" parameter. If ommited, the css output is in the same folder as the source files output.
"variables" can be any variables in your sass files.
### Add to template
Sometimes you want to include some code directly into the template, instead of just including it in the header. Mostly, if you want to define and use your own template variables.
This option just injects the given code directly into the head of the template.
It accepts a path to a file and will add the contents of the file to the template.
~~~yaml
Test-style:
pdf:
add-to-template:
- |
\titlehead{{$titletop-left$
\hfill $titletop-right$\\}
$titlehead$}
\publishers{\small $titlebottom$}
~~~
### Replace in template
As above, but instead of just adding the code to the head, it replaces arbitrary text in the template. You need to give it a pattern and a replacement text. Optionally you can use the flag "add" to not replace the text, but prepend to it and the field "count" if only some matches should be replaced.
~~~yaml
Test-style:
html:
replace-in-template:
- pattern: \$body\$
replacement-text: |
<div class="content">
$body$
</div>
~~~
### Replace in output
Exactly the same as replace-in-template but for text in the output-file
### Postflight
These scripts are called after the source is converted. Pretty similar to preflight, but instead of `<files>` it only accepts a single `<file>`
**Some app:**
~~~yaml
Test-style:
html:
preflight:
- 'some_app -d -f <file>'
~~~
**Custome script:**
~~~python
from pandoc_styles import run_postflight_script, file_read, file_write
def postflight(self):
text_to_append = self.cfg["append-to-output"]
if isinstance(text_to_append, list):
text_to_append = "\n".join(text_to_append)
file_write(ffile, f"{file_read(ffile)}\n{text_to_append}")
if __name__ == '__main__':
run_postflight_script(postflight)
~~~
~~~yaml
Test-style:
html:
preflight:
- append-to-output.py
append-to-output: "Test"
~~~
### Filter
This script includes some functionality to make writing filters a little bit more easy.
### Advanced Example
Pandocs self-contained flag doesn't work for html if math is used, because mathjax can't be included. This style is not really self-contained, but it allows for single files with all css included. This example useses the default.sass file included in this script. Fonts are also just referenced instead of included, to make for small file-sizes.
For code in pdfs, it introduces line-wrap in code blocks and ligatures in the font.
In addition, inheritance is shown.
~~~yaml
All:
all:
lang: en
pdf:
pdf-engine: "xelatex"
Math-document:
inherits:
- Code
html:
self-contained: true
mathjax: true
sass:
files: ~/default.scss
output-path: temp
replace-in-template:
- pattern: \$body\$
replacement-text: |
<div class="content">
$body$
</div>
- pattern: \$table-of-contents\$
replacement-text: |
<div id="sidebar">
<input class="trigger" type="checkbox" id="mainNavButton">
<label for="mainNavButton" onclick></label>
$table-of-contents$
</div>
replace-in-output:
- pattern: (<\/head>)
count: 1
add: true
replacement-text: |
<link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif|Oswald" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tonsky/FiraCode@1.206/distr/fira_code.css">
- pattern: <script type="text\/javascript">\/\*\n\s+\*\s+\/MathJax\.js.*?<\/script>
replacement-text: |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_CHTML-full" type="text/javascript"></script>
Code:
all:
highlight-style: tango
pdf:
monofont: Fira Code
# allow code line break
add-to-template:
- |
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakautoindent=true,commandchars=\\\{\}}
- |
\setmonofont[
Contextuals={Alternate}
]{$monofont$}
\makeatletter
\def\verbatim@nolig@list{}
\makeatother
~~~
## Commandline tools
Some additional tools are available on the commandline with the command:
```bash
pandoc-styles-tools
```
The import option is used to import stylepacks.
One tool merges styles and outputs the new style in a file.
The localize tool copies all used assets into the local directory, to have a self-contingent project folder.
## Creating stylepacks
To create a stylepack, just create a folder with the name of the stylepack. Inside the folder put a yaml file containing the style definitions with the name of the stylepack. Then mimick the config folder for organizing the files provided.
In the yaml file reference links to files inside the stylepack with "stylepack_name@path".
Create a zip of your folder (with the folder inside the zip) and name it after your stylepack.
Raw data
{
"_id": null,
"home_page": "https://github.com/dickloraine/pandoc_styles",
"name": "pandoc-styles",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "pandoc,writing,text,conversion",
"author": "dickloraine",
"author_email": "dickloraine@gmx.net",
"download_url": "https://files.pythonhosted.org/packages/6e/b6/492151e3c9d68845badf8498c21a1ab75f3cde56af1b2cd421fd64885fbc/pandoc_styles-0.9.14.tar.gz",
"platform": null,
"description": "# pandoc-styles\n\nThis script allows you to define styles for pandoc. In styles you can define, with which arguments pandoc should be invoked for different formats. In addition it allows to run scripts before and after a conversion and gives much power to these scripts and to filters.\n\n- [pandoc-styles](#pandoc-styles)\n - [Installation](#installation)\n - [Requirements](#requirements)\n - [Install](#install)\n - [Setup](#setup)\n - [Usage](#usage)\n - [Defining Styles](#defining-styles)\n - [Basic Usage](#basic-usage)\n - [Inheritance](#inheritance)\n - [Stylepacks](#stylepacks)\n - [Advanced Feature](#advanced-feature)\n - [Adressing files in the configuration folder](#adressing-files-in-the-configuration-folder)\n - [Verbatim Variables](#verbatim-variables)\n - [Preflight](#preflight)\n - [Process Sass](#process-sass)\n - [Add to template](#add-to-template)\n - [Replace in template](#replace-in-template)\n - [Replace in output](#replace-in-output)\n - [Postflight](#postflight)\n - [Filter](#filter)\n - [Advanced Example](#advanced-example)\n - [Commandline tools](#commandline-tools)\n - [Creating stylepacks](#creating-stylepacks)\n\n## Installation\n\n### Requirements\n\nTo use this script, you need the following:\n\n1. Python 3.6 or higher:\n You can get [python here](https://www.python.org/).\n\n2. Pandoc 2.11 or higher:\n You can download [pandoc here](http://pandoc.org/index.html).\n\n### Install\n\nNow you need to install this script itself. Open the console and enter:\n\n pip3 install pandoc_styles\n pandoc-styles --init\n\n### Setup\n\nDepending on your system, you may have to configure some settings for everything to work.\nUpon initialization this script created the directory \"pandoc_styles\" in your user folder. Inside you can find the config.yaml file. Set the option in there that are needed for your system.\n\n## Usage\n\nThe \"pandoc_styles\" folder can be used as a central point to store styles, scripts, filter etc. Some subfolders are pre-created for you to use.\n\nThe \"styles.yaml\" file contains all the styles. Here you define your styles and the script looks here for styles specified in the metadata block of your files.\n\nTo use your styles, your source files need to have a metadata block. These commands in the block are recognized by this script:\n\n- styles: A list of styles to be used for the file\n- style-defintion: In addition of defining styles in the \"styles.yaml\" file, you can define a style here too. Style settings given here have precedence over those given in \"styles.yaml\"\n- formats: A list of formats the source file should be converted to. If none is given, html- and pdf-files are build.\n- destination: A directory to create the output in.\n- output-name: The desired name of the outputfile without extension. In none is given, the filename is used.\n- fields that exist in the style. They override the default given in the style.\n\nIf you convert all files in a folder as one document, these additional commands are available:\n\n- file-list: Specify exactly which files in the folder should be converted.\n- excluded-files: Exclude the listed files from beeing converted.\n\nThen to convert your file, open the console and enter:\n\n pandoc-styles \"your_file\"\n\nOr if you want to convert all files in a folder as one document:\n pandoc-styles -f\n\nThe commandline script has many optional parameters to be useful in macros, batch files etc. Enter\n\n pandoc-styles -h\n\nto see all the options.\n\n## Defining Styles\n\n### Basic Usage\n\nStyles are written in yaml, just like pandoc metadata-blocks. A style is defined like this:\n\n~~~yaml\nName:\n format:\n pandoc-option: value\n pandoc-variable: value\n~~~\n\n\"Name\" is how the style is adressed. A style directly defined in the metadata-block has no name. \"Format\" specifies for which format the following commands should be invoked. There is a special value: \"all\". Everything under \"all\" is used in any format. Examples for formats are html, pdf, latex, epub etc.\n\nUnder the format you just enter pandoc options and variables. If a parameter is a flag, use \"true\". Parameters given the value \"false\" are ignored.\n\n**A Basic example**\n\nThis is an example metadata-block in a source file:\n\n~~~yaml\n\n---\ntitle: Example\nauthor: John Doe\nformats:\n - html\n - pdf\nstyle-definition:\n all:\n toc: true\n toc-depth: 3\n highlight-style: tango\n language: en\n html:\n standalone: true\n pdf:\n pdf-engine: xelatex\n---\n~~~\n\n### Inheritance\n\nA style can have a field named \"inherit\". This is a list of other styles it inherits from. Styles lower on the list update styles that are higher. The following rules are in place:\n\n- Single values are replaced\n- If a value is another dictionary, new values are appended to it, if a value exists, these rules are used again on it\n- If a value is a list, new values are appended to it.\n\n## Stylepacks\n\nIt is possible, to bundle all files necessary for a particular style and share this as a stylepack. You can install a stylepack either through extracting its contents into the styles folder inside the config folder or through the pandoc_styles_tools command line interface with the option `import` command.\n\nTo use a stylepack, include a field \"stylepacks\" in the matadata. It looks like this:\n\n~~~\nstylepacks:\n - stylepack_1_name:\n - style_1\n - style2\n - stylepack_2_name\n~~~\n\nIf you do not specify styles from the stylepack, it uses its default style.\n\n**Example**\n\n[pandoc_styles: novel](https://github.com/dickloraine/pandoc_styles_novel) is a stylepack to create novels out of your source files. A documentation for using this stylepack is found on the github page and inside the style folder of the pack once installed. You can install it with this command:\n\n~~~\npandoc-styles-tools import novel -u https://github.com/dickloraine/pandoc_styles_novel/releases/latest/download/novel.zip\n~~~\n\n## Advanced Feature\n\n### Adressing files in the configuration folder\n\nYou can point to a file in the configuration directory, if you prepend the path with \"~/\". The script searches first for the given path and then looks in appropiatly named subfolders and finally in the \"misc\" subfolder. For example:\n\n~~~yaml\nfilter:\n - ~/test-filter.py\n~~~\n\nWould find the file \"test-filter.py\" in the subfolder \"filter\" in the configuration directory.\n\n### Verbatim Variables\n\nIf you need template variables that should not be rendered in the output format (for example file paths), you can add these under the \"verbatim-variables\" field:\n\n~~~yaml\nverbatim-variables:\n my-path: \"my/path\"\n~~~\n\nSome variables are predefiened and always usable in templates:\n\n- config-dir: The path to the config dir\n- stylepackName-dir: The path to the directory of the given stylepack\n- temp-dir: The path to the currently used temporary directory\n\n### Preflight\n\nYou can run other command-line apps and scripts before the conversion happens. Just enter the command-line command in the preflight field in the style definition. You can pass the files list to it with `<files>`. Explicitly mark the value as a string, to avoid any hassle with special characters. For example:\n\n~~~yaml\nTest-style:\n html:\n preflight:\n - 'some_app -d -f <files>'\n~~~\n\nIf you give it just a single python file, it assumes that it is a special preflight script. These are written in python and have access to the style infos and files that should be converted.\n\nHere a basic example of a preflight script, that appends text given in the field \"append-to-file\" in the style definition to the end of the files:\n\n~~~python\nfrom pandoc_styles import run_preflight_script, file_read, file_write\n\n\ndef preflight(self):\n text_to_append = self.cfg[\"append-to-file\"]\n if isinstance(text_to_append, list):\n text_to_append = \"\\n\".join(text_to_append)\n file_write(self.files[-1], f\"{file_read(self.files[-1])}\\n{text_to_append}\")\n\n\nif __name__ == '__main__':\n run_preflight_script(preflight)\n~~~\n\nModify only the preflight function to include your code.\n\nAnd to run it in your style definition:\n\n~~~yaml\nTest-style:\n html:\n preflight:\n - append-to-file.py\n append-to-file: \"Test\"\n~~~\n\n### Process Sass\n\nYou can point to sass-files that should be used for html output and this script converts them for you to css and uses that in the output. In addition you can define variables used in the sass file and specify, where the compiled css file shoud be copied.\n\n~~~yaml\nTest-style:\n html:\n sass:\n files: ~/default.scss\n output-path: temp\n variables:\n body-font-size: 10pt\n~~~\n\n\"files\" is a list of sass files to be included.\n\n\"output-path\" can be \"~/\" to output to the css folder in the configuration folder, a relative path or \"temp\" to be used with the \"self-contained\" parameter. If ommited, the css output is in the same folder as the source files output.\n\n\"variables\" can be any variables in your sass files.\n\n### Add to template\n\nSometimes you want to include some code directly into the template, instead of just including it in the header. Mostly, if you want to define and use your own template variables.\n\nThis option just injects the given code directly into the head of the template.\n\nIt accepts a path to a file and will add the contents of the file to the template.\n\n~~~yaml\nTest-style:\n pdf:\n add-to-template:\n - |\n \\titlehead{{$titletop-left$\n \\hfill $titletop-right$\\\\}\n $titlehead$}\n \\publishers{\\small $titlebottom$}\n~~~\n\n### Replace in template\n\nAs above, but instead of just adding the code to the head, it replaces arbitrary text in the template. You need to give it a pattern and a replacement text. Optionally you can use the flag \"add\" to not replace the text, but prepend to it and the field \"count\" if only some matches should be replaced.\n\n~~~yaml\nTest-style:\n html:\n replace-in-template:\n - pattern: \\$body\\$\n replacement-text: |\n <div class=\"content\">\n $body$\n </div>\n~~~\n\n### Replace in output\n\nExactly the same as replace-in-template but for text in the output-file\n\n### Postflight\n\nThese scripts are called after the source is converted. Pretty similar to preflight, but instead of `<files>` it only accepts a single `<file>`\n\n**Some app:**\n\n~~~yaml\nTest-style:\n html:\n preflight:\n - 'some_app -d -f <file>'\n~~~\n\n**Custome script:**\n\n~~~python\nfrom pandoc_styles import run_postflight_script, file_read, file_write\n\n\ndef postflight(self):\n text_to_append = self.cfg[\"append-to-output\"]\n if isinstance(text_to_append, list):\n text_to_append = \"\\n\".join(text_to_append)\n file_write(ffile, f\"{file_read(ffile)}\\n{text_to_append}\")\n\n\nif __name__ == '__main__':\n run_postflight_script(postflight)\n~~~\n\n~~~yaml\nTest-style:\n html:\n preflight:\n - append-to-output.py\n append-to-output: \"Test\"\n~~~\n\n### Filter\n\nThis script includes some functionality to make writing filters a little bit more easy.\n\n### Advanced Example\n\nPandocs self-contained flag doesn't work for html if math is used, because mathjax can't be included. This style is not really self-contained, but it allows for single files with all css included. This example useses the default.sass file included in this script. Fonts are also just referenced instead of included, to make for small file-sizes.\n\nFor code in pdfs, it introduces line-wrap in code blocks and ligatures in the font.\n\nIn addition, inheritance is shown.\n\n~~~yaml\nAll:\n all:\n lang: en\n pdf:\n pdf-engine: \"xelatex\"\n\nMath-document:\n inherits:\n - Code\n html:\n self-contained: true\n mathjax: true\n sass:\n files: ~/default.scss\n output-path: temp\n replace-in-template:\n - pattern: \\$body\\$\n replacement-text: |\n <div class=\"content\">\n $body$\n </div>\n - pattern: \\$table-of-contents\\$\n replacement-text: |\n <div id=\"sidebar\">\n <input class=\"trigger\" type=\"checkbox\" id=\"mainNavButton\">\n <label for=\"mainNavButton\" onclick></label>\n $table-of-contents$\n </div>\n replace-in-output:\n - pattern: (<\\/head>)\n count: 1\n add: true\n replacement-text: |\n <link href=\"https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif|Oswald\" rel=\"stylesheet\">\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/tonsky/FiraCode@1.206/distr/fira_code.css\">\n - pattern: <script type=\"text\\/javascript\">\\/\\*\\n\\s+\\*\\s+\\/MathJax\\.js.*?<\\/script>\n replacement-text: |\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_CHTML-full\" type=\"text/javascript\"></script>\n\nCode:\n all:\n highlight-style: tango\n pdf:\n monofont: Fira Code\n # allow code line break\n add-to-template:\n - |\n \\usepackage{fvextra}\n \\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakautoindent=true,commandchars=\\\\\\{\\}}\n - |\n \\setmonofont[\n Contextuals={Alternate}\n ]{$monofont$}\n \\makeatletter\n \\def\\verbatim@nolig@list{}\n \\makeatother\n~~~\n\n## Commandline tools\n\nSome additional tools are available on the commandline with the command:\n\n```bash\npandoc-styles-tools\n```\n\nThe import option is used to import stylepacks.\n\nOne tool merges styles and outputs the new style in a file.\n\nThe localize tool copies all used assets into the local directory, to have a self-contingent project folder.\n\n## Creating stylepacks\n\nTo create a stylepack, just create a folder with the name of the stylepack. Inside the folder put a yaml file containing the style definitions with the name of the stylepack. Then mimick the config folder for organizing the files provided.\n\nIn the yaml file reference links to files inside the stylepack with \"stylepack_name@path\".\n\nCreate a zip of your folder (with the folder inside the zip) and name it after your stylepack.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A script to convert files with pandoc using styles.",
"version": "0.9.14",
"split_keywords": [
"pandoc",
"writing",
"text",
"conversion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e7fd34d8d082f8963df8e751d244ff15beea54f215875bc98b83a3dabca69c9b",
"md5": "89f6187b05ac0ffb6e66df7308486f74",
"sha256": "6895cbefab84b84722e63bd5eac5e638c4bf28e6837dc71b71850c4feb7d5606"
},
"downloads": -1,
"filename": "pandoc_styles-0.9.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "89f6187b05ac0ffb6e66df7308486f74",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 35284,
"upload_time": "2023-01-28T16:20:01",
"upload_time_iso_8601": "2023-01-28T16:20:01.094757Z",
"url": "https://files.pythonhosted.org/packages/e7/fd/34d8d082f8963df8e751d244ff15beea54f215875bc98b83a3dabca69c9b/pandoc_styles-0.9.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6eb6492151e3c9d68845badf8498c21a1ab75f3cde56af1b2cd421fd64885fbc",
"md5": "5c516fba830ef23ac448bcae6e2d8e48",
"sha256": "fba74fd519293bbd06667b56331d927e57547441d51b1f6e8e94230da37666cd"
},
"downloads": -1,
"filename": "pandoc_styles-0.9.14.tar.gz",
"has_sig": false,
"md5_digest": "5c516fba830ef23ac448bcae6e2d8e48",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 30356,
"upload_time": "2023-01-28T16:20:03",
"upload_time_iso_8601": "2023-01-28T16:20:03.301724Z",
"url": "https://files.pythonhosted.org/packages/6e/b6/492151e3c9d68845badf8498c21a1ab75f3cde56af1b2cd421fd64885fbc/pandoc_styles-0.9.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-28 16:20:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "dickloraine",
"github_project": "pandoc_styles",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pandoc-styles"
}