Command line Python program to extract army rules and unit cards from 10th edition Warhammer 40k indexes to create army list specific pdfs with reduced file size.
Project description
Description
Command line Python program to extract army rules and unit cards from 10th edition Warhammer 40k indexes to create army list specific pdfs with reduced file size. Requires Python.
Instructions
- Download an army index https://www.warhammer-community.com/warhammer-40000-downloads/#indexes-faqs-and-errata
- Install Python
- Install py40kie using pip:
pip install -U py40kie
- Run py40kie using command line:
py40kie [-h] [-i EXTRA_INDEXES [EXTRA_INDEXES ...]] [-o OUTPUT_PDF] [-b] [-a] [-d] [-s] [-e] [-w] [-na] [-nd] [-ns] [-ne] [-nw] [-r RULE_PAGES [RULE_PAGES ...]] [-v] index_pdf pages [pages ...]
Army List builder instructions
- Create army list with Google Sheet army list builder
- Run the generated py40kie command
Examples
py40kie "Tyranids Index.pdf" 9 21 25 27 -o "my army list"
py40kie "Tyranids Index.pdf" "hive tyrant" "tyranid warriors with ranged bio-weapons" 25 "hOrMaGaUnTs" -o "./my lists/my army list"
py40kie "Space Wolves Index.pdf" 7 1-23 "Blood Claws" 1-53 "terminator squad" "2-culexus assassin" 2-7 3-1 -o "Best Army List Ever.pdf" -i "Space Marines Index.pdf" "Agents of Imperium Index.pdf" "Imperial Armour Astartes.pdf"
py40kie "Blood Angels Index.pdf" "Commander Dante" "Sanguinary Guard" "Lieutenant in Phobos Armour" "Death Company Marines" "Astraeus" "Culexus Assassin" "Knight Gallant" -o "super competitive list.pdf" -i "Astartes Index.pdf" "Imperial Armour Astartes.pdf" "Agents of the Imperium Index.pdf" "Imperial Knights Index.pdf"
Arguments
Postional arguments
- The "index.pdf" file to extract cards from
- Space separated list of cards to extract. Can be page numbers or **exact** unit titles. Army rules, detachment rules, stratagems, enhancements and unit wargear are included automatically
Optional arguments:
- -o: The file to save the extracted pdf to. Folder path can be included
- -i: Optional space separated list of additional pdfs to extract allied units from other Indexes/Imperial Armour/Legends ("1-10" to extract the card on page 10 from the first additional pdf). Also use this to extract the Adeptus Astartes army rule when using Space Marines
- -b: Optional flag for boarding actions (extracts the army rules page but not the detachment or stratagem pages)
- -na: Optional flag to disable extracting the army rules page
- -nd: Optional flag to disable extracting the detachment rules page
- -ns: Optional flag to disable extracting the stratagem pages
- -ne: Optional flag to disable extracting the enhancements page
- -nw: Optional flag to disable extracting wargear pages
- -r: Optional argument to specify army rules and stratagem pages (space separated numbers). Use this if the army rules and stratagems are not successfully extracted from the index
- -v: Optional flag to override page extraction. Will extract only the page numbers specified from the main index
Contributions
Future features
Any suggested features would be appreciated
- Allied units from other Indexes/Imperial Armour/Legends
- Extract Adeptus Astartes army rule page for Space Marine lists
- Create runnable command from Google Sheet army builder lists
Example Sheet
Original creator u/Swelt - Extract extra rule pages. e.g. Deathwatch Armoury
- Handle exceptions gracefully
- Webapp version?...
Issues
py40kie was not tested on all indexes. If there is any problem extracting cards please submit an issue https://github.com/Dragons-Ire/40k-index-pdf-extractor/issues/new
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py40kie-0.2.2.tar.gz
.
File metadata
- Download URL: py40kie-0.2.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5351a8583a9a1ab7dd29fa7f39bc8bf601785bcd1ccbf733a2dd6dc8f9657a |
|
MD5 | 5f4053ee4b0a5fee9123cbcc75c521dd |
|
BLAKE2b-256 | 010cbe546627dbabb2fd3e61148a65725a9ffe6df3466b8b2ae8b5f0c9346cdd |
File details
Details for the file py40kie-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: py40kie-0.2.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d264ad45518101138d036158cd648cf3c601031ff124e06abfd26d34e05751 |
|
MD5 | b1d9d04aabeb2b5ca703d956ad4f7c1f |
|
BLAKE2b-256 | 9fa85af83e714384f5801dbe38724443c66bc0c69bcd7cc9960f7326f5786267 |