New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new translator for Peeters from @zuphilip 's workshop #1582 #1597

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@socheres

socheres commented Mar 18, 2018

No description provided.

@zuphilip

This comment has been minimized.

Show comment
Hide comment
@zuphilip

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.

Collaborator

zuphilip commented Mar 26, 2018

@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

This comment has been minimized.

Show comment
Hide comment
@socheres

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.

@zuphilip zuphilip referenced this pull request Mar 27, 2018

Open

Peeters #1606

@zuphilip

This comment has been minimized.

Show comment
Hide comment
@zuphilip

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).

Collaborator

zuphilip commented Mar 27, 2018

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).

@socheres

This comment has been minimized.

Show comment
Hide comment
@socheres

socheres Mar 27, 2018

thanks @zuphilip here in my latest commit some more fixes that i found.

socheres commented Mar 27, 2018

thanks @zuphilip here in my latest commit some more fixes that i found.

@zuphilip

This comment has been minimized.

Show comment
Hide comment
@zuphilip

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.

Collaborator

zuphilip commented Mar 28, 2018

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.

@zuphilip

This comment has been minimized.

Show comment
Hide comment
@zuphilip

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.)

Collaborator

zuphilip commented Mar 28, 2018

(The changes for Dialnet with some update I put it here #1613, but please don't add it to this branch again.)

@socheres

This comment has been minimized.

Show comment
Hide comment
@socheres

socheres Mar 29, 2018

thank you @zuphilip for your changes and PR.

socheres commented Mar 29, 2018

thank you @zuphilip for your changes and PR.

@adam3smith

This comment has been minimized.

Show comment
Hide comment
@adam3smith

adam3smith Sep 15, 2018

Collaborator

superseded by #1606

Collaborator

adam3smith commented Sep 15, 2018

superseded by #1606

@adam3smith adam3smith closed this Sep 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment