zotero / scaffold

Zotero translator creation IDE
http://www.zotero.org/support/dev/scaffold
38 stars 9 forks source link

New function: Add new web translator #39

Closed zuphilip closed 6 years ago

zuphilip commented 7 years ago

@adam3smith suggested in https://github.com/zotero/translators/issues/1277#issuecomment-286951365

In my view, we could just put up a regular translator skeleton for scrapes (along the line of what Philipp already has for other types) that emulates FW with regular js code.

I ignore the FW part but I certainly agree with the remaining. Moreover, we could actually do a new button in Scaffold with the functionality "Add new web translator". This should then create a new id but can also already save a a generic translator template for the start. We can for example start with the lines I have collected and even try something which might run from the beginning (take all a nodes in the multiple xpath, set generic title in the scrape). Additional comments can be given for the user to hint where to look for additional code blocks.

What do you think? @dstillman

dstillman commented 7 years ago

My only concern with that is that we do want translators to use import translators when possible, not prioritize scrapers. But we could could offer a few different translator types: scraper, RIS import, BibTeX import, etc.

zuphilip commented 7 years ago

Good point!

But we could could offer a few different translator types

I am not sure how this would be done in the GUI...

Alternatively, we could also provide a link to some (online) documentation about the scrape function with different template blocks.

dstillman commented 7 years ago

I am not sure how this would be done in the GUI...

Can just make the button a menu, with a few translator types under it.

owcz commented 7 years ago

I'd recommend having the default scraper template first pull from EM and have an example of how the scraper can pull the fields missed by the EM translator.