intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Dec 14, 2017 11:23 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
PostPosted: Sun Apr 02, 2017 9:14 am 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
Pegbiter wrote:
To my knowledge, only the browse pages can be fetched in XML format. Just add &xml to any http://ifdb.tads.org/search URL. This does not seem to work for the random pages unfortunately.


Thank you, that works, for example - I can fetch ratings 3.0 to 6.0, only Inform stories, and only ones with several reviews in XML with this URL: http://ifdb.tads.org/search?searchfor=r ... +Games&xml However, the list seems short and seems to stop in the alphabetical A's?

For Incant! app for Android, I ended up abandoning live fetching from IFDB as I couldn't find a way to filter based on rating and number of reviews. I made CSV files that are open source to anyone: https://github.com/WakeRealityDev/incan ... assets/csv - and in the source code comments there are mysql SQL statements on how I extracted these CSV files. here: https://github.com/WakeRealityDev/incan ... e.java#L19

IFDB mysql dump is getting near the 3 months mark before they dump it again. http://ifarchive.org/indexes/if-archiveXinfoXifdb.html And I think this makes SQL generated star ratings out of date for new stories, doesn't give fresh author works as much attention. Trying to see if I can get an XML query to account for raising stars.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Apr 03, 2017 3:36 am 
Offline

Joined: Mon Jun 22, 2015 2:58 am
Posts: 11
allensocket wrote:
Thank you, that works, for example - I can fetch ratings 3.0 to 6.0, only Inform stories, and only ones with several reviews in XML with this URL: http://ifdb.tads.org/search?searchfor=r ... +Games&xml However, the list seems short and seems to stop in the alphabetical A's?
The XML version will contain the exact same list of games as the corresponding HTML search/browse page.

You can change the order by adding &sortby= followed by a modifier to the URL. The available modifiers are rel, new and old for search pages; lnew, lold, pnew and pold for browse pages and ratu, ratd, rcu, rcd, ttl, auth and rand for any of them. Instead of randomly trying these out, I suggest you use the sorting dropdown in the HTML result page.

The XML list is also paginated in the same way as the HTML page. In case the result is no longer than 250 items, you can fetch it all by adding &pg=all to the URL. This will also give you the 250 first items with the current sorting order when the result is longer. If you want to fetch further results, you need to add &pg=2, &pg=3 and so on to the URL.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Apr 03, 2017 9:56 am 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
Cool, thank you for the tips.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group