20 Commits

Author SHA1 Message Date
Wendel Voigt
5fcfcdb3e8
Menagerie changes (#304)
* New menagerie images
* Added options to deal with the new Way cards
* Added Menagerie set and new card types
* Tool to help bring in a large number of new cards
2020-03-23 22:29:17 -07:00
Peter
69c0a66868
Change card db handling (#286)
* reorganize card db, add doit file
* make card_db_src a true source by removing untranslated entries, removing the untranslated field
* turn update language script into a better compiler
* move tools into submodule
* remove language db comparison test; add travis compile and check-in of card db
Co-authored-by: Nick Vance <nickv2002@users.noreply.github.com>
2020-01-04 15:26:51 -08:00
Nick Vance
fb80880041 Added Captain and Church Promos (#267)
* Added Captain and Church Pomos
2019-09-14 15:12:34 -07:00
Guillaume Collic
3a8f72a56a Fix cards list order for accents in expansion card (#264) 2019-07-29 15:02:18 -07:00
Paul Molodowitch
3cf716d7fc add --exclude-expansion option (and test) (#257)
provides an easy way to include nearly all expansions, except for a select few
2019-06-02 15:16:59 -07:00
Paul Molodowitch
87a2835097 allow cost / set-icon to be displayed in body-top ONLY (#258)
previously, if you used, ie, "--cost=body-top", the cost would show in
the tab AND body-top.  Since the help text implies that the way to
accomplish this should be "--cost=tab --cost=body-top" (and because if you
put it in body-top, it's probably because you want to save space on the
tab)
2019-06-02 15:09:32 -07:00
Peter
31a71447f0
precommit git hooks, rearrange package structure (#251)
* precommit hooks and changes because of these
* mv package into src dir
* add requirements file, clean up setup reqs, add precommit to CI
2019-05-23 16:17:30 -07:00
Peter
f47d9ee17b Make better package (#132)
* make domdiv a better behaved python package (see #131)
* move code from __init__.py to main.py to make import quicker and make version work without dependencies
* update languages import to use pkg_resources, fix tests
* update readmes
* change font lookup, font readme notes
2016-12-15 16:29:48 -08:00
Nick Vance
250a9e4b51 Card db refactoring (#105)
* Code refactoring for card db change (#86)
This assumes the following file structure:
```
card_db/
    cards_db.json
    sets_db.json
    <language>/
        cards_text.json
        sets_text.json
```
Files that are needed are:

- cards_db.json
- cards_text.json and sets_text.json for each supported language

**Other changes:**

Added option called `--edition` that can be "1", "2", "latest", or "all". Defaults to "all".
This allows for a quick filtering for those that don't want everything (i.e., "all").

- "1" is for all 1st editions of expansions. It also includes 2nd edition update packs.
- "2" is for all 2nd editions of expansions. So base, Dominion 2nd ed., and Intrigue 2nd ed. (no update packs, since already in 2nd edition)
- "latest" is for base, Dominion 2nd ed., and Intrigue 2nd ed., and all the remaining 1st editions.

Cards can be grouped 3 ways:

- No grouping (default)
- In expansion grouping invoked with `--special_card_groups`.
- Grouping across expansions with `--exclude_events` and `--exclude_landmarks`.  These groups are placed in a set called "Extras".   `--exclude_prizes` is not currently implemented.

Added an option called `--upgrade_with_expansion` which will put the upgraded cards into the corresponding earlier expansion.  So all 1st edition cards as well as the upgrade cards appear in the 1st edition set.  That way the cards are listed on the expansion dividers and any tab/ordering fit the expansion as a whole.  And because of the deleted cards in 2nd edition, this is a different list of cards than just using the 2nd edition.

* update set image mapping for 2nd edition icons
* add improved set icons from https://boardgamegeek.com/filepage/73273/dominion-card-icons-vector-images
* recompress all images
* new format for cards_db.json and translations
* Added short name to sets
* Updates to allow blank set images for base cards and fix blank set image for the "Extras" set.  Also removed base_set.png which is no longer needed (again!)
* scaled all set images to be exactly 300 x 300 pixels for consistency and better printing
* Updated __init__.py and cards.py to automatically find the "lowest cost" value from all the cards in a group.
* Update carddb_tests.py
  * Updated set information in testcases
  * Changed test of cardset to test cardset_tag instead.  Since that is what everything keys off of now.
  * Updated the language tests to pull in the language parts before making the check.
* Standardize on ISO8859-15 (#98)
* Remove Trash Card from 2nd edition, replace HTML line breaks & unicode
* Better Error Handling for Font Errors
* Added text formating codes
Added text formatting codes for "extra" and "description" fields.  This includes:
<tab> and <t> to add a tab (4 spaces)
<n> as an alternative to \n (hard new line)
<br> as an alternative to <br /> (soft new line)
<c> and <center> to center text in this paragraph until the next hard new line
<l> and <left> to left align text in this paragraph until the next hard new line
<r> and <right> to right align text in this paragraph until the next hard new line.
<line> to add a hard new line, a centered dividing line, and a trailing hard new line.
<line> to put a centered line
This goes with the <b>..</b> for bold, <i>..</i> for italics, and <u>..</u> for underline that was already existing (but probably not remembered.
* Update card count presentation (#116)
* wvoigt added automatic bonus highlighting (#119)
2016-12-10 21:05:34 -08:00
Michael Rice
0f9832ae26 added intrigue update cards (english only) 2016-10-16 18:38:43 -05:00
Nick Vance
0efac2000b Add new Sauna/Avanto Promo with Split Pile (#76)
* Added Sauna/Avanto Promo with Split Pile
* Update tests to account for new promo cards
2016-10-04 12:43:02 -07:00
Sumpfork
b70bd37d80 - start using argparse instead of optionparser
- make all code conform to pep8 once more
- add a unit test to check for pep8 compliance
- delete old ez_setup
2016-07-06 15:21:00 -07:00
robertre2
eb338c77d8 Added Event and Landmarks. (#62)
Added Event and Landmarks from Empires, and the Summon Event.
Fixed some problems with display of Debt in descriptions.
2016-06-16 13:39:45 -07:00
Sumpfork
d3e3c8f25b fix card number test for deleting Settlers 2016-06-14 12:38:45 -07:00
Sumpfork
e616ad2656 update unit tests for empires 2016-06-08 11:27:32 -07:00
Wendel Voigt
94f91b5ea2 Fixed error in Text and Tab tests 2015-11-24 10:36:00 -06:00
Wendel Voigt
d024dc9fb4 Added front and back text options
1. Added --front and --back to select the type of text to display.
Options are 'card' for the card text, 'rules' for the extra rules,
'blank' to not print anything.  And for --back, the option 'none' will
keep the pages with the backs from printing.
2. Added stub test cases for card text as well as tab size and text
alignment.
3. removed options --no-card-rules and --no-card-backs since they are no
longer needed.
4. Fixed issue with the tab outline drawing
2015-11-24 10:21:47 -06:00
Sumpfork
fbc456c48e language tests 2015-11-20 16:49:15 -08:00
Sumpfork
4b9956006a first couple unit tests 2015-11-19 17:20:08 -08:00
Sumpfork
d1750589a1 start refactoring and renaming to clear up code structure 2015-11-10 16:40:45 -08:00