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 upnew translator for Peeters from @zuphilip 's workshop #1582 #1597
Conversation
zuphilip
added
Workshop
New Translator
labels
Mar 18, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zuphilip
Mar 26, 2018
Collaborator
@socheres The translator for Peeters looks great! Now, there are some more changes (on Dialnet) here, because you used your master branch for everything. I will cherry-pick your commit for Peeters and do some changes there and open a new PR with all that.
@socheres The translator for Peeters looks great! Now, there are some more changes (on Dialnet) here, because you used your master branch for everything. I will cherry-pick your commit for Peeters and do some changes there and open a new PR with all that. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
socheres
Mar 26, 2018
thanks @zuphilip The translators for Peeters doesn't work with Byzantion . I tried to fix the title/subtitle with several xpath option, but there aren't global pattern.
item.title = ZU.xpathText(doc, '//b[contains(text(), "Title:")]/following-sibling::text()[1]|//b[contains(text(), "Title:")]/following::i[1]|//b[contains(text(), "Title:")]/following-sibling::text()[2]', '', '');
var subtitle = ZU.xpathText(doc, '//b[contains(text(), "Subtitle:")]/following-sibling::text()[1]|//b[contains(text(), "Subtitle:")]/following::i[1]', '', '');
if (subtitle) {
item.title = ZU.trimInternal(item.title += ': ' + subtitle);
}
It is better to load first a import translator e.g. from mEDRA? and then to scrape missing items like subtitle, volume, issue, abstracts. It was my mistake to send pull request of all my commits to zotero/master.
socheres
commented
Mar 26, 2018
•
thanks @zuphilip The translators for Peeters doesn't work with Byzantion . I tried to fix the title/subtitle with several xpath option, but there aren't global pattern. item.title = ZU.xpathText(doc, '//b[contains(text(), "Title:")]/following-sibling::text()[1]|//b[contains(text(), "Title:")]/following::i[1]|//b[contains(text(), "Title:")]/following-sibling::text()[2]', '', '');
var subtitle = ZU.xpathText(doc, '//b[contains(text(), "Subtitle:")]/following-sibling::text()[1]|//b[contains(text(), "Subtitle:")]/following::i[1]', '', '');
if (subtitle) {
item.title = ZU.trimInternal(item.title += ': ' + subtitle);
} It is better to load first a import translator e.g. from mEDRA? and then to scrape missing items like subtitle, volume, issue, abstracts. It was my mistake to send pull request of all my commits to zotero/master. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zuphilip
Mar 27, 2018
Collaborator
Okay, I created now a new PR with Peeters translator only see #1606. Moreover, I adapted the extracting methods such that it works with the example above and also with another example where the author is only given in initials (and therefore the allcaps test is failing).
Okay, I created now a new PR with Peeters translator only see #1606. Moreover, I adapted the extracting methods such that it works with the example above and also with another example where the author is only given in initials (and therefore the allcaps test is failing). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
socheres
commented
Mar 27, 2018
socheres
and others
added some commits
Mar 27, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zuphilip
Mar 28, 2018
Collaborator
Okay, I took the commits about Dialnet out this PR here (best is to use different branches in git for different fixes/translators). Now, the PR don't have any merge conflict anymore.
Moreover, I undid the changes about the italics in the title, because we would usually want that. However, we can delete this in the export translator. You can e.g. open an issue at zotkat for that.
@adam3smith Let me know whether you want to review this translator, or if we can merge it already.
Okay, I took the commits about Dialnet out this PR here (best is to use different branches in git for different fixes/translators). Now, the PR don't have any merge conflict anymore. Moreover, I undid the changes about the italics in the title, because we would usually want that. However, we can delete this in the export translator. You can e.g. open an issue at zotkat for that. @adam3smith Let me know whether you want to review this translator, or if we can merge it already. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zuphilip
Mar 28, 2018
Collaborator
(The changes for Dialnet with some update I put it here #1613, but please don't add it to this branch again.)
(The changes for Dialnet with some update I put it here #1613, but please don't add it to this branch again.) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
socheres
commented
Mar 29, 2018
thank you @zuphilip for your changes and PR. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
superseded by #1606 |
socheres commentedMar 18, 2018
No description provided.