A set of BASH scripts for turning PDFs that contain multiple rolltables into Json filess that can be imported in FoundryVTT 12-13
Find a file
Techognito d47c8f88e1 Updated step-0 again and added debugger script
Step 0 progress:
- The grep workaround now works, but causes problems if there are mutliple titles with that are similar (e.g., "Items in a Office" and "Items in a Port Master's Office" as the grepper will provide both when searching for the first)
- Only 1 known bug remains (the one listed above)
2025-08-15 21:21:20 +02:00
coulumnsplit.sh Moved scripts to paren folder, and updated README some more 2025-08-14 22:45:04 +02:00
debugger.sh Updated step-0 again and added debugger script 2025-08-15 21:21:20 +02:00
foundrycleaner.sh Moved scripts to paren folder, and updated README some more 2025-08-14 22:45:04 +02:00
foundryrolltable.sh Moved scripts to paren folder, and updated README some more 2025-08-14 22:45:04 +02:00
greatSplitter.sh Moved scripts to paren folder, and updated README some more 2025-08-14 22:45:04 +02:00
README.md created the initial draft of a cleaner for the pure pdftotext output 2025-08-15 00:00:21 +02:00
rolltabletxtfix.sh Moved scripts to paren folder, and updated README some more 2025-08-14 22:45:04 +02:00
step-0-Cleaner.sh Updated step-0 again and added debugger script 2025-08-15 21:21:20 +02:00

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.

Step 0

pdf2text something.pdf

turns pdf into text files

Step 1

greatSplitter.sh split

This "detects" rolltables from the input file, and splits them into seperate files

This does however assume, that the source is cleaned beforehand and each empty line splits the rolltables (not very clean)

Step 2

foundrycleaner.sh dice|title|numbers|sort|lines|auto [inputFile] [outputFile]

recommended is auto, as that performes all changes

auto steps:

  1. sort the file content base on the numbers that starts each line
  2. Removes the numbers that sort used first step
  3. 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