Skip to content
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

Adaptation Bibliotheque nationale de France.js for the new BnF catalog #1051

Merged
merged 4 commits into from May 19, 2016

Conversation

facem
Copy link
Contributor

@facem facem commented Apr 15, 2016

The changes consist on :
the Import works whatever display style (intermarc, unimarc, public)
in the field 'URL' there is a ARK link of the notice
the URL of numeric document is in field "attachement document"
correction for the role detection
The document type detection uses the field Unimarc
Modification of the field "source"

@@ -41,7 +41,8 @@ var BnfClass = function() {
See http://archive.ifla.org/VI/3/p1996-1/appx-c.htm.
*/
function getCreatorType(aut) {
switch(aut['4']) {
typeAut = aut['4'].replace(/\s/g,"");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be var typeAut and I'd use .trim() instead of the replace.

@adam3smith
Copy link
Collaborator

@symac -- if you have a minute to look over this? Makes a lot of sense to me, but you wrote most of the code.

Suppressions method getDCType and translateDCType. These methods don't work with any display.
@facem
Copy link
Contributor Author

facem commented Apr 22, 2016

Hello,
I have corrected.
I have deleted the method that didn't work with all display.
I hadn't made before because I did not want to change too much the code

@facem
Copy link
Contributor Author

facem commented May 3, 2016

Hello,
I have corrected and simplidied the code.
I have deleted the method that didn't work with all display.
I hadn't made before because I did not want to change too much the code

Best regard

2016-04-22 16:41 GMT+02:00 Sebastian Karcher notifications@github.com:

@symac https://github.com/symac -- if you have a minute to look over
this? Makes a lot of sense to me, but you wrote most of the code.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1051 (comment)

@@ -41,7 +41,9 @@ var BnfClass = function() {
See http://archive.ifla.org/VI/3/p1996-1/appx-c.htm.
*/
function getCreatorType(aut) {
switch(aut['4']) {
//typeAut = aut['4'].replace(/\s/g,"");
typeAut = aut['4'].trim();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're still not declaring the variable here. Needs to be var typeAut = ...

@adam3smith
Copy link
Collaborator

Looks good to me otherwise.

@facem
Copy link
Contributor Author

facem commented May 9, 2016

Hello
I'm sorry for this mistake.
I have just corrected.
Thank you for the time that you spend for me and for your help
Best regard

@symac
Copy link
Contributor

symac commented May 9, 2016

Trying the new translator I have encountered an error when trying to get list (but I believe they also exist in the previous version, seems BnF has updated their markup). In getSelectedItems function, there is the following line :
var link = doc.evaluate('./div[@class="notice-contenu"]/a', cell, null, XPathResult.ANY_TYPE, null).iterateNext();

that needs to be replaced by :
var link = doc.evaluate('./div[@class="notice-contenu"]/div[@class="notice-synthese"]/a', cell, null, XPathResult.ANY_TYPE, null).iterateNext();

The div with the class notice-synthese has been added meanwhile I believe. Otherwise I have not found any error with some tests, seems ok to me.

don't do anything when the page type is undefined
@facem
Copy link
Contributor Author

facem commented May 10, 2016

Hello
Indeed, I have just corrected and I have change the code for don't do nothing when the page type is "undefined".

Best regard

@facem
Copy link
Contributor Author

facem commented May 19, 2016

Hello,

I corrected the last error.

Is it good?

what happens when it is ok ?

Best regard

Le 9 mai 2016 14:35, "Sylvain Machefert" notifications@github.com a
écrit :

Trying the new translator I have encountered an error when trying to get
list (but I believe they also exist in the previous version, seems BnF has
updated their markup). In getSelectedItems function, there is the following
line :
var link = doc.evaluate('./div[@Class="notice-contenu"]/a', cell, null,
XPathResult.ANY_TYPE, null).iterateNext();

that needs to be replaced by :
var link =
doc.evaluate('./div[@Class="notice-contenu"]/div[@Class="notice-synthese"]/a',
cell, null, XPathResult.ANY_TYPE, null).iterateNext();

The div with the class notice-synthese has been added meanwhile I
believe. Otherwise I have not found any error with some tests, seems ok to
me.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
Le 9 mai 2016 14:35, "Sylvain Machefert" notifications@github.com a
écrit :

Trying the new translator I have encountered an error when trying to get
list (but I believe they also exist in the previous version, seems BnF has
updated their markup). In getSelectedItems function, there is the following
line :
var link = doc.evaluate('./div[@Class="notice-contenu"]/a', cell, null,
XPathResult.ANY_TYPE, null).iterateNext();

that needs to be replaced by :
var link =
doc.evaluate('./div[@Class="notice-contenu"]/div[@Class="notice-synthese"]/a',
cell, null, XPathResult.ANY_TYPE, null).iterateNext();

The div with the class notice-synthese has been added meanwhile I
believe. Otherwise I have not found any error with some tests, seems ok to
me.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@adam3smith adam3smith merged commit ef385aa into zotero:master May 19, 2016
@adam3smith
Copy link
Collaborator

thanks!

@facem
Copy link
Contributor Author

facem commented May 20, 2016

Hello
Great
Thanks for all.
Best reagard

2016-05-19 15:26 GMT+02:00 Sebastian Karcher notifications@github.com:

thanks!


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1051 (comment)

zuphilip pushed a commit to zuphilip/translators that referenced this pull request Mar 28, 2018
zotero#1051)

* adaptation for a new markup  for the list.
* don't do anything when the page type is undefined
zuphilip pushed a commit to zuphilip/translators that referenced this pull request Mar 28, 2018
zotero#1051)

* adaptation for a new markup  for the list.
* don't do anything when the page type is undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants