Wikisource
I am new to Zotero. I am working on a large project that will be pulling lots of information from these two sources:
Dictionary of National Biography:
https://en.wikisource.org/wiki/Dictionary_of_National_Biography,_1885-1900
Encyclopedia Britannica 1911:
https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica
When I go to these sites there is no icon in my address bar, so I have to right-click and save. It saves it as a webpage instead of an encyclopedia article and only gives me a couple of the pieces of information I need. So I have to end up entering most of the data myself, which defeats the purpose of using Zotero.
So how do I get Zotero to add those pages as an encyclopedia article with encyclopedia title, author (and also editor in the case of the Dictionary of National Biography), article title, URL, date accessed, and date modified?
I saw somewhere that there was a translator for wikisource, is that what I need? If so, where do I get it and how do I implement it?
Dictionary of National Biography:
https://en.wikisource.org/wiki/Dictionary_of_National_Biography,_1885-1900
Encyclopedia Britannica 1911:
https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica
When I go to these sites there is no icon in my address bar, so I have to right-click and save. It saves it as a webpage instead of an encyclopedia article and only gives me a couple of the pieces of information I need. So I have to end up entering most of the data myself, which defeats the purpose of using Zotero.
So how do I get Zotero to add those pages as an encyclopedia article with encyclopedia title, author (and also editor in the case of the Dictionary of National Biography), article title, URL, date accessed, and date modified?
I saw somewhere that there was a translator for wikisource, is that what I need? If so, where do I get it and how do I implement it?
To customize the behavior, you'd have to modify the translator, which is a fairly technical undertaking--probably undoable if you've never coded in javascript (though not very hard if you have).
https://www.zotero.org/support/dev/translators/coding
encyclopediaTitle : FW.Xpath('//span[@id="header_title_text"]').text().trim().remove(/\n.+/g),
it returns Dictionary of National Biography, 1885-1900
I don't want the date, so how do I get it to return only the name of the encyclopedia?
Also, after I get that, can I treat encyclopediaTitle as a string in, say, an if then statement?
/.+?\n\n/
will match everything (excluding newlines) up to the first double newline/\n.+/g
will match lines following a newline (so all lines that are not first line and that are not empty)https://regex101.com/ may be helpful to experiment with regular expressions.
For your example, you can try something like .remove(/,\s*\d{4}-\d{4}\s*$/)