diff --git a/.gitignore b/.gitignore index 3e1bf98ac465..eca7aa023bcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.exe *.py[cod] +.envrc __pycache__/ +outline output_* -outline \ No newline at end of file diff --git a/README.md b/README.md index 8b01da3e7ea8..1ef4068af844 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,37 @@ # mariadb_pdf ## Installation + - install [python](https://www.python.org/downloads/) `(3.10+)` - install [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) (if on windows copy wkhtmltopdf.exe to this directory) -- Install python packages with (pip/pip3) +- Install python packages with (pip/pip3): - toml - pdfkit - requests - bs4 +If you are on Linux (not tested on MacOS or Windows), you can setup a virtual +environment with the following commands (needs `virtualenv`): + +```console +virtualenv .venv +source .venv/bin/activate +pip3 install -r requirements.txt +``` + ## Usage -- make sure -[mariadb_kb_server](https://github.com/icerath/mariadb_kb_server) +- make sure [mariadb_kb_server](https://github.com/icerath/mariadb_kb_server) is running. - run `'(python/python3) main.py'` - - ## Dependencies -- python 3.10 + -- wkhtmltopdf + +See [requirements.txt](./requirements.txt). ### Libraries + - toml - pdfkit - requests -- bs4 \ No newline at end of file +- bs4 diff --git a/config.toml b/config.toml index f4fe189749d8..23e21d80d9fa 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ -[TOC] -main_font_size = "12px" -main_indent = "1em" +[TOC] +main_font_size = "13px" +main_indent = "0.8em" main_margin = "0.5em" chapter_font_size = "18px" @@ -23,4 +23,4 @@ dump-outline = "outline" encoding = "UTF-8" footer-line = "" quiet = "" -disable-javascript = true \ No newline at end of file +disable-javascript = true diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000000..96409b13bbe5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +bs4 +pdfkit +requests +toml