-
Notifications
You must be signed in to change notification settings - Fork 756
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
Added translator for The Saturday Paper #3099
base: master
Are you sure you want to change the base?
Conversation
Added article section detection. Added edition detection. Added snapshot of article. Adjusted test cases.
item.publicationTitle = "The Saturday Paper"; | ||
item.title = attr(doc, 'meta[name="dcterms.title"]', 'content'); | ||
item.date = ZU.strToISO(attr(doc, 'meta[name="dcterms.date"]', 'content')); | ||
item.abstractNote = attr(doc, 'meta[name="dcterms.description"]', 'content'); | ||
item.creators.push(ZU.cleanAuthor(attr(doc, 'meta[name="dcterms.creator"]', 'content'), "author")); | ||
item.language = "en-AU"; | ||
item.url = url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I think it suffices to make use of the 'Embedded Metadata' translator (such as by using the template code from Scaffold -> Tools menu -> Templates) for the majority of these fields. The EM translator will take care of these <meta>
fields, and any improvements to EM translator will be automatically picked up by the translators that use it.
let editionRaw = doc.querySelector('p.issue-nav__current').textContent; | ||
var em = editionRaw.match(/.*No\.\s(\d+)/); | ||
if (em) { | ||
item.edition = em[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure "edition" is the appropriate field? I think this refers to editions of a book, or in the context of newspapers, the different "prints" or versions of a particular day's issue, due to intra-day updates (edits).
This PR adds a translator for Australian newspaper The Saturday Paper.