| coulumnsplit.sh | ||
| debugger.sh | ||
| foundrycleaner.sh | ||
| foundryrolltable.sh | ||
| greatSplitter.sh | ||
| README.md | ||
| rolltabletxtfix.sh | ||
| step-0-Cleaner.sh | ||
FVTT-pdf2json-rolltable-creater
A set of BASH scripts for turning PDFs that contain multiple rolltables into Json filess that can be imported in FoundryVTT 12-13
Initially these scripts are intended for "The book of random tables" series by Matt Davids, but will look into adding other sources as I find need for it.
I want to be able to use these scripts on x.pdf or y.pdf
- Open an issue in the issues tracker
- Either provide a copy of the pdf or a link to where it can be purchased
- Be patient (Depending on complexity and my leftover energy from everything else I do. The amount of time needed varies)
- profit
The Different Scripts and their order
Step 0
pdf2text something.pdf
turns pdf into text files, the text files can then be parsed by my scripts
Step 1
step-0-Cleaner.sh inputfile [output path]
This "detects" rolltables from the input file, and splits them into seperate files
the greatSplitter.sh has been replaced by step-0-Cleaner instead, as I found a way to do both in the same "step"
output still needs some cleaning though, hence the cleaner on Step 2, but Step 2 uses the individual outputs from Step 1
Step 2
foundrycleaner.sh dice|title|numbers|sort|lines|auto [inputFile] [outputFile]
recommended is auto, as that performes all changes
auto steps:
- sort the file content base on the numbers that starts each line
- Removes the numbers that sort used first step
- changes dice marks into foundry html approved marks (makes it so you can click to roll, in the description field or on the popup/chat message that contains the rolltable result)
Step 3
fundryrolltable.sh ["inputfile"] ["Title"]
Step 4
create an empty rolltable in foundry, right click and import, upload JSON from step 3
Debugger script
To use the debugger script link it to you bin or to /usr/bin
ln -s /path/to/debugger.sh ~/bin/debugger
alternatively:
ln -s /path/to/debugger.sh /usr/bin/debugger