Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

I've added an endpoint here to query records:

 

https://dsdarchive.com/api/demos/records?wad=heretic&level=E1M1&category=Pacifist

 

Response: {"player":"Kimo Xvirus","time":"0:27","category":"Pacifist","level":"E1M1","wad":"heretic","engine":"Heretic v1.3 + vv","date":"2009-02-22T03:06:50.000Z"}

 

(I can add more details to the response, it's just a proof of concept.)

 

This could be used, for instance, with irc / discord bots, for pages on other sites to not need manual updates, etc.

 

What would you like to see out of a dsda API?

Share this post


Link to post

I like this. Maybe wad specific stats like total time, total demos, first demo (date, demo), last demo (date, demo), etc

Share this post


Link to post

Nice, this should be a godsend for the Doom Wiki - I tried on a couple of occasions to push along the maintenance of the speedrunning tables there, but with now over 5000 map articles and counting it's just an impossible task, no one has that much time on their hands. For Pr+ demos would it be possible for the response to show the demo's complevel?

Share this post


Link to post
2 minutes ago, Eris Falling said:

For Pr+ demos would it be possible for the response to show the demo's complevel?

I'm not coding this, but afaik the complevel always gets baked into the demo file, so I suppose it can be read.

Share this post


Link to post
Posted (edited)
1 hour ago, Eris Falling said:

For Pr+ demos would it be possible for the response to show the demo's complevel?

That info is included in the engine column right now, e.g.,

 

https://dsdarchive.com/api/demos/records?wad=enirvana&level=Map 19&category=Pacifist

 

{"player":"4shockblast","time":"9:30.37","category":"Pacifist","level":"Map 19","wad":"enirvana","engine":"PrBoom+ v2.5.1.4 cl9","date":"2017-07-28T20:51:56.000Z"}

Share this post


Link to post
On 5/8/2019 at 9:29 PM, Eris Falling said:

Nice, this should be a godsend for the Doom Wiki - I tried on a couple of occasions to push along the maintenance of the speedrunning tables there, but with now over 5000 map articles and counting it's just an impossible task, no one has that much time on their hands.

Adding/updating DW demo tables via a XymphBot script has been on my to-do list for a long time, pending API availability, so yes, this is most welcome.

 

I don't really have any insight yet what data will be needed to accomplish that, so perhaps someone familiar with DW demo coverage (Eris?) can advise what API features would be useful?

Beyond that, desired endpoints and attributes will probably not come up until I would start building a script, which is quite a ways off due to (non-DW) things higher on my list.

Share this post


Link to post
Posted (edited)
33 minutes ago, kraflab said:

I guess one thing missing is a link to the file.

Obviously. And a notes field?

 

Edit: query by wad ID (e.g. 947 for Doom IWAD) would be most helpful, since I already have those in XymphBot .ini files.

Edited by Xymph

Share this post


Link to post

The id for doom is "doom" in the new dsda; I don't have any plans on preserving those numbers 😛

Share this post


Link to post
Posted (edited)
1 hour ago, kraflab said:

The id for doom is "doom" in the new dsda; I don't have any plans on preserving those numbers 😛

Please reconsider that. Wad IDs (and optionally map IDs too) are used in the dsda template and only the template would need to be updated to point to the new site and WAD/map pages.

With a different ID system, some 4500+ DW articles would need to be updated which, even with a bot script, would be painful and time-consuming -- as would manually looking up the 380+ new IDs and updating the bot .ini files.

Edited by Xymph

Share this post


Link to post

Considering the scope of this project, updating links on the wiki doesn't strike me as a big task anymore, since it should be automatable. 🙃

 

The template has a title, which could be used to make the links instead, but only if there aren't duplicates, so I don't know if that's doable.

Share this post


Link to post
Posted (edited)

FWIW: What about an API query that takes the md5 (or 8.3 filename perhaps) of a WAD and returns its ID?

 

For the bot, that means a one-time code update to replace Andy's IDs, then subsequent runs make two passes, one to retrieve the IDs and one to get the records. If the IDs later change again (backend upgrade or whatever), it keeps working.

 

As a bonus, it could prevent associating a demo with the wrong version of a megawad.

Share this post


Link to post

Not seeing any reason to add an extra step in between wad and id, especially one that needs to be changed every time a wad is updated.

 

What version of a wad a demo belongs to is a separate topic and a nonissue, so I don't see that being a relevant benefit either.

Share this post


Link to post
9 hours ago, kraflab said:

Considering the scope of this project, updating links on the wiki doesn't strike me as a big task anymore, since it should be automatable. 🙃

Despite automation, it is still a big task to me. Bot account actions aren't autonomous; a bot script is run on each .ini file separately, under human supervision so it can be aborted in case a malformed edit comes along (e.g. due to a non-standard entry that the script didn't take into account yet). No-one is going to review thousands of bot edits afterwards, so I believe that monitoring is important. While running across multiple .ini files can be automated further, monitoring updates on 4500+ pages (the other 1000-odd map articles don't have DSDA links) is still very time-consuming.

 

And before that, updating the .ini files is a time-consuming task in itself. Could you at least provide a mapping list of old numeric ID to new alphanumeric ID so I can try to script those updates? It should not be hard to create that as a by-product of the import phase from the old site.

 

9 hours ago, kraflab said:

The template has a title, which could be used to make the links instead, but only if there aren't duplicates, so I don't know if that's doable.

The optional title field determines how a link is shown in the article, and cannot and should not be used to control the external link.

 

The whole point of this template (and many like it) is that the external links can easily be updated in a single place if the IDs are preserved, and it'll be frustrating if that won't happen here.

Share this post


Link to post

Ya, I'm sure we can work out some kind of redirect path that takes legacy IDs.

Share this post


Link to post
16 minutes ago, kraflab said:

Ya, I'm sure we can work out some kind of redirect path that takes legacy IDs.

Thanks, I'd appreciate that very much.

 

For new WADs without old ID, we can create a new dsda template and use that in future map articles.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×