44 Commits

Author SHA1 Message Date
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
Nick Vance
3b732fa47f Merge pull request #83 from mr-ice/master
added 2nd edition dominion & intrigue cards (english only)
2016-10-23 21:40:05 -07:00
Michael Rice
1cfc6e3e24 Fixed "Settlers / Bustling Village" group as it was backward (#84)
causing it not to match cards.json.  Also copied the updates
from 7355c8f6 into the other three card_groups.json, as new
entries needing translation.
2016-10-23 20:08:06 -07:00
Sumpfork
dbe3a2a45e fix typo in Mountain Pass name 2016-10-19 13:17:34 +02:00
Wendel Voigt
9ea133d2a2 Update Card counts for Adventures and Empires (#82)
Fixed incorrect card counts for Adventures and Empires.  Removed extra
white space at end of some lines.  Added text for the overall events and
landmark dividers in Empires (where blank).
2016-10-17 11:51:54 +02:00
Michael Rice
0f9832ae26 added intrigue update cards (english only) 2016-10-16 18:38:43 -05:00
Michael Rice
633050be51 added update cards to the dominion set (english only) 2016-10-16 14:09:56 -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
Wendel Voigt
669fa4c7e6 Add card counts and wrapper/slipcase features (#65)
This adds card counts and the option to print wrappers (aka slipcases).
It fixes issues #45, #47, and #48.
2016-07-06 14:16:06 -07:00
Sumpfork
7b9e2361ae fix typo, issue https://github.com/sumpfork/dominiontabs/issues/42 2016-06-19 19:32:27 -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
Nick Vance
cd6407a50d Remove duplicate Settlers entry
As reported here https://github.com/sumpfork/dominiontabs/issues/55
2016-06-14 11:23:32 -07:00
Nick Vance
01146a1591 Add Possession Errata from Empires (#54)
From https://github.com/sumpfork/dominiontabs/issues/50
2016-06-13 14:13:30 -07:00
Mark Bogdanoff
e6f343345f add rest of empires cards, extra, debtcost
also cleanup trailing whitespace
2016-06-10 20:32:44 -07:00
Aaron Jensen
7355c8f6f8 Empires expansion: adding cards with cost, name and type; dividers for events and landmarks. 2016-06-07 23:22:54 -07:00
Sumpfork
c8f057afc5 oops, cards were getting saved too late stripping out base cards from the expansions 2015-11-05 14:52:44 -08:00
Sumpfork
b200c9da9d simplify language mapping to always use english card type tags - we never show them in the generated pdf anyway 2015-11-03 14:34:19 -08:00
Sumpfork
96fb4bb8e0 bite the bullet: JSON card db is now the true source; remove text versions of card db, update card groups to JSON 2015-11-03 14:09:53 -08:00
Sumpfork
4c5a59cd43 add generated json file 2015-11-03 13:52:12 -08:00
Sumpfork
1b96a9ceb8 Throw out yaml as the python yaml library is badly documented and out of date; use JSON everywhere instead 2015-11-03 13:21:41 -08:00
Sumpfork
5ebdb555bc sync yaml 2015-09-25 14:49:36 -07:00
Michael Simons
a5db31b74c Found a few more typos :) 2015-09-25 17:30:46 -04:00
Sumpfork
3ae9ab06e7 run yaml generation to bring .txt and .yaml files into sync 2015-09-25 14:09:51 -07:00
Michael Simons
8e12a63acd Update dominion_cards.txt
Fixed typo
2015-09-20 01:07:47 -04:00
Adam Chappell
ac1159998b Issue 13 - Updated costs with * and +
Fixed costs to add * and + where necessary. Modified regex to allow a
cost to end in a * or a +. Adventures cards missing from yaml version so
you'll need to keep the costs for those cards in mind when adding them.
2015-07-26 20:54:35 -05:00
Jonathan Gordon
473b35e667 Add card groups to easily exclude upgrades and prizes, etc 2015-06-22 21:45:46 +10:00
Jonathan Gordon
55825b0069 Add --no-page-footer, --exclude-prizes, --no-card-backs options
--no-page-footer stops the set name being printed at the bottom of
the page (which doesnt fit on horizontal mode)
--exclude-prixes stops the prizes getting their own tabs
--no-card-backs stops it printing the back page (make sure your printer
is set to single-sided printing)
2015-06-22 20:46:34 +10:00
Pekka Mikkola
ce568d6ddf Include & reformat rules for Possession 2015-05-04 20:49:25 +03:00
Pekka Mikkola
75d33dd76e Add single tab for prizes 2015-05-04 20:16:39 +03:00
Pekka Mikkola
55e1aa1d35 Fix price & coins of scavenger 2015-05-04 00:05:20 +03:00
Sumpfork
03f5bc3fee fix price for Artificer 2015-04-30 12:06:38 -07:00
Sumpfork
5ba454752e add collection tab for Advenatures events 2015-04-27 13:17:13 -07:00
Robert R. Enderlein
7a2a3729c8 Added Events for Adventure (and a flag to disable them). 2015-04-27 00:46:53 +02:00
Robert R. Enderlein
8ef25f62f4 Fixed spaces -> tabs in card database.
The script now correctly parses the cards for the Adventures set.
2015-04-27 00:05:03 +02:00
Sumpfork
d32dfd69dd clean up english descriptions; add new Adventures card types 2015-04-24 15:31:46 -07:00
aarongilly
f3964afa78 Added Adventures Raw Text
Cards in order as they were printed on the Adventures rule book. May need reordered. Also - the Traveller cards may need some special handling. I haven't looked at the rest of your code.
2015-04-24 10:43:30 -05:00
Nick Vance
39f64dc6d5 Removed extra ':' in Adventures cards 2015-04-21 12:43:30 -07:00
Nick Vance
c924e9f5e3 Added Descriptions for All Cards from Dominion Adventures
Added Descriptions for All Cards from Dominion including Event and
Upgrade cards.
2015-04-21 12:35:06 -07:00
Sumpfork
558443925d fix inconsistent line lengths 2014-12-09 11:56:01 -08:00
Sumpfork
fb17c63d30 fix non-English name lookup when specifying expansions 2014-12-08 10:11:28 -08:00
Sumpfork
88df1c2f3f optional support for blank dividers with extra text. Some minor fixes and pep8. 2014-12-01 15:23:40 -08:00
Sumpfork
f112df29ed language mapping for terms; start cleaning up italian files 2014-11-20 14:26:27 -08:00
Sumpfork
1f4ded0f93 turn files into utf-8 for easy parsing 2014-11-19 13:27:36 -08:00
Sumpfork
753f7f7c09 start integrating multilingual versions; italian not working yet 2014-11-19 12:56:35 -08:00