Hi API developers,

As you may have seen, VacuumBot has been very busy [1] transforming
some formats (e.g. "[microform]" to "Microform"), cleaning up
pagination by stripping spaces, colons and semicolons from the right
and, since last night, removing trailing periods (".") from author
death dates. I had heard George give that last task as an example bot
task in a recorded presentation (am I the first to pick it up?).
I have limited the number of calls to about one API call
OpenLibrary.save(key, record, comment) per two seconds, but it can
probably be done more efficiently using the API call
OpenLibrary.save_many(query, comment, action). But what exactly does
it do? What is supposed to go in the query, comment and action
arguments? There is no documentation for it on
http://code.openlibrary.org/api/openlibrary/api.html

In the past days of running VacuumBot, I've encountered errors like this:
Bad Request: {"message": "expected /type/author, found
/type/redirect", "at": {"property": "authors", "key":
"/books/OL21880872M"}, "value": "/authors/OL4472901A", "error":
"bad_data"}
VacuumBot didn't touch the authors field, so it seems that this is
(more) bad data in the database. I checked the author from the error
and it looks like this may have been the result from a bad author
merge: the author key in the "bad data" redirects to the author that
this was merged into, but this Edition record was not updated with the
new key.
I see several options to handle these cases (there aren't that many,
but it seems it can't be done manually):
1) remove authors (but that would leave the impossible task of
reconnecting authors and works later on);
2) if there is a work that has an author, remove the author from the
edition (but most of these records with errors don't have works);
3) if there is no work, try to find the merged author by following the
links until you find the record with type /type/author and put that in
the authors field.
Is this something an existing bot can do?
I tried one record manually, but when I had found the right author for
the newly created/to be created work and clicked "save", I still got
the error. I think the web interface doesn't do my option 2.

VacuumBot is now on GitHub too [2].

Thanks in advance.

Ben

[1] http://openlibrary.org/people/vacuumbot
[2] https://github.com/bencomp/VacuumBot
_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to