<commit_before># mw2pdf
Convert Mediawiki to PDF via pandoc and latex, including UML conversion 

## Purpose

Given a mediawiki where multiple documents (each spread across
multiple pages) are developed. Provide an
easy way to translate that into a separate PDF per document. Use
pandoc/latex to do so. 

Specific requirement: supported embedded plantUML in the pages, use
plantUML to produce the figures. 

## Usage

### On the wiki

* Provide a page in the wiki where you list all the documents you want
to have translated.
* In that page, put a bullet list with names of wiki pages, one line
per document
* These pages again contain a bullet list of wiki pages. These pages
  will be contained in the final document, in the order in which they
  are listed on this page
* Feel free  to use plantuml in your pages.  

### Translation process

* Put configuration data in config.py: user name, password, etc.
* run build.py
* it will download wiki pages, figures, etc.
* extracts uml, translates it via plantuml
* uses pandocs to translate into latex
* runs pdflatex
* uploads the pdfs and results page 

### Results

* For each document mentioned in the documentlist, there will be a
  file .pdf uploaded and a page with the name of documnet and
  BuildReport added. 
* BuildReports contains error messages as well as a link to the
  PDF. They are also added to a category BuildReport 
* They also have a link to the generated and uploaded PDF. 

## TODOs

* Better handling of figures: captions, size, ...

## Installation

* plantuml jar file is included here, but look for a more up-to-date
version
* python modules needed: mwclient and pypandoc
* installation: python, java, pandoc
<commit_msg>added missing pandocfilters module requirement to README.md<commit_after># mw2pdf
Convert Mediawiki to PDF via pandoc and latex, including UML conversion 

## Purpose

Given a mediawiki where multiple documents (each spread across
multiple pages) are developed. Provide an
easy way to translate that into a separate PDF per document. Use
pandoc/latex to do so. 

Specific requirement: supported embedded plantUML in the pages, use
plantUML to produce the figures. 

## Usage

### On the wiki

* Provide a page in the wiki where you list all the documents you want
to have translated.
* In that page, put a bullet list with names of wiki pages, one line
per document
* These pages again contain a bullet list of wiki pages. These pages
  will be contained in the final document, in the order in which they
  are listed on this page
* Feel free  to use plantuml in your pages.  

### Translation process

* Put configuration data in config.py: user name, password, etc.
* run build.py
* it will download wiki pages, figures, etc.
* extracts uml, translates it via plantuml
* uses pandocs to translate into latex
* runs pdflatex
* uploads the pdfs and results page 

### Results

* For each document mentioned in the documentlist, there will be a
  file .pdf uploaded and a page with the name of documnet and
  BuildReport added. 
* BuildReports contains error messages as well as a link to the
  PDF. They are also added to a category BuildReport 
* They also have a link to the generated and uploaded PDF. 

## TODOs

* Better handling of figures: captions, size, ...

## Installation

* plantuml jar file is included here, but look for a more up-to-date
version
* python modules needed: mwclient, pypandoc, pandocfilters
* installation: python, java, pandoc

{'fraction_non_alphanumeric': 0.04887218045112782, 'fraction_numerical': 0.000578368999421631, 'mean_word_length': 3.984149855907781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7160178', 'n_tokens_mistral': 964, 'n_tokens_neox': 917, 'n_words': 530}