82 Commits

Author SHA1 Message Date
Sumpfork
774c51dbc7 minor help text spelling fix 2016-12-11 15:04:44 -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
Nick Vance
c77e38824b Add Sauna/Avanto Promo Images (#80)
* Point Summon and Sauna promos to renamed promo.set.png
2016-10-17 11:53:13 +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
Peter
21c4134e9f German promo cards (#77)
* Add German texts for promo cards.
* fix logic around missing set images; add translations of german promo card names to mapping
2016-10-04 23:46:42 -07:00
Sumpfork
7863a9d0c5 fix arparse help strings - they cannot have unquoted format character 2016-07-19 11:13:00 -07:00
Wendel Voigt
b280fa7bc9 CenterTabs correctly fix up white space issues from automatic tests 2016-07-11 18:33:03 -05:00
Wendel Voigt
d354f1e291 CenterTabs fix up white space issues from automatic tests 2016-07-11 18:30:07 -05:00
Wendel Voigt
48c6ee0def Add option for Center Tab
These changes addresses issue #68
2016-07-11 18:15:08 -05: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
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
421127d8b5 use new action-treasure banner from https://github.com/sumpfork/dominiontabs/pull/61 to fix https://github.com/sumpfork/dominiontabs/issues/60 2016-06-19 08:49:11 -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
Mark Bogdanoff
cb86a48691 support cards with debt cost
doesn't support cards with coin and debt cost, but I don't need it that myself.
2016-06-10 20:31:54 -07:00
Mark Bogdanoff
9e07f2d1f6 add empires set image, debt image 2016-06-10 20:31:08 -07:00
Sumpfork
0475abf393 fix mispelling of treasure png 2016-06-08 11:24:01 -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
Aaron Jensen
1e7302c505 Fixed: --use-text-set-icon parameter doesnt work. 2016-06-07 22:00:52 -07:00
Sumpfork
b4fe9a936a add sorting by colour (really, card type) 2016-05-24 16:27:39 -07:00
Sumpfork
06edcbd2f2 add some asserts 2016-03-16 17:45:57 -07:00
Sumpfork
7980a7857b Merge branch 'emtpy_coin' of git://github.com/Hellmy/dominiontabs into Hellmy-emtpy_coin 2016-03-16 15:41:54 -07:00
Sumpfork
fdc2055999 Add horizontal/vertical gap option
Horizontal and vertical gap between dividers support - doesn’t properly
work with crop marks yet.
2016-03-16 15:05:43 -07:00
Manuel
6aaa690473 Add empty coin symbol with example 2016-02-25 20:25:50 +01:00
Sumpfork
5d58c4b3c0 fix bad refactoring for cropmarks 2015-12-31 08:43:16 -08:00
Sumpfork
cf19cf9b72 only single copy of data dir in options for now 2015-11-30 15:40:20 -08:00
Wendel Voigt
ff9cb6fde9 Fixed code error with tab_name_align being assigned 'left' 2015-11-24 10:44:42 -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
96308eb571 better page size handling 2015-11-20 12:56:38 -08:00
Sumpfork
95011627e5 move font registration to draw module, make its fallback actually work properly 2015-11-20 12:25:16 -08:00
Sumpfork
b8871471a6 more refactoring 2015-11-19 17:19:43 -08:00
Sumpfork
489f467bce more refactoring, renaming, unifying 2015-11-19 10:31:18 -08:00
Sumpfork
d1750589a1 start refactoring and renaming to clear up code structure 2015-11-10 16:40:45 -08:00