|
|
|
@ -1,5 +1,3 @@
|
|
|
|
|
# Wiki to HTML pages script
|
|
|
|
|
![](https://pzwiki.wdka.nl/mw-mediadesign/images/8/82/Workflow-wiki2html.svg)
|
|
|
|
|
|
|
|
|
|
## Depencencies
|
|
|
|
|
* python3
|
|
|
|
@ -20,7 +18,9 @@
|
|
|
|
|
* Install:
|
|
|
|
|
* Debian/Ubuntu: `sudo apt install pandoc`
|
|
|
|
|
* Mac: `brew install pandoc`
|
|
|
|
|
|
|
|
|
|
* [html5lib](https://github.com/html5lib/html5lib-python)
|
|
|
|
|
* Install:
|
|
|
|
|
* `pip3 install html5lib`
|
|
|
|
|
|
|
|
|
|
## login.txt
|
|
|
|
|
`login.txt` is a local and individual file, ignored by git, where you place you itch wiki username and password, in separate lines.
|
|
|
|
@ -31,7 +31,32 @@ myusername
|
|
|
|
|
mypassword
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Create archive from wiki:
|
|
|
|
|
|
|
|
|
|
### on sandbox server
|
|
|
|
|
`python dumpwiki.py`
|
|
|
|
|
|
|
|
|
|
### locally on your own machine:
|
|
|
|
|
create archive folder: `mkdir archive`
|
|
|
|
|
|
|
|
|
|
run script outputting to archive folder and displaying the images from the wiki:
|
|
|
|
|
|
|
|
|
|
`python dumpwiki.py --output archive --local`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Categories and Templates:
|
|
|
|
|
For each Wiki Category in [Category Publish](https://hub.xpub.nl/sandbox/itchwiki/index.php/Category:Publish)
|
|
|
|
|
there should be an HTML [jinja2 template](https://jinja.palletsprojects.com/en/2.11.x/)
|
|
|
|
|
, with the same name of the category this repository `templates/`
|
|
|
|
|
|
|
|
|
|
If not the `templates/default.html` will be used to render the pages under that Category.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# query2html.py
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
|
|
`cd special-issue-11-wiki2html/`
|
|
|
|
@ -100,3 +125,5 @@ It is
|
|
|
|
|
to convert pdfs to jpgs:
|
|
|
|
|
convert -quality 100 -density 300 [name-of-pdf] %02d.jpg
|
|
|
|
|
|
|
|
|
|
# Wiki to HTML pages script
|
|
|
|
|
![](https://pzwiki.wdka.nl/mw-mediadesign/images/8/82/Workflow-wiki2html.svg)
|
|
|
|
|