Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Card Template  (Read 2789 times)

0 Members and 1 Guest are viewing this topic.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Card Template
« on: November 06, 2012, 04:55:07 am »
+2

I'm replacing all most of the [[$Card]] links by {{Card|$Card}}. Some are missing (saw a "Knight" that is not captured, everything that is not in the Navbox is not captured as that's where I got my data from. Some King's Courts are not captured as they where written "King`s Court" or so.
But don't have more time now...

edit: Also everything like "[Duchies|Duchy]" is not captured.
edit2: Also, links like [Gold]s no don't include the 's' anymore, but that probably has to go in the template...

edit3: If you find something missing, please add to the list:
  • Shelters
  • Prizes
  • Ruins
  • 'Ruins' itself might be 'corrected' but shouldn't
  • Knights
  • 'Knights' itself might be 'corrected' but shouldn't
  • there are some "copper"s with small 's' in "terminal copper". Think that should stay like that,  but links don't work there

Other things:
  • [$card]$text needs work at template I think
  • [$card|$text] also needs work at the template
  • correct King's Court and other '-variants
  • 'Knights' also is wrong in the Navbox-template, it tries to preview, but there is no picture.
  • "Cost = x" in the Cardbox -> {{coin|x}}
« Last Edit: November 07, 2012, 01:26:32 pm by DStu »
Logged

Qvist

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2400
  • Shuffle iT Username: Qvist
  • Respect: +4085
    • View Profile
Re: Card Template
« Reply #1 on: November 06, 2012, 02:44:35 pm »
0

I don't know how to solve the [[Card]]s problem best. I could include an optional second parameter which replaces the Link text for {{Card|Duchy|Duchies}} but we still have to edit {{Card|Estate}}s into {{Card|Estate|Estates}}.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Card Template
« Reply #2 on: November 06, 2012, 03:12:06 pm »
0

I don't know how to solve the [[Card]]s problem best. I could include an optional second parameter which replaces the Link text for {{Card|Duchy|Duchies}} but we still have to edit {{Card|Estate}}s into {{Card|Estate|Estates}}.
That should be no problem
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Card Template
« Reply #3 on: November 07, 2012, 11:36:38 am »
+1

The template now supports 1 or 2 parameters, and the bot is updating the pages.

btw: NEED MORE BACKSLASHES
Code: [Select]
less cardlist.txt | sed -r 's/(.*)/\\\[\\\[\1\\\]\\\]\n\{\{Card\|\1\}\}\n\(\[\^ \]\*\)\\\[\\\[\1\\\]\\\]\(\[\^ \]\*\)\n\{\{Card\|\1\|\\1\1\\2}}\n\\\[\\\[\1\\\|\(\[^\\\]\]\*\)\\\]\\\]\n\{\{Card\|\1\|\\1\}\}/g' > replace.txt
« Last Edit: November 07, 2012, 11:39:13 am by DStu »
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Card Template
« Reply #4 on: November 07, 2012, 11:40:23 am »
+1

This might be helpful.  It has plural spellings of all the pre dark ages cards.

https://github.com/rrenaud/dominionstats/blob/master/card_info/card_list.csv
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Card Template
« Reply #5 on: November 07, 2012, 12:01:50 pm »
0

This might be helpful.  It has plural spellings of all the pre dark ages cards.

https://github.com/rrenaud/dominionstats/blob/master/card_info/card_list.csv

Thanks, even thought on this.  But I don't think I need them. I just want to replace everything that looks like '[[$Card|$sometextthatmightbepluralbutcanalsobesomethingelse]]' by {{Card|$Card|$sometextthatmightandwhythehelldidItakesuchalongvariablenamejusttotrytobefunny}}' and '[[$Card]]$sometexthere' by '{{Card|$Card|$Card$sometexthere}}'

Anyway thanks, might be helpfull sometime else.
Logged
Pages: [1]
 

Page created in 0.04 seconds with 20 queries.