RSS Feed for a Nation
I could be wrong - in which case apologies for cluttering up the forum - but I don't think there's any RSS output for individual nations.
So, I knocked together this Yahoo! Pipe (http://pipes.yahoo.com/pipes/pipe.info?_id=2NtiWXnj2xGrb3Qho_NLYQ). Simply insert your NationStates name (the short one in the URL, not the full one that appears on the page), and the Pipe should do the rest.
I don't know any other NationStates users, so it might be a little buggy. If anyone has any problems with it, please let me know. Thanks!
Ermarian
27-06-2007, 01:28
I could be wrong - in which case apologies for cluttering up the forum - but I don't think there's any RSS output for individual nations.
So, I knocked together this Yahoo! Pipe (http://pipes.yahoo.com/pipes/pipe.info?_id=2NtiWXnj2xGrb3Qho_NLYQ). Simply insert your NationStates name (the short one in the URL, not the full one that appears on the page), and the Pipe should do the rest.
I don't know any other NationStates users, so it might be a little buggy. If anyone has any problems with it, please let me know. Thanks!
Um... I don't want to come across as overly critical, because this is some impressive work (and Yahoo Pipes looks interesting - WYSIWYG programming using XSLT, apparently; I need to try this out some time).
But still: You're generating a block of descriptive, human-readable text from the raw XML data that is there. Isn't that what www.nationstates.net/NationName is supposed to be doing already? ;) It's in RSS, but doesn't take advantage of the real point of this format, because it only ever contains a single item.
If Yahoo allowed some more power in getting multiple files, perhaps this could be extended to recently joined nations or in getting the members of the region... otherwise the only way to do that may be to write actual and arduous PHP code.
(I do have a really primitive NationStates XML parser script (http://stuff.ermarian.net/arancaytar/txt/ns_puppet/ns_xml.php.txt) that uses an event-driven parser to read the XML into a PHP object. Saves the regular expressions or string searches that are normally needed...)
Frisbeeteria
27-06-2007, 01:37
I'm not in a position to evaluate this as something the admins might be interested in, but there is that possibility.
If there's no response from the admins in two or three weeks (yes, it's summer holiday season for us too), try bumping the thread again.
Thanks for your kind words, Ermarian!
I absolutely agree with the limitations you mention. In fact, the only reason I made this Pipe was to replicate - as far as possible - the NationStates web content in my feed reader for the sake of convenience. (It also helps remind me that there are likely to be Nation-based issues needing tackled without me having to remember to visit the website each day.)
Thanks for sharing your XML parsing code. I had a quick go at knocking up a Facebook application (http://apps.facebook.com/nationstates/) to show off your Nation in your profile, but it's not exactly ready for primetime yet!
Brachiosaurus
28-06-2007, 05:51
Greetings.
I tried your feed but all I get is the first paragraph. I was wondering how it tells you that you have issues?
Greetings.
I tried your feed but all I get is the first paragraph. I was wondering how it tells you that you have issues?
It doesn't tell you that you explicitly have issues, I'm afraid. However, since my NationStates setting is to have new issues every day, the mere fact that the feed updates every day is enough to remind me that I need to go sort out my issues.
That's not a perfect solution, of course!
Imperial isa
28-06-2007, 13:51
odd it says i only have population of 2927 million when NS says i have 2.927 billion
Flibbleites
28-06-2007, 14:10
odd it says i only have population of 2927 million when NS says i have 2.927 billion
Notice the lack of a decimal point in the first number.
Imperial isa
28-06-2007, 14:24
Notice the lack of a decimal point in the first number.
yes on all the Nations i checked
The Most Glorious Hack
28-06-2007, 15:17
2927 million is the same as 2.927 billion.
Imperial isa
28-06-2007, 15:24
i all ways see million as small then billion and billion as bigger then miliion
guess it how they teach you it
The Most Glorious Hack
28-06-2007, 15:29
Um... what?
HC Eredivisie
28-06-2007, 16:01
2927 million is the same as 2.927 billion.At least in Dutch a billion is a million million, not a thousand million. I don't know for other languages.
I V Stalin
28-06-2007, 18:52
At least in Dutch a billion is a million million, not a thousand million. I don't know for other languages.
English, too.
American on the other hand...
Brachiosaurus
28-06-2007, 23:48
I had a question. It is intended to give only a partial description? All I get is:
The Chiefdom of Brachiosaurus
Founded 340 days ago , Brachiosaurus's population of 1957 million live in Norte Americana . Its Iron Fist Consumerists government lists Law & Order as its priority and Arms Manufacturing as its major industry. Brachiosaurus's civil rights are Few , its economy is Thriving and its…
Is anyone else getting the same?
I had a question. It is intended to give only a partial description? All I get is:
The Chiefdom of Brachiosaurus
Founded 340 days ago , Brachiosaurus's population of 1957 million live in Norte Americana . Its Iron Fist Consumerists government lists Law & Order as its priority and Arms Manufacturing as its major industry. Brachiosaurus's civil rights are Few , its economy is Thriving and its…
Is anyone else getting the same?
Hi Brahiosaurus,
Is that partial description what you get as the whole RSS output, or just what's displayed on the Pipes page before you add the feed to your FeedReader?
I tried adding your feed to Bloglines and got a full output, but I'm keen to find and correct any errors if you're getting some.
Brachiosaurus
29-06-2007, 00:36
It's on your pipe page at Yahoo.
What is Bloglines?
It's on your pipe page at Yahoo.
What is Bloglines?
Bloglines (http://www.bloglines.com) is a Web Feed Reader. Wikipedia has more information about these (http://en.wikipedia.org/wiki/News_aggregator), RSS (http://en.wikipedia.org/wiki/RSS_%28file_format%29) and web feeds in general (http://en.wikipedia.org/wiki/Web_feed).
There are plenty of other feed readers out there that you can use either online (e.g. Google Reader (http://reader.google.com/)) or on your desktop.
The result of the Yahoo! Pipe I created is one of these feeds; all you're seeing on the Pipe page is a short preview of the output. Directly above it, however, is a 'Subscribe' button, which should add the feed to your reader of choice.
Since this is the Technical part of the NationStates forum, I took a bunch of feed knowledge for granted where perhaps I shouldn't. Sorry about that! :)
Here's a sample of the output as viewed in Bloglines (http://www.bloglines.com/).
http://hodgers.com/media/temporary/sample_feed_output.png
North Edinburgh
29-06-2007, 10:46
Very very clever. I really like this. I especially like the "founded" info which is not normally listed elsewhere. It sits nicely in my iGoogle homepage.
Bravo! There should be a clapping smiley.
Very very clever. I really like this. I especially like the "founded" info which is not normally listed elsewhere. It sits nicely in my iGoogle homepage.
Bravo! There should be a clapping smiley.
Thanks very much! I'm so pleased you're getting good use out of it.
Brachiosaurus
29-06-2007, 21:44
Thanks.
The blogline version seems to have a better format than the google one.
It's nice that it gives the founding date for the nation.
Is there is version for the region? I noted the region XML does not give a founding date for regions though.
So a region version might be a bit more difficult unless people kept track of when they created their regions, perhaps, and then just input that in to the feed.
Thanks.
The blogline version seems to have a better format than the google one.
It's nice that it gives the founding date for the nation.
Is there is version for the region? I noted the region XML does not give a founding date for regions though.
So a region version might be a bit more difficult unless people kept track of when they created their regions, perhaps, and then just input that in to the feed.
Wow! I had no idea there was a cgi script for the regions as well! In hindsight, I suppose I could have guessed (Pacific (http://nationstates.net/cgi-bin/regiondata.cgi?region=pacific)). I shall get to work on a regions Pipe this weekend :)
Are there any other cgi scripts in NationStates?
Brachiosaurus
30-06-2007, 02:01
There is a region xml but it doesn't really tell you anything except how many nations are in the region.
Ermarian
01-07-2007, 19:06
English, too.
American on the other hand...
So you do have "milliards" in Britain?
In any case, population in XML is in terms of millions, and always an integer.
------------
Unfortunately, I don't think there are any XML feeds besides nation and region. My endorsement counter parses the actual HTML of the human-readable nation page; as far as I know, so do all other endo-counting scripts.
Goobergunchia
04-07-2007, 01:02
Very very clever. I really like this. I especially like the "founded" info which is not normally listed elsewhere. It sits nicely in my iGoogle homepage.
I'm obliged to note that if your nation is sufficiently ancient to predate the "Founded" tag in the XML feed, you get something along the lines of "Founded , Goobergunchia's population of 8184 million...."
However, well done on this feed IMO.
St Edmundan Antarctic
07-07-2007, 17:52
So you do have "milliards" in Britain?
We used to have them, but these days 'billion' is much more commonly used -- as in America -- for that value instead...
I'm obliged to note that if your nation is sufficiently ancient to predate the "Founded" tag in the XML feed, you get something along the lines of "Founded , Goobergunchia's population of 8184 million...."
However, well done on this feed IMO.
Aaah, thanks for letting me know, Goobergunchia. I'll try and figure out a way round that (but don't hold your breath - I'm quite slow! :) )