Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd new translator: BBC genome #1367
Conversation
zuphilip
added some commits
Jul 11, 2017
This comment has been minimized.
This comment has been minimized.
pigsonthewing
commented
Jul 12, 2017
•
Thank you, Philipp. Original discussion, for the record: https://forums.zotero.org/discussion/60629/bbc-genome-radio-times |
This comment has been minimized.
This comment has been minimized.
pigsonthewing
commented
Jul 12, 2017
Philipp and I have been discussing, cordially, how best to use "abstract" and/ or "note(s)" (tagged as "quote") for the programme description (e.g. "BBC One London, 19 March 1972 13.25") and synopsis. Anyone else got a view? |
This comment has been minimized.
This comment has been minimized.
what's the gist of the discussion? If there is a decent synopsis, I'd think that's a good fit for an abstract field. The other info seems good in a note. As always, I'd consider merging multiple notes. |
This comment has been minimized.
This comment has been minimized.
The line as "BBC One London, 21 July 1969 6.00" is quite important but I don't know where to save it best. I tried i) abstractNote, ii) note, iii) an additionalItem with relation. Each websites correspond to a magazineArticle with title, date and some information. The same information was also part of the corresponding radioBroadcast or tvBroadcast which was aired a little later. And this line is giving us the information about this broadcast. We could also add a tag (e.g. "synopsis" or "quote") to a note for better, structured metadata and possible parsing afterwards. However, this might be more an option to do individually, but I guess any such tag would not be standardized overall. Personally, I like the two items which are connected at the moment. But I am unsure if this is ideal for any reuse... |
This comment has been minimized.
This comment has been minimized.
pigsonthewing
commented
Jul 12, 2017
•
Philipp has answered this, but I'd add that it's probably best understood by looking at some genome pages. Please visit the pages for the full quotes. http://genome.ch.bbc.co.uk/fb06fde9d6b749238929041ee47221a4 text a = BBC One London, 10 August 1968 17.15 http://genome.ch.bbc.co.uk/5a2e8607052c43c98a86101d8748e62e text a = BBC Radio 4 FM, 27 June 2004 14.00 http://genome.ch.bbc.co.uk/e9fbf4f8ace140d182b0f31d7ae1222b The question is, when describing the magazine article, do we put "text a" in "abstract", and text b in "quote", vice versa, both in "quote", or is there some other way to model this? And ditto when describing the broadcast programme. |
This comment has been minimized.
This comment has been minimized.
Since I don't think we currently have any other translator that imports two items on a single item page, I want to first make sure @dstillman has no objection to that. |
This comment has been minimized.
This comment has been minimized.
I'm OK with saving two items. (I think it will mean that neither of the items will be automatically selected in Zotero, the same as when using multiple selection.) |
This comment has been minimized.
This comment has been minimized.
Sorry for the delay. I think the right way to do this (here & in general) is to put the summary (i.e. text b in @pigsonthewing 's summary above) into the abstract field (because the abstract is a summary of the content) and leave text a) in a note. Everything else looks good to me. |
This comment has been minimized.
This comment has been minimized.
pigsonthewing
commented
Aug 11, 2017
Sounds OK to me. @zuphilip Any thoughts? |
This comment has been minimized.
This comment has been minimized.
Okay, I changed abstract and note for the text b), but I am not sure that this is all you wanted. @adam3smith Are you fine with the two items for each step? Did I saved the abstract to the correct item? Anything else? |
adam3smith
reviewed
Sep 4, 2017
2 quick nits (sorry, I thought I submitted those a while ago) |
var aside = text(doc, 'aside.issue p'); | ||
//e.g. Issue 2384\n 7 July 1969\n Page 16 | ||
var parts = aside.trim().split('\n'); | ||
item.issue = parts[0].replace('Issue', '').trim(); |
This comment has been minimized.
This comment has been minimized.
adam3smith
Sep 4, 2017
Collaborator
I'm nervous about parts[1] or parts[2] not existing and then triggering an error that breaks the whole thing. Let's test for them before running replace.
//e.g ["BBC Radio 4 FM" , "30 September 1967 6.35"] | ||
additionalItem.programTitle = pieces[0]; | ||
var time = text(doc, '.primary-content a span.time'); | ||
var date = ZU.strToISO(pieces[1].replace(time, '')) |
This comment has been minimized.
This comment has been minimized.
adam3smith
Sep 4, 2017
Collaborator
this seems less likely to be absent, but let's be conservative and test for pieces[1]
, too.
This comment has been minimized.
This comment has been minimized.
Please have a look at the new version. |
adam3smith
merged commit ee8a61f
into
zotero:master
Sep 4, 2017
1 check passed
This comment has been minimized.
This comment has been minimized.
Great, thanks! |
zuphilip commentedJul 12, 2017
The original request in the forum was from @pigsonthewing.
Actually, I tried to create two items for each entry: one for the magazinArticle and one for the radio or tvBroadcast and connect them together. @adam3smith What do you think about this? Some code looks fragile, but actually I haven't found any example which will break it.
I used the new function
text
andattr
here and they are quite handy (also I am very much used to think about a xpath rather than csspath).