NATION

PASSWORD

List of Cards in XML

The place to wheel and deal, talk shop, and build up your dream deck!
User avatar
Ballotonia
Senior Admin
 
Posts: 5494
Founded: Antiquity
Liberal Democratic Socialists

List of Cards in XML

Postby Ballotonia » Mon Jul 22, 2019 11:18 am

Greetings,

A list of cards is now available, in XML format. It contains all information shown on the cards, including badges and trophies.

Download it right here:
S1: https://www.nationstates.net/pages/cardlist_S1.xml.gz
S2: https://www.nationstates.net/pages/cardlist_S2.xml.gz

Ballotonia
Last edited by Ballotonia on Sat Dec 07, 2019 1:00 pm, edited 1 time in total.
"Een volk dat voor tirannen zwicht zal meer dan lijf en goed verliezen, dan dooft het licht…" -- H.M. van Randwijk

User avatar
9003
Diplomat
 
Posts: 624
Founded: Oct 25, 2012
Corporate Police State

Postby 9003 » Mon Jul 22, 2019 11:34 am

I'm glad to see the official list out. No more clunky api work and it has the badges!
proud member of PETZ people for the Ethical Treatment of Zombies

Active member of The cards market place discord

User avatar
Inven
Spokesperson
 
Posts: 126
Founded: Mar 06, 2019
Liberal Democratic Socialists

Postby Inven » Wed Jul 31, 2019 5:19 am

[deleted]
Last edited by Inven on Sat Jan 04, 2020 7:39 am, edited 1 time in total.

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Wed Jul 31, 2019 5:15 pm

This is great, thanks for making this resource available!
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
N7eternia
Envoy
 
Posts: 254
Founded: Feb 20, 2019
Ex-Nation

Postby N7eternia » Wed Jul 31, 2019 5:22 pm

Thanks!

User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1895
Founded: Mar 02, 2016
Benevolent Dictatorship

Postby SherpDaWerp » Mon Aug 05, 2019 12:36 am

Might it be worthy pointing out this is a .gzip file, that requires a proper file decompression thing to open? I know it's painfully obvious, but I somehow managed to still miss the fact it was compressed until Notepad++ opened gibberish. Granted, most everyone who will use this should know how to decompress it (including me), but it was still a bit of a surprise.

Otherwise, thanks heaps, this is quite helpful!

EDIT: There's also a bunch of characters that are outside the normal ASCII range, so it goes weird opening it in Firefox.
You can use notepad++ to remove them all (Replace -> " [^\x1F-\x7F]+ " -> Search Mode: Regular Expression)
Last edited by SherpDaWerp on Mon Aug 05, 2019 12:56 am, edited 2 times in total.
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial

User avatar
Ballotonia
Senior Admin
 
Posts: 5494
Founded: Antiquity
Liberal Democratic Socialists

Postby Ballotonia » Sat Dec 07, 2019 1:05 pm

Greetings!

Now also a file is available containing the cardlist for season 2. See top post.

Note that XML readers which cannot handle special characters will still stumble. There is no convenient way for us to strip those out without fundamentally altering the contents of the file. If you want you could grep out all lines containing user-supplied content, which will get rid of all special characters. This will however leave you without nation description (S1 only), nation slogan, and nation type information.

Ballotonia
Last edited by Ballotonia on Mon Dec 23, 2019 1:22 pm, edited 2 times in total.
"Een volk dat voor tirannen zwicht zal meer dan lijf en goed verliezen, dan dooft het licht…" -- H.M. van Randwijk

User avatar
BuccaRuu
Lobbyist
 
Posts: 11
Founded: Sep 06, 2006
Inoffensive Centrist Democracy

Postby BuccaRuu » Tue Mar 03, 2020 9:12 am

I found a card in that list (season 2) which does not exist. How is that possible? It is card #3317683 which is from Thiccumsland and has/had/was supposed to have the default flag - hence my interest in it.

User avatar
9003
Diplomat
 
Posts: 624
Founded: Oct 25, 2012
Corporate Police State

Postby 9003 » Tue Mar 03, 2020 11:49 am

BuccaRuu wrote:I found a card in that list (season 2) which does not exist. How is that possible? It is card #3317683 which is from Thiccumsland and has/had/was supposed to have the default flag - hence my interest in it.


Early on during the inscription period if a nation was DEATed the card was nuked as no copies where printed yet.
A check check to the boneyard confirms that the nation in question was in fact DEATed. This list was made at the snapshot and no updated after the fact.
proud member of PETZ people for the Ethical Treatment of Zombies

Active member of The cards market place discord

User avatar
BuccaRuu
Lobbyist
 
Posts: 11
Founded: Sep 06, 2006
Inoffensive Centrist Democracy

Postby BuccaRuu » Sun Mar 08, 2020 7:31 am

Okay, so I assume the "snapshot" was taken after the flags were "frozen"? In any case, this https://www.nationstates.net/page=deck/card=3083854/season=2 card has "Default.png" as flag in the list, but it obviously does not as printed card. This makes the use of the list somehow difficult. :unsure:

cardlist_s2.xml wrote:<CARD>
<ID>3083854</ID>
<NAME>Tattooed Belle</NAME>
<TYPE>Free Land</TYPE>
<MOTTO>If it's not Baroque, don't fix it.</MOTTO>
<CATEGORY>Civil Rights Lovefest</CATEGORY>
<REGION>Osiris</REGION>
<FLAG>Default.png</FLAG>
<CARDCATEGORY>common</CARDCATEGORY>
<DESCRIPTION> 1.54b Population 61.6t Industry</DESCRIPTION>
<BADGES></BADGES>
<TROPHIES>
<TROPHY type="LIBERAL-10">14607</TROPHY>
</TROPHIES>
</CARD>
Last edited by BuccaRuu on Sun Mar 08, 2020 7:32 am, edited 2 times in total.

User avatar
Recuecn
Ambassador
 
Posts: 1049
Founded: Feb 02, 2015
New York Times Democracy

Postby Recuecn » Sun Mar 08, 2020 1:49 pm

BuccaRuu wrote:Okay, so I assume the "snapshot" was taken after the flags were "frozen"? In any case, this https://www.nationstates.net/page=deck/card=3083854/season=2 card has "Default.png" as flag in the list, but it obviously does not as printed card. This makes the use of the list somehow difficult. :unsure:

cardlist_s2.xml wrote:<CARD>
<ID>3083854</ID>
<NAME>Tattooed Belle</NAME>
<TYPE>Free Land</TYPE>
<MOTTO>If it's not Baroque, don't fix it.</MOTTO>
<CATEGORY>Civil Rights Lovefest</CATEGORY>
<REGION>Osiris</REGION>
<FLAG>Default.png</FLAG>
<CARDCATEGORY>common</CARDCATEGORY>
<DESCRIPTION> 1.54b Population 61.6t Industry</DESCRIPTION>
<BADGES></BADGES>
<TROPHIES>
<TROPHY type="LIBERAL-10">14607</TROPHY>
</TROPHIES>
</CARD>

If you mean the XML snapshot, then yes, it was after the flags were frozen. (For the card snapshot itself, of course, there was a period that allowed people to change their flags, among other things.) As a gif collector, I struggle with the xml not always being right too: there's a decent number of animated flags that due to changes in how NS handles flag uploads, aren't labeled as gifs. Some people have joked about renaming their flag files on purpose just to screw with card collectors, and my guess is something like that happened in your case (although probably not intentionally).
rəswɛsən

User avatar
BuccaRuu
Lobbyist
 
Posts: 11
Founded: Sep 06, 2006
Inoffensive Centrist Democracy

Postby BuccaRuu » Sat Mar 28, 2020 1:18 pm

Those are different things, I believe. Also PNG images can be animated, and JPG as well. No clue if that is filtered during the upload so only "pure" GIFs end up as animated flags.

The tag <FLAG>Default.png</FLAG> cannot come from user-uploaded flags, since they always have the
<FLAG>uploads/@@NAME@@__(some number).(jpg,png,gif)</FLAG>
form. So that other example was altered by someone after the snapshot was taken for the XML.

Another flaw I found: https://www.nationstates.net/page=deck/ ... 4/season=2 is a default.jpg flag but the XML snapshot had it as some user upload. Does that happen if the upload conflicted with some rules for flags, so it was replaced by the default flag after the XML list was constructed?
If so, there might be a lot more default (jpg or png) flags out there I'll never know of unless someone sends me the card offer. :(
Last edited by BuccaRuu on Sat Mar 28, 2020 1:22 pm, edited 1 time in total.

User avatar
War Dogs IV
Political Columnist
 
Posts: 5
Founded: Mar 12, 2019
Inoffensive Centrist Democracy

Postby War Dogs IV » Sun Nov 20, 2022 5:38 am

Hi,
do we get this service for S3 as well? It would be much appreciated!
Cheers

User avatar
Pribaltic Union
Civilian
 
Posts: 1
Founded: Nov 27, 2023
Inoffensive Centrist Democracy

Postby Pribaltic Union » Mon Feb 05, 2024 8:00 pm

War Dogs IV wrote:Hi,
do we get this service for S3 as well? It would be much appreciated!
Cheers


Hi there,

you can change the number in the address:

https://www.nationstates.net/pages/cardlist_S3.xml.gz

Ballotonia wrote:Greetings!

Note that XML readers which cannot handle special characters will still stumble. There is no convenient way for us to strip those out without fundamentally altering the contents of the file. If you want you could grep out all lines containing user-supplied content, which will get rid of all special characters. This will however leave you without nation description (S1 only), nation slogan, and nation type information.


yep, I, however, tried to import these xml into Excel, but there were something like invalid characters. I'm an xml ignorant person, so I had to look for an editor to replace these invalid characters and do various obscure things, after this the file began to open in Excel.

corrected S3 xml file: https://disk.yandex.ru/d/cGFeTObU7IaCTg
S3 saved to excel format: https://disk.yandex.ru/i/_WK2ZFmO3Py-fg
Last edited by Pribaltic Union on Mon Feb 05, 2024 8:21 pm, edited 2 times in total.


Advertisement

Remove ads

Return to Trading Cards

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads