Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes T #1351
Conversation
zuphilip
added some commits
Jun 27, 2017
zuphilip
added some commits
Jul 5, 2017
This comment has been minimized.
This comment has been minimized.
@zuphilip -- any views on the test here? It shouldn't fail, but can't handle the rename of the translator. Since that test only goes for individual PRs (i.e. won't keep failing), we could just ignore it, or do you want to try to fix the test? |
zuphilip
referenced this pull request
Jul 6, 2017
Merged
Rename Bibliotheque et Archives Nationales du Quebec.js #1357
This comment has been minimized.
This comment has been minimized.
Here it is a rename and completely rewrite which will not work for Travis. I tried some improvements in the linked PR, but also with this improved script, Travis will still complain. Thus, I suggest to ignore Travis on this here. |
adam3smith
requested changes
Jul 9, 2017
whew. That was a marathon. Given that, quite few comments and all should be pretty quick. |
"notes": [ | ||
{ | ||
"note": "n.1. a. Physical or mental exertion, especially when difficult or exhausting; work. See Synonyms at work.b. Something produced by work.2. A specific task.3. A particular form of work or method of working: manual labor.4. Work for wages.5. a. Workers considered as a group.b. The trade union movement, especially its officials.6. Labor A political party representing workers' interests, especially in Great Britain.7. The process by which childbirth occurs, beginning with contractions of the uterus and ending with the expulsion of the fetus or infant and the placenta." | ||
"note": "n.1. Physical or mental exertion, especially when difficult or exhausting; work. See Synonyms at work.2. A specific task or effort, especially a painful or arduous one: \"Eating the bread was a labor I put myself through to quiet my stomach\" (Gail Anderson-Dargatz).3. A particular form of work or method of working: manual labor.4. Work for wages: businesses paying more for labor.5. a. Workers considered as a group.b. The trade union movement, especially its officials.6. Labor A political party representing workers' interests, especially in Great Britain.7. The process by which childbirth occurs, beginning with contractions of the uterus and ending with the expulsion of the fetus or infant and the placenta." |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jul 9, 2017
Collaborator
Not wild about all these notes -- let's put this into a single one?
item.creators.push(ZU.cleanAuthor(authors[i], "author")); | ||
} | ||
} | ||
//FW.Xpath('//p[@class="byline"]').text().remove(/\s(in|for)\s.+/).split(/\s+and\s+|\s*,\s*/).cleanAuthor("author") |
This comment has been minimized.
This comment has been minimized.
//translator.setDocument(doc); | ||
|
||
translator.setHandler('itemDone', function (obj, item) { | ||
item.publicationTitle = "The Hamilton Spectator"; |
This comment has been minimized.
This comment has been minimized.
@@ -2,14 +2,14 @@ | |||
"translatorID": "9499c586-d672-42d6-9ec4-ee9594dcc571", | |||
"label": "The Hindu (old)", | |||
"creator": "Prashant Iyengar and Michael Berkowitz", | |||
"target": "^https?://(www\\.)?hindu\\.com/", | |||
"target": "^https?://(www\\.)?thehindu\\.com/lr/", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jul 9, 2017
Collaborator
let's also add item.ISSN = "0971-751X";
and remove Zotero.wait()
and Zotero.done()
if (authorString) { | ||
var authors = authorString.split(/\.,|&/); | ||
for (var i=0; i<authors.length; i++) { | ||
item.creators.push(ZU.cleanAuthor(authors[i], "author")); |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jul 9, 2017
Collaborator
I think you need a , true
here. note the authors in the tests have lastName & firstName swapped
} | ||
], | ||
"date": "2017-07-02", | ||
"ISSN": "0140-0460", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jul 9, 2017
Collaborator
I think the Sunday times should be 0956-1382
see https://en.wikipedia.org/wiki/The_Sunday_Times
***** END LICENSE BLOCK ***** | ||
*/ | ||
|
||
|
||
function detectWeb(doc, url) { | ||
if (url.indexOf("search") != -1 && url.indexOf("classifieds") == -1) { |
This comment has been minimized.
This comment has been minimized.
} | ||
var urlParts = url.split('/'); | ||
item.blogTitle = '@' + urlParts[3]; | ||
item.websiteType = "microblog"; |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jul 9, 2017
Collaborator
We should maybe reconsider this -- no one seems to actually use it. We could just say "Tweet" which is what APA uses (http://blog.apastyle.org/apastyle/2013/10/how-to-cite-social-media-in-apa-style.html ) and what MLA used to use ( https://www.theatlantic.com/technology/archive/2012/03/how-do-you-cite-a-tweet-in-an-academic-paper/253932/ )
This comment has been minimized.
This comment has been minimized.
item.creators.splice(i, 1); | ||
} | ||
} | ||
|
This comment has been minimized.
This comment has been minimized.
//translator.setDocument(doc); | ||
|
||
translator.setHandler('itemDone', function (obj, item) { | ||
item.publicationTitle = "taz. die tageszeitung"; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
zuphilip
Jul 10, 2017
Collaborator
In the ZDB we have Die Tageszeitung : taz
which looks nice for me. I will change it to this.
This comment has been minimized.
This comment has been minimized.
Thank you for the helpful comments. Please have a look at the new version. |
adam3smith
reviewed
Jul 10, 2017
@@ -87,7 +87,8 @@ function scrape(doc, url) { | |||
//translator.setDocument(doc); | |||
|
|||
translator.setHandler('itemDone', function (obj, item) { | |||
item.publicationTitle = "taz. die tageszeitung"; | |||
item.publicationTitle = "Die Tageszeitung : taz"; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Yes, deleted space before colon. |
adam3smith
merged commit 1797efb
into
zotero:master
Jul 15, 2017
1 check failed
This comment has been minimized.
This comment has been minimized.
Woot! You just finished the translator ironman! |
zuphilip commentedJul 5, 2017
Finally, this is the last letter in my tour from A to Z🎉 .
Please have a look at these fixes, update and rewrites.