Initial Commit
This commit is contained in:
BIN
locate/Google Scholar.ico
Normal file
BIN
locate/Google Scholar.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
17
locate/engines.json
Normal file
17
locate/engines.json
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"_name": "Google Scholar",
|
||||
"_alias": "Untitled",
|
||||
"_description": "Google Scholar Search",
|
||||
"_icon": "file:///home/fzzin/Zotero/locate/Google%20Scholar.ico",
|
||||
"_hidden": false,
|
||||
"_urlTemplate": "https://scholar.google.com/scholar?as_q=&as_epq={z:title}&as_occt=title&as_sauthors={rft:aufirst?}+{rft:aulast?}&as_ylo={z:year?}&as_yhi={z:year?}&as_sdt=1.&as_sdtp=on&as_sdtf=&as_sdts=22&",
|
||||
"_urlParams": [],
|
||||
"_urlNamespaces": {
|
||||
"rft": "info:ofi/fmt:kev:mtx:journal",
|
||||
"z": "http://www.zotero.org/namespaces/openSearch#",
|
||||
"": "http://a9.com/-/spec/opensearch/1.1/"
|
||||
},
|
||||
"_iconSourceURI": "chrome://zotero/skin/logos/google-scholar.ico"
|
||||
}
|
||||
]
|
||||
302
styles/american-chemical-society.csl
Normal file
302
styles/american-chemical-society.csl
Normal file
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="expanded" default-locale="en-US">
|
||||
<info>
|
||||
<title>American Chemical Society</title>
|
||||
<title-short>ACS</title-short>
|
||||
<id>http://www.zotero.org/styles/american-chemical-society</id>
|
||||
<link href="http://www.zotero.org/styles/american-chemical-society" rel="self"/>
|
||||
<link href="https://pubs.acs.org/doi/full/10.1021/acsguide.40303" rel="documentation"/>
|
||||
<link href="https://pubs.acs.org/doi/book/10.1021/acsguide" rel="documentation"/>
|
||||
<author>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Ivan Bushmarinov</name>
|
||||
<email>ib@ineos.ac.ru</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="chemistry"/>
|
||||
<summary>The American Chemical Society style</summary>
|
||||
<updated>2022-11-13T02:40:31+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<terms>
|
||||
<term name="editortranslator" form="short">
|
||||
<single>ed. and translator</single>
|
||||
<multiple>eds. and translators</multiple>
|
||||
</term>
|
||||
<term name="translator" form="short">
|
||||
<single>translator</single>
|
||||
<multiple>translators</multiple>
|
||||
</term>
|
||||
<term name="collection-editor" form="short">
|
||||
<single>series ed.</single>
|
||||
<multiple>series eds.</multiple>
|
||||
</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<group delimiter="; ">
|
||||
<names variable="editor translator" delimiter="; ">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="title"/>
|
||||
</names>
|
||||
<names variable="collection-editor">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="title"/>
|
||||
</names>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author" suffix=".">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter="; " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="capitalize-first"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="thesis" match="any">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" text-case="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" text-case="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="volume">
|
||||
<group delimiter=" ">
|
||||
<text term="volume" form="short" text-case="capitalize-first"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="series">
|
||||
<text variable="collection-title"/>
|
||||
</macro>
|
||||
<macro name="pages">
|
||||
<label variable="page" form="short" suffix=" " strip-periods="true"/>
|
||||
<text variable="page"/>
|
||||
</macro>
|
||||
<macro name="book-container">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<choose>
|
||||
<if type="entry-dictionary entry-encyclopedia" match="none">
|
||||
<group delimiter=" ">
|
||||
<text term="in" text-case="capitalize-first"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="issued">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</macro>
|
||||
<macro name="full-issued">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="month" form="long" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="DOI" match="any">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else-if type="article-journal book chapter entry-encyclopedia entry-dictionary paper-conference" match="none">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group delimiter=" ">
|
||||
<text variable="URL"/>
|
||||
<group delimiter=" " prefix="(" suffix=")">
|
||||
<text term="accessed"/>
|
||||
<date variable="accessed">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" prefix="-" form="numeric-leading-zeros"/>
|
||||
<date-part name="day" prefix="-" form="numeric-leading-zeros"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout delimiter="," vertical-align="sup">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography second-field-align="flush" entry-spacing="0">
|
||||
<layout suffix=".">
|
||||
<text variable="citation-number" prefix="(" suffix=")"/>
|
||||
<text macro="author" suffix=" "/>
|
||||
<choose>
|
||||
<if type="article-journal review" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<text variable="container-title" font-style="italic" form="short"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="issued" font-weight="bold"/>
|
||||
<choose>
|
||||
<if variable="volume">
|
||||
<group delimiter=" ">
|
||||
<text variable="volume" font-style="italic"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<text term="issue" form="short" text-case="capitalize-first"/>
|
||||
<text variable="issue"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article-magazine article-newspaper article" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<text variable="container-title" font-style="italic" suffix="."/>
|
||||
<text macro="edition"/>
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="full-issued"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="genre"/>
|
||||
</group>
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<text macro="title"/>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
<text macro="editor" prefix=" "/>
|
||||
<text macro="series"/>
|
||||
<choose>
|
||||
<if type="report">
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
<date variable="issued" form="text"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
|
||||
<group delimiter="; ">
|
||||
<text macro="book-container"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="series"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="webpage post post-weblog" match="any">
|
||||
<group delimiter=". ">
|
||||
<text variable="title" font-style="italic"/>
|
||||
<text variable="container-title"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="issued"/>
|
||||
<text variable="volume" font-style="italic"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text macro="access" prefix=". "/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
301
styles/american-medical-association.csl
Normal file
301
styles/american-medical-association.csl
Normal file
@@ -0,0 +1,301 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="expanded" initialize-with-hyphen="false" default-locale="en-US">
|
||||
<info>
|
||||
<title>American Medical Association 11th edition</title>
|
||||
<title-short>AMA (11th ed.)</title-short>
|
||||
<id>http://www.zotero.org/styles/american-medical-association</id>
|
||||
<link href="http://www.zotero.org/styles/american-medical-association" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/american-medical-association-10th-edition" rel="template"/>
|
||||
<link href="https://westlibrary.txwes.edu/sites/default/files/pdf/AMACitationStyle.pdf" rel="documentation"/>
|
||||
<link href="https://www.amamanualofstyle.com/fileasset/AMAMOS/aaaAMWA%20presentation%20Nov%202019%20FULL.pdf" rel="documentation"/>
|
||||
<author>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Christian Pietsch</name>
|
||||
<uri>http://purl.org/net/pietsch</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Daniel W Chan</name>
|
||||
<email>danwchan@protonmail.com</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
<email>obrienpat86@gmail.com</email>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="medicine"/>
|
||||
<summary>The American Medical Association style as used in JAMA. Version 11 as per November-2019.</summary>
|
||||
<updated>2025-08-26T17:06:55+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<terms>
|
||||
<term name="page-range-delimiter">-</term>
|
||||
<term name="presented at">presented at</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<names variable="editor">
|
||||
<name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", "/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<group suffix=".">
|
||||
<names variable="author">
|
||||
<name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", "/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<text macro="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if type="article-newspaper" match="none">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<text value="doi:"/>
|
||||
<text variable="DOI"/>
|
||||
</if>
|
||||
<else-if variable="URL">
|
||||
<group delimiter=". ">
|
||||
<choose>
|
||||
<if type="webpage post post-weblog" match="any">
|
||||
<date variable="issued" form="text"/>
|
||||
</if>
|
||||
</choose>
|
||||
<group>
|
||||
<text term="accessed" text-case="capitalize-first" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
|
||||
<text variable="title" font-style="italic" text-case="title"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<text variable="publisher"/>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout delimiter="," vertical-align="sup">
|
||||
<text variable="citation-number"/>
|
||||
<group prefix="(" suffix=")">
|
||||
<label variable="locator" form="short" strip-periods="true"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography hanging-indent="false" et-al-min="7" et-al-use-first="3" second-field-align="flush">
|
||||
<layout>
|
||||
<text variable="citation-number" suffix="."/>
|
||||
<text macro="author"/>
|
||||
<text macro="title" prefix=" " suffix="."/>
|
||||
<choose>
|
||||
<if type="bill book graphic legislation motion_picture report song" match="any">
|
||||
<group suffix="." prefix=" " delimiter=" ">
|
||||
<group delimiter=" ">
|
||||
<text term="volume" form="short" text-case="capitalize-first" strip-periods="true"/>
|
||||
<text variable="volume" suffix="."/>
|
||||
</group>
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
<text macro="publisher" prefix=" "/>
|
||||
<group suffix="." prefix="; ">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<text variable="page" prefix=":"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
|
||||
<group prefix=" " delimiter=" ">
|
||||
<text term="in" text-case="capitalize-first" suffix=":"/>
|
||||
<text macro="editor"/>
|
||||
<text variable="container-title" font-style="italic" suffix="." text-case="title"/>
|
||||
<group delimiter=" ">
|
||||
<text term="volume" form="short" text-case="capitalize-first" strip-periods="true"/>
|
||||
<text variable="volume" suffix="."/>
|
||||
</group>
|
||||
<text macro="edition"/>
|
||||
<text variable="collection-title" suffix="."/>
|
||||
<group delimiter="; " suffix=".">
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=":" suffix=".">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-newspaper">
|
||||
<text variable="container-title" font-style="italic" prefix=" " suffix=". "/>
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text variable="URL"/>
|
||||
<group>
|
||||
<date variable="issued">
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
<group>
|
||||
<text term="accessed" text-case="capitalize-first" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=":" suffix=".">
|
||||
<group>
|
||||
<date variable="issued">
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</else-if>
|
||||
<else-if type="legal_case">
|
||||
<group suffix="," prefix=" " delimiter=" ">
|
||||
<text macro="editor" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
<group prefix=" " delimiter=" ">
|
||||
<text variable="container-title"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
<text variable="page" prefix=", " suffix=" "/>
|
||||
<group prefix="(" suffix=")." delimiter=" ">
|
||||
<text variable="authority"/>
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="webpage post post-weblog" match="any">
|
||||
<text variable="container-title" prefix=" " suffix="."/>
|
||||
</else-if>
|
||||
<else-if type="speech">
|
||||
<group prefix=" " suffix=":">
|
||||
<choose>
|
||||
<if variable="genre">
|
||||
<text variable="genre" suffix=" "/>
|
||||
<text term="presented at"/>
|
||||
</if>
|
||||
<else>
|
||||
<text term="presented at" text-case="capitalize-first"/>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
<group delimiter="; " prefix=" " suffix=".">
|
||||
<text variable="event"/>
|
||||
<group>
|
||||
<date delimiter=" " variable="issued">
|
||||
<date-part name="month"/>
|
||||
<date-part name="day" suffix=","/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
<text variable="event-place"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis" match="any">
|
||||
<group delimiter=". " prefix=" " suffix=".">
|
||||
<text variable="genre"/>
|
||||
<group delimiter="; ">
|
||||
<text variable="publisher"/>
|
||||
<date date-parts="year" form="text" variable="issued"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="editor" prefix=" " suffix="."/>
|
||||
<group prefix=" " suffix=".">
|
||||
<text variable="container-title" font-style="italic" form="short" strip-periods="true" suffix="."/>
|
||||
<choose>
|
||||
<if type="article" match="any">
|
||||
<text variable="publisher" font-style="italic" suffix="."/>
|
||||
</if>
|
||||
</choose>
|
||||
<group delimiter=";" prefix=" ">
|
||||
<choose>
|
||||
<if variable="issue volume" match="any">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if type="article">
|
||||
<text value="Preprint posted online"/>
|
||||
</if>
|
||||
<else>
|
||||
<text value="Published online"/>
|
||||
</else>
|
||||
</choose>
|
||||
<date form="text" date-parts="year-month-day" variable="issued"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<group>
|
||||
<text variable="volume"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</group>
|
||||
<text variable="page" prefix=":"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text prefix=" " macro="access"/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
244
styles/american-political-science-association.csl
Normal file
244
styles/american-political-science-association.csl
Normal file
@@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" page-range-format="chicago" demote-non-dropping-particle="sort-only">
|
||||
<info>
|
||||
<title>American Political Science Association</title>
|
||||
<title-short>APSA</title-short>
|
||||
<id>http://www.zotero.org/styles/american-political-science-association</id>
|
||||
<link href="http://www.zotero.org/styles/american-political-science-association" rel="self"/>
|
||||
<link href="https://connect.apsanet.org/stylemanual/wp-content/uploads/sites/43/2023/12/Style-Manual-for-Political-Science-December-2023-Revision.pdf" rel="documentation"/>
|
||||
<author>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Aaron Guerra</name>
|
||||
</contributor>
|
||||
<category citation-format="author-date"/>
|
||||
<category field="political_science"/>
|
||||
<summary>The American Political Science Association style. Et al rules based on published APSR articles</summary>
|
||||
<updated>2024-03-16T18:52:49+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en-US">
|
||||
<date form="text">
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</locale>
|
||||
<locale xml:lang="nb-NO">
|
||||
<date form="text">
|
||||
<date-part name="day" suffix=" "/>
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</locale>
|
||||
<locale xml:lang="nn-NO">
|
||||
<date form="text">
|
||||
<date-part name="day" suffix=" "/>
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<names variable="editor" delimiter=", ">
|
||||
<label form="short" text-case="lowercase" suffix=" "/>
|
||||
<name and="text" delimiter=", "/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="lowercase"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<text macro="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author-short">
|
||||
<names variable="author">
|
||||
<name form="short" and="text" delimiter=", " initialize-with=". " sort-separator=", "/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<text variable="title" form="short"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if type="legal_case" match="none">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<text variable="DOI" prefix="doi:"/>
|
||||
</if>
|
||||
<else-if match="any" variable="URL">
|
||||
<group delimiter=" ">
|
||||
<text variable="URL"/>
|
||||
<group prefix="(" suffix=")">
|
||||
<date variable="accessed" form="text"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" font-style="italic" text-case="title"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" quotes="true" text-case="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="legal_case">
|
||||
<group prefix=" " delimiter=" ">
|
||||
<text variable="volume"/>
|
||||
<text variable="container-title"/>
|
||||
</group>
|
||||
<text variable="authority" prefix=" (" suffix=")"/>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="thesis" match="none">
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
<text variable="genre" prefix=". "/>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=". ">
|
||||
<text variable="genre"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date" form="short"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="locator">
|
||||
<choose>
|
||||
<if locator="page">
|
||||
<text variable="locator"/>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<label variable="locator" form="short"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name" collapse="year">
|
||||
<sort>
|
||||
<key macro="author-short"/>
|
||||
<key macro="year-date"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=" ">
|
||||
<text macro="author-short"/>
|
||||
<text macro="year-date"/>
|
||||
</group>
|
||||
<text macro="locator"/>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography hanging-indent="true" et-al-min="10" et-al-use-first="7">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="year-date"/>
|
||||
<key variable="title"/>
|
||||
</sort>
|
||||
<layout suffix=".">
|
||||
<text macro="author" suffix="."/>
|
||||
<date variable="issued" prefix=" " suffix=".">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation manuscript motion_picture report song thesis" match="any">
|
||||
<text macro="legal_case"/>
|
||||
<group prefix=" " delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" suffix="."/>
|
||||
</group>
|
||||
<text prefix=" " suffix="." macro="publisher"/>
|
||||
</if>
|
||||
<else-if type="chapter paper-conference" match="any">
|
||||
<text macro="title" prefix=" " suffix="."/>
|
||||
<group prefix=" " delimiter=" ">
|
||||
<text term="in" text-case="capitalize-first"/>
|
||||
<text variable="container-title" font-style="italic" suffix="," text-case="title"/>
|
||||
<text variable="collection-title" suffix=","/>
|
||||
<text macro="editor" suffix="."/>
|
||||
<group suffix=".">
|
||||
<text macro="publisher"/>
|
||||
<text variable="page" prefix=", "/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group prefix=" " delimiter=" " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text macro="editor"/>
|
||||
</group>
|
||||
<choose>
|
||||
<if type="speech">
|
||||
<group prefix=" " delimiter=" " suffix=".">
|
||||
<text term="presented at" text-case="capitalize-first"/>
|
||||
<group delimiter=", ">
|
||||
<text variable="event"/>
|
||||
<text variable="event-place"/>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
<group prefix=" " suffix=".">
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<group prefix=" ">
|
||||
<text variable="volume"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
<text variable="page" prefix=": "/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text prefix=" " macro="access" suffix="."/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
370
styles/american-sociological-association.csl
Normal file
370
styles/american-sociological-association.csl
Normal file
@@ -0,0 +1,370 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="chicago">
|
||||
<info>
|
||||
<title>American Sociological Association 6th/7th edition</title>
|
||||
<title-short>ASA</title-short>
|
||||
<id>http://www.zotero.org/styles/american-sociological-association</id>
|
||||
<link href="http://www.zotero.org/styles/american-sociological-association" rel="self"/>
|
||||
<link href="http://owl.english.purdue.edu/owl/resource/583/03/" rel="documentation"/>
|
||||
<author>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
</contributor>
|
||||
<category citation-format="author-date"/>
|
||||
<category field="sociology"/>
|
||||
<summary>The ASA style following the 6th/7th edition of the Style Guide (reference formatting is the same for both editions).</summary>
|
||||
<updated>2025-06-30T16:57:53+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<terms>
|
||||
<term name="version">version</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<names variable="editor">
|
||||
<label form="verb" suffix=" "/>
|
||||
<name and="text" delimiter=", " initialize-with=". "/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always" initialize="false" initialize-with=". "/>
|
||||
<label form="short" prefix=", "/>
|
||||
<substitute>
|
||||
<names variable="editor translator director"/>
|
||||
<choose>
|
||||
<if type="report">
|
||||
<text variable="publisher"/>
|
||||
</if>
|
||||
</choose>
|
||||
<text variable="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author-short">
|
||||
<names variable="author">
|
||||
<name form="short" and="text" delimiter=", " initialize-with=". "/>
|
||||
<substitute>
|
||||
<names variable="editor director translator"/>
|
||||
<choose>
|
||||
<if type="report">
|
||||
<text variable="publisher"/>
|
||||
</if>
|
||||
</choose>
|
||||
<text variable="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<group>
|
||||
<choose>
|
||||
<if type="webpage post-weblog post" match="any">
|
||||
<group delimiter=". ">
|
||||
<choose>
|
||||
<if variable="issued" match="none">
|
||||
<group delimiter=" ">
|
||||
<text term="retrieved" text-case="capitalize-first"/>
|
||||
<date form="text" variable="accessed"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article-journal report dataset" match="any">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<text variable="DOI" prefix="doi:"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="URL"/>
|
||||
</else>
|
||||
</choose>
|
||||
</else-if>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="thesis">
|
||||
<text variable="title" text-case="title"/>
|
||||
</if>
|
||||
<else-if type="book dataset" variable="version" match="all">
|
||||
<text variable="title" font-style="italic"/>
|
||||
</else-if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" font-style="italic" text-case="title"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="title" quotes="true" text-case="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="thesis manuscript">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
<choose>
|
||||
<if type="manuscript" match="any">
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<group>
|
||||
<group delimiter=" ">
|
||||
<date variable="original-date" form="numeric" date-parts="year" prefix="[" suffix="]"/>
|
||||
<date variable="issued" form="numeric" date-parts="year"/>
|
||||
</group>
|
||||
<text variable="year-suffix"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if variable="status">
|
||||
<group>
|
||||
<text variable="status" text-case="lowercase"/>
|
||||
<text variable="year-suffix" prefix="-"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group>
|
||||
<text term="no date" form="short"/>
|
||||
<text variable="year-suffix" prefix="-"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-sort">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued" form="numeric" date-parts="year"/>
|
||||
</if>
|
||||
<else-if variable="status">
|
||||
<group>
|
||||
<text variable="status" text-case="lowercase"/>
|
||||
<text variable="year-suffix" prefix="-"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<text term="no date" form="short"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="day-month">
|
||||
<date variable="issued">
|
||||
<date-part name="month"/>
|
||||
<date-part name="day" prefix=" "/>
|
||||
</date>
|
||||
</macro>
|
||||
<macro name="pages">
|
||||
<label variable="page" form="short" suffix=" " text-case="capitalize-first"/>
|
||||
<text variable="page"/>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="volume">
|
||||
<group delimiter=" ">
|
||||
<label text-case="capitalize-first" variable="volume" form="short"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="report">
|
||||
<choose>
|
||||
<if type="report" match="any">
|
||||
<group delimiter=". ">
|
||||
<text variable="genre" font-style="italic"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation et-al-min="4" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
|
||||
<sort>
|
||||
<key macro="author-short"/>
|
||||
<key macro="year-sort"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter="; ">
|
||||
<group delimiter=":">
|
||||
<group delimiter=" ">
|
||||
<text macro="author-short"/>
|
||||
<text macro="year-date"/>
|
||||
</group>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography hanging-indent="true">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="year-sort"/>
|
||||
<key variable="title"/>
|
||||
</sort>
|
||||
<layout suffix=".">
|
||||
<group delimiter=". ">
|
||||
<text macro="author"/>
|
||||
<text macro="year-date"/>
|
||||
<choose>
|
||||
<if type="article-newspaper article-magazine" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
</group>
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text variable="container-title" font-style="italic" text-case="title"/>
|
||||
<text macro="day-month"/>
|
||||
<text variable="edition"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="manuscript">
|
||||
<group delimiter=". ">
|
||||
<text macro="title" quotes="true"/>
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" suffix="."/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
<text variable="genre"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="dataset">
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<group delimiter=": ">
|
||||
<text macro="title"/>
|
||||
<group delimiter=" ">
|
||||
<label text-case="capitalize-first" suffix=" " variable="version"/>
|
||||
<text variable="version"/>
|
||||
</group>
|
||||
</group>
|
||||
<text variable="genre" prefix="[" suffix="]"/>
|
||||
</group>
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" suffix="."/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<text macro="title" suffix="." quotes="true"/>
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" suffix="."/>
|
||||
<text variable="genre"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="book" variable="version" match="all">
|
||||
<group delimiter=". ">
|
||||
<group>
|
||||
<text macro="title" suffix=" [computer program]"/>
|
||||
</group>
|
||||
<group delimiter=" ">
|
||||
<text term="version" text-case="capitalize-first"/>
|
||||
<text variable="version"/>
|
||||
</group>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="volume"/>
|
||||
<text macro="edition"/>
|
||||
<text macro="editor" suffix="."/>
|
||||
<text macro="report"/>
|
||||
<text variable="collection-title" text-case="title"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter paper-conference" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<group delimiter=", " suffix=".">
|
||||
<group delimiter=" ">
|
||||
<text macro="pages"/>
|
||||
<text term="in" text-case="lowercase"/>
|
||||
<group delimiter=". ">
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<text macro="volume"/>
|
||||
</group>
|
||||
</group>
|
||||
<text variable="collection-title" font-style="italic"/>
|
||||
<text macro="editor"/>
|
||||
</group>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="speech" match="any">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<group delimiter=" ">
|
||||
<text term="presented at" text-case="capitalize-first"/>
|
||||
<text variable="event"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="day-month"/>
|
||||
<text variable="event-place"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="webpage post post-weblog" match="any">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<text macro="title"/>
|
||||
<text macro="editor"/>
|
||||
</group>
|
||||
<group suffix="." delimiter=" ">
|
||||
<text variable="container-title" font-style="italic" text-case="title"/>
|
||||
<group delimiter=":">
|
||||
<group>
|
||||
<text variable="volume"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
<text prefix=". " macro="access"/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
2133
styles/apa.csl
Normal file
2133
styles/apa.csl
Normal file
File diff suppressed because it is too large
Load Diff
3924
styles/chicago-author-date.csl
Normal file
3924
styles/chicago-author-date.csl
Normal file
File diff suppressed because it is too large
Load Diff
5940
styles/chicago-notes-bibliography.csl
Normal file
5940
styles/chicago-notes-bibliography.csl
Normal file
File diff suppressed because it is too large
Load Diff
4064
styles/chicago-shortened-notes-bibliography.csl
Normal file
4064
styles/chicago-shortened-notes-bibliography.csl
Normal file
File diff suppressed because it is too large
Load Diff
238
styles/elsevier-harvard.csl
Normal file
238
styles/elsevier-harvard.csl
Normal file
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US">
|
||||
<info>
|
||||
<title>Elsevier - Harvard (with titles)</title>
|
||||
<id>http://www.zotero.org/styles/elsevier-harvard</id>
|
||||
<link href="http://www.zotero.org/styles/elsevier-harvard" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/ecology-letters" rel="template"/>
|
||||
<link href="http://www.elsevier.com/journals/biological-conservation/0006-3207/guide-for-authors#68000" rel="documentation"/>
|
||||
<author>
|
||||
<name>David Kaplan</name>
|
||||
<email>david.kaplan@ird.fr</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Simon Kornblith</name>
|
||||
<email>simon@simonster.com</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Bruce D'Arcus</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Curtis M. Humphrey</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Richard Karnesky</name>
|
||||
<email>karnesky+zotero@gmail.com</email>
|
||||
<uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<category citation-format="author-date"/>
|
||||
<category field="biology"/>
|
||||
<updated>2025-05-18T00:55:38+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<macro name="container">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in" prefix=", " suffix=": "/>
|
||||
<names variable="editor translator" delimiter=", " suffix=", ">
|
||||
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
|
||||
</names>
|
||||
<group delimiter=", ">
|
||||
<text variable="container-title" text-case="title"/>
|
||||
<text variable="collection-title" text-case="title"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group prefix=", " delimiter=", ">
|
||||
<text variable="container-title"/>
|
||||
<text variable="collection-title"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group prefix=". " delimiter=", ">
|
||||
<text variable="container-title" form="short"/>
|
||||
<text variable="collection-title"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=" (" suffix=")" text-case="capitalize-first"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<text macro="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author-short">
|
||||
<names variable="author">
|
||||
<name form="short" and="text" delimiter=", " initialize-with=". "/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" form="short" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" form="short" quotes="true"/>
|
||||
</else>
|
||||
</choose>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else-if type="webpage post-weblog" match="any">
|
||||
<group delimiter=" ">
|
||||
<text value="URL"/>
|
||||
<text variable="URL"/>
|
||||
<group prefix="(" suffix=").">
|
||||
<text term="accessed" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="month" form="numeric" suffix="."/>
|
||||
<date-part name="day" suffix="."/>
|
||||
<date-part name="year" form="short"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="report thesis" match="any">
|
||||
<text variable="title"/>
|
||||
<group prefix=" (" suffix=")" delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number" prefix="No. "/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
|
||||
<text variable="title"/>
|
||||
<text macro="edition" prefix=", "/>
|
||||
</else-if>
|
||||
<else-if type="webpage">
|
||||
<text variable="title"/>
|
||||
<text value="WWW Document" prefix=" [" suffix="]"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="event">
|
||||
<choose>
|
||||
<if variable="event">
|
||||
<text term="presented at" text-case="capitalize-first" suffix=" "/>
|
||||
<text variable="event"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="issued">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date" form="short"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
<text value="ed"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="locators">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper" match="any">
|
||||
<group prefix=" " delimiter=", ">
|
||||
<group>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
|
||||
<group delimiter=", " prefix=". ">
|
||||
<text macro="event"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter paper-conference" match="any">
|
||||
<group delimiter=", " prefix=". ">
|
||||
<text macro="event"/>
|
||||
<text macro="publisher"/>
|
||||
<group>
|
||||
<label variable="page" form="short" suffix=" "/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text variable="number" prefix=". "/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="issued" sort="descending"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<text macro="author-short"/>
|
||||
<text macro="issued"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="locator" form="short"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="issued" sort="descending"/>
|
||||
</sort>
|
||||
<layout>
|
||||
<group suffix=".">
|
||||
<text macro="author" suffix=","/>
|
||||
<text macro="issued" prefix=" "/>
|
||||
<group prefix=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="container"/>
|
||||
<text macro="locators"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="access" prefix=". "/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
321
styles/harvard-cite-them-right.csl
Normal file
321
styles/harvard-cite-them-right.csl
Normal file
@@ -0,0 +1,321 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
|
||||
<info>
|
||||
<title>Cite Them Right 12th edition - Harvard</title>
|
||||
<id>http://www.zotero.org/styles/harvard-cite-them-right</id>
|
||||
<link href="http://www.zotero.org/styles/harvard-cite-them-right" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/harvard-cite-them-right-11th-edition" rel="template"/>
|
||||
<link href="http://www.citethemrightonline.com/" rel="documentation"/>
|
||||
<author>
|
||||
<name>Patrick O'Brien</name>
|
||||
</author>
|
||||
<category citation-format="author-date"/>
|
||||
<category field="generic-base"/>
|
||||
<summary>Harvard according to Cite Them Right, 11th edition.</summary>
|
||||
<updated>2025-10-29T11:57:22+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en-GB">
|
||||
<terms>
|
||||
<term name="editor" form="short">
|
||||
<single>ed.</single>
|
||||
<multiple>eds</multiple>
|
||||
</term>
|
||||
<term name="editortranslator" form="verb">edited and translated by</term>
|
||||
<term name="edition" form="short">edn.</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<names variable="container-author" delimiter=", " suffix=", ">
|
||||
<name and="text" initialize-with=". " delimiter=", " sort-separator=", " name-as-sort-order="all"/>
|
||||
</names>
|
||||
<choose>
|
||||
<if variable="container-author" match="none">
|
||||
<names variable="editor translator" delimiter=", ">
|
||||
<name and="text" initialize-with="."/>
|
||||
<label form="short" prefix=" (" suffix=")"/>
|
||||
</names>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="secondary-contributors">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="none">
|
||||
<names variable="editor translator" delimiter=". ">
|
||||
<label form="verb" text-case="capitalize-first" suffix=" "/>
|
||||
<name and="text" initialize-with="."/>
|
||||
</names>
|
||||
</if>
|
||||
<else-if variable="container-author" match="any">
|
||||
<names variable="editor translator" delimiter=". ">
|
||||
<label form="verb" text-case="capitalize-first" suffix=" "/>
|
||||
<name and="text" initialize-with=". " delimiter=", "/>
|
||||
</names>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name and="text" delimiter-precedes-last="never" initialize-with="." name-as-sort-order="all"/>
|
||||
<label form="short" prefix=" (" suffix=")"/>
|
||||
<et-al font-style="italic"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<choose>
|
||||
<if type="article-newspaper article-magazine article-journal" match="any">
|
||||
<text variable="container-title" text-case="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text macro="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author-short">
|
||||
<names variable="author">
|
||||
<name form="short" and="text" delimiter=", " delimiter-precedes-last="never" initialize-with=". "/>
|
||||
<et-al font-style="italic"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<choose>
|
||||
<if type="article-newspaper article-magazine article-journal" match="any">
|
||||
<text variable="container-title" text-case="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text macro="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<group delimiter=": ">
|
||||
<text term="available at" text-case="capitalize-first"/>
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if variable="URL">
|
||||
<text term="available at" suffix=": " text-case="capitalize-first"/>
|
||||
<text variable="URL"/>
|
||||
<group prefix=" (" delimiter=": " suffix=")">
|
||||
<text term="accessed" text-case="capitalize-first"/>
|
||||
<date form="text" variable="accessed">
|
||||
<date-part name="day"/>
|
||||
<date-part name="month"/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="number-volumes">
|
||||
<choose>
|
||||
<if variable="volume" match="none">
|
||||
<group delimiter=" " prefix="(" suffix=")">
|
||||
<text variable="number-of-volumes"/>
|
||||
<label variable="volume" form="short" strip-periods="true"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book legal_case legislation motion_picture report song thesis webpage graphic" match="any">
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<group delimiter=" ">
|
||||
<text variable="title" font-style="italic"/>
|
||||
<text variable="medium" prefix="[" suffix="]"/>
|
||||
</group>
|
||||
<text macro="number-volumes"/>
|
||||
</group>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" form="long" quotes="true"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="thesis">
|
||||
<group delimiter=". ">
|
||||
<text variable="genre"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="report">
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-journal article-newspaper article-magazine" match="none">
|
||||
<group delimiter=" ">
|
||||
<group delimiter=", ">
|
||||
<choose>
|
||||
<if type="speech" variable="event" match="any">
|
||||
<text variable="event" font-style="italic"/>
|
||||
</if>
|
||||
</choose>
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</group>
|
||||
<group prefix="(" suffix=")" delimiter=", ">
|
||||
<text variable="collection-title"/>
|
||||
<text variable="collection-number"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<text variable="year-suffix"/>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date"/>
|
||||
<text variable="year-suffix" prefix=" "/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="locator">
|
||||
<choose>
|
||||
<if type="article-journal">
|
||||
<text variable="volume"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="published-date">
|
||||
<choose>
|
||||
<if type="article-newspaper article-magazine post-weblog speech" match="any">
|
||||
<date variable="issued">
|
||||
<date-part name="day" suffix=" "/>
|
||||
<date-part name="month" form="long"/>
|
||||
</date>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="pages">
|
||||
<choose>
|
||||
<if type="chapter paper-conference article-journal article article-magazine article-newspaper book review review-book report" match="any">
|
||||
<group delimiter=" ">
|
||||
<label variable="page" form="short"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-title">
|
||||
<choose>
|
||||
<if variable="container-title">
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<choose>
|
||||
<if type="article article-journal" match="any">
|
||||
<choose>
|
||||
<if match="none" variable="page volume">
|
||||
<text value="Preprint" prefix="[" suffix="]"/>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short" strip-periods="true"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-prefix">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
|
||||
<sort>
|
||||
<key macro="year-date"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=", ">
|
||||
<text macro="author-short"/>
|
||||
<text macro="year-date"/>
|
||||
</group>
|
||||
<group>
|
||||
<label variable="locator" form="short" suffix=" "/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography and="text" et-al-min="4" et-al-use-first="1">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="year-date"/>
|
||||
<key variable="title"/>
|
||||
</sort>
|
||||
<layout suffix=".">
|
||||
<group delimiter=". ">
|
||||
<group delimiter=" ">
|
||||
<text macro="author"/>
|
||||
<text macro="year-date" prefix="(" suffix=")"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="title"/>
|
||||
<group delimiter=" ">
|
||||
<text macro="container-prefix"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="container-title"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="secondary-contributors"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
<group delimiter=", " prefix=", ">
|
||||
<text macro="locator"/>
|
||||
<text macro="published-date"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
<text macro="access" prefix=". "/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
512
styles/ieee.csl
Normal file
512
styles/ieee.csl
Normal file
@@ -0,0 +1,512 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
|
||||
<info>
|
||||
<title>IEEE</title>
|
||||
<id>http://www.zotero.org/styles/ieee</id>
|
||||
<link href="http://www.zotero.org/styles/ieee" rel="self"/>
|
||||
<!-- <link href="https://ieeeauthorcenter.ieee.org/wp-content/uploads/IEEE-Reference-Guide.pdf" rel="documentation"/> - 2018 guidelines -->
|
||||
<link href="http://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE_Reference_Guide.pdf" rel="documentation"/>
|
||||
<link href="https://journals.ieeeauthorcenter.ieee.org/your-role-in-article-production/ieee-editorial-style-manual/" rel="documentation"/>
|
||||
<author>
|
||||
<name>Michael Berkowitz</name>
|
||||
<email>mberkowi@gmu.edu</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Rintze Zelle</name>
|
||||
<uri>http://twitter.com/rintzezelle</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Stephen Frank</name>
|
||||
<uri>http://www.zotero.org/sfrank</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Giuseppe Silano</name>
|
||||
<email>g.silano89@gmail.com</email>
|
||||
<uri>http://giuseppesilano.net</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Brenton M. Wiernik</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Oliver Couch</name>
|
||||
<email>oliver.couch@gmail.com</email>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="engineering"/>
|
||||
<category field="generic-base"/>
|
||||
<summary>IEEE style as per the 2023 guidelines, V 11.29.2023.</summary>
|
||||
<updated>2024-07-15T14:30:07+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<date form="text">
|
||||
<date-part name="month" form="short" suffix=" "/>
|
||||
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<terms>
|
||||
<term name="chapter" form="short">ch.</term>
|
||||
<term name="chapter-number" form="short">ch.</term>
|
||||
<term name="presented at">presented at the</term>
|
||||
<term name="available at">available</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<!-- Macros -->
|
||||
<macro name="status">
|
||||
<choose>
|
||||
<if variable="page issue volume" match="none">
|
||||
<text variable="status" text-case="capitalize-first" suffix="" font-weight="bold"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" text-case="capitalize-first" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="issued">
|
||||
<choose>
|
||||
<if type="article-journal report" match="any">
|
||||
<date variable="issued">
|
||||
<date-part name="month" form="short" suffix=" "/>
|
||||
<date-part name="year" form="long"/>
|
||||
</date>
|
||||
</if>
|
||||
<else-if type="bill book chapter graphic legal_case legislation song thesis" match="any">
|
||||
<date variable="issued">
|
||||
<date-part name="year" form="long"/>
|
||||
</date>
|
||||
</else-if>
|
||||
<else-if type="paper-conference" match="any">
|
||||
<date variable="issued">
|
||||
<date-part name="month" form="short"/>
|
||||
<date-part name="year" prefix=" "/>
|
||||
</date>
|
||||
</else-if>
|
||||
<else-if type="motion_picture" match="any">
|
||||
<date variable="issued" form="text" prefix="(" suffix=")"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<date variable="issued" form="text"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name and="text" et-al-min="7" et-al-use-first="1" initialize-with=". "/>
|
||||
<label form="short" prefix=", " text-case="capitalize-first"/>
|
||||
<et-al font-style="italic"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<text macro="director"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<names variable="editor">
|
||||
<name initialize-with=". " delimiter=", " and="text"/>
|
||||
<label form="short" prefix=", " text-case="capitalize-first"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="director">
|
||||
<names variable="director">
|
||||
<name and="text" et-al-min="7" et-al-use-first="1" initialize-with=". "/>
|
||||
<et-al font-style="italic"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="locators">
|
||||
<group delimiter=", ">
|
||||
<text macro="edition"/>
|
||||
<group delimiter=" ">
|
||||
<text term="volume" form="short"/>
|
||||
<number variable="volume" form="numeric"/>
|
||||
</group>
|
||||
<group delimiter=" ">
|
||||
<number variable="number-of-volumes" form="numeric"/>
|
||||
<text term="volume" form="short" plural="true"/>
|
||||
</group>
|
||||
<group delimiter=" ">
|
||||
<text term="issue" form="short"/>
|
||||
<number variable="issue" form="numeric"/>
|
||||
</group>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture song standard software" match="any">
|
||||
<text variable="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" quotes="true"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="bill book chapter graphic legal_case legislation motion_picture paper-conference song" match="any">
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="event">
|
||||
<choose>
|
||||
<!-- Published Conference Paper -->
|
||||
<if type="paper-conference speech" match="any">
|
||||
<choose>
|
||||
<if variable="container-title" match="any">
|
||||
<group delimiter=" ">
|
||||
<text term="in"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
</if>
|
||||
<!-- Unpublished Conference Paper -->
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<text term="presented at"/>
|
||||
<text variable="event"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if type="webpage post post-weblog" match="any">
|
||||
<!-- https://url.com/ (accessed Mon. DD, YYYY). -->
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group delimiter=". " prefix=" ">
|
||||
<group delimiter=": ">
|
||||
<text term="accessed" text-case="capitalize-first"/>
|
||||
<date variable="accessed" form="text"/>
|
||||
</group>
|
||||
<text term="online" prefix="[" suffix="]" text-case="capitalize-first"/>
|
||||
<group delimiter=": ">
|
||||
<text term="available at" text-case="capitalize-first"/>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
<else-if match="any" variable="DOI">
|
||||
<!-- doi: 10.1000/xyz123. -->
|
||||
<text variable="DOI" prefix=" doi: " suffix="."/>
|
||||
</else-if>
|
||||
<else-if variable="URL">
|
||||
<!-- Accessed: Mon. DD, YYYY. [Medium]. Available: https://URL.com/ -->
|
||||
<group delimiter=". " prefix=" " suffix=". ">
|
||||
<!-- Accessed: Mon. DD, YYYY. -->
|
||||
<group delimiter=": ">
|
||||
<text term="accessed" text-case="capitalize-first"/>
|
||||
<date variable="accessed" form="text"/>
|
||||
</group>
|
||||
<!-- [Online Video]. -->
|
||||
<group prefix="[" suffix="]" delimiter=" ">
|
||||
<choose>
|
||||
<if variable="medium" match="any">
|
||||
<text variable="medium" text-case="capitalize-first"/>
|
||||
</if>
|
||||
<else>
|
||||
<text term="online" text-case="capitalize-first"/>
|
||||
<choose>
|
||||
<if type="motion_picture">
|
||||
<text term="video" text-case="capitalize-first"/>
|
||||
</if>
|
||||
</choose>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
</group>
|
||||
<!-- Available: https://URL.com/ -->
|
||||
<group delimiter=": " prefix=" ">
|
||||
<text term="available at" text-case="capitalize-first"/>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="page">
|
||||
<choose>
|
||||
<if type="article-journal" variable="number" match="all">
|
||||
<group delimiter=" ">
|
||||
<text value="Art."/>
|
||||
<text term="issue" form="short"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<label variable="page" form="short"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="citation-locator">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if locator="page">
|
||||
<label variable="locator" form="short"/>
|
||||
</if>
|
||||
<else>
|
||||
<label variable="locator" form="short" text-case="capitalize-first"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="geographic-location">
|
||||
<group delimiter=", " suffix=".">
|
||||
<choose>
|
||||
<if variable="publisher-place">
|
||||
<text variable="publisher-place" text-case="title"/>
|
||||
</if>
|
||||
<else-if variable="event-place">
|
||||
<text variable="event-place" text-case="title"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- Series -->
|
||||
<macro name="collection">
|
||||
<choose>
|
||||
<if variable="collection-title" match="any">
|
||||
<text term="in" suffix=" "/>
|
||||
<group delimiter=", " suffix=". ">
|
||||
<text variable="collection-title"/>
|
||||
<text variable="collection-number" prefix="no. "/>
|
||||
<text variable="volume" prefix="vol. "/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<!-- Citation -->
|
||||
<citation>
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout delimiter=", ">
|
||||
<group prefix="[" suffix="]" delimiter=", ">
|
||||
<text variable="citation-number"/>
|
||||
<text macro="citation-locator"/>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<!-- Bibliography -->
|
||||
<bibliography entry-spacing="0" second-field-align="flush">
|
||||
<layout>
|
||||
<!-- Citation Number -->
|
||||
<text variable="citation-number" prefix="[" suffix="]"/>
|
||||
<!-- Author(s) -->
|
||||
<text macro="author" suffix=", "/>
|
||||
<!-- Rest of Citation -->
|
||||
<choose>
|
||||
<!-- Specific Formats -->
|
||||
<if type="article-journal">
|
||||
<group delimiter=", ">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title" font-style="italic" form="short"/>
|
||||
<text macro="locators"/>
|
||||
<text macro="page"/>
|
||||
<text macro="issued"/>
|
||||
<text macro="status"/>
|
||||
</group>
|
||||
<choose>
|
||||
<if variable="URL DOI" match="none">
|
||||
<text value="."/>
|
||||
</if>
|
||||
<else>
|
||||
<text value=","/>
|
||||
</else>
|
||||
</choose>
|
||||
<text macro="access"/>
|
||||
</if>
|
||||
<else-if type="paper-conference speech" match="any">
|
||||
<group delimiter=", " suffix=", ">
|
||||
<text macro="title"/>
|
||||
<text macro="event"/>
|
||||
<text macro="editor"/>
|
||||
</group>
|
||||
<text macro="collection"/>
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
<text macro="page"/>
|
||||
<text macro="status"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="chapter">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<group delimiter=" ">
|
||||
<text term="in" suffix=" "/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
<text macro="locators"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="collection"/>
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="chapter-number" form="short"/>
|
||||
<text variable="chapter-number"/>
|
||||
</group>
|
||||
<text macro="page"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="report">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text variable="genre"/>
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="software">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text macro="issued" prefix="(" suffix=")"/>
|
||||
<text variable="genre"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="article">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text macro="issued"/>
|
||||
<group delimiter=": ">
|
||||
<text macro="publisher" font-style="italic"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="webpage post-weblog post" match="any">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group delimiter=", ">
|
||||
<text macro="title"/>
|
||||
<text variable="number"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<!-- Online Video -->
|
||||
<else-if type="motion_picture">
|
||||
<text macro="geographic-location" suffix=". "/>
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="standard">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
<text macro="geographic-location"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<!-- Generic/Fallback Formats -->
|
||||
<else-if type="bill book graphic legal_case legislation report song" match="any">
|
||||
<group delimiter=", " suffix=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="locators"/>
|
||||
</group>
|
||||
<text macro="collection"/>
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
<text macro="page"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any">
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<text macro="locators"/>
|
||||
<text macro="publisher"/>
|
||||
<text macro="page"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<group delimiter=", " suffix=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<text macro="locators"/>
|
||||
</group>
|
||||
<text macro="collection"/>
|
||||
<group delimiter=", " suffix=".">
|
||||
<text macro="publisher"/>
|
||||
<text macro="page"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<text macro="access"/>
|
||||
</else>
|
||||
</choose>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
3111
styles/modern-humanities-research-association-notes.csl
Normal file
3111
styles/modern-humanities-research-association-notes.csl
Normal file
File diff suppressed because it is too large
Load Diff
1221
styles/modern-language-association.csl
Normal file
1221
styles/modern-language-association.csl
Normal file
File diff suppressed because it is too large
Load Diff
189
styles/nature.csl
Normal file
189
styles/nature.csl
Normal file
@@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
|
||||
<info>
|
||||
<title>Nature</title>
|
||||
<id>http://www.zotero.org/styles/nature</id>
|
||||
<link href="http://www.zotero.org/styles/nature" rel="self"/>
|
||||
<link href="https://www.nature.com/nature/for-authors/formatting-guide" rel="documentation"/>
|
||||
<author>
|
||||
<name>Michael Berkowitz</name>
|
||||
<email>mberkowi@gmu.edu</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Patrick O'Brien</name>
|
||||
<email>citationstyler@gmail.com</email>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="science"/>
|
||||
<category field="generic-base"/>
|
||||
<issn>0028-0836</issn>
|
||||
<eissn>1476-4687</eissn>
|
||||
<updated>2025-09-10T18:26:53+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" font-style="italic" text-case="title"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name sort-separator=", " delimiter=", " and="symbol" initialize-with=". " delimiter-precedes-last="never" name-as-sort-order="all"/>
|
||||
<label form="short" prefix=", "/>
|
||||
<et-al font-style="italic"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="volume" type="article dataset software" match="any"/>
|
||||
<else-if variable="DOI">
|
||||
<text variable="DOI" prefix="doi:"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="access-data">
|
||||
<choose>
|
||||
<if type="dataset software" match="any">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="issuance">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture song thesis chapter paper-conference" match="any">
|
||||
<group delimiter="; " suffix=".">
|
||||
<group delimiter=", " prefix="(" suffix=")">
|
||||
<text variable="publisher" form="long"/>
|
||||
<text variable="publisher-place"/>
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if variable="genre" match="any">
|
||||
<text variable="genre" text-case="capitalize-first"/>
|
||||
</if>
|
||||
<else>
|
||||
<text term="preprint" text-case="capitalize-first"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text term="at"/>
|
||||
<choose>
|
||||
<if variable="DOI" match="any">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="URL"/>
|
||||
</else>
|
||||
</choose>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="dataset software" match="any">
|
||||
<group delimiter=" ">
|
||||
<text variable="publisher"/>
|
||||
<text macro="access-data"/>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="report webpage post post-weblog" match="any">
|
||||
<group delimiter=" ">
|
||||
<text variable="URL"/>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-journal" match="any">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if match="none" variable="volume page">
|
||||
<choose>
|
||||
<if match="any" variable="DOI">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="URL"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<date variable="issued" prefix="(" suffix=")">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-title">
|
||||
<choose>
|
||||
<if type="article-journal">
|
||||
<text variable="container-title" font-style="italic" form="short"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<names variable="editor" prefix="(" suffix=")">
|
||||
<label form="short" suffix=" "/>
|
||||
<name and="symbol" delimiter-precedes-last="never" initialize-with=". " name-as-sort-order="all"/>
|
||||
</names>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="volume">
|
||||
<choose>
|
||||
<if type="article-journal" match="any">
|
||||
<text variable="volume" font-weight="bold" suffix=","/>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<label variable="volume" form="short"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout vertical-align="sup" delimiter=",">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography et-al-min="6" et-al-use-first="1" second-field-align="flush" entry-spacing="0" line-spacing="2">
|
||||
<layout suffix=".">
|
||||
<text variable="citation-number" suffix="."/>
|
||||
<group delimiter=" ">
|
||||
<text macro="author" suffix="."/>
|
||||
<text macro="title" suffix="."/>
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in"/>
|
||||
</if>
|
||||
</choose>
|
||||
<text macro="container-title"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="volume"/>
|
||||
<text variable="page"/>
|
||||
<text macro="issuance"/>
|
||||
<text macro="access"/>
|
||||
</group>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
377
styles/vancouver.csl
Normal file
377
styles/vancouver.csl
Normal file
@@ -0,0 +1,377 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" initialize-with-hyphen="false" page-range-format="minimal">
|
||||
<info>
|
||||
<title>Vancouver</title>
|
||||
<id>http://www.zotero.org/styles/vancouver</id>
|
||||
<link href="http://www.zotero.org/styles/vancouver" rel="self"/>
|
||||
<link href="http://www.nlm.nih.gov/bsd/uniform_requirements.html" rel="documentation"/>
|
||||
<author>
|
||||
<name>Michael Berkowitz</name>
|
||||
<email>mberkowi@gmu.edu</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Sean Takats</name>
|
||||
<email>stakats@gmu.edu</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="generic-base"/>
|
||||
<category field="medicine"/>
|
||||
<summary>Vancouver style as outlined by International Committee of Medical Journal Editors Uniform Requirements for Manuscripts Submitted to Biomedical Journals: Sample References</summary>
|
||||
<updated>2025-05-18T00:55:38+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<date form="text" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" form="short" strip-periods="true"/>
|
||||
<date-part name="day"/>
|
||||
</date>
|
||||
<terms>
|
||||
<term name="collection-editor" form="long">
|
||||
<single>editor</single>
|
||||
<multiple>editors</multiple>
|
||||
</term>
|
||||
<term name="presented at">presented at</term>
|
||||
<term name="available at">available from</term>
|
||||
<term name="section" form="short">sect.</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<locale xml:lang="fr">
|
||||
<date form="text" delimiter=" ">
|
||||
<date-part name="day"/>
|
||||
<date-part name="month" form="short" strip-periods="true"/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</locale>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="long" prefix=", "/>
|
||||
<substitute>
|
||||
<text macro="webpage-title"/>
|
||||
<names variable="editor"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<names variable="editor" suffix=".">
|
||||
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="long" prefix=", "/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="chapter-marker">
|
||||
<choose>
|
||||
<if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
|
||||
<text term="in" text-case="capitalize-first"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="webpage-title">
|
||||
<!--If a webpage has a container, we're assuming the citation is "part of a website" as per ch. 25 Citing Medicine https://www.ncbi.nlm.nih.gov/books/NBK7274/?report=reader -->
|
||||
<choose>
|
||||
<if type="webpage" variable="container-title" match="all">
|
||||
<group delimiter=" ">
|
||||
<text variable="container-title"/>
|
||||
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<!--discard publisher info for articles-->
|
||||
<if type="article-journal article-magazine article-newspaper" match="none">
|
||||
<group delimiter=": " suffix=";">
|
||||
<choose>
|
||||
<if type="thesis">
|
||||
<text variable="publisher-place" prefix="[" suffix="]"/>
|
||||
</if>
|
||||
<else-if type="speech"/>
|
||||
<else>
|
||||
<text variable="publisher-place"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group delimiter=": ">
|
||||
<text term="available at" text-case="capitalize-first"/>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="accessed-date">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group prefix="[" suffix="]" delimiter=" ">
|
||||
<text term="cited" text-case="lowercase"/>
|
||||
<date variable="accessed" form="text"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-title">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine chapter paper-conference article-newspaper review review-book entry-dictionary entry-encyclopedia" match="any">
|
||||
<group suffix="." delimiter=" ">
|
||||
<choose>
|
||||
<if type="article-journal review review-book" match="any">
|
||||
<text variable="container-title" form="short" strip-periods="true"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="container-title" strip-periods="true"/>
|
||||
</else>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
<text macro="edition" prefix=" "/>
|
||||
</if>
|
||||
<!--add event-name and event-place once they become available-->
|
||||
<else-if type="bill legislation" match="any">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text variable="container-title"/>
|
||||
<group delimiter=" ">
|
||||
<text term="section" form="short" text-case="capitalize-first"/>
|
||||
<text variable="section"/>
|
||||
</group>
|
||||
</group>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="speech">
|
||||
<group delimiter=": " suffix=";">
|
||||
<group delimiter=" ">
|
||||
<text variable="genre" text-case="capitalize-first"/>
|
||||
<text term="presented at"/>
|
||||
</group>
|
||||
<text variable="event"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group delimiter=", " suffix=".">
|
||||
<choose>
|
||||
<if variable="collection-title" match="none">
|
||||
<group delimiter=" ">
|
||||
<label variable="volume" form="short" text-case="capitalize-first"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
<text variable="container-title"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="webpage" variable="container-title" match="all"/>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
<choose>
|
||||
<if type="article-journal article-magazine chapter paper-conference article-newspaper review review-book entry-dictionary entry-encyclopedia" match="none">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<text term="internet" prefix=" [" suffix="]" text-case="capitalize-first"/>
|
||||
</if>
|
||||
</choose>
|
||||
<text macro="edition" prefix=". "/>
|
||||
</if>
|
||||
</choose>
|
||||
</else>
|
||||
</choose>
|
||||
<choose>
|
||||
<if type="thesis">
|
||||
<text variable="genre" prefix=" [" suffix="]"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="date">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper review review-book" match="any">
|
||||
<group suffix=";" delimiter=" ">
|
||||
<date variable="issued" form="text"/>
|
||||
<text macro="accessed-date"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill legislation" match="any">
|
||||
<group delimiter=", ">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="month" form="short" strip-periods="true"/>
|
||||
<date-part name="day"/>
|
||||
</date>
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="report">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" form="short" strip-periods="true"/>
|
||||
</date>
|
||||
<text macro="accessed-date" prefix=" "/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group suffix=".">
|
||||
<group delimiter=", ">
|
||||
<text variable="number"/>
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
<text macro="accessed-date" prefix=" "/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="speech">
|
||||
<group delimiter="; ">
|
||||
<group delimiter=" ">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" form="short" strip-periods="true"/>
|
||||
<date-part name="day"/>
|
||||
</date>
|
||||
<text macro="accessed-date"/>
|
||||
</group>
|
||||
<text variable="event-place"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group suffix=".">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
<text macro="accessed-date" prefix=" "/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="pages">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper review review-book" match="any">
|
||||
<text variable="page" prefix=":"/>
|
||||
</if>
|
||||
<else-if type="book" match="any">
|
||||
<text variable="number-of-pages" prefix=" "/>
|
||||
<choose>
|
||||
<if is-numeric="number-of-pages">
|
||||
<label variable="number-of-pages" form="short" prefix=" " plural="never"/>
|
||||
</if>
|
||||
</choose>
|
||||
</else-if>
|
||||
<else>
|
||||
<group prefix=" " delimiter=" ">
|
||||
<label variable="page" form="short" plural="never"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="journal-location">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine review review-book" match="any">
|
||||
<text variable="volume"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="webpage-part">
|
||||
<choose>
|
||||
<if type="webpage" variable="container-title" match="all">
|
||||
<text variable="title"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="collection-details">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper review review-book" match="none">
|
||||
<choose>
|
||||
<if variable="collection-title">
|
||||
<group delimiter=" " prefix="(" suffix=")">
|
||||
<names variable="collection-editor" suffix=".">
|
||||
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="long" prefix=", "/>
|
||||
</names>
|
||||
<group delimiter="; ">
|
||||
<text variable="collection-title"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="volume" form="short"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="report-details">
|
||||
<choose>
|
||||
<if type="report">
|
||||
<text variable="number" prefix="Report No.: "/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter=",">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography et-al-min="7" et-al-use-first="6" second-field-align="flush">
|
||||
<layout>
|
||||
<text variable="citation-number" suffix="."/>
|
||||
<group delimiter=". " suffix=". ">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
</group>
|
||||
<group delimiter=" " suffix=". ">
|
||||
<group delimiter=": ">
|
||||
<text macro="chapter-marker"/>
|
||||
<group delimiter=" ">
|
||||
<text macro="editor"/>
|
||||
<text macro="container-title"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="publisher"/>
|
||||
<group>
|
||||
<text macro="date"/>
|
||||
<text macro="journal-location"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
<text macro="webpage-part"/>
|
||||
</group>
|
||||
<text macro="collection-details" suffix=". "/>
|
||||
<text macro="report-details" suffix=". "/>
|
||||
<text macro="access"/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
||||
224
translators/ABC News Australia.js
Normal file
224
translators/ABC News Australia.js
Normal file
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"translatorID": "92d45016-5f7b-4bcf-bb63-193033f02f2b",
|
||||
"label": "ABC News Australia",
|
||||
"creator": "Joyce Chia",
|
||||
"target": "https?://(www\\.)?abc\\.net\\.au/news/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-23 00:29:10"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2020-2021 Joyce Chia
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
let contentType = attr(doc, 'meta[property="ABC.ContentType"]', 'content');
|
||||
if (contentType == 'CMChannel' && getSearchResults(doc, true)) {
|
||||
return 'multiple';
|
||||
}
|
||||
else if (contentType == 'Video') {
|
||||
return 'videoRecording';
|
||||
}
|
||||
else if (contentType == 'Article') {
|
||||
return 'newspaperArticle';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h3 a');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) return;
|
||||
ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
item.language = "en-AU";
|
||||
// og:url does not preserve https prefixes, so use canonical link until fixed
|
||||
var canonical = doc.querySelector('link[rel="canonical"]');
|
||||
if (canonical) {
|
||||
item.url = canonical.href;
|
||||
}
|
||||
|
||||
if (item.itemType == 'videoRecording') {
|
||||
item.studio = "ABC News"; // i guess this is correct...
|
||||
}
|
||||
else {
|
||||
item.publicationTitle = "ABC News";
|
||||
}
|
||||
|
||||
item.language = "en-AU";
|
||||
|
||||
if (item.date) {
|
||||
item.date = ZU.strToISO(item.date);
|
||||
}
|
||||
else {
|
||||
item.date = ZU.strToISO(attr(doc, 'time', 'datetime'));
|
||||
}
|
||||
|
||||
var authors = text(doc, '[data-component="Byline"] p');
|
||||
if (authors && item.creators.length <= 1) {
|
||||
authors = authors.replace(/^By /, '');
|
||||
if (authors == authors.toUpperCase()) { // convert to title case if all caps
|
||||
authors = ZU.capitalizeTitle(authors, true);
|
||||
}
|
||||
item.creators = [];
|
||||
var authorsList = authors.split(/,|\band\b/);
|
||||
for (let i = 0; i < authorsList.length; i++) {
|
||||
item.creators.push(ZU.cleanAuthor(authorsList[i], "author"));
|
||||
}
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = detectWeb(doc, url);
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.abc.net.au/news/2020-05-22/nt-government-coronavirus-recovery-commission-michael-gunner/12276832?section=politics",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "NT 'uniquely positioned' to solve Australia's economic woes post-COVID-19, says Chief Minister",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Lauren",
|
||||
"lastName": "Roberts",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-05-22",
|
||||
"abstractNote": "The NT Labor Government establishes a new commission to help it financially recover from the coronavirus pandemic, with the former opposition leader and a former chief minister in key roles.",
|
||||
"language": "en-AU",
|
||||
"libraryCatalog": "www.abc.net.au",
|
||||
"publicationTitle": "ABC News",
|
||||
"url": "https://www.abc.net.au/news/2020-05-22/nt-government-coronavirus-recovery-commission-michael-gunner/12276832",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "chief minister michael gunner"
|
||||
},
|
||||
{
|
||||
"tag": "coronavirus budget"
|
||||
},
|
||||
{
|
||||
"tag": "nt budget"
|
||||
},
|
||||
{
|
||||
"tag": "parliament house"
|
||||
},
|
||||
{
|
||||
"tag": "territory economic reconstruction commission"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.abc.net.au/news/2021-07-23/tracey-holmes-on-the-ground-in-tokyo/13467310",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Tracey Holmes on the ground in Tokyo",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Tracey",
|
||||
"lastName": "Holmes",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-07-22",
|
||||
"abstractNote": "Brisbane is named the host of the 2032 Olympics, Tracey speaks with Federal Sports Minister Richard Colbeck to get his reaction. Plus we look at the COVID safety measures athletes, officials and the media are subjected to as they land in the Japanese capital.",
|
||||
"language": "en-AU",
|
||||
"libraryCatalog": "www.abc.net.au",
|
||||
"studio": "ABC News",
|
||||
"url": "https://www.abc.net.au/news/2021-07-23/tracey-holmes-on-the-ground-in-tokyo/13467310",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "olympics"
|
||||
},
|
||||
{
|
||||
"tag": "tokyo olympics 2021"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
165
translators/ACLS Humanities EBook.js
Normal file
165
translators/ACLS Humanities EBook.js
Normal file
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"translatorID": "2553b683-dc1b-4a1e-833a-7a7755326186",
|
||||
"label": "ACLS Humanities EBook",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://www\\.fulcrum\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-03 01:54:15"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.querySelector('meta[name="citation_title"]')) {
|
||||
return "book";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.document a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(text(row, 'h3'));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
item.libraryCatalog = 'ACLS Humanities EBook';
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.fulcrum.org/concern/monographs/79408038k?locale=en",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Empire, Architecture, and the City: French-Ottoman Encounters, 1830-1914",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Zeynep",
|
||||
"lastName": "Celik",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2008",
|
||||
"ISBN": "9780295987798",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ACLS Humanities EBook",
|
||||
"publisher": "U of Washington Press",
|
||||
"shortTitle": "Empire, Architecture, and the City",
|
||||
"url": "https://hdl.handle.net/2027/heb.33994",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.fulcrum.org/concern/monographs/9z9032224?locale=en",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Black Rock: Mining Folklore of the Pennsylvania Dutch",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "George",
|
||||
"lastName": "Korson",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1960",
|
||||
"ISBN": "9780801803451",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ACLS Humanities EBook",
|
||||
"publisher": "Johns Hopkins UP",
|
||||
"shortTitle": "Black Rock",
|
||||
"url": "https://hdl.handle.net/2027/heb.33116",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.fulcrum.org/heb?utf8=%E2%9C%93&press=heb&q=istanbul",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
600
translators/ACLWeb.js
Normal file
600
translators/ACLWeb.js
Normal file
@@ -0,0 +1,600 @@
|
||||
{
|
||||
"translatorID": "f4a5876a-3e53-40e2-9032-d99a30d7a6fc",
|
||||
"label": "ACLWeb",
|
||||
"creator": "Guy Aglionby",
|
||||
"target": "^https?://(www\\.)?(aclanthology\\.org|aclweb\\.org/anthology)/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2022-11-10 10:36:48"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2018 Guy Aglionby
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
var ext2mime = {
|
||||
gz: 'application/gzip',
|
||||
tgz: 'application/gzip',
|
||||
pdf: 'application/pdf',
|
||||
zip: 'application/zip',
|
||||
tar: 'application/x-tar',
|
||||
txt: 'text/plain',
|
||||
rar: 'application/x-rar-compressed',
|
||||
rtf: 'application/rtf',
|
||||
bz2: 'application/x-bzip2',
|
||||
bz: 'application/x-bzip',
|
||||
doc: 'application/msword',
|
||||
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
ppt: 'application/vnd.ms-powerpoint',
|
||||
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
xls: 'application/vnd.ms-excel',
|
||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
html: 'text/html',
|
||||
png: 'image/png',
|
||||
gif: 'image/gif',
|
||||
jpg: 'image/jpeg',
|
||||
jpeg: 'image/jpeg',
|
||||
mp4: 'video/mp4',
|
||||
tsv: 'text/tab-separated-values',
|
||||
csv: 'text/csv',
|
||||
py: 'text/x-python',
|
||||
tex: 'text/x-tex',
|
||||
bbl: 'text/x-tex'
|
||||
};
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
let paperIdRegex = /([A-Z])\d{2}-\d{4}|\d{4}\.([\w\d]+)-[\w\d]+\.\d+/;
|
||||
let paperMatch = url.match(paperIdRegex);
|
||||
if (paperMatch) {
|
||||
let venue = paperMatch[1] ? paperMatch[1] : paperMatch[2];
|
||||
venue = venue.toLowerCase();
|
||||
if (venue == 'j' || venue == 'q' || venue == 'tacl' || venue == 'cl') {
|
||||
return 'journalArticle';
|
||||
}
|
||||
else {
|
||||
return 'conferencePaper';
|
||||
}
|
||||
}
|
||||
else if ((url.includes('/events/') || url.includes('/people/')
|
||||
|| url.includes('/volumes/') || url.includes('/search/'))
|
||||
&& getSearchResults(doc, url)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) === 'multiple') {
|
||||
Zotero.selectItems(getSearchResults(doc, url), function (selected) {
|
||||
if (selected) {
|
||||
ZU.processDocuments(Object.keys(selected), scrape);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (url.endsWith('.bib')) {
|
||||
let paperURL = url.slice(0, -'.bib'.length);
|
||||
ZU.processDocuments(paperURL, scrape);
|
||||
}
|
||||
else if (url.endsWith('.pdf')) {
|
||||
// e.g. http://aclweb.org/anthology/P18-1001.pdf
|
||||
let paperURL = url.slice(0, -'.pdf'.length);
|
||||
ZU.processDocuments(paperURL, scrape);
|
||||
}
|
||||
else {
|
||||
scrape(doc);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc) {
|
||||
let bibtex = ZU.xpath(doc, '//pre[@id = "citeBibtexContent"]')[0].textContent;
|
||||
let pdfURL = ZU.xpath(doc, '//a[span[contains(text(), "PDF")]]/@href')[0].value;
|
||||
let translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4");
|
||||
translator.setString(bibtex);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
item.attachments.push({
|
||||
url: pdfURL,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
delete item.itemID;
|
||||
|
||||
if (item.date) {
|
||||
item.date = ZU.strToISO(item.date);
|
||||
}
|
||||
|
||||
if (item.abstractNote) {
|
||||
item.abstractNote = ZU.cleanTags(item.abstractNote);
|
||||
}
|
||||
|
||||
if (item.itemType == 'conferencePaper') {
|
||||
item.conferenceName = getVenue(doc, item.publicationTitle);
|
||||
}
|
||||
|
||||
if (Z.getHiddenPref('attachSupplementary')) {
|
||||
let supplementaries = ZU.xpath(doc, '//div[contains(@class, "acl-paper-link-block")]//a[contains(@class, "btn-attachment")]');
|
||||
|
||||
supplementaries.forEach(function (supplementary) {
|
||||
let ext = supplementary.href.split('.').pop();
|
||||
let supplementaryMime = Z.getHiddenPref('supplementaryAsLink') ? 'text/html' : ext2mime[ext];
|
||||
item.attachments.push({
|
||||
url: supplementary.href,
|
||||
title: supplementary.text,
|
||||
mimeType: supplementaryMime || 'text/html',
|
||||
snapshot: !Z.getHiddenPref('supplementaryAsLink')
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
}
|
||||
|
||||
function getVenue(doc, pubTitle) {
|
||||
let venueElements = ZU.xpath(doc, '//dt[contains(text(), "Venue")]//following::dd[1]/a');
|
||||
let venues = venueElements.map(function (v) {
|
||||
return v.innerText.trim();
|
||||
});
|
||||
|
||||
if (!venues.length) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let year = ZU.xpath(doc, '//dt[contains(text(), "Year")]/following::dd[1]')[0].textContent;
|
||||
let venueString = venues.join('-') + ' ' + year;
|
||||
|
||||
if (pubTitle.includes('Student') || pubTitle.includes('Demonstration') || pubTitle.includes('Tutorial')) {
|
||||
// better to use full proceedingsTitle to cite these publications
|
||||
return '';
|
||||
}
|
||||
if (venueString.includes('SemEval')) {
|
||||
if (pubTitle.includes('SENSEVAL')) {
|
||||
return 'SENSEVAL ' + year;
|
||||
}
|
||||
else if (pubTitle.includes('Evaluation') && !pubTitle.includes('Joint')) {
|
||||
return 'SemEval ' + year;
|
||||
}
|
||||
else if (!pubTitle.includes('Evaluation') && pubTitle.includes('Joint')) {
|
||||
return '*SEM ' + year;
|
||||
}
|
||||
else if (pubTitle.includes('Volume 1') && pubTitle.includes('Volume 2')) {
|
||||
return '*SEM/SemEval ' + year;
|
||||
}
|
||||
else if (pubTitle.includes('SemEval')) {
|
||||
return 'SemEval ' + year;
|
||||
}
|
||||
else {
|
||||
return '*SEM ' + year;
|
||||
}
|
||||
}
|
||||
else if (venueString.includes('WS')) {
|
||||
// better to use full proceedingsTitle to cite these publications
|
||||
return '';
|
||||
}
|
||||
else if (!venueString.includes("HLT") && pubTitle.match('HLT|Human Language Technolog(y|ies)')) {
|
||||
return venues.join('-') + '-HLT ' + year;
|
||||
}
|
||||
return venueString;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, url) {
|
||||
let items = {};
|
||||
if (url.includes('/search/')) {
|
||||
// e.g. https://www.aclweb.org/anthology/search/?q=foo+bar
|
||||
let results = ZU.xpath(doc, '//div[contains(@class, "gsc-webResult")]//div[contains(@class, "gs-title")]/a');
|
||||
let paperRegex = /[A-Z]\d{2}-\d{4}|\d{4}\.[\w\d]+-[\w\d]+\.\d+/;
|
||||
for (let result of results) {
|
||||
let url = result.href;
|
||||
if (url.match(paperRegex)) {
|
||||
if (url.endsWith('.pdf')) {
|
||||
url = url.slice(0, -'.pdf'.length);
|
||||
}
|
||||
items[url] = result.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
let papers = ZU.xpath(doc, '//section[@id="main"]//strong/a');
|
||||
for (let paper of papers) {
|
||||
items[paper.href] = paper.text;
|
||||
}
|
||||
}
|
||||
return Object.keys(items).length ? items : false;
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/events/acl-2018/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/volumes/P18-1/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/people/i/iryna-gurevych/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/Q18-1001/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Whodunnit? Crime Drama as a Case for Natural Language Understanding",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Lea",
|
||||
"lastName": "Frermann",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Shay B.",
|
||||
"lastName": "Cohen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Mirella",
|
||||
"lastName": "Lapata",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2018",
|
||||
"DOI": "10.1162/tacl_a_00001",
|
||||
"abstractNote": "In this paper we argue that crime drama exemplified in television programs such as CSI: Crime Scene Investigation is an ideal testbed for approximating real-world natural language understanding and the complex inferences associated with it. We propose to treat crime drama as a new inference task, capitalizing on the fact that each episode poses the same basic question (i.e., who committed the crime) and naturally provides the answer when the perpetrator is revealed. We develop a new dataset based on CSI episodes, formalize perpetrator identification as a sequence labeling problem, and develop an LSTM-based model which learns from multi-modal data. Experimental results show that an incremental inference strategy is key to making accurate guesses as well as learning from representations fusing textual, visual, and acoustic input.",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "1–15",
|
||||
"publicationTitle": "Transactions of the Association for Computational Linguistics",
|
||||
"shortTitle": "Whodunnit?",
|
||||
"url": "https://www.aclweb.org/anthology/Q18-1001",
|
||||
"volume": "6",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/W04-0801/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "The Basque lexical-sample task",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Eneko",
|
||||
"lastName": "Agirre",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Itziar",
|
||||
"lastName": "Aldabe",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Mikel",
|
||||
"lastName": "Lersundi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "David",
|
||||
"lastName": "Martínez",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Eli",
|
||||
"lastName": "Pociello",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Larraitz",
|
||||
"lastName": "Uria",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2004-07",
|
||||
"conferenceName": "SENSEVAL 2004",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "1–4",
|
||||
"place": "Barcelona, Spain",
|
||||
"proceedingsTitle": "Proceedings of SENSEVAL-3, the Third International Workshop on the Evaluation of Systems for the Semantic Analysis of Text",
|
||||
"publisher": "Association for Computational Linguistics",
|
||||
"url": "https://www.aclweb.org/anthology/W04-0801",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/W19-0101/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Can Entropy Explain Successor Surprisal Effects in Reading?",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Marten",
|
||||
"lastName": "van Schijndel",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Tal",
|
||||
"lastName": "Linzen",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2019",
|
||||
"DOI": "10.7275/qtbb-9d05",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "1–7",
|
||||
"proceedingsTitle": "Proceedings of the Society for Computation in Linguistics (SCiL) 2019",
|
||||
"url": "https://www.aclweb.org/anthology/W19-0101",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/N12-2001/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Finding the Right Supervisor: Expert-Finding in a University Domain",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Fawaz",
|
||||
"lastName": "Alarfaj",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Udo",
|
||||
"lastName": "Kruschwitz",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "David",
|
||||
"lastName": "Hunter",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Chris",
|
||||
"lastName": "Fox",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012-06",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "1–6",
|
||||
"place": "Montréal, Canada",
|
||||
"proceedingsTitle": "Proceedings of the NAACL HLT 2012 Student Research Workshop",
|
||||
"publisher": "Association for Computational Linguistics",
|
||||
"shortTitle": "Finding the Right Supervisor",
|
||||
"url": "https://www.aclweb.org/anthology/N12-2001",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/N18-1001/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Label-Aware Double Transfer Learning for Cross-Specialty Medical Named Entity Recognition",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Zhenghui",
|
||||
"lastName": "Wang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Yanru",
|
||||
"lastName": "Qu",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Liheng",
|
||||
"lastName": "Chen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Jian",
|
||||
"lastName": "Shen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Weinan",
|
||||
"lastName": "Zhang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Shaodian",
|
||||
"lastName": "Zhang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Yimei",
|
||||
"lastName": "Gao",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Gen",
|
||||
"lastName": "Gu",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Ken",
|
||||
"lastName": "Chen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Yong",
|
||||
"lastName": "Yu",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2018-06",
|
||||
"DOI": "10.18653/v1/N18-1001",
|
||||
"abstractNote": "We study the problem of named entity recognition (NER) from electronic medical records, which is one of the most fundamental and critical problems for medical text mining. Medical records which are written by clinicians from different specialties usually contain quite different terminologies and writing styles. The difference of specialties and the cost of human annotation makes it particularly difficult to train a universal medical NER system. In this paper, we propose a label-aware double transfer learning framework (La-DTL) for cross-specialty NER, so that a medical NER system designed for one specialty could be conveniently applied to another one with minimal annotation efforts. The transferability is guaranteed by two components: (i) we propose label-aware MMD for feature representation transfer, and (ii) we perform parameter transfer with a theoretical upper bound which is also label aware. We conduct extensive experiments on 12 cross-specialty NER tasks. The experimental results demonstrate that La-DTL provides consistent accuracy improvement over strong baselines. Besides, the promising experimental results on non-medical NER scenarios indicate that La-DTL is potential to be seamlessly adapted to a wide range of NER tasks.",
|
||||
"conferenceName": "NAACL-HLT 2018",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "1–15",
|
||||
"place": "New Orleans, Louisiana",
|
||||
"proceedingsTitle": "Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)",
|
||||
"publisher": "Association for Computational Linguistics",
|
||||
"url": "https://www.aclweb.org/anthology/N18-1001",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/2020.lrec-1.2/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "A Cluster Ranking Model for Full Anaphora Resolution",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Juntao",
|
||||
"lastName": "Yu",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alexandra",
|
||||
"lastName": "Uma",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Massimo",
|
||||
"lastName": "Poesio",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-05",
|
||||
"ISBN": "9791095546344",
|
||||
"abstractNote": "Anaphora resolution (coreference) systems designed for the CONLL 2012 dataset typically cannot handle key aspects of the full anaphora resolution task such as the identification of singletons and of certain types of non-referring expressions (e.g., expletives), as these aspects are not annotated in that corpus. However, the recently released dataset for the CRAC 2018 Shared Task can now be used for that purpose. In this paper, we introduce an architecture to simultaneously identify non-referring expressions (including expletives, predicative s, and other types) and build coreference chains, including singletons. Our cluster-ranking system uses an attention mechanism to determine the relative importance of the mentions in the same cluster. Additional classifiers are used to identify singletons and non-referring markables. Our contributions are as follows. First all, we report the first result on the CRAC data using system mentions; our result is 5.8% better than the shared task baseline system, which used gold mentions. Second, we demonstrate that the availability of singleton clusters and non-referring expressions can lead to substantially improved performance on non-singleton clusters as well. Third, we show that despite our model not being designed specifically for the CONLL data, it achieves a score equivalent to that of the state-of-the-art system by Kantor and Globerson (2019) on that dataset.",
|
||||
"conferenceName": "LREC 2020",
|
||||
"language": "English",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"pages": "11–20",
|
||||
"place": "Marseille, France",
|
||||
"proceedingsTitle": "Proceedings of the 12th Language Resources and Evaluation Conference",
|
||||
"publisher": "European Language Resources Association",
|
||||
"url": "https://www.aclweb.org/anthology/2020.lrec-1.2",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/volumes/2020.lrec-1/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aclanthology.org/T87-1010.bib",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Unification and the new grammatism",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Steve",
|
||||
"lastName": "Pulman",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1987",
|
||||
"conferenceName": "TINLAP 1987",
|
||||
"libraryCatalog": "ACLWeb",
|
||||
"proceedingsTitle": "Theoretical Issues in Natural Language Processing 3",
|
||||
"url": "https://www.aclweb.org/anthology/T87-1010",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
710
translators/ACM Digital Library.js
Normal file
710
translators/ACM Digital Library.js
Normal file
@@ -0,0 +1,710 @@
|
||||
{
|
||||
"translatorID": "f3f092bf-ae09-4be6-8855-a22ddd817925",
|
||||
"label": "ACM Digital Library",
|
||||
"creator": "Guy Aglionby",
|
||||
"target": "^https://dl\\.acm\\.org/(doi|do|profile|toc|topic|keyword|action/doSearch|acmbooks|browse)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-07-30 05:19:59"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2019 Guy Aglionby
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (isContentUrl(url)) {
|
||||
let subtypeMatch = getItemSubtype(doc);
|
||||
if (!subtypeMatch) {
|
||||
return 'journalArticle';
|
||||
}
|
||||
let subtype = subtypeMatch[1].toLowerCase();
|
||||
|
||||
if (subtype == 'conference') {
|
||||
return 'conferencePaper';
|
||||
}
|
||||
else if (subtype == 'journal' || subtype == 'periodical' || subtype == 'magazine' || subtype == 'newsletter') {
|
||||
return 'journalArticle';
|
||||
}
|
||||
else if (subtype == 'report' || subtype == 'rfc') {
|
||||
return 'report';
|
||||
}
|
||||
else if (subtype == 'thesis') {
|
||||
return 'thesis';
|
||||
}
|
||||
else if (subtype == 'software') {
|
||||
return 'computerProgram';
|
||||
}
|
||||
else if (subtype == 'dataset') {
|
||||
return 'document';
|
||||
}
|
||||
else if (subtype == 'book') {
|
||||
let bookTypeRegex = /page:string:([\w ]+)/;
|
||||
let extractedContext = attr(doc, 'meta[name=pbContext]', 'content');
|
||||
let bookType = extractedContext.match(bookTypeRegex);
|
||||
if (bookType && bookType[1].toLowerCase() == 'book page') {
|
||||
return 'book';
|
||||
}
|
||||
else {
|
||||
return 'bookSection';
|
||||
}
|
||||
}
|
||||
return 'journalArticle';
|
||||
}
|
||||
else if (getSearchResults(doc, false)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
Zotero.selectItems(getSearchResults(doc), function (selected) {
|
||||
if (selected) {
|
||||
ZU.processDocuments(Object.keys(selected), scrape);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc);
|
||||
}
|
||||
}
|
||||
|
||||
function getItemSubtype(doc) {
|
||||
let extractedContext = attr(doc, 'meta[name=pbContext]', 'content');
|
||||
let subtypeRegex = /csubtype:string:(\w+)/;
|
||||
return extractedContext.match(subtypeRegex);
|
||||
}
|
||||
|
||||
function isContentUrl(url) {
|
||||
return (url.includes('/doi/') || url.includes('/do/')) && !url.includes('/doi/proceedings');
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
let items = {};
|
||||
let found = false;
|
||||
let results = doc.querySelectorAll('h5.issue-item__title a');
|
||||
|
||||
for (let i = 0; i < results.length; i++) {
|
||||
let url = results[i].href;
|
||||
let title = ZU.trimInternal(results[i].textContent);
|
||||
if (!title || !url) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isContentUrl(url)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (checkOnly) {
|
||||
return true;
|
||||
}
|
||||
found = true;
|
||||
items[url] = title;
|
||||
}
|
||||
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function scrape(doc) {
|
||||
let doi = attr(doc, 'input[name=doiVal]', 'value');
|
||||
let lookupEndpoint = 'https://dl.acm.org/action/exportCiteProcCitation';
|
||||
let postBody = 'targetFile=custom-bibtex&format=bibTex&dois=' + encodeURIComponent(doi);
|
||||
|
||||
ZU.doPost(lookupEndpoint, postBody, function (returnedText) {
|
||||
let json = JSON.parse(returnedText);
|
||||
let cslItem = json.items[0][doi];
|
||||
cslItem.type = cslItem.type.toLowerCase().replace('_', '-');
|
||||
|
||||
// Some pages use ARTICLE rather than ARTICLE_JOURNAL
|
||||
// https://github.com/zotero/translators/issues/2162
|
||||
if (cslItem.type == 'article') {
|
||||
cslItem.type = 'article-journal';
|
||||
}
|
||||
else if (cslItem.type == 'thesis') {
|
||||
// The advisor is indicated as an editor in CSL which
|
||||
// ZU.itemFromCSLJSON incorrectly extracts as an author.
|
||||
delete cslItem.editor;
|
||||
// The (co-)chair(s) or supervisor(s) are included in CSL as additional authors.
|
||||
cslItem.author.splice(1);
|
||||
}
|
||||
|
||||
if (cslItem.source && (cslItem.source.includes('19') || cslItem.source.includes('20'))) {
|
||||
// Issue date sometimes goes in source (libraryCatalog)
|
||||
delete cslItem.source;
|
||||
}
|
||||
|
||||
let item = new Zotero.Item();
|
||||
ZU.itemFromCSLJSON(item, cslItem);
|
||||
|
||||
item.title = ZU.unescapeHTML(item.title);
|
||||
|
||||
let abstractElements = doc.querySelectorAll('div.article__abstract p, div.abstractSection p');
|
||||
let abstract = Array.from(abstractElements).map(x => x.textContent).join('\n\n');
|
||||
if (abstract.length && abstract.toLowerCase() != 'no abstract available.') {
|
||||
item.abstractNote = ZU.trimInternal(abstract);
|
||||
}
|
||||
|
||||
let pdfElement = doc.querySelector('a[title="View PDF"]');
|
||||
if (pdfElement) {
|
||||
item.attachments.push({
|
||||
url: pdfElement.href,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
if (item.DOI) {
|
||||
item.url = 'https://dl.acm.org/doi/' + ZU.cleanDOI(item.DOI);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.itemType == 'journalArticle') {
|
||||
// Publication name in the CSL is shortened; scrape from page to get full title.
|
||||
let expandedTitle = text(doc, 'span.epub-section__title');
|
||||
if (expandedTitle) {
|
||||
item.journalAbbreviation = item.publicationTitle;
|
||||
item.publicationTitle = expandedTitle;
|
||||
}
|
||||
// Article number 46 --> pages = 46:1–46:22
|
||||
if (cslItem.number) {
|
||||
let number = cslItem.number.replace("Article", "").trim();
|
||||
if (item.pages) {
|
||||
item.pages = item.pages.split("–").map(x => number + ":" + x).join("–");
|
||||
}
|
||||
else {
|
||||
item.pages = number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.creators.length) {
|
||||
// There are cases where authors are not included in the CSL
|
||||
// (for example, a chapter of a book) so we must scrape them.
|
||||
// e.g. https://dl.acm.org/doi/abs/10.5555/3336323.C5474411
|
||||
let authorElements = doc.querySelectorAll('div.citation span.loa__author-name');
|
||||
authorElements.forEach(function (element) {
|
||||
item.creators.push(ZU.cleanAuthor(element.textContent, 'author'));
|
||||
});
|
||||
}
|
||||
|
||||
if (!item.ISBN && cslItem.ISBN) {
|
||||
let isbnLength = cslItem.ISBN.replace('-', '').length;
|
||||
let isbnText = 'ISBN-' + isbnLength + ': ' + cslItem.ISBN;
|
||||
item.extra = item.extra ? item.extra + '\n' + isbnText : isbnText;
|
||||
}
|
||||
|
||||
let numPages = text(doc, 'div.pages-info span');
|
||||
if (numPages && !item.numPages) {
|
||||
item.numPages = numPages;
|
||||
}
|
||||
|
||||
let tagElements = doc.querySelectorAll('div.tags-widget a');
|
||||
tagElements.forEach(function (tag) {
|
||||
item.tags.push(tag.textContent);
|
||||
});
|
||||
|
||||
if (getItemSubtype(doc) == 'dataset') {
|
||||
item.extra = item.extra ? item.extra + '\nitemType: data' : 'itemType: data';
|
||||
}
|
||||
|
||||
delete item.callNumber;
|
||||
|
||||
item.complete();
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/abs/10.1145/1596655.1596682",
|
||||
"detectedItemType": "conferencePaper",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Tracking performance across software revisions",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Mostafa",
|
||||
"firstName": "Nagy",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Krintz",
|
||||
"firstName": "Chandra",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "August 27, 2009",
|
||||
"DOI": "10.1145/1596655.1596682",
|
||||
"ISBN": "9781605585987",
|
||||
"abstractNote": "Repository-based revision control systems such as CVS, RCS, Subversion, and GIT, are extremely useful tools that enable software developers to concurrently modify source code, manage conflicting changes, and commit updates as new revisions. Such systems facilitate collaboration with and concurrent contribution to shared source code by large developer bases. In this work, we investigate a framework for \"performance-aware\" repository and revision control for Java programs. Our system automatically tracks behavioral differences across revisions to provide developers with feedback as to how their change impacts performance of the application. It does so as part of the repository commit process by profiling the performance of the program or component, and performing automatic analyses that identify differences in the dynamic behavior or performance between two code revisions. In this paper, we present our system that is based upon and extends prior work on calling context tree (CCT) profiling and performance differencing. Our framework couples the use of precise CCT information annotated with performance metrics and call-site information, with a simple tree comparison technique and novel heuristics that together target the cause of performance differences between code revisions without knowledge of program semantics. We evaluate the efficacy of the framework using a number of open source Java applications and present a case study in which we use the framework to distinguish two revisions of the popular FindBugs application.",
|
||||
"itemID": "10.1145/1596655.1596682",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "162–171",
|
||||
"place": "New York, NY, USA",
|
||||
"proceedingsTitle": "Proceedings of the 7th International Conference on Principles and Practice of Programming in Java",
|
||||
"publisher": "Association for Computing Machinery",
|
||||
"series": "PPPJ '09",
|
||||
"url": "https://dl.acm.org/doi/10.1145/1596655.1596682",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "calling context tree"
|
||||
},
|
||||
{
|
||||
"tag": "performance-aware revision control"
|
||||
},
|
||||
{
|
||||
"tag": "profiling"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/10.5555/1717186",
|
||||
"detectedItemType": "book",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Loeliger",
|
||||
"firstName": "Jon",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2009",
|
||||
"ISBN": "9780596520120",
|
||||
"abstractNote": "Version Control with Git takes you step-by-step through ways to track, merge, and manage software projects, using this highly flexible, open source version control system. Git permits virtually an infinite variety of methods for development and collaboration. Created by Linus Torvalds to manage development of the Linux kernel, it's become the principal tool for distributed version control. But Git's flexibility also means that some users don't understand how to use it to their best advantage. Version Control with Git offers tutorials on the most effective ways to use it, as well as friendly yet rigorous advice to help you navigate Git's many functions. With this book, you will: Learn how to use Git in several real-world development environments Gain insight into Git's common-use cases, initial tasks, and basic functions Understand how to use Git for both centralized and distributed version control Use Git to manage patches, diffs, merges, and conflicts Acquire advanced techniques such as rebasing, hooks, and ways to handle submodules (subprojects) Learn how to use Git with Subversion Git has earned the respect of developers around the world. Find out how you can benefit from this amazing tool with Version Control with Git.",
|
||||
"edition": "1st",
|
||||
"itemID": "10.5555/1717186",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"numPages": "336",
|
||||
"publisher": "O'Reilly Media, Inc.",
|
||||
"shortTitle": "Version Control with Git",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/abs/10.1023/A:1008286901817",
|
||||
"detectedItemType": "journalArticle",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Simulation Techniques for the Manufacturing Test of MCMs",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Tegethoff",
|
||||
"firstName": "Mick",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Chen",
|
||||
"firstName": "Tom",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "February 1, 1997",
|
||||
"DOI": "10.1023/A:1008286901817",
|
||||
"ISSN": "0923-8174",
|
||||
"abstractNote": "Simulation techniques used in the Manufacturing Test SIMulator (MTSIM) are described. MTSIM is a Concurrent Engineering tool used to simulate the manufacturing test and repair aspects of boards and MCMs from design concept through manufacturing release. MTSIM helps designers select assembly process, specify Design For Test (DFT) features, select board test coverage, specify ASIC defect level goals, establish product feasibility, and predict manufacturing quality and cost goals. A new yield model for boards and MCMs which accounts for the clustering of solder defects is introduced and used to predict the yield at each test step. In addition, MTSIM estimates the average number of defects per board detected at each test step, and estimates costs incurred in test execution, fault isolation and repair. MTSIM models were validated with high performance assemblies at Hewlett-Packard (HP).",
|
||||
"issue": "1-2",
|
||||
"itemID": "10.1023/A:1008286901817",
|
||||
"journalAbbreviation": "J. Electron. Test.",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "137–149",
|
||||
"publicationTitle": "Journal of Electronic Testing: Theory and Applications",
|
||||
"url": "https://doi.org/10.1023/A:1008286901817",
|
||||
"volume": "10",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "DFM"
|
||||
},
|
||||
{
|
||||
"tag": "DFT"
|
||||
},
|
||||
{
|
||||
"tag": "MCM"
|
||||
},
|
||||
{
|
||||
"tag": "SMT"
|
||||
},
|
||||
{
|
||||
"tag": "board"
|
||||
},
|
||||
{
|
||||
"tag": "simulation"
|
||||
},
|
||||
{
|
||||
"tag": "test"
|
||||
},
|
||||
{
|
||||
"tag": "yield"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/abs/10.1145/258948.258973",
|
||||
"detectedItemType": "conferencePaper",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Functional reactive animation",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Elliott",
|
||||
"firstName": "Conal",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hudak",
|
||||
"firstName": "Paul",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "August 1, 1997",
|
||||
"DOI": "10.1145/258948.258973",
|
||||
"ISBN": "9780897919180",
|
||||
"abstractNote": "Fran (Functional Reactive Animation) is a collection of data types and functions for composing richly interactive, multimedia animations. The key ideas in Fran are its notions of behaviors and events. Behaviors are time-varying, reactive values, while events are sets of arbitrarily complex conditions, carrying possibly rich information. Most traditional values can be treated as behaviors, and when images are thus treated, they become animations. Although these notions are captured as data types rather than a programming language, we provide them with a denotational semantics, including a proper treatment of real time, to guide reasoning and implementation. A method to effectively and efficiently perform event detection using interval analysis is also described, which relies on the partial information structure on the domain of event times. Fran has been implemented in Hugs, yielding surprisingly good performance for an interpreter-based system. Several examples are given, including the ability to describe physical phenomena involving gravity, springs, velocity, acceleration, etc. using ordinary differential equations.",
|
||||
"itemID": "10.1145/258948.258973",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "263–273",
|
||||
"place": "New York, NY, USA",
|
||||
"proceedingsTitle": "Proceedings of the second ACM SIGPLAN international conference on Functional programming",
|
||||
"publisher": "Association for Computing Machinery",
|
||||
"series": "ICFP '97",
|
||||
"url": "https://dl.acm.org/doi/10.1145/258948.258973",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/abs/10.1145/2566617",
|
||||
"detectedItemType": "journalArticle",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Check-ins in “Blau Space”: Applying Blau’s Macrosociological Theory to Foursquare Check-ins from New York City",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Joseph",
|
||||
"firstName": "Kenneth",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Carley",
|
||||
"firstName": "Kathleen M.",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hong",
|
||||
"firstName": "Jason I.",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September 18, 2014",
|
||||
"DOI": "10.1145/2566617",
|
||||
"ISSN": "2157-6904",
|
||||
"abstractNote": "Peter Blau was one of the first to define a latent social space and utilize it to provide concrete hypotheses. Blau defines social structure via social “parameters” (constraints). Actors that are closer together (more homogenous) in this social parameter space are more likely to interact. One of Blau’s most important hypotheses resulting from this work was that the consolidation of parameters could lead to isolated social groups. For example, the consolidation of race and income might lead to segregation. In the present work, we use Foursquare data from New York City to explore evidence of homogeneity along certain social parameters and consolidation that breeds social isolation in communities of locations checked in to by similar users. More specifically, we first test the extent to which communities detected via Latent Dirichlet Allocation are homogenous across a set of four social constraints—racial homophily, income homophily, personal interest homophily and physical space. Using a bootstrapping approach, we find that 14 (of 20) communities are statistically, and all but one qualitatively, homogenous along one of these social constraints, showing the relevance of Blau’s latent space model in venue communities determined via user check-in behavior. We then consider the extent to which communities with consolidated parameters, those homogenous on more than one parameter, represent socially isolated populations. We find communities homogenous on multiple parameters, including a homosexual community and a “hipster” community, that show support for Blau’s hypothesis that consolidation breeds social isolation. We consider these results in the context of mediated communication, in particular in the context of self-representation on social media.",
|
||||
"issue": "3",
|
||||
"itemID": "10.1145/2566617",
|
||||
"journalAbbreviation": "ACM Trans. Intell. Syst. Technol.",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "46:1–46:22",
|
||||
"publicationTitle": "ACM Transactions on Intelligent Systems and Technology",
|
||||
"shortTitle": "Check-ins in “Blau Space”",
|
||||
"url": "https://dl.acm.org/doi/10.1145/2566617",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Foursquare"
|
||||
},
|
||||
{
|
||||
"tag": "community structure"
|
||||
},
|
||||
{
|
||||
"tag": "latent social space"
|
||||
},
|
||||
{
|
||||
"tag": "urban analytics"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/abs/10.5555/3336323.C5474411",
|
||||
"detectedItemType": "bookSection",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "2007--2016",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Peter A.",
|
||||
"lastName": "Freeman",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "W. Richards",
|
||||
"lastName": "Adrion",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "William",
|
||||
"lastName": "Aspray",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "November 20, 2019",
|
||||
"ISBN": "9781450372763",
|
||||
"abstractNote": "This organizational history relates the role of the National Science Foundation (NSF) in the development of modern computing. Drawing upon new and existing oral histories, extensive use of NSF documents, and the experience of two of the authors as senior managers, this book describes how NSF's programmatic activities originated and evolved to become the primary source of funding for fundamental research in computing and information technologies.The book traces how NSF's support has provided facilities and education for computing usage by all scientific disciplines, aided in institution and professional community building, supported fundamental research in computer science and allied disciplines, and led the efforts to broaden participation in computing by all segments of society.Today, the research and infrastructure facilitated by NSF computing programs are significant economic drivers of American society and industry. For example, NSF supported work that led to the first widelyused web browser, Netscape; sponsored the creation of algorithms at the core of the Google search engine; facilitated the growth of the public Internet; and funded research on the scientific basis for countless other applications and technologies. NSF has advanced the development of human capital and ideas for future advances in computing and its applications.This account is the first comprehensive coverage of NSF's role in the extraordinary growth and expansion of modern computing and its use. It will appeal to historians of computing, policy makers and leaders in government and academia, and individuals interested in the history and development of computing and the NSF.",
|
||||
"bookTitle": "Computing and the National Science Foundation, 1950--2016: Building a Foundation for Modern Computing",
|
||||
"itemID": "10.5555/3336323.C5474411",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"place": "New York, NY, USA",
|
||||
"publisher": "Association for Computing Machinery",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/10.1145/3264631.3264634",
|
||||
"detectedItemType": "journalArticle",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Beyond screen and voice: augmenting aural navigation with screenless access",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Gross",
|
||||
"firstName": "Mikaylah",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Bolchini",
|
||||
"firstName": "Davide",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "August 2, 2018",
|
||||
"DOI": "10.1145/3264631.3264634",
|
||||
"ISSN": "1558-2337",
|
||||
"abstractNote": "The current interaction paradigm to access the mobile web forces people who are blind to hold out their phone at all times, thus increasing the risk for the device to fall or be robbed. Moreover, such continuous, two-handed interaction on a small screen hampers the ability of people who are blind to keep their hands free to control aiding devices (e.g., cane) or touch objects nearby, especially on-the-go. To investigate alternative paradigms, we are exploring and reifying strategies for \"screenless access\": a browsing approach that enables users to interact touch-free with aural navigation architectures using one-handed, in-air gestures recognized by an off-the-shelf armband. In this article, we summarize key highlights from an exploratory study with ten participants who are blind or visually impaired who experienced our screenless access prototype. We observed proficient navigation performance after basic training, users conceptual fit with a screen-free paradigm, and low levels of cognitive load, notwithstanding the errors and limits of the design and system proposed. The full paper appeared in W4A2018 [1].",
|
||||
"issue": "121",
|
||||
"itemID": "10.1145/3264631.3264634",
|
||||
"journalAbbreviation": "SIGACCESS Access. Comput.",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "3:1",
|
||||
"publicationTitle": "ACM SIGACCESS Accessibility and Computing",
|
||||
"shortTitle": "Beyond screen and voice",
|
||||
"url": "https://doi.org/10.1145/3264631.3264634",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/10.1145/2854146",
|
||||
"detectedItemType": "journalArticle",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Why Google stores billions of lines of code in a single repository",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Potvin",
|
||||
"firstName": "Rachel",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Levenberg",
|
||||
"firstName": "Josh",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "June 24, 2016",
|
||||
"DOI": "10.1145/2854146",
|
||||
"ISSN": "0001-0782",
|
||||
"abstractNote": "Google's monolithic repository provides a common source of truth for tens of thousands of developers around the world.",
|
||||
"issue": "7",
|
||||
"itemID": "10.1145/2854146",
|
||||
"journalAbbreviation": "Commun. ACM",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"pages": "78–87",
|
||||
"publicationTitle": "Communications of the ACM",
|
||||
"url": "https://dl.acm.org/doi/10.1145/2854146",
|
||||
"volume": "59",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/book/10.5555/1087674",
|
||||
"detectedItemType": "thesis",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "thesis",
|
||||
"title": "A \"void-trimming\" methodology of generating shrink-wrapped mesh for component-based complex \"dirty\" geometry",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Yuan",
|
||||
"firstName": "Wei",
|
||||
"creatorTypeID": 8,
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2005",
|
||||
"abstractNote": "The geometric surface model generated by common CAD tools is often “dirty” (cracks, small gaps, small holes, surface penetration, inconsistent surface orientation, bad edge-face connectivity, etc.). Also, problems of component overlapping, island components, and patch duplication exist in a component-based system. The process of traditional geometric healing and repairing methods is time-consuming (weeks or months), and often time fails when dealing with a complex “dirty” geometric model. In this dissertation, a new methodology based on “void volume trimming” is presented to resolve problems stated above. The meshing process starts from generating a Cartesian volume mesh using the 2 N tree (instead of the traditional Octree) data structure. With this structure, several mesh adaptation methods based on geometric features coupled with a smoothing algorithm between neighbor cells are developed to generate the preferred mesh sizes at desired regions while ensuring the gradual transition between dense and coarse meshes. In the process of constructing surface mesh for “dirty” geometric components, an effective “surface orientation free” algorithm is proposed. For resolving of “mesh leak” at cracks and small gap regions, the continuous “intersecting cell” set is used instead of geometric surfaces as the domain bound. The major contribution of this dissertation is the development of “void volume trimming” algorithm. With this methodology, the watertight feature can be promised, and the axis-aligned surface mesh is gradually adjusted to be geometric aligned while maintaining high mesh quality. Meanwhile, the surface mesh is pushed towards the geometry for satisfaction of mapping criteria. The constrained smoothing algorithm presented in this dissertation further improves the mesh quality while shrinking the surface mesh closer to geometry components. At the same time, the use of the SPP (Shortest Path Projection) algorithm coupled with the ADT (Alternating Digital Tree) data structure has been shown that it is efficient when generating body-fitted surface meshes for complex “dirty” geometries while maintaining high performance. The present critical feature preservation method has shown its capability of capturing the detailed features, while the introduced patch mapping method can topologically maintain the geometric model property. Case studies and application results have demonstrated that the current methodology is efficient for handling the component-based complex “dirty” geometric model.",
|
||||
"extra": "AAI3164056\nISBN-10: 0496987127",
|
||||
"itemID": "10.5555/1087674",
|
||||
"libraryCatalog": "ACM Digital Library",
|
||||
"numPages": "118",
|
||||
"place": "USA",
|
||||
"thesisType": "phd",
|
||||
"university": "University of Alabama in Huntsville",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/profile/81460641152/publications?Role=author",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/toc/interactions/2016/24/1",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/topic/ccs2012/10010147.10010341.10010342.10010343",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/doi/proceedings/10.1145/2342541",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/keyword/pesq",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/action/doSearch?AllField=Zotero",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/browse/book",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://dl.acm.org/subject/mobile",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
391
translators/ACM Queue.js
Normal file
391
translators/ACM Queue.js
Normal file
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"translatorID": "212ffcc8-927c-4e84-a097-bd24fd4a44b6",
|
||||
"translatorType": 4,
|
||||
"label": "ACM Queue",
|
||||
"creator": "Bogdan Lynn",
|
||||
"target": "^https://queue\\.acm\\.org/",
|
||||
"minVersion": "5.0",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-12-04 20:10:00"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2025 Bogdan Lynn
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('detail.cfm?id=')) {
|
||||
return 'journalArticle';
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('a[href*="detail.cfm?id="]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
// Skip links to specific parts of the article, like #comments,
|
||||
// since those normally appear below the actual top-level link
|
||||
if (href.includes("#")) continue;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(await requestDocument(url));
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
async function scrape(doc, url = doc.location.href) {
|
||||
// DOI can be found in the URL of the PDF link
|
||||
let pdfUrl = doc.querySelector('a[href*="/doi/pdf"]');
|
||||
let doi = pdfUrl.href.split("/pdf/")[1];
|
||||
let translate = Zotero.loadTranslator("search");
|
||||
// DOI Content Negotiation translator
|
||||
translate.setTranslator("b28d0d42-8549-4c6d-83fc-8382874a5cb9");
|
||||
translate.setSearch({ itemType: "journalArticle", DOI: doi });
|
||||
|
||||
// Do nothing on error
|
||||
translate.setHandler("error", () => {});
|
||||
translate.setHandler("itemDone", (obj, item) => {
|
||||
item.publicationTitle = "ACM Queue";
|
||||
item.publisher = "Association for Computing Machinery";
|
||||
|
||||
// 'DOI Content Negotiation' translator does not add attachments
|
||||
let pdfUrl = doc.querySelector('a[href*="/doi/pdf"]');
|
||||
item.attachments.push({
|
||||
url: pdfUrl.href,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
item.complete();
|
||||
});
|
||||
|
||||
// Try to resolve the DOI, and if it does not work, scrape the DOM.
|
||||
try {
|
||||
await translate.translate();
|
||||
return;
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug(`Failed to resolve DOI. Scrape the page.`);
|
||||
}
|
||||
await scrapeDocument(doc, url);
|
||||
}
|
||||
|
||||
|
||||
async function scrapeDocument(doc, url) {
|
||||
let item = new Zotero.Item("journalArticle");
|
||||
item.title = text(doc, "h1");
|
||||
item.publicationTitle = "ACM Queue";
|
||||
item.publisher = "Association for Computing Machinery";
|
||||
item.journalAbbreviation = "Queue";
|
||||
item.language = "en";
|
||||
item.ISSN = "1542-7730";
|
||||
item.url = url;
|
||||
|
||||
// Extract volume and issue from "Volume X, issue Y" at the top
|
||||
let descriptor = text(doc, ".descriptor").toLowerCase();
|
||||
let re = /^volume\s+(\d+),\s*issue\s+(\d+)\s*$/i;
|
||||
let matches = descriptor.match(re) || [];
|
||||
item.volume = matches[1];
|
||||
item.issue = matches[2];
|
||||
|
||||
// Add PDF attachment and DOI
|
||||
let pdfUrl = doc.querySelector('a[href*="/doi/pdf"]');
|
||||
let doi = pdfUrl.href.split("/pdf/")[1];
|
||||
item.DOI = doi;
|
||||
item.attachments.push({
|
||||
url: pdfUrl.href,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
|
||||
// Some info needs to be fetched from the page of the entire issue
|
||||
// because it appears in difference places on the article page
|
||||
let issueDoc = await requestDocument(attr(doc, ".descriptor", "href"));
|
||||
|
||||
// Fetch date
|
||||
let dateContainer = text(issueDoc, "#lead p");
|
||||
let date = dateContainer.split(" ").slice(-2).join(" ");
|
||||
if (date.includes("/")) {
|
||||
date = date.split("/")[1];
|
||||
}
|
||||
item.date = date;
|
||||
|
||||
// Find link to the article on the page of the issue
|
||||
let searchParams = new URLSearchParams(url.split("?")[1]);
|
||||
let id = searchParams.get("id");
|
||||
let articleLinkOnissueDoc = issueDoc.querySelector(`a[href*="detail.cfm?id=${id}"]`);
|
||||
// Fetch abstract below the link
|
||||
item.abstractNote = articleLinkOnissueDoc.parentNode.nextElementSibling.textContent;
|
||||
// Fetch creators below the abstract
|
||||
let potentialAuthors = articleLinkOnissueDoc.parentNode.nextElementSibling.nextElementSibling;
|
||||
if (potentialAuthors?.classList.contains("meta")) {
|
||||
let creators = potentialAuthors.textContent.split(",");
|
||||
for (let creator of creators) {
|
||||
item.creators.push(ZU.cleanAuthor(creator, "author"));
|
||||
}
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3664275",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Make Two Trips: Larry David's New Year's resolution works for IT too.",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Thomas A.",
|
||||
"lastName": "Limoncelli"
|
||||
}
|
||||
],
|
||||
"date": "2024-04-30",
|
||||
"DOI": "10.1145/3664275",
|
||||
"ISSN": "1542-7730, 1542-7749",
|
||||
"abstractNote": "Whether your project is as simple as carrying groceries into the house or as complex as a multiyear engineering project, \"make two trips\" can simplify the project, reduce the chance of error, improve the probability of success, and lead to easier explanations.",
|
||||
"issue": "2",
|
||||
"journalAbbreviation": "Queue",
|
||||
"language": "en",
|
||||
"libraryCatalog": "DOI.org (Crossref)",
|
||||
"pages": "5-14",
|
||||
"publicationTitle": "ACM Queue",
|
||||
"shortTitle": "Make Two Trips",
|
||||
"url": "https://dl.acm.org/doi/10.1145/3664275",
|
||||
"volume": "22",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3762991",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Understanding the Harm Teens Experience on Social Media",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Arturo",
|
||||
"lastName": "Béjar",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "August 2025",
|
||||
"DOI": "10.1145/3762991",
|
||||
"ISSN": "1542-7730",
|
||||
"abstractNote": "The current approach to online safety, focusing on objectively harmful content and deletion or downranking, is necessary but not sufficient, as it addresses only a small fraction of the harm that teens experience. In order to understand harm, it is essential to understand it from their perspective by surveying and creating safety tools and reporting that make it easy to capture what happens and provide immediate help. Many of the recommendations in this article come from what you learn when you analyze behavioral correlates: that you need approaches that rely on conduct in context, better personalization, and providing feedback to actors.",
|
||||
"issue": "4",
|
||||
"journalAbbreviation": "Queue",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ACM Queue",
|
||||
"publicationTitle": "ACM Queue",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3762991",
|
||||
"volume": "23",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3546935",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "I'm Probably Less Deterministic Than I Used to Be: Embracing randomness is necessary in cloud environments.",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Pat",
|
||||
"lastName": "Helland"
|
||||
}
|
||||
],
|
||||
"date": "2022-06-30",
|
||||
"DOI": "10.1145/3546935",
|
||||
"ISSN": "1542-7730, 1542-7749",
|
||||
"abstractNote": "In my youth, I thought the universe was ruled by cause and effect like a big clock. In this light, computing made sense. Now I see that both life and computing can be a crapshoot, and that has given me a new peace.",
|
||||
"issue": "3",
|
||||
"journalAbbreviation": "Queue",
|
||||
"language": "en",
|
||||
"libraryCatalog": "DOI.org (Crossref)",
|
||||
"pages": "5-13",
|
||||
"publicationTitle": "ACM Queue",
|
||||
"shortTitle": "I'm Probably Less Deterministic Than I Used to Be",
|
||||
"url": "https://dl.acm.org/doi/10.1145/3546935",
|
||||
"volume": "20",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3501293",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Federated Learning and Privacy",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Kallista",
|
||||
"lastName": "Bonawitz",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Peter",
|
||||
"lastName": "Kairouz",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Brendan",
|
||||
"lastName": "McMahan",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Daniel",
|
||||
"lastName": "Ramage",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September-October 2021",
|
||||
"DOI": "10.1145/3494834.3501293",
|
||||
"ISSN": "1542-7730",
|
||||
"abstractNote": "Centralized data collection can expose individuals to privacy risks and organizations to legal risks if data is not properly managed. Federated learning is a machine learning setting where multiple entities collaborate in solving a machine learning problem, under the coordination of a central server or service provider. Each client's raw data is stored locally and not exchanged or transferred; instead, focused updates intended for immediate aggregation are used to achieve the learning objective. This article provides a brief introduction to key concepts in federated learning and analytics with an emphasis on how privacy technologies may be combined in real-world systems and how their use charts a path toward societal benefit from aggregate statistics in new domains and with minimized risk to individuals and to the organizations who are custodians of the data.",
|
||||
"issue": "5",
|
||||
"journalAbbreviation": "Queue",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ACM Queue",
|
||||
"publicationTitle": "ACM Queue",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3501293",
|
||||
"volume": "19",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3773095",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Memory Safety for Skeptics",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Andrew Lilley",
|
||||
"lastName": "Brinker",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "October 2025",
|
||||
"DOI": "10.1145/3773095",
|
||||
"ISSN": "1542-7730",
|
||||
"abstractNote": "The state of possibility with memory safety today is similar to the state of automobile safety just prior to the widespread adoption of mandatory seat-belt laws. As car manufacturers began to integrate seat belts as a standard feature across their model lines and states began to require that drivers wear seat belts while driving, the rate of traffic fatalities and severity of traffic-related injuries dropped drastically. Seat belts did not solve automobile safety, but they credibly improved it, and at remarkably low cost.",
|
||||
"issue": "5",
|
||||
"journalAbbreviation": "Queue",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ACM Queue",
|
||||
"publicationTitle": "ACM Queue",
|
||||
"url": "https://queue.acm.org/detail.cfm?id=3773095",
|
||||
"volume": "23",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/issuedetail.cfm?issue=2838344",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://queue.acm.org/listing.cfm?item_topic=Blockchain&qc_type=theme_list&filter=Blockchain&page_title=Blockchain&order=desc",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
633
translators/ACS Publications.js
Normal file
633
translators/ACS Publications.js
Normal file
@@ -0,0 +1,633 @@
|
||||
{
|
||||
"translatorID": "938ebe32-2b2e-4349-a5b3-b3a05d3de627",
|
||||
"label": "ACS Publications",
|
||||
"creator": "Sean Takats, Michael Berkowitz, Santawort, and Aurimas Vinckevicius",
|
||||
"target": "^https?://pubs\\.acs\\.org/(toc/|journal/|topic/|isbn/\\d|doi/(full/|abs/|epdf/|book/)?10\\.|action/(doSearch\\?|showCitFormats\\?.*doi))",
|
||||
"minVersion": "4.0.5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-09-30 13:50:18"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2008 Sean Takats, Michael Berkowitz, Santawort, Aurimas
|
||||
Vinckevicius, Philipp Zumstein, and other contributors.
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {}, found = false;
|
||||
var rows = doc.querySelectorAll('.issue-item_title a, .teaser_title a');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
var doi = getDoi(href);
|
||||
if (!doi) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
// Return the DOI indicated by the URL, or null when no DOI is found
|
||||
// The input should be a properly encoded URL
|
||||
function getDoi(url) {
|
||||
let urlObj = new URL(url);
|
||||
let doi = decodeURIComponent(urlObj.pathname).match(/^\/doi\/(?:.+\/)?(10\.\d{4,}\/.+)$/);
|
||||
if (doi) {
|
||||
doi = doi[1];
|
||||
}
|
||||
else {
|
||||
doi = urlObj.searchParams.get("doi");
|
||||
}
|
||||
return doi;
|
||||
}
|
||||
|
||||
/** ***************************
|
||||
* BEGIN: Supplementary data *
|
||||
*****************************/
|
||||
|
||||
var suppTypeMap = {
|
||||
txt: 'text/plain',
|
||||
csv: 'text/csv',
|
||||
bz2: 'application/x-bzip2',
|
||||
gz: 'application/gzip',
|
||||
zip: 'application/zip',
|
||||
pdf: 'application/pdf',
|
||||
doc: 'application/msword',
|
||||
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
xls: 'application/vnd.ms-excel',
|
||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
};
|
||||
|
||||
function getSupplements(doc, supplementAsLink = false) {
|
||||
let supplements = [];
|
||||
// Note that the lists of supplements are duplicated in the main
|
||||
// content side and right-side panel (if any). We want to confine it to
|
||||
// one (or the only) side in order to avoid having to deduplicate.
|
||||
let supplementLinks = doc.querySelectorAll(".article_content-left .suppl-anchor");
|
||||
for (let i = 0; i < supplementLinks.length; i++) {
|
||||
let elem = supplementLinks[i];
|
||||
let url = elem.href;
|
||||
if (!url) continue;
|
||||
let pathComponents = url.replace(/[?#].+$/, "").split(".");
|
||||
// possible location of file extension (following the last dot)
|
||||
let ext = pathComponents[pathComponents.length - 1].toLowerCase();
|
||||
let mimeType = suppTypeMap[ext];
|
||||
// Only save file when MIME type is known *and* when we aren't
|
||||
// specifically told otherwise
|
||||
let snapshot = Boolean(!supplementAsLink && mimeType);
|
||||
// The "title" (text describing what the supplement file is for) can be
|
||||
// substantially long, while the filename is redundant (and it doesn't
|
||||
// inform the user that the file is meant to be a supplement). We
|
||||
// simply number them in the order they appear.
|
||||
let title = `Supplement ${i + 1}`;
|
||||
let attachment = { title, url, snapshot };
|
||||
if (mimeType) attachment.mimeType = mimeType;
|
||||
supplements.push(attachment);
|
||||
}
|
||||
return supplements;
|
||||
}
|
||||
|
||||
/** *************************
|
||||
* END: Supplementary data *
|
||||
***************************/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
let urlObj = new URL(url);
|
||||
// standalone "download citation" page
|
||||
if (urlObj.pathname === "/action/showCitFormats"
|
||||
&& urlObj.searchParams.get("doi")) {
|
||||
// May be inaccurate, but better than not detecting
|
||||
return "journalArticle";
|
||||
}
|
||||
// epdf viewer web app
|
||||
if (urlObj.pathname.startsWith("/doi/epdf/")) {
|
||||
// TODO: check if "epdf" viewer is always for journal articles
|
||||
return "journalArticle";
|
||||
}
|
||||
// books such as https://pubs.acs.org/doi/book/10.1021/acsguide
|
||||
if (urlObj.pathname.startsWith("/doi/book/")) {
|
||||
return "book";
|
||||
}
|
||||
if (doc.querySelector("#returnToBook")) {
|
||||
// Some of them may be conference articles, but the RIS doesn't say so
|
||||
return "bookSection";
|
||||
}
|
||||
else if (getDoi(url)) {
|
||||
// TODO: check if this block still works
|
||||
var type = doc.getElementsByClassName("content-navigation__contentType");
|
||||
if (type.length && type[0].textContent.includes("Chapter")) {
|
||||
return "bookSection";
|
||||
}
|
||||
else {
|
||||
return "journalArticle";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function cleanNumberField(item, field) {
|
||||
if (item[field]) {
|
||||
let n = parseInt(item[field]);
|
||||
if (n <= 0 || isNaN(n)) {
|
||||
delete item[field];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// In most cases the URL contains the DOI which is sufficient for obtaining the
|
||||
// RIS, so there's no need to download the document if it's not already there.
|
||||
// But when supplements as attachments are desired, we need the actual document
|
||||
// for the supplement links. Our convention here is to pass falsy as the "doc"
|
||||
// argument when supplements are not requested, and the actual doc (maybe
|
||||
// fetched by us) when we want the supplements.
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
let attachSupplement = false;
|
||||
let supplementAsLink = false;
|
||||
// reduce some overhead by fetching these only once
|
||||
if (Z.getHiddenPref) {
|
||||
attachSupplement = Z.getHiddenPref("attachSupplementary");
|
||||
supplementAsLink = Z.getHiddenPref("supplementaryAsLink");
|
||||
}
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") { // search
|
||||
let items = await Z.selectItems(getSearchResults(doc));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(
|
||||
attachSupplement && await requestDocument(url),
|
||||
url,
|
||||
supplementAsLink
|
||||
);
|
||||
await delay(500);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// single article
|
||||
await scrape(attachSupplement && doc, url, supplementAsLink);
|
||||
}
|
||||
}
|
||||
|
||||
function delay(milliseconds) {
|
||||
return new Promise(resolve => setTimeout(resolve, milliseconds));
|
||||
}
|
||||
|
||||
async function scrape(doc, url, supplementAsLink) {
|
||||
let doi = getDoi(url);
|
||||
|
||||
if (doc && /\/action\/showCitFormats\?|\/doi\/epdf\//.test(url)) {
|
||||
// standalone "export citation" page or "epdf viewer", *and*
|
||||
// supplements are desired; we need to fetch the actual article page
|
||||
// and scrape that
|
||||
url = `https://pubs.acs.org/doi/${doi}`;
|
||||
doc = await requestDocument(url);
|
||||
}
|
||||
|
||||
let risURL = new URL("/action/downloadCitation?include=abs&format=ris&direct=true", url);
|
||||
risURL.searchParams.set("doi", doi);
|
||||
risURL.searchParams.set("downloadFileName", doi.replace(/^10\.\d{4,}\//, ""));
|
||||
let risText = await requestText(risURL.href, { headers: { Referer: url } });
|
||||
// Delete redundant DOI info
|
||||
risText = risText.replace(/\nN1 {2}- doi:[^\n]+/, "");
|
||||
// Fix noise in DO field
|
||||
risText = risText.replace("\nDO - doi:", "\nDO - ");
|
||||
// Fix the wrong mapping for journal abbreviations
|
||||
risText = risText.replace("\nJO -", "\nJ2 -");
|
||||
// Use publication date when available
|
||||
if (risText.includes("\nDA -")) {
|
||||
risText = risText.replace(/\nY1 {2}- [^\n]*/, "")
|
||||
.replace("\nDA -", "\nY1 -");
|
||||
}
|
||||
|
||||
let translator = Zotero.loadTranslator("import");
|
||||
// RIS
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(risText);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
if (item.date) {
|
||||
item.date = ZU.strToISO(item.date);
|
||||
}
|
||||
item.attachments = [];
|
||||
if (/\/doi\/book\//.test(url)) {
|
||||
// books as standalone items don't have full pdfs (TODO: verify)
|
||||
if (doc) {
|
||||
item.attachments.push({
|
||||
title: "Snapshot",
|
||||
url: url,
|
||||
mimeType: "text/html"
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
// standard pdf
|
||||
item.attachments.push({
|
||||
title: "Full Text PDF",
|
||||
url: `/doi/pdf/${doi}`,
|
||||
mimeType: "application/pdf"
|
||||
});
|
||||
}
|
||||
// supplements
|
||||
if (doc) {
|
||||
item.attachments.push(...getSupplements(doc, supplementAsLink));
|
||||
}
|
||||
// Cleanup fields that may contain invalid numeric values
|
||||
cleanNumberField(item, "numberOfVolumes");
|
||||
cleanNumberField(item, "numPages");
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/doi/10.1021/es103607c",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Life Cycle Environmental Assessment of Lithium-Ion and Nickel Metal Hydride Batteries for Plug-In Hybrid and Battery Electric Vehicles",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Majeau-Bettez",
|
||||
"firstName": "Guillaume",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hawkins",
|
||||
"firstName": "Troy R.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Strømman",
|
||||
"firstName": "Anders Hammer",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011-05-15",
|
||||
"DOI": "10.1021/es103607c",
|
||||
"ISSN": "0013-936X",
|
||||
"abstractNote": "This study presents the life cycle assessment (LCA) of three batteries for plug-in hybrid and full performance battery electric vehicles. A transparent life cycle inventory (LCI) was compiled in a component-wise manner for nickel metal hydride (NiMH), nickel cobalt manganese lithium-ion (NCM), and iron phosphate lithium-ion (LFP) batteries. The battery systems were investigated with a functional unit based on energy storage, and environmental impacts were analyzed using midpoint indicators. On a per-storage basis, the NiMH technology was found to have the highest environmental impact, followed by NCM and then LFP, for all categories considered except ozone depletion potential. We found higher life cycle global warming emissions than have been previously reported. Detailed contribution and structural path analyses allowed for the identification of the different processes and value-chains most directly responsible for these emissions. This article contributes a public and detailed inventory, which can be easily be adapted to any powertrain, along with readily usable environmental performance assessments.",
|
||||
"issue": "10",
|
||||
"journalAbbreviation": "Environ. Sci. Technol.",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"pages": "4548-4554",
|
||||
"publicationTitle": "Environmental Science & Technology",
|
||||
"url": "https://doi.org/10.1021/es103607c",
|
||||
"volume": "45",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/toc/nalefd/12/6",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/doi/abs/10.1021/bk-2011-1071.ch005",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Redox Chemistry and Natural Organic Matter (NOM): Geochemists’ Dream, Analytical Chemists’ Nightmare",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Macalady",
|
||||
"firstName": "Donald L.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Walton-Day",
|
||||
"firstName": "Katherine",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011-01-01",
|
||||
"ISBN": "9780841226524",
|
||||
"abstractNote": "Natural organic matter (NOM) is an inherently complex mixture of polyfunctional organic molecules. Because of their universality and chemical reversibility, oxidation/reductions (redox) reactions of NOM have an especially interesting and important role in geochemistry. Variabilities in NOM composition and chemistry make studies of its redox chemistry particularly challenging, and details of NOM-mediated redox reactions are only partially understood. This is in large part due to the analytical difficulties associated with NOM characterization and the wide range of reagents and experimental systems used to study NOM redox reactions. This chapter provides a summary of the ongoing efforts to provide a coherent comprehension of aqueous redox chemistry involving NOM and of techniques for chemical characterization of NOM. It also describes some attempts to confirm the roles of different structural moieties in redox reactions. In addition, we discuss some of the operational parameters used to describe NOM redox capacities and redox states, and describe nomenclature of NOM redox chemistry. Several relatively facile experimental methods applicable to predictions of the NOM redox activity and redox states of NOM samples are discussed, with special attention to the proposed use of fluorescence spectroscopy to predict relevant redox characteristics of NOM samples.",
|
||||
"bookTitle": "Aquatic Redox Chemistry",
|
||||
"extra": "DOI: 10.1021/bk-2011-1071.ch005",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"pages": "85-111",
|
||||
"publisher": "American Chemical Society",
|
||||
"series": "ACS Symposium Series",
|
||||
"seriesNumber": "1071",
|
||||
"shortTitle": "Redox Chemistry and Natural Organic Matter (NOM)",
|
||||
"url": "https://doi.org/10.1021/bk-2011-1071.ch005",
|
||||
"volume": "1071",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/doi/abs/10.1021/jp000606%2B",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Theory of Charge Transport in Polypeptides",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Schlag",
|
||||
"firstName": "E. W.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Sheu",
|
||||
"firstName": "Sheh-Yi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Yang",
|
||||
"firstName": "Dah-Yen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Selzle",
|
||||
"firstName": "H. L.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Lin",
|
||||
"firstName": "S. H.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2000-08-01",
|
||||
"DOI": "10.1021/jp000606+",
|
||||
"ISSN": "1520-6106",
|
||||
"abstractNote": "We have derived phase space and diffusion theories for a new hopping model of charge transport in polypeptides and thence for distal chemical kinetics. The charge is transferred between two carbamide groups on each side of the Cα atom hinging two amino acid groups. When the torsional angles on the hinge approach a certain region of the Ramachandran plot, the charge transfer has zero barrier height and makes charge transfer the result of strong electronic correlation. The mean first passage time calculated from this analytic model of some 164 fs is in reasonable agreement with prior molecular dynamics calculation of some 140 fs and supports this new bifunctional model for charge transport and chemical reactions in polypeptides.",
|
||||
"issue": "32",
|
||||
"journalAbbreviation": "J. Phys. Chem. B",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"pages": "7790-7794",
|
||||
"publicationTitle": "The Journal of Physical Chemistry B",
|
||||
"url": "https://doi.org/10.1021/jp000606+",
|
||||
"volume": "104",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/journal/acbcct",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/action/doSearch?text1=zotero&field1=AllField",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/doi/book/10.1021/acsguide",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "The ACS Guide to Scholarly Communication",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Banik",
|
||||
"firstName": "Gregory M.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Baysinger",
|
||||
"firstName": "Grace",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Kamat",
|
||||
"firstName": "Prashant V.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Pienta",
|
||||
"firstName": "Norbert",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2019-10-02",
|
||||
"ISBN": "9780841235861",
|
||||
"extra": "DOI: 10.1021/acsguide",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"publisher": "American Chemical Society",
|
||||
"series": "ACS Guide to Scholarly Communication",
|
||||
"url": "https://doi.org/10.1021/acsguide",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/action/showCitFormats?doi=10.1021%2Facscentsci.3c00243",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Generic Platform for the Multiplexed Targeted Electrochemical Detection of Osteoporosis-Associated Single Nucleotide Polymorphisms Using Recombinase Polymerase Solid-Phase Primer Elongation and Ferrocene-Modified Nucleoside Triphosphates",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Ortiz",
|
||||
"firstName": "Mayreli",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Jauset-Rubio",
|
||||
"firstName": "Miriam",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Trummer",
|
||||
"firstName": "Olivia",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Foessl",
|
||||
"firstName": "Ines",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Kodr",
|
||||
"firstName": "David",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Acero",
|
||||
"firstName": "Josep Lluís",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Botero",
|
||||
"firstName": "Mary Luz",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Biggs",
|
||||
"firstName": "Phil",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Lenartowicz",
|
||||
"firstName": "Daniel",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Trajanoska",
|
||||
"firstName": "Katerina",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Rivadeneira",
|
||||
"firstName": "Fernando",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hocek",
|
||||
"firstName": "Michal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Obermayer-Pietsch",
|
||||
"firstName": "Barbara",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "O’Sullivan",
|
||||
"firstName": "Ciara K.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2023-08-23",
|
||||
"DOI": "10.1021/acscentsci.3c00243",
|
||||
"ISSN": "2374-7943",
|
||||
"abstractNote": "Osteoporosis is a multifactorial disease influenced by genetic and environmental factors, which contributes to an increased risk of bone fracture, but early diagnosis of this disease cannot be achieved using current techniques. We describe a generic platform for the targeted electrochemical genotyping of SNPs identified by genome-wide association studies to be associated with a genetic predisposition to osteoporosis. The platform exploits isothermal solid-phase primer elongation with ferrocene-labeled nucleoside triphosphates. Thiolated reverse primers designed for each SNP were immobilized on individual gold electrodes of an array. These primers are designed to hybridize to the SNP site at their 3′OH terminal, and primer elongation occurs only where there is 100% complementarity, facilitating the identification and heterozygosity of each SNP under interrogation. The platform was applied to real blood samples, which were thermally lysed and directly used without the need for DNA extraction or purification. The results were validated using Taqman SNP genotyping assays and Sanger sequencing. The assay is complete in just 15 min with a total cost of 0.3€ per electrode. The platform is completely generic and has immense potential for deployment at the point of need in an automated device for targeted SNP genotyping with the only required end-user intervention being sample addition.",
|
||||
"issue": "8",
|
||||
"journalAbbreviation": "ACS Cent. Sci.",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"pages": "1591-1602",
|
||||
"publicationTitle": "ACS Central Science",
|
||||
"url": "https://doi.org/10.1021/acscentsci.3c00243",
|
||||
"volume": "9",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://pubs.acs.org/doi/epdf/10.1021/acscentsci.3c00323",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Dynamics of Rayleigh Fission Processes in ∼100 nm Charged Aqueous Nanodrops",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Hanozin",
|
||||
"firstName": "Emeline",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Harper",
|
||||
"firstName": "Conner C.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "McPartlan",
|
||||
"firstName": "Matthew S.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Williams",
|
||||
"firstName": "Evan R.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2023-08-23",
|
||||
"DOI": "10.1021/acscentsci.3c00323",
|
||||
"ISSN": "2374-7943",
|
||||
"abstractNote": "Fission of micron-size charged droplets has been observed using optical methods, but little is known about fission dynamics and breakup of smaller nanosize droplets that are important in a variety of natural and industrial processes. Here, spontaneous fission of individual aqueous nanodrops formed by electrospray is investigated using charge detection mass spectrometry. Fission processes ranging from formation of just two progeny droplets in 2 ms to production of dozens of progeny droplets over 100+ ms are observed for nanodrops that are charged above the Rayleigh limit. These results indicate that Rayleigh fission is a continuum of processes that produce progeny droplets that vary widely in charge, mass, and number.",
|
||||
"issue": "8",
|
||||
"journalAbbreviation": "ACS Cent. Sci.",
|
||||
"libraryCatalog": "ACS Publications",
|
||||
"pages": "1611-1622",
|
||||
"publicationTitle": "ACS Central Science",
|
||||
"url": "https://doi.org/10.1021/acscentsci.3c00323",
|
||||
"volume": "9",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
664
translators/ADS Bibcode.js
Normal file
664
translators/ADS Bibcode.js
Normal file
@@ -0,0 +1,664 @@
|
||||
{
|
||||
"translatorID": "09bd8037-a9bb-4f9a-b3b9-d18b2564b49e",
|
||||
"label": "ADS Bibcode",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "",
|
||||
"minVersion": "6.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 8,
|
||||
"lastUpdated": "2025-04-29 03:02:00"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
// Logic for accurate type detection. In general, the type in the RIS export is
|
||||
// fairly accurate. However, it may misidentify a proceedings book as JOUR (but
|
||||
// usually identifies conference papers fine). Theses are also identified as
|
||||
// JOUR in the RIS file. Preprints are usually correctly identified.
|
||||
function getRealType(bibStem, exportType) {
|
||||
if (/^(PhDT|MsT)/.test(bibStem)) {
|
||||
return "thesis";
|
||||
}
|
||||
|
||||
// Fix misidentifying full proceedings book as JOUR
|
||||
let volume = bibStem.substring(5, 9);
|
||||
if (volume === "conf" && exportType === "journalArticle") {
|
||||
return "book";
|
||||
}
|
||||
|
||||
return exportType;
|
||||
}
|
||||
|
||||
// https://github.com/yymao/adstex/blob/64989c9e75d7401ea2b33b546664cbc34cce6a27/adstex.py
|
||||
const bibcodeRe = /^\d{4}\D\S{13}[A-Z.:]$/;
|
||||
|
||||
function detectSearch(items) {
|
||||
return !!filterQuery(items).length;
|
||||
}
|
||||
|
||||
async function doSearch(items) {
|
||||
let bibcodes = filterQuery(items);
|
||||
if (!bibcodes.length) return;
|
||||
await scrape(bibcodes);
|
||||
}
|
||||
|
||||
function filterQuery(items) {
|
||||
if (!items) return [];
|
||||
|
||||
if (!items.length) items = [items];
|
||||
|
||||
// filter out invalid queries
|
||||
let bibcodes = [];
|
||||
for (let item of items) {
|
||||
if (item.adsBibcode && typeof item.adsBibcode == 'string') {
|
||||
let bibcode = item.adsBibcode.trim();
|
||||
if (bibcodeRe.test(bibcode)) {
|
||||
bibcodes.push(bibcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
return bibcodes;
|
||||
}
|
||||
|
||||
function extractId(url) {
|
||||
let m = url.match(/\/abs\/([^/]+)/);
|
||||
return m && decodeURIComponent(m[1]);
|
||||
}
|
||||
|
||||
function makePdfUrl(id) {
|
||||
return "https://ui.adsabs.harvard.edu/link_gateway/" + id + "/ARTICLE";
|
||||
}
|
||||
|
||||
// Detect if an item is from arXiv. This is necessary because bibcodes of older
|
||||
// arXiv preprints don't start with "arXiv"
|
||||
function isArXiv(item, bibStem) {
|
||||
if (item.DOI && item.DOI.startsWith("10.48550/")) return true;
|
||||
if (bibStem.startsWith("arXiv")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
async function scrape(ids) {
|
||||
let bootstrap = await requestJSON("https://api.adsabs.harvard.edu/v1/accounts/bootstrap");
|
||||
if (!bootstrap || !bootstrap.access_token) {
|
||||
throw new Error("ADS Bibcode: cannot obtain access token");
|
||||
}
|
||||
let body = JSON.stringify({ bibcode: ids, sort: ['no sort'] });
|
||||
let response = await requestJSON("https://api.adsabs.harvard.edu/v1/export/ris", {
|
||||
method: "POST",
|
||||
body,
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${bootstrap.access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
let translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); // RIS
|
||||
translator.setString(response.export);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
let id = extractId(item.url);
|
||||
let bibStem = id.slice(4);
|
||||
|
||||
let type = getRealType(bibStem, item.itemType);
|
||||
if (type !== item.itemType) {
|
||||
Z.debug(`ADS Bibcode: changing item type: ${item.itemType} -> ${type}`);
|
||||
item.itemType = type;
|
||||
}
|
||||
|
||||
if (isArXiv(item, bibStem)) {
|
||||
item.itemType = "preprint";
|
||||
item.publisher = "arXiv";
|
||||
delete item.pages;
|
||||
delete item.publicationTitle;
|
||||
delete item.journalAbbreviation;
|
||||
}
|
||||
|
||||
item.extra = (item.extra || '') + `\nADS Bibcode: ${id}`;
|
||||
|
||||
// for thesis-type terminology, see
|
||||
// https://adsabs.harvard.edu/abs_doc/journals1.html
|
||||
if (item.itemType === "thesis") {
|
||||
if (bibStem.startsWith("PhDT")) {
|
||||
item.thesisType = "Ph.D. thesis";
|
||||
}
|
||||
else if (bibStem.startsWith("MsT")) {
|
||||
item.thesisType = "Masters thesis";
|
||||
}
|
||||
delete item.journalAbbreviation; // from spurious JO tag
|
||||
delete item.publicationTitle;
|
||||
}
|
||||
|
||||
item.attachments.push({
|
||||
url: makePdfUrl(id),
|
||||
title: "Full Text PDF",
|
||||
mimeType: "application/pdf"
|
||||
});
|
||||
|
||||
if (item.journalAbbreviation == item.publicationTitle) {
|
||||
delete item.journalAbbreviation;
|
||||
}
|
||||
|
||||
if (item.date) {
|
||||
item.date = ZU.strToISO(item.date);
|
||||
}
|
||||
|
||||
item.libraryCatalog = 'NASA ADS';
|
||||
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2022MSSP..16208070W"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Research and application of neural network for tread wear prediction and optimization",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Wang",
|
||||
"firstName": "Meiqi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Jia",
|
||||
"firstName": "Sixian",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Chen",
|
||||
"firstName": "Enli",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Yang",
|
||||
"firstName": "Shaopu",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Liu",
|
||||
"firstName": "Pengfei",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Qi",
|
||||
"firstName": "Zhuang",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2022-01-01",
|
||||
"DOI": "10.1016/j.ymssp.2021.108070",
|
||||
"ISSN": "0888-3270",
|
||||
"abstractNote": "The wheel tread wear of heavy haul freight car in operation leads to shortened wheel turning period, reduced operation life, and poor train operation performance. In addition, wheel rail wear is a complex non-linear problem that integrates multiple disciplines. Thus, using a single physical or mathematical model to accurately describe and predict it is difficult. How to establish a model that could accurately predict wheel tread wear is an urgent problem and challenge that needs to be solved. In this paper, a tread wear prediction and optimization method based on chaotic quantum particle swarm optimization (CQPSO)-optimized derived extreme learning machine (DELM), namely CQPSO-DELM, is proposed to overcome this problem. First, an extreme learning machine model with derivative characteristics is proposed (DELM). Next, the chaos algorithm is introduced into the quantum particle swarm optimization algorithm to optimize the parameters of DELM. Then, through the CQPSO-DELM prediction model, the vehicle dynamics model simulates the maximum wheel tread wear under different test parameters to train and predict. Results show that the error performance index of the CQPSO-DELM prediction model is smaller than that of other algorithms. Thus, it could better reflect the influence of different parameters on the value of wheel tread wear. CQPSO is used to optimize the tread coordinates to obtain a wheel profile with low wear. The optimized wheel profile is fitted and reconstructed by the cubic non-uniform rational B-spline (NURBS) theory, and the optimized wear value of the tread is compared with the original wear value. The optimized wear value is less than the original wear value, thus verifying the effectiveness of the optimization model. The CQPSO-DELM model proposed in this paper could predict the wear value of different working conditions and tree shapes and solve the problem that different operating conditions and complex environment could have a considerable effect on the prediction of tread wear value. The optimization of wheel tread and the wear prediction of different tread shapes are realized from the angle of artificial intelligence for the first time.",
|
||||
"extra": "ADS Bibcode: 2022MSSP..16208070W",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"pages": "108070",
|
||||
"publicationTitle": "Mechanical Systems and Signal Processing",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2022MSSP..16208070W",
|
||||
"volume": "162",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "00-01"
|
||||
},
|
||||
{
|
||||
"tag": "99-00"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2021PhDT.........5C"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "thesis",
|
||||
"title": "Searching for the Astrophysical Gravitational-Wave Background and Prompt Radio Emission from Compact Binaries",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Callister",
|
||||
"firstName": "Thomas A.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-06-01",
|
||||
"abstractNote": "Gravitational-wave astronomy is now a reality. During my time at Caltech, the Advanced LIGO and Virgo observatories have detected gravitational waves from dozens of compact binary coalescences. All of these gravitational-wave events occurred in the relatively local Universe. In the first part of this thesis, I will instead look towards the remote Universe, investigating what LIGO and Virgo may be able to learn about cosmologically-distant compact binaries via observation of the stochastic gravitational-wave background. The stochastic gravitational-wave background is composed of the incoherent superposition of all distant, individually-unresolvable gravitational-wave sources. I explore what we learn from study of the gravitational-wave background, both about the astrophysics of compact binaries and the fundamental nature of gravitational waves. Of course, before we can study the gravitational-wave background we must first detect it. I therefore present searches for the gravitational-wave background using data from Advanced LIGO's first two observing runs, obtaining the most stringent upper limits to date on strength of the stochastic background. Finally, I consider how one might validate an apparent detection of the gravitational-wave background, confidently distinguishing a true astrophysical signal from spurious terrestrial artifacts. The second part of this thesis concerns the search for electromagnetic counterparts to gravitational-wave events. The binary neutron star merger GW170817 was accompanied by a rich set of electromagnetic counterparts spanning nearly the entire electromagnetic spectrum. Beyond these counterparts, compact binaries may additionally generate powerful radio transients at or near their time of merger. First, I consider whether there is a plausible connection between this so-called \"prompt radio emission\" and fast radio bursts — enigmatic radio transients of unknown origin. Next, I present the first direct search for prompt radio emission from a compact binary merger using the Owens Valley Radio Observatory Long Wavelength Array (OVRO-LWA). While no plausible candidates are identified, this effort successfully demonstrates the prompt radio follow-up of a gravitational-wave source, providing a blueprint for LIGO and Virgo follow-up in their O3 observing run and beyond.",
|
||||
"extra": "ADS Bibcode: 2021PhDT.........5C",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"thesisType": "Ph.D. thesis",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2021PhDT.........5C",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2021wfc..rept....8D"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "report",
|
||||
"title": "WFC3 IR Blob Classification with Machine Learning",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Dauphin",
|
||||
"firstName": "F.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Medina",
|
||||
"firstName": "J. V.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "McCullough",
|
||||
"firstName": "P. R.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-06-01",
|
||||
"abstractNote": "IR blobs are small, circular, dark artifacts in WFC3 IR images caused by particulates that occasionally are deposited on a flat mirror that is nearly optically conjugate to the IR detector. Machine learning can potentially reduce the effort currently devoted to visually inspecting blobs. We describe how machine learning (ML) techniques have been implemented to develop software that will automatically find new IR blobs and notify the WFC3 Quicklook team. This report describes the data preparation, development of the ML model, and criteria for success. The results of our latest test cases demonstrate that the model finds blobs reliably, with the model correctly classifying blob and non-blob images 94% and 88% of the time, respectively. We also report tips and lessons learned from our experience in machine learning as a result of this project.",
|
||||
"extra": "ADS Bibcode: 2021wfc..rept....8D",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"pages": "8",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2021wfc..rept....8D",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Blobs"
|
||||
},
|
||||
{
|
||||
"tag": "Convolutional Neural Networks"
|
||||
},
|
||||
{
|
||||
"tag": "HST"
|
||||
},
|
||||
{
|
||||
"tag": "Hubble Space Telescope"
|
||||
},
|
||||
{
|
||||
"tag": "IR"
|
||||
},
|
||||
{
|
||||
"tag": "Machine Learning"
|
||||
},
|
||||
{
|
||||
"tag": "STScI"
|
||||
},
|
||||
{
|
||||
"tag": "Space Telescope Science Institute"
|
||||
},
|
||||
{
|
||||
"tag": "WFC3"
|
||||
},
|
||||
{
|
||||
"tag": "Wide Field Camera 3"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2021sti..book.....P"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Stochastic Thermodynamics: An Introduction",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Peliti",
|
||||
"firstName": "Luca",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Pigolotti",
|
||||
"firstName": "Simone",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-07-01",
|
||||
"abstractNote": "The first comprehensive graduate-level introduction to stochastic thermodynamics. Stochastic thermodynamics is a well-defined subfield of statistical physics that aims to interpret thermodynamic concepts for systems ranging in size from a few to hundreds of nanometers, the behavior of which is inherently random due to thermal fluctuations. This growing field therefore describes the nonequilibrium dynamics of small systems, such as artificial nanodevices and biological molecular machines, which are of increasing scientific and technological relevance. This textbook provides an up-to-date pedagogical introduction to stochastic thermodynamics, guiding readers from basic concepts in statistical physics, probability theory, and thermodynamics to the most recent developments in the field. Gradually building up to more advanced material, the authors consistently prioritize simplicity and clarity over exhaustiveness and focus on the development of readers' physical insight over mathematical formalism. This approach allows the reader to grow as the book proceeds, helping interested young scientists to enter the field with less effort and to contribute to its ongoing vibrant development. Chapters provide exercises to complement and reinforce learning. Appropriate for graduate students in physics and biophysics, as well as researchers, Stochastic Thermodynamics serves as an excellent initiation to this rapidly evolving field. Emphasizes a pedagogical approach to the subject Highlights connections with the thermodynamics of information Pays special attention to molecular biophysics applications Privileges physical intuition over mathematical formalism Solutions manual available on request for instructors adopting the book in a course",
|
||||
"extra": "ADS Bibcode: 2021sti..book.....P",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"shortTitle": "Stochastic Thermodynamics",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2021sti..book.....P",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2020jsrs.conf.....B"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Proceedings of the Journées Systèmes de Référence Spatio-temporels 2019 \"Astrometry, Earth Rotation and Reference System in the Gaia era\"",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Bizouard",
|
||||
"firstName": "Christian",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-09-01",
|
||||
"extra": "ADS Bibcode: 2020jsrs.conf.....B",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2020jsrs.conf.....B",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "2020jsrs.conf..209S"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Atmospheric angular momentum related to Earth rotation studies: history and modern developments",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Salstein",
|
||||
"firstName": "D.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-09-01",
|
||||
"abstractNote": "It was noted some time ago that the angular momentum of the atmosphere varies, both regionally as well as in total. Given the conservation of angular momentum in the Earth system, except for known external torques, such variability implies transfer of the angular momentum across the atmosphere's lower boundary. As nearly all is absorbed by the Earth below, the solid Earth changes its overall rotation from this impact. Due to the large difference between in the moments of inertia of the atmosphere and Earth, relatively big differences in the atmosphere are translated as relatively very small differences in the Earth, measurable as changes in Earth rotation rate, and polar motion. The atmospheric angular momentum (AAM) is that due to the motion of the winds and to the changes in mass distribution, closely related to the atmosphere pressure patterns; its variability in the atmosphere is mirrored in the Earth rotation rate and polar motion. This connection between the global solid Earth properties and the global and regional atmosphere on a number of time scales, especially seasonal and interannual, was much appreciated by Barbara Kolaczek, with Jolanta Nastula, at the Space Research Center in Warsaw, and this was a subject of our collaborative studies. Many calculations were made of atmospheric angular momentum, leading to a service under the Global Geophysical Fluids Center of the IERS based on calculations using both operational meteorological series, determined for weather forecasting purposes, and retrospective analyses of the atmosphere. Theoretical development of the connection between the AAM, Earth rotation/polar motion, and also the angular momentum of the other geophysical fluids occurred at the same time that space-based observations and enhanced computer power were allowing improved skills for both weather analysis and forecasting. Hence better determination of the AAM became possible, which could be used as a measure for forecasting Earth rotation. Today we are looking at the atmosphere in combination with the ocean and other fluids, and also assessing the implications of climate variability on Earth rotation through climate model research. According to models of the Earth system, significant changes in winds appear to be a possible result of climate change, with implications for the Earth rotation parameters.",
|
||||
"conferenceName": "Astrometry, Earth Rotation, and Reference Systems in the GAIA era",
|
||||
"extra": "ADS Bibcode: 2020jsrs.conf..209S",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"pages": "209-213",
|
||||
"shortTitle": "Atmospheric angular momentum related to Earth rotation studies",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2020jsrs.conf..209S",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": [
|
||||
{
|
||||
"adsBibcode": "2002math.....11159P"
|
||||
},
|
||||
{
|
||||
"adsBibcode": "2003math......3109P"
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"itemType": "preprint",
|
||||
"title": "The entropy formula for the Ricci flow and its geometric applications",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Perelman",
|
||||
"firstName": "Grisha",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2002-11-01",
|
||||
"DOI": "10.48550/arXiv.math/0211159",
|
||||
"abstractNote": "We present a monotonic expression for the Ricci flow, valid in all dimensions and without curvature assumptions. It is interpreted as an entropy for a certain canonical ensemble. Several geometric applications are given. In particular, (1) Ricci flow, considered on the space of riemannian metrics modulo diffeomorphism and scaling, has no nontrivial periodic orbits (that is, other than fixed points); (2) In a region, where singularity is forming in finite time, the injectivity radius is controlled by the curvature; (3) Ricci flow can not quickly turn an almost euclidean region into a very curved one, no matter what happens far away. We also verify several assertions related to Richard Hamilton's program for the proof of Thurston geometrization conjecture for closed three-manifolds, and give a sketch of an eclectic proof of this conjecture, making use of earlier results on collapsing with local lower curvature bound.",
|
||||
"extra": "ADS Bibcode: 2002math.....11159P",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"repository": "arXiv",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2002math.....11159P",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "53C"
|
||||
},
|
||||
{
|
||||
"tag": "Differential Geometry"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
},
|
||||
{
|
||||
"itemType": "preprint",
|
||||
"title": "Ricci flow with surgery on three-manifolds",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Perelman",
|
||||
"firstName": "Grisha",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2003-03-01",
|
||||
"DOI": "10.48550/arXiv.math/0303109",
|
||||
"abstractNote": "This is a technical paper, which is a continuation of math.DG/0211159. Here we construct Ricci flow with surgeries and verify most of the assertions, made in section 13 of that e-print; the exceptions are (1) the statement that manifolds that can collapse with local lower bound on sectional curvature are graph manifolds - this is deferred to a separate paper, since the proof has nothing to do with the Ricci flow, and (2) the claim on the lower bound for the volume of maximal horns and the smoothness of solutions from some time on, which turned out to be unjustified and, on the other hand, irrelevant for the other conclusions.",
|
||||
"extra": "ADS Bibcode: 2003math......3109P",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"repository": "arXiv",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/2003math......3109P",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "53C"
|
||||
},
|
||||
{
|
||||
"tag": "Differential Geometry"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "1995LNP...463...51E"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Observations and Cosmological Models",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Ellis",
|
||||
"firstName": "G. F. R.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1995-01-01",
|
||||
"bookTitle": "Galaxies in the Young Universe",
|
||||
"extra": "DOI: 10.1007/BFb0102359\nADS Bibcode: 1995LNP...463...51E",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"pages": "51",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/1995LNP...463...51E",
|
||||
"volume": "463",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "search",
|
||||
"input": {
|
||||
"adsBibcode": "1997MsT...........B"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"itemType": "thesis",
|
||||
"title": "Comparative Analysis of Selected Radiation Effects in Medium Earth Orbits",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Bolin",
|
||||
"firstName": "Jennifer A.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1997-12-01",
|
||||
"abstractNote": "Satellite design is well developed for the common Low Earth Orbit (LEO) and Geosynchronous Orbit (GEO) and Highly Elliptical Orbits (HEO), i.e., Molniya, cases; Medium Earth Orbit (MEO) satellite design is a relatively new venture. MEO is roughly defined as being altitudes above LEO and below GEO. A primary concern, and a major reason for the delay in exploiting the MEO altitudes, has been the expected radiation environment and corresponding satellite degradation anticipated to occur at MEO altitudes. The presence of the Van Allen belts, a major source of radiation, along with the suitability of GEO and LEO orbits, has conventionally discouraged satellite placement in MEO. As conventional Earth orbits become increasingly crowded, MEO will become further populated. This thesis investigates the major sources of radiation (geomagnetically trapped particles, solar particle events and galactic cosmic radiation) with respect to specific Naval Research Laboratory (NRL) designated MEO (altitudes between 3,000 nautical miles (nmi) and 9,000 nmi; (inclination angle of 15 degrees). The contribution of each of these components to the total radiation experienced in MEO and the effects of the expected radiation on a representative spacecraft are analyzed in comparison to a baseline LEO orbit of 400 nmi and 70 degrees inclination. Dose depth curves are calculated for several configurations, and show that weight gains from necessary expected shielding are not extreme. The radiation effects considered include proton displacement dose and solar cell degradation.",
|
||||
"extra": "ADS Bibcode: 1997MsT...........B",
|
||||
"libraryCatalog": "NASA ADS",
|
||||
"thesisType": "Masters thesis",
|
||||
"url": "https://ui.adsabs.harvard.edu/abs/1997MsT...........B",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Aerospace Environments"
|
||||
},
|
||||
{
|
||||
"tag": "Astrophysics"
|
||||
},
|
||||
{
|
||||
"tag": "Cosmic Rays"
|
||||
},
|
||||
{
|
||||
"tag": "Degradation"
|
||||
},
|
||||
{
|
||||
"tag": "Elliptical Orbits"
|
||||
},
|
||||
{
|
||||
"tag": "Galactic Radiation"
|
||||
},
|
||||
{
|
||||
"tag": "Geosynchronous Orbits"
|
||||
},
|
||||
{
|
||||
"tag": "Low Earth Orbits"
|
||||
},
|
||||
{
|
||||
"tag": "Radiation Belts"
|
||||
},
|
||||
{
|
||||
"tag": "Radiation Effects"
|
||||
},
|
||||
{
|
||||
"tag": "Satellite Design"
|
||||
},
|
||||
{
|
||||
"tag": "Solar Activity"
|
||||
},
|
||||
{
|
||||
"tag": "Solar Cells"
|
||||
},
|
||||
{
|
||||
"tag": "Solar Corpuscular Radiation"
|
||||
},
|
||||
{
|
||||
"tag": "Solar Storms"
|
||||
},
|
||||
{
|
||||
"tag": "Unmanned Spacecraft"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
450
translators/AEA Web.js
Normal file
450
translators/AEA Web.js
Normal file
@@ -0,0 +1,450 @@
|
||||
{
|
||||
"translatorID": "6044b16f-2452-4ce8-ad02-fab69ef04f13",
|
||||
"label": "AEA Web",
|
||||
"creator": "Sebatian Karcher",
|
||||
"target": "^https?://www\\.aeaweb\\.org/(articles|journals|issues)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-05-08 17:43:18"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
AEA Web translator Copyright © 2014 Sebastian Karcher
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.indexOf('/articles?id=')>-1) {
|
||||
return "journalArticle";
|
||||
} else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//article//a[contains(@href, "/articles?id=")]|//li[@class="article"]//a[contains(@href, "/articles?id=")]');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = new Array();
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');//Embedded Metadata
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
//Decode HTML entities in title, e.g. '
|
||||
item.title = ZU.unescapeHTML(item.title);
|
||||
|
||||
//Correct pages format, e.g. 1467-96 or 625-63
|
||||
var m = item.pages.match(/^(\d+)(\d\d)[\--](\d\d)$|^(\d+)(\d)[\--](\d)$|^(\d+)(\d\d\d)[\--](\d\d\d)$/);
|
||||
if (m) {
|
||||
item.pages = m[1]+m[2]+"-"+m[1]+m[3];
|
||||
}
|
||||
|
||||
//The abstract is contained in the section-node of class abstract,
|
||||
//but this node consists of an (empty) text node, a h2 node
|
||||
//and another text node with the actual abstract.
|
||||
var abstract = ZU.xpathText(doc, '//section[contains(@class,"abstract")]/text()[last()]');
|
||||
item.abstractNote = abstract;
|
||||
|
||||
for (let jelCode of doc.querySelectorAll('.jel-codes .code')) {
|
||||
let jelTag = jelCode.nextSibling;
|
||||
if (jelTag && jelTag.textContent.trim()) {
|
||||
item.tags.push({ tag: jelTag.textContent.trim() });
|
||||
}
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
translator.getTranslatorObject(function(trans) {
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/journals/search-results?within%5Btitle%5D=on&within%5Babstract%5D=on&within%5Bauthor%5D=on&journal=&from=a&q=labor+market",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/issues/356",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jep.28.4.3",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Networks in the Understanding of Economic Behaviors",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Matthew O.",
|
||||
"lastName": "Jackson",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2014/11",
|
||||
"DOI": "10.1257/jep.28.4.3",
|
||||
"ISSN": "0895-3309",
|
||||
"abstractNote": "As economists endeavor to build better models of human behavior, they cannot ignore that humans are fundamentally a social species with interaction patterns that shape their behaviors. People's opinions, which products they buy, whether they invest in education, become criminals, and so forth, are all influenced by friends and acquaintances. Ultimately, the full network of relationships—how dense it is, whether some groups are segregated, who sits in central positions—affects how information spreads and how people behave. Increased availability of data coupled with increased computing power allows us to analyze networks in economic settings in ways not previously possible. In this paper, I describe some of the ways in which networks are helping economists to model and understand behavior. I begin with an example that demonstrates the sorts of things that researchers can miss if they do not account for network patterns of interaction. Next I discuss a taxonomy of network properties and how they impact behaviors. Finally, I discuss the problem of developing tractable models of network formation.",
|
||||
"issue": "4",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.aeaweb.org",
|
||||
"pages": "3-22",
|
||||
"publicationTitle": "Journal of Economic Perspectives",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jep.28.4.3",
|
||||
"volume": "28",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Belief"
|
||||
},
|
||||
{
|
||||
"tag": "Communication"
|
||||
},
|
||||
{
|
||||
"tag": "Consumer Economics: Theory"
|
||||
},
|
||||
{
|
||||
"tag": "Consumer Economics: Theory, Search"
|
||||
},
|
||||
{
|
||||
"tag": "Economic Anthropology"
|
||||
},
|
||||
{
|
||||
"tag": "Economic Sociology; Economic Anthropology; Social and Economic Stratification"
|
||||
},
|
||||
{
|
||||
"tag": "Information and Knowledge"
|
||||
},
|
||||
{
|
||||
"tag": "Learning"
|
||||
},
|
||||
{
|
||||
"tag": "Network Formation and Analysis: Theory"
|
||||
},
|
||||
{
|
||||
"tag": "Search; Learning; Information and Knowledge; Communication; Belief; Unawareness"
|
||||
},
|
||||
{
|
||||
"tag": "Social and Economic Stratification"
|
||||
},
|
||||
{
|
||||
"tag": "Unawareness, Network Formation and Analysis: Theory, Economic Sociology"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/aer.101.4.1467",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Education and Labor Market Discrimination",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Kevin",
|
||||
"lastName": "Lang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Michael",
|
||||
"lastName": "Manove",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011/06",
|
||||
"DOI": "10.1257/aer.101.4.1467",
|
||||
"ISSN": "0002-8282",
|
||||
"abstractNote": "Using a model of statistical discrimination and educational sorting,\nwe explain why blacks get more education than whites of similar\ncognitive ability, and we explore how the Armed Forces Qualification\nTest (AFQT), wages, and education are related. The model suggests\nthat one should control for both AFQT and education when comparing\nthe earnings of blacks and whites, in which case a substantial\nblack-white wage differential emerges. We reject the hypothesis that\ndifferences in school quality between blacks and whites explain the\nwage and education differentials. Our findings support the view that\nsome of the black-white wage differential reflects the operation of the\nlabor market. (JEL I21, J15, J24, J31, J71)",
|
||||
"issue": "4",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.aeaweb.org",
|
||||
"pages": "1467-1496",
|
||||
"publicationTitle": "American Economic Review",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/aer.101.4.1467",
|
||||
"volume": "101",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Analysis of Education"
|
||||
},
|
||||
{
|
||||
"tag": "Analysis of Education, Economics of Minorities and Races"
|
||||
},
|
||||
{
|
||||
"tag": "Economics of Minorities and Races; Non-labor Discrimination"
|
||||
},
|
||||
{
|
||||
"tag": "Human Capital; Skills; Occupational Choice; Labor Productivity"
|
||||
},
|
||||
{
|
||||
"tag": "Labor Discrimination"
|
||||
},
|
||||
{
|
||||
"tag": "Labor Productivity, Wage Level and Structure"
|
||||
},
|
||||
{
|
||||
"tag": "Non-labor Discrimination, Human Capital"
|
||||
},
|
||||
{
|
||||
"tag": "Occupational Choice"
|
||||
},
|
||||
{
|
||||
"tag": "Skills"
|
||||
},
|
||||
{
|
||||
"tag": "Wage Differentials, Labor Discrimination"
|
||||
},
|
||||
{
|
||||
"tag": "Wage Level and Structure; Wage Differentials"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jep.30.3.235",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "A Skeptical View of the National Science Foundation's Role in Economic Research",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Tyler",
|
||||
"lastName": "Cowen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alex",
|
||||
"lastName": "Tabarrok",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2016/09",
|
||||
"DOI": "10.1257/jep.30.3.235",
|
||||
"ISSN": "0895-3309",
|
||||
"abstractNote": "We can imagine a plausible case for government support of science based on traditional economic reasons of externalities and public goods. Yet when it comes to government support of grants from the National Science Foundation (NSF) for economic research, our sense is that many economists avoid critical questions, skimp on analysis, and move straight to advocacy. In this essay, we take a more skeptical attitude toward the efforts of the NSF to subsidize economic research. We offer two main sets of arguments. First, a key question is not whether NSF funding is justified relative to laissez-faire, but rather, what is the marginal value of NSF funding given already existing government and nongovernment support for economic research? Second, we consider whether NSF funding might more productively be shifted in various directions that remain within the legal and traditional purview of the NSF. Such alternative focuses might include data availability, prizes rather than grants, broader dissemination of economic insights, and more. Given these critiques, we suggest some possible ways in which the pattern of NSF funding, and the arguments for such funding, might be improved.",
|
||||
"issue": "3",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.aeaweb.org",
|
||||
"pages": "235-248",
|
||||
"publicationTitle": "Journal of Economic Perspectives",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jep.30.3.235",
|
||||
"volume": "30",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Higher Education; Research Institutions"
|
||||
},
|
||||
{
|
||||
"tag": "Market for Economists, Higher Education"
|
||||
},
|
||||
{
|
||||
"tag": "Research Institutions, Technological Change: Government Policy"
|
||||
},
|
||||
{
|
||||
"tag": "Role of Economics"
|
||||
},
|
||||
{
|
||||
"tag": "Role of Economics; Role of Economists; Market for Economists"
|
||||
},
|
||||
{
|
||||
"tag": "Role of Economists"
|
||||
},
|
||||
{
|
||||
"tag": "Technological Change: Government Policy"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jel.20201641",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "The 1918 Influenza Pandemic and Its Lessons for COVID-19",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Brian",
|
||||
"lastName": "Beach",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Karen",
|
||||
"lastName": "Clay",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Martin",
|
||||
"lastName": "Saavedra",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2022/03",
|
||||
"DOI": "10.1257/jel.20201641",
|
||||
"ISSN": "0022-0515",
|
||||
"abstractNote": "This article reviews the global health and economic consequences of the 1918 influenza pandemic, with a particular focus on topics that have seen a renewed interest because of COVID-19. We begin by providing an overview of key contextual and epidemiological details as well as the data that are available to researchers. We then examine the effects on mortality, fertility, and the economy in the short and medium run. The role of non-pharmaceutical interventions in shaping those outcomes is discussed throughout. We then examine longer-lasting health consequences and their impact on human capital accumulation and socioeconomic status. Throughout the paper we highlight important areas for future work.",
|
||||
"issue": "1",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.aeaweb.org",
|
||||
"pages": "41-84",
|
||||
"publicationTitle": "Journal of Economic Literature",
|
||||
"url": "https://www.aeaweb.org/articles?id=10.1257/jel.20201641",
|
||||
"volume": "60",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Aggregate Human Capital"
|
||||
},
|
||||
{
|
||||
"tag": "Aggregate Labor Productivity, Business Fluctuations"
|
||||
},
|
||||
{
|
||||
"tag": "Business Fluctuations; Cycles"
|
||||
},
|
||||
{
|
||||
"tag": "Child Care"
|
||||
},
|
||||
{
|
||||
"tag": "Children"
|
||||
},
|
||||
{
|
||||
"tag": "Cycles, Health Behavior, Health and Economic Development, Fertility"
|
||||
},
|
||||
{
|
||||
"tag": "Economic History: Labor and Consumers, Demography, Education, Health, Welfare, Income, Wealth, Religion, and Philanthropy: General, International, or Comparative"
|
||||
},
|
||||
{
|
||||
"tag": "Employment"
|
||||
},
|
||||
{
|
||||
"tag": "Employment; Unemployment; Wages; Intergenerational Income Distribution; Aggregate Human Capital; Aggregate Labor Productivity"
|
||||
},
|
||||
{
|
||||
"tag": "Family Planning"
|
||||
},
|
||||
{
|
||||
"tag": "Fertility; Family Planning; Child Care; Children; Youth"
|
||||
},
|
||||
{
|
||||
"tag": "Health Behavior"
|
||||
},
|
||||
{
|
||||
"tag": "Health and Economic Development"
|
||||
},
|
||||
{
|
||||
"tag": "Human Capital; Skills; Occupational Choice; Labor Productivity"
|
||||
},
|
||||
{
|
||||
"tag": "Intergenerational Income Distribution"
|
||||
},
|
||||
{
|
||||
"tag": "Labor Productivity, Economic History: Labor and Consumers, Demography, Education, Health, Welfare, Income, Wealth, Religion, and Philanthropy: General, International, or Comparative"
|
||||
},
|
||||
{
|
||||
"tag": "Occupational Choice"
|
||||
},
|
||||
{
|
||||
"tag": "Skills"
|
||||
},
|
||||
{
|
||||
"tag": "Unemployment"
|
||||
},
|
||||
{
|
||||
"tag": "Wages"
|
||||
},
|
||||
{
|
||||
"tag": "Youth, Human Capital"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
311
translators/AGRIS.js
Normal file
311
translators/AGRIS.js
Normal file
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"translatorID": "48a67d12-1bcf-44ac-a4f4-11457ebfc0bb",
|
||||
"label": "AGRIS",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://agris\\.fao\\.org/agris-search/search",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-12 21:34:16"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.querySelector('.docType_ico img[title*="Dataset"]')) {
|
||||
return "document";
|
||||
}
|
||||
else if (doc.querySelector('meta[name="citation_journal_title"]')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (doc.querySelector('meta[name="citation_title"]')) {
|
||||
return "report";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h3 > a[href*="search.do"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// item.url will be empty if there's no full-text link; we don't want
|
||||
// to use the catalog page as the URL in that case.
|
||||
item.url = attr(doc, '.link-full-text a', 'href');
|
||||
item.attachments = [];
|
||||
|
||||
if (item.itemType == 'document') {
|
||||
item.extra = (item.extra || '') + '\nType: dataset';
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = detectWeb(doc, url);
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://agris.fao.org/agris-search/search.do?recordID=IR2012044101",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "report",
|
||||
"title": "Possibility of artificial propagation in farmed great sturgeon (Huso huso)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Mahmoud",
|
||||
"lastName": "Bahmani",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Porkazemi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "H.",
|
||||
"lastName": "Khara",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Rahimidanesh",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M. A.",
|
||||
"lastName": "Tolooei",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "A.",
|
||||
"lastName": "Abasalizadeh",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Hassanzadehsaber",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "H.",
|
||||
"lastName": "Mohamadiparashkohi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "O.",
|
||||
"lastName": "Asghari",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "R.",
|
||||
"lastName": "Kazemi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "S.",
|
||||
"lastName": "Dezhandian",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "A.",
|
||||
"lastName": "Yousefi Jourdehi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Mohseni",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M. A.",
|
||||
"lastName": "Yazdani",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "A.",
|
||||
"lastName": "Hallajian",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Shakourian",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Pourdehghani",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"abstractNote": "In this research, morphometrical and physiological indicators of farmed great sturgeon, Huso huso in the Dr.Dadman International Sturgeon Research Institute studied. After biopsy of male and female gonads, two groups in terms of sexual maturity stage were observed. According to the histological observations, gonad development of male fish in the test group 1, stage II to III and in the test group 2 stage II to IV and in female fish in the test group 1 from stage II to stage II-III and in the test group 2 in stage III of sexual development and maturity stage was determined Maximum average weight and total length in a group of male fish in the summer (39/07±5/79 kg and 170 ± 6/48cm) and minimum average weight and total length in the two test groups of male fish in the autumn (26/25±3/65 kg and 155/5±4/40 cm) were measured. In the female test groups, the maximum average of weight and total length of the test group 2 in the summer (40/32±3/09 kg 170/12±1/96 cm), and the minimum of the test group 1 in the fall (25/8±1/30 kg and 160/6± 1/97 cm) were determined. The results of measuring the cortisol hormone in male test group, maximum and minimum average in the test group 1, respectively, in the summer (41/25±6/34 ng/ml) and fall (24/62±13/96 ng/ml) showed a significant difference between groups (p0.05). While the results of female group tests in test groups in relation with cortisol hormone had suggested that the maximum in group 2 in winter (58±25/92 ng/ml) and minimum in group 1 in the autumn (9/32±5/6 ng/ml) were observed and there were significant difference between groups (p0.05). Male, the results had suggested that the maximum average testosterone in the test group 2 in winter (71/25±15/52 ng / ml) and minimum in group 1 and in winter (27±6/60 ng/ml), respectively. So that showed significant difference between groups (P0.05). progesterone hormone were in the test group 2 and in summer (1/52±0/18 ng/ml) and its minimum in winter (0/14± 0/10 ng/ml) in test group 1 (p0.05), respectively. Maximum hormone levels 17-beta estradiol in the test group 2 in the autumn (16/42±6/36 ng/ml) and its minimum in the test group 1 in the winter (3/1±0/74 ng/ml) was observed and showed no statistical difference between groups (p 0.05). Based on the results, levels of female sex hormones in the test group showed that maximum testosterone (19/87±10/72 ng/ml) in the test group 2 in summer and minimum16/0±0/02 ng/ml) in the test group 1, were determined and had significant difference in all seasons (p0.05 (0/03±0/01 ng/ml) in the test group 1 was observed in winter that a significant difference between groups showed at fall (P0.05). Maximum and minimum levels of the hormone 17-beta estradiol in the test group 2 was observed in autumn (12/37±7/23 ng/ml), respectively (p0.05). The results of plasma metabolites (glucose, cholesterol, triglycerides and total lipid in the male test groups had suggested that the maximum and minimum of glucose in the test group 1 was (75/25±8/71 mg/dl) in winter and (39/5±6/71 mg / dl) summer, respectively. Maximum and minimum levels of cholesterol in group 1 was observed in autumn (128/75±54/34 mg/dl) and in winter (74/5±8/19 mg/dl), respectively. Maximum and minimum amount of triglycerides in the test group 2 observed in winter (384/75±50/93 mg/dl) and (156/25±16/34 mg / dl) in spring, so that in the spring between the groups showed significant difference (p0.05). Maximum total lipid in the test group 2 was observed in summer (686/25 ± 83/27 mg/dl) and minimum in the test group 1 in spring (410±62/03 mg/dl). Maximum and minimum glucose levels in a female group was observed in winter (82/7±11/55 mg/dl) and autumn (27/6±6 /41 mg/dl), respectively. The maximum cholesterol amount of the test group 1 was observed in winter (87±3/66 mg/dl) and minimum in the test group 2 in autumn (63/5±5/23 mg/dl). Maximum and minimum amount of triglycerides in the test group 2 was in the spring (281±33/67 mg/dl) and its minimum in autumn (213/75 ± 32/44 mg/dl), respectively, so that in the spring showed significant difference between the groups (p0.05).Maximum total lipid amount was in the test group 2 in spring (554/7±31/59 mg/dl) and minimum in the test group 1 in winter (367±21/22 mg/dl) and in summer between groups significant difference was observed (p0.05). The results of calcium and sodium cations and osmolarity in males suggested that calcium in females and sodium in males showed significant difference related to sexual maturation stage (P0.05). But osmolarity didn t show significant difference in both sex (p0.05).",
|
||||
"institution": "Iranian Fisheries Research Organization",
|
||||
"language": "Farsi",
|
||||
"libraryCatalog": "agris.fao.org",
|
||||
"url": "https://agris.fao.org/agris-search/search.do?recordID=IR2012044101",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://agris.fao.org/agris-search/search.do?recordID=TH2005000236",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Efficiency of antimicrobial residue screening test kit for meat CM-Test",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Thongchai",
|
||||
"lastName": "Chalermchaikit",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Kriengsak",
|
||||
"lastName": "Poonsook",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Kriengsuk",
|
||||
"lastName": "Dangprom",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Monthon",
|
||||
"lastName": "Lertworapreecha",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Kittikorn",
|
||||
"lastName": "Jotisakulratana",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2002",
|
||||
"ISSN": "0125-0369",
|
||||
"abstractNote": "Concerns of antimicrobial residues in food of animal origins are not only the adverse health effect to consumers but also the impact on exportation. The conventional methods for detecting antimicrobial residues in meat are European Four Pate Test (EDPR) method which use Bacillus subtilis and Micrococcus luteus in Test agar or Microbial Inhibition Disk Assay (MIDA) which use Bacillus mycoides, Bacillus subtilis and Micrococcus luteus in Antibiotic medium as indicators. However, EFPT and MIDA are required incubating time at least 18 hours for reading the results. Besides, EFPT and MIDA have been showed low specificity, which lead to false negative results. Therefore, antimicrobial screening test kit for meat has been developed by the full support from Thai Research Fund (TRF). The concept of new developed antimicrobial screening test kit (CM-Test) is tube diffusion method. There are consisted of Bacillus stearothermophilus in appropriated medium, which contained in polypropylene tube (1*4 cm). The tested results can be read after the meat extract supernatant of 0.1 ml is put into the test kit and incubated at 65+-1 deg C for 3 1/2-4 1/2 hours. The color of test kit will not be changed if the sample is positive (contain antimicrobial residue). If the sample is negative, test kit color will be changed to yellow. The prevalence of antimicrobial residues in 300 chicken meat samples and 300 pork samples, randomly purchased from markets and supermarkets in Bangkok during July 2001 to February 2002, had been studied. The results of chicken meat samples were found positive 12.3, 0 and 1.7 percent by using CM-Test, EFPT and MIDA methods, respectively. The results of pork samples were found positive 8.3, 2 and 2.7 percent by using CM-Test, EFPT and MIDA methods, respectively. Positive samples were confirmed by Charm II Test method. These results reveal that the detection limits developed antimicrobial residue screening test kit are better than conventional methods, EFPT and MIDA.",
|
||||
"language": "Thai",
|
||||
"libraryCatalog": "agris.fao.org",
|
||||
"publicationTitle": "Warasan Witthayasat Kaset",
|
||||
"url": "https://agris.fao.org/agris-search/search.do?recordID=TH2005000236",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://agris.fao.org/agris-search/search.do?request_locale=ar&recordID=AV20120164931&query=&sourceQuery=&sortField=&sortOrder=&countryResource=&agrovocString=&advQuery=¢erString=&enableField=",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "report",
|
||||
"title": "Petroleum Hydrocarbons in Saudi Red Sea Coastal Waters الهيدروكربونات البترولية في المياه السطحية لساحل البحر الاحمر السعودية (منطقة بترومين)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Sultan",
|
||||
"lastName": "Al-Lihaibi",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Turki",
|
||||
"lastName": "Al-Ghamdy",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1997",
|
||||
"abstractNote": "Total petroleum hydrocarbons in surface water samples collected from the Red Sea coast al area of Jeddah (Saudi Arabia), have been measured using ultraviolet fluorescence spectroscopy (UVF). Concentration level ranged between 1.79 and 17.9 J..I.g 1,1 light Arabian oil equivalents . Samples taken near the oil terminal (Petromin) showed relatively high concentrations (2.8-17.9 J..I.g I\" 1). whereas in the relatively clean Obhur Creek concentrations wer~ low (2 J..I.g 1- I). Perfect agreement has been obtained between concentrations calculated as chrysene and light Arabian equivalents. However, the light Arabian equivalent concentration is almost 6 times the chrysene equivalent concentration . تم قياس الهيدروكربونات البترولية في المياه السطحية للمنطقة الساحلية لمدينة جدة باستخدام مطياف الفلورة فوق البنفسجية . وجد أن مستوى التركيز في العينات تراوح بين 1.8 و 17.9 مايكروجرام / لتر وحدات زيت عربي خفيف مكافئة . وقد لوحظ أن العينات القريبة من مصرف مصفاة الزيت (بترومين) أعطت تراكيز عالية ( 2.8-17.9 مايكروجرام/ لتر ) بينما أعطت العينات المأخوذة من شرم أبحر ، والذي يعتبر الأنظف نسبيا ، قراءات منخفضة ( 2.0 مايكروجرام / لتر أو أقل ) . كما لوحظ وجود علاقة بين التركيزات المحسوبة على أساس وحدات كرايسين مكافئة وتلك المحسوبة على أساس وحدات زيت عربي خفيف مكافئة بحيث يكون الأخير مساويا لما يقارب 6 أضعاف الأول.",
|
||||
"institution": "KAU - Scientific Publishing Center",
|
||||
"language": "English",
|
||||
"libraryCatalog": "agris.fao.org",
|
||||
"url": "http://www.kau.edu.sa/centers/spc/jkau/Doc/Mar/8/Petroleum%20Hydrocarbons%20in%20Saudi%20Red%20Sea%20Coastal%20Waters.pdf",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://agris.fao.org/agris-search/searchIndex.do?query=soil+water",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
295
translators/AIP.js
Normal file
295
translators/AIP.js
Normal file
@@ -0,0 +1,295 @@
|
||||
{
|
||||
"translatorID": "48d3b115-7e09-4134-ad5d-0beda6296761",
|
||||
"label": "AIP",
|
||||
"creator": "Aurimas Vinckevicius",
|
||||
"target": "^https?://scitation\\.aip\\.org/(search\\?|content/)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2015-10-17 17:37:33"
|
||||
}
|
||||
|
||||
function getSearchResults(doc) {
|
||||
return doc.getElementsByClassName("resultItem");
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.indexOf('search') !== -1 && getSearchResults(doc).length) {
|
||||
return 'multiple';
|
||||
}
|
||||
|
||||
if (ZU.xpathText(doc, '/html/head/meta[@name="citation_journal_title"]/@content')) {
|
||||
return 'journalArticle';
|
||||
}
|
||||
else if (doc.body.id == 'conferencepaper') return "conferencePaper"
|
||||
}
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
var results = getSearchResults(doc);
|
||||
var items = {};
|
||||
for (var i=0, n=results.length; i<n; i++) {
|
||||
var title = ZU.xpath(results[i], './/div[@class="title"]/a')[0];
|
||||
items[title.href] = ZU.trimInternal(title.textContent);
|
||||
}
|
||||
|
||||
Z.selectItems(items, function(selectedItems) {
|
||||
if (!selectedItems) return true;
|
||||
|
||||
var urls = [];
|
||||
for (var i in selectedItems) {
|
||||
urls.push(i);
|
||||
}
|
||||
|
||||
ZU.processDocuments(urls, scrape);
|
||||
})
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
//use Embedded Metadata
|
||||
var translator = Z.loadTranslator('web');
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function(obj, item) {
|
||||
//for conference papers, we're missing some metadata
|
||||
if (!item.publicationTitle
|
||||
&& ZU.xpath(doc, '//div[@id="breadcrumb"]/a[@title="Link to conference proceedings"]').length) {
|
||||
item.publicationTitle = "AIP Conference Proceedings";
|
||||
item.volume = ZU.xpathText(doc, '//div[@class="itemCitation"]//span[@class="citationvolume"]');
|
||||
}
|
||||
|
||||
//check if we have the correct publication date
|
||||
var year = doc.getElementsByClassName('itemCitation')[0];
|
||||
if (year) year = year.textContent.match(/\((\d{4})\)/);
|
||||
if (year && (!item.date || item.date.indexOf(year[1]) == -1) ) {
|
||||
item.date = year[1];
|
||||
}
|
||||
|
||||
|
||||
var pdf = ZU.xpath(doc, '//div[@class="pdfItem"]/a[@class="pdf" and @href]')[0];
|
||||
if (pdf) {
|
||||
item.attachments.push({
|
||||
title: "Full Text PDF",
|
||||
url: pdf.href,
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
}
|
||||
|
||||
var keywords = ZU.xpath(doc, '//div[@class="keywords-container"]//dt/a');
|
||||
var tags = [];
|
||||
for (var i=0, n=keywords.length; i<n; i++) {
|
||||
tags.push(ZU.trimInternal(keywords[i].textContent));
|
||||
}
|
||||
if (tags.length) {
|
||||
item.tags = tags;
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.translate();
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://scitation.aip.org/content/aip/journal/aplmater/1/2/10.1063/1.4818002",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Ian",
|
||||
"lastName": "MacLaren",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "LiQiu",
|
||||
"lastName": "Wang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Owen",
|
||||
"lastName": "Morris",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alan J.",
|
||||
"lastName": "Craven",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Robert L.",
|
||||
"lastName": "Stamps",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Bernhard",
|
||||
"lastName": "Schaffer",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quentin M.",
|
||||
"lastName": "Ramasse",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Shu",
|
||||
"lastName": "Miao",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Kambiz",
|
||||
"lastName": "Kalantari",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Iasmi",
|
||||
"lastName": "Sterianou",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Ian M.",
|
||||
"lastName": "Reaney",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [
|
||||
"Antiferroelectricity",
|
||||
"Antiferroelectricity",
|
||||
"Dielectric oxides",
|
||||
"Dielectric oxides",
|
||||
"Image reconstruction",
|
||||
"Image reconstruction",
|
||||
"Iron group ions",
|
||||
"Iron group ions",
|
||||
"Ozone",
|
||||
"Ozone"
|
||||
],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
},
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"title": "Local stabilisation of polar order at charged antiphase boundaries in antiferroelectric (Bi0.85Nd0.15)(Ti0.1Fe0.9)O3",
|
||||
"date": "2013/08/01",
|
||||
"publicationTitle": "APL Materials",
|
||||
"volume": "1",
|
||||
"issue": "2",
|
||||
"abstractNote": "Observation of an unusual, negatively-charged antiphase boundary in (Bi0.85Nd0.15)(Ti0.1Fe0.9)O3 is reported. Aberration corrected scanning transmission electron microscopy is used to establish the full three dimensional structure of this boundary including O-ion positions to ∼±10 pm. The charged antiphase boundary stabilises tetragonally distorted regions with a strong polar ordering to either side of the boundary, with a characteristic length scale determined by the excess charge trapped at the boundary. Far away from the boundary the crystal relaxes into the well-known Nd-stabilised antiferroelectric phase.",
|
||||
"DOI": "10.1063/1.4818002",
|
||||
"pages": "021102",
|
||||
"ISSN": "2166-532X",
|
||||
"url": "http://scitation.aip.org/content/aip/journal/aplmater/1/2/10.1063/1.4818002",
|
||||
"libraryCatalog": "scitation.aip.org"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://scitation.aip.org/content/aip/proceeding/aipcp/10.1063/1.4756630",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "S.",
|
||||
"lastName": "Št'astník",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [
|
||||
"Advanced materials",
|
||||
"Insulator surfaces",
|
||||
"Materials science",
|
||||
"Numerical analysis",
|
||||
"Surface finishing"
|
||||
],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
},
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"title": "Evaluation of thermal resistance of building insulations with reflective surfaces",
|
||||
"publisher": "AIP Publishing",
|
||||
"date": "2012/09/26",
|
||||
"volume": "1479",
|
||||
"conferenceName": "NUMERICAL ANALYSIS AND APPLIED MATHEMATICS ICNAAM 2012: International Conference of Numerical Analysis and Applied Mathematics",
|
||||
"abstractNote": "The thermal resistance of advanced insulation materials, applied namely in civil engineering, containing reflective surfaces and air gaps, cannot be evaluated correctly using the valid European standards because of presence of the dominant nonlinear radiative heat transfer and other phenomena not included in the recommended computational formulae. The proper general physical analysis refers to rather complicated problems from classical thermodynamics, whose both existence theory and numerical analysis contain open questions and cannot be done in practice when the optimization of composition of insulation layers is required. This paper, coming from original experimental results, demonstrates an alternative simplified computational approach, taking into account the most important physical processes, useful in the design of modern insulation systems.",
|
||||
"DOI": "10.1063/1.4756630",
|
||||
"pages": "2204-2207",
|
||||
"url": "http://scitation.aip.org/content/aip/proceeding/aipcp/10.1063/1.4756630",
|
||||
"libraryCatalog": "scitation.aip.org",
|
||||
"proceedingsTitle": "AIP Conference Proceedings"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://scitation.aip.org/search?value1=insulation&option1=all&option12=resultCategory&value12=ResearchPublicationContent",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://scitation.aip.org/content/aip/journal/jap/49/3/10.1063/1.324716",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "L.",
|
||||
"lastName": "Berger",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [
|
||||
"Carrier generation",
|
||||
"Conduction electrons",
|
||||
"Domain walls",
|
||||
"Iron",
|
||||
"Magnetoresistance"
|
||||
],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
},
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"title": "Low‐field magnetoresistance and domain drag in ferromagnets",
|
||||
"date": "1978/03/01",
|
||||
"publicationTitle": "Journal of Applied Physics",
|
||||
"volume": "49",
|
||||
"issue": "3",
|
||||
"abstractNote": "Despite common misconceptions, domain walls are too thick to ’’scatter’’ electrons appreciably. However, electrons crossing a wall apply a torque to it, which tends to cant the wall spins. This could be used to measure the conduction electron spin polarization. Most of the low‐field resistive anomalies observed in pure Fe, Ni and Co at low temperature are caused by the Lorentz force associated with the internal field B=M s present inside each domain. The existence of low‐resistivity paths extending over many domains accounts for still unexplained magnetoresistance data in ironwhiskers. In uniaxial materials, a d.c. eddy‐current loop caused by the Hall effect runs around each wall. The field H z generated by these loops tends to ’’drag’’ the whole domain structure in the direction of the carrier drift velocity. Also, the Joule dissipation of the eddy currents manifests itself as an excess Ohmic resistance. As predicted, this excess resistance decreases as the square of the field, in amorphous Gd25Co75 films, in MnBi films, and in pure bulk cobalt, when the walls are removed by an external field. The excess resistance can also be changed by reorienting the walls.",
|
||||
"DOI": "10.1063/1.324716",
|
||||
"pages": "2156-2161",
|
||||
"ISSN": "0021-8979, 1089-7550",
|
||||
"url": "http://scitation.aip.org/content/aip/journal/jap/49/3/10.1063/1.324716",
|
||||
"libraryCatalog": "scitation.aip.org"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
136
translators/AMS Journals.js
Normal file
136
translators/AMS Journals.js
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"translatorID": "bdaac15c-b0ee-453f-9f1d-f35d00c7a994",
|
||||
"label": "AMS Journals",
|
||||
"creator": "Michael Berkowitz",
|
||||
"target": "^https?://www\\.ams\\.org/journals/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2016-09-03 20:50:31"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.match(/home\.html|\d{4}[^\/]*\/.+/)) {
|
||||
return "journalArticle";
|
||||
} else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
//This is tailored for the issue pages and may need
|
||||
//adjusted for search (when this works again).
|
||||
var rows = ZU.xpath(doc, '//div[@class="contentList"]/dl');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var href = ZU.xpathText(rows[i], './/a[contains(text(), "Abstract") or contains(text(), "Review information") or contains(text(), "Review Information")]/@href');
|
||||
var title = ZU.trimInternal(ZU.xpathText(rows[i], './/*[@class="articleTitleInAbstract" or @class="bookTitleInAbstract"]'));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url){
|
||||
//Z.debug(url)
|
||||
// We call the Embedded Metadata translator to do the actual work
|
||||
var translator = Zotero.loadTranslator("web");
|
||||
translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48");
|
||||
translator.setDocument(doc);
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
var abstract = ZU.xpathText(doc, '//p[a[contains(@id, "Abstract")]]');
|
||||
if (abstract) item.abstractNote = ZU.trimInternal(abstract).replace(/^Abstract:\s/, "");
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.ams.org/journals/jams/2012-25-01/S0894-0347-2011-00713-3/home.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Equivalences between fusion systems of finite groups of Lie type",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Carles",
|
||||
"lastName": "Broto",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Jesper",
|
||||
"lastName": "Møller",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Bob",
|
||||
"lastName": "Oliver",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012",
|
||||
"DOI": "10.1090/S0894-0347-2011-00713-3",
|
||||
"ISSN": "0894-0347, 1088-6834",
|
||||
"abstractNote": "We prove, for certain pairs of finite groups of Lie type, that the -fusion systems and are equivalent. In other words, there is an isomorphism between a Sylow -subgroup of and one of which preserves -fusion. This occurs, for example, when and for a simple Lie ``type'' , and and are prime powers, both prime to , which generate the same closed subgroup of -adic units. Our proof uses homotopy-theoretic properties of the -completed classifying spaces of and , and we know of no purely algebraic proof of this result.",
|
||||
"accessDate": "CURRENT_TIMESTAMP",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "J. Amer. Math. Soc.",
|
||||
"libraryCatalog": "www.ams.org",
|
||||
"pages": "1-20",
|
||||
"publicationTitle": "Journal of the American Mathematical Society",
|
||||
"url": "http://www.ams.org/jams/2012-25-01/S0894-0347-2011-00713-3/",
|
||||
"volume": "25",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"classifying spaces",
|
||||
"fusion systems",
|
||||
"groups of Lie type",
|
||||
"𝑝-completion"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.ams.org/journals/bull/2016-53-03/",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
313
translators/AMS MathSciNet (Legacy).js
Normal file
313
translators/AMS MathSciNet (Legacy).js
Normal file
@@ -0,0 +1,313 @@
|
||||
{
|
||||
"translatorID": "a354331-981b-43de-a61-bc26dd1be3a9",
|
||||
"label": "AMS MathSciNet (Legacy)",
|
||||
"creator": "Simon Kornblith, Sebastian Karcher",
|
||||
"target": "^https?://(mathscinet\\.)?ams\\.[^/]*/(mathscinet/2006/)?mathscinet(\\-getitem\\?|/search/(publications\\.html|publdoc\\.html))",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-07-06 17:03:34"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2015-2023 Simon Kornblith & Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
var itemType;
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (ZU.xpathText(doc, '//div[@class="headlineMenu"]/*[last()-1]')) {
|
||||
itemType = ZU.xpathText(doc, '//div[@class="headlineMenu"]/*[last()-1]');
|
||||
switch (itemType.trim().toLowerCase()) {
|
||||
case 'article':
|
||||
return "journalArticle";
|
||||
case 'book':
|
||||
return "book";
|
||||
case 'chapter':
|
||||
return "bookSection";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//div[@class="headlineText"]');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = ZU.xpathText(rows[i], './a[@class="mrnum"]/@href');
|
||||
var title = ZU.xpathText(rows[i], './span[@class="title"]');
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(await requestDocument(url));
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function scrape(doc, url = doc.location.href) {
|
||||
var host = url.match(/^(.+)\/mathscinet/);
|
||||
var pub = host[0] + "/search/publications.html?fmt=bibtex";
|
||||
var MR = ZU.xpathText(doc, '//div[@id="content"]/div[@class="doc"]/div[@class="headline"]/strong[1]');
|
||||
pub += "&pg1=MR&s1=" + MR.replace(/^MR0*/, "");
|
||||
|
||||
let text = await requestText(pub);
|
||||
var preRE = /<pre>\s*([\s\S]*?)\s*<\/pre>/g;
|
||||
var bibTeXString = "";
|
||||
|
||||
var m;
|
||||
//eslint-disable-next-line no-cond-assign
|
||||
while (m = preRE.exec(text)) {
|
||||
bibTeXString += m[1] + '\n';
|
||||
}
|
||||
|
||||
// import using BibTeX
|
||||
let translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4");
|
||||
translator.setString(bibTeXString);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
// Fix/fetch MR number
|
||||
var mrnumber;
|
||||
if (item.extra) {
|
||||
item.extra = item.extra.replace(/^MR:\s*(?:MR)?(\d+).*/gm,
|
||||
function (m, mr) {
|
||||
mrnumber = mr;
|
||||
return 'MR: ' + mr;
|
||||
});
|
||||
}
|
||||
|
||||
if (mrnumber) {
|
||||
url = 'https://mathscinet.ams.org/mathscinet-getitem?mr=' + mrnumber;
|
||||
}
|
||||
item.attachments.push({ title: "MathSciNet Snapshot", document: doc });
|
||||
item.url = url;
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/search/publications.html?pg4=AUCN&s4=Karcher&co4=AND&pg5=TI&s5=&co5=AND&pg6=PC&s6=&co6=AND&pg7=ALLF&s7=&co7=AND&Submit=Search&dr=all&yrop=eq&arg3=&yearRangeFirst=&yearRangeSecond=&pg8=ET&s8=All&review_format=html",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/2006/mathscinet/search/publdoc.html?arg3=&co4=AND&co5=AND&co6=AND&co7=AND&dr=all&pg4=MR&pg5=TI&pg6=PC&pg7=ALLF&pg8=ET&r=1&review_format=html&s4=3004573",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Extrapolation of stable random fields",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Wolfgang",
|
||||
"lastName": "Karcher",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Elena",
|
||||
"lastName": "Shmileva",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Evgeny",
|
||||
"lastName": "Spodarev",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2013",
|
||||
"DOI": "10.1016/j.jmva.2012.11.004",
|
||||
"ISSN": "0047-259X",
|
||||
"extra": "MR: 3004573",
|
||||
"itemID": "MR3004573",
|
||||
"journalAbbreviation": "J. Multivariate Anal.",
|
||||
"libraryCatalog": "AMS MathSciNet (Legacy)",
|
||||
"pages": "516–536",
|
||||
"publicationTitle": "Journal of Multivariate Analysis",
|
||||
"url": "https://mathscinet.ams.org/mathscinet-getitem?mr=3004573",
|
||||
"volume": "115",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "MathSciNet Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/search/publications.html?pg1=ISSI&s1=308850",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/2006/mathscinet/search/publdoc.html?arg3=&co4=AND&co5=AND&co6=AND&co7=AND&dr=all&pg4=MR&pg5=TI&pg6=PC&pg7=ALLF&pg8=ET&r=1&review_format=html&s4=2767535",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "On implementation of the Markov chain Monte Carlo stochastic approximation algorithm",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Yihua",
|
||||
"lastName": "Jiang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Peter",
|
||||
"lastName": "Karcher",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Yuedong",
|
||||
"lastName": "Wang",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"bookTitle": "Advances in directional and linear statistics",
|
||||
"extra": "MR: 2767535\nDOI: 10.1007/978-3-7908-2628-9_7",
|
||||
"itemID": "MR2767535",
|
||||
"libraryCatalog": "AMS MathSciNet (Legacy)",
|
||||
"pages": "97–111",
|
||||
"publisher": "Physica-Verlag/Springer, Heidelberg",
|
||||
"url": "https://mathscinet.ams.org/mathscinet-getitem?mr=2767535",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "MathSciNet Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/2006/mathscinet/search/publdoc.html?arg3=&co4=AND&co5=AND&co6=AND&co7=AND&dr=all&pg4=MR&pg5=TI&pg6=PC&pg7=ALLF&pg8=ET&r=1&review_format=html&s4=2663710",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Advances in directional and linear statistics",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Martin T.",
|
||||
"lastName": "Wells",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Ashis",
|
||||
"lastName": "SenGupta",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"ISBN": "9783790826272",
|
||||
"extra": "MR: 2663710\nDOI: 10.1007/978-3-7908-2628-9",
|
||||
"itemID": "MR2663710",
|
||||
"libraryCatalog": "AMS MathSciNet (Legacy)",
|
||||
"numPages": "xiv+321",
|
||||
"publisher": "Physica-Verlag/Springer, Heidelberg",
|
||||
"url": "https://mathscinet.ams.org/mathscinet-getitem?mr=2663710",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "MathSciNet Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "<p>A Festschrift for Sreenivasa Rao Jammalamadaka</p>"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet-getitem?mr=1346201",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Sommation des séries divergentes",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Bernard",
|
||||
"lastName": "Malgrange",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1995",
|
||||
"ISSN": "0723-0869",
|
||||
"extra": "MR: 1346201",
|
||||
"issue": "2-3",
|
||||
"itemID": "MR1346201",
|
||||
"journalAbbreviation": "Exposition. Math.",
|
||||
"libraryCatalog": "AMS MathSciNet",
|
||||
"pages": "163–222",
|
||||
"publicationTitle": "Expositiones Mathematicae. International Journal",
|
||||
"url": "https://mathscinet.ams.org/mathscinet-getitem?mr=1346201",
|
||||
"volume": "13",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "MathSciNet Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
288
translators/AMS MathSciNet.js
Normal file
288
translators/AMS MathSciNet.js
Normal file
@@ -0,0 +1,288 @@
|
||||
{
|
||||
"translatorID": "16f2936d-a059-40e8-a48e-f0acbb1e93e0",
|
||||
"label": "AMS MathSciNet",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://mathscinet\\.ams\\.[^/]*/mathscinet/(article\\?|publications-search\\?|author\\?)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-07-14 11:04:37"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2023 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (url.includes("article?mr=")) {
|
||||
if (doc.querySelector('div[data-testid="ap-book-isbn"]')) {
|
||||
if (doc.querySelector('div[data-testid="ap-book-collection"] a.router-link-active')) return "bookSection";
|
||||
else return "book";
|
||||
}
|
||||
else return "journalArticle";
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.results div.font-weight-bold');
|
||||
for (let row of rows) {
|
||||
let href = attr(row, 'a', 'href');
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(await requestDocument(url));
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
async function scrape(doc, url = doc.location.href) {
|
||||
let id = url.match(/\?mr=(\d+)/);
|
||||
if (!id) {
|
||||
throw new Error("No MR ID, can't proceed");
|
||||
}
|
||||
let bibJSONUrl = '/mathscinet/api/publications/format?formats=bib&ids=' + id[1];
|
||||
// Z.debug(bibJSONUrl)
|
||||
let bibJSON = await requestText(bibJSONUrl);
|
||||
// Z.debug(bibJSON)
|
||||
bibJSON = JSON.parse(bibJSON);
|
||||
let bibTex = bibJSON[0].bib;
|
||||
// Z.debug(bibTex)
|
||||
let translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator('9cb70025-a888-4a29-a210-93ec52da40d4');
|
||||
translator.setString(bibTex);
|
||||
translator.setHandler('itemDone', (_obj, item) => {
|
||||
item.url = ""; // these aren't full text URLs
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/article?mr=3004573",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Extrapolation of stable random fields",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Wolfgang",
|
||||
"lastName": "Karcher",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Elena",
|
||||
"lastName": "Shmileva",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Evgeny",
|
||||
"lastName": "Spodarev",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2013",
|
||||
"DOI": "10.1016/j.jmva.2012.11.004",
|
||||
"ISSN": "0047-259X,1095-7243",
|
||||
"extra": "MR: 3004573",
|
||||
"itemID": "MR3004573",
|
||||
"journalAbbreviation": "J. Multivariate Anal.",
|
||||
"libraryCatalog": "AMS MathSciNet",
|
||||
"pages": "516–536",
|
||||
"publicationTitle": "Journal of Multivariate Analysis",
|
||||
"volume": "115",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/article?mr=2767535",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "On implementation of the Markov chain Monte Carlo stochastic approximation algorithm",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Yihua",
|
||||
"lastName": "Jiang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Peter",
|
||||
"lastName": "Karcher",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Yuedong",
|
||||
"lastName": "Wang",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"ISBN": "9783790826272",
|
||||
"bookTitle": "Advances in directional and linear statistics",
|
||||
"extra": "MR: 2767535\nDOI: 10.1007/978-3-7908-2628-9_7",
|
||||
"itemID": "MR2767535",
|
||||
"libraryCatalog": "AMS MathSciNet",
|
||||
"pages": "97–111",
|
||||
"publisher": "Physica-Verlag/Springer, Heidelberg",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/article?mr=2663710",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Advances in directional and linear statistics",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Martin T.",
|
||||
"lastName": "Wells",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Ashis",
|
||||
"lastName": "SenGupta",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"ISBN": "9783790826272",
|
||||
"extra": "MR: 2663710\nDOI: 10.1007/978-3-7908-2628-9",
|
||||
"itemID": "MR2663710",
|
||||
"libraryCatalog": "AMS MathSciNet",
|
||||
"numPages": "xiv+321",
|
||||
"publisher": "Physica-Verlag/Springer, Heidelberg",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "<p>A Festschrift for Sreenivasa Rao Jammalamadaka</p>"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/article?mr=1346201",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Sommation des séries divergentes",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Bernard",
|
||||
"lastName": "Malgrange",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1995",
|
||||
"ISSN": "0723-0869",
|
||||
"extra": "MR: 1346201",
|
||||
"issue": "2-3",
|
||||
"itemID": "MR1346201",
|
||||
"journalAbbreviation": "Exposition. Math.",
|
||||
"libraryCatalog": "AMS MathSciNet",
|
||||
"pages": "163–222",
|
||||
"publicationTitle": "Expositiones Mathematicae. International Journal",
|
||||
"volume": "13",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/publications-search?query=karcher&page=1&size=20&sort=newest&facets=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://mathscinet.ams.org/mathscinet/author?authorId=98350",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
915
translators/APA PsycNET.js
Normal file
915
translators/APA PsycNET.js
Normal file
@@ -0,0 +1,915 @@
|
||||
{
|
||||
"translatorID": "1e1e35be-6264-45a0-ad2e-7212040eb984",
|
||||
"label": "APA PsycNet",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(psycnet|doi)\\.apa\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-03-10 19:48:42"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2017-2021 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// Some test cases are only working in the browser with some AJAX loading:
|
||||
// 1) http://psycnet.apa.org/PsycBOOKS/toc/10023
|
||||
// 2) follow a link in a search
|
||||
// 3) search page
|
||||
// 4) journal page
|
||||
//
|
||||
// Moreover, after three test cases you have to load an psycnet url in the browser
|
||||
// to avoid some automatic download detection.
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/search/display?')
|
||||
|| url.includes('/record/')
|
||||
|| url.includes('/fulltext/')
|
||||
|| url.includes('/buy/')
|
||||
|| url.includes('/doiLanding?doi=')) {
|
||||
if (attr(doc, 'meta[name="og:type"]', 'content') == 'Chapter') {
|
||||
return "bookSection";
|
||||
}
|
||||
else if (doc.getElementById('bookchapterstoc')) {
|
||||
return "book";
|
||||
}
|
||||
else {
|
||||
return "journalArticle";
|
||||
}
|
||||
}
|
||||
if (url.includes('/search/results?') || url.includes('/journal/')) { // && getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('a.article-title');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(await requestDocument(url), url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function scrape(doc, url) {
|
||||
var uid = await getIds(doc, url.replace(/#.*$/, ''));
|
||||
if (!uid) {
|
||||
throw new Error("ID not found");
|
||||
}
|
||||
|
||||
var productCode;
|
||||
var db = doc.getElementById('database') || doc.querySelector('doi-landing .meta span');
|
||||
if (db) {
|
||||
db = db.parentNode.textContent.toLowerCase();
|
||||
if (db.includes('psycarticles')) {
|
||||
productCode = 'PA';
|
||||
}
|
||||
else if (db.includes('psycbooks')) {
|
||||
productCode = 'PB';
|
||||
}
|
||||
else if (db.includes('psycinfo')) {
|
||||
productCode = 'PI';
|
||||
}
|
||||
else if (db.includes('psycextra')) {
|
||||
productCode = 'PE';
|
||||
}
|
||||
}
|
||||
else {
|
||||
// default, e.g. if page is not completely loaded
|
||||
productCode = 'PI';
|
||||
}
|
||||
|
||||
var postData = JSON.stringify({
|
||||
api: "record.exportRISFile",
|
||||
params: {
|
||||
UIDList: [{ UID: uid, ProductCode: productCode }],
|
||||
exportType: "zotero"
|
||||
}
|
||||
});
|
||||
var headers = {
|
||||
'Content-Type': 'application/json',
|
||||
Referer: url
|
||||
};
|
||||
|
||||
let apiReturnData = await requestJSON('/api/request/record.exportRISFile', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: postData,
|
||||
});
|
||||
|
||||
if (apiReturnData && apiReturnData.isRisExportCreated) {
|
||||
// 2. Download the requested data (after step 1)
|
||||
let data = await requestText('/ris/download');
|
||||
if (data.includes('Content: application/x-research-info-systems')) {
|
||||
await processRIS(data, doc);
|
||||
}
|
||||
else {
|
||||
// sometimes (e.g. during testing) the data is not loaded
|
||||
// but a meta redirect to a captcha page mentioning
|
||||
Z.debug("The APA anomaly detection think we are doing "
|
||||
+ "something unusual (sigh). Please reload any APA page e.g. "
|
||||
+ "http://psycnet.apa.org/ in your browser and try again.");
|
||||
Z.debug(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function processRIS(text, doc) {
|
||||
let pdfURL = attr(doc, 'a[href*="/fulltext"]', 'href');
|
||||
if (!pdfURL) {
|
||||
Zotero.debug('Fetching institution ID for PDF');
|
||||
try {
|
||||
let uid = doc.location.pathname.match(/\/(?:record|fulltext)\/([^/.]+)/)[1];
|
||||
let { institution } = await requestJSON(
|
||||
'https://psycnet.apa.org/api/request/institution.getInstitutionByIpAddress', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
api: 'institution.getInstitutionByIpAddress',
|
||||
params: { uid }
|
||||
})
|
||||
}
|
||||
);
|
||||
if (institution) {
|
||||
pdfURL = `https://psycnet.apa.org/fulltext/${uid}.pdf?auth_id=${institution.ringGoldId}&returnUrl=${encodeURIComponent(doc.location.href)}`;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug('Failed to fetch institution ID');
|
||||
Zotero.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
item.title = cleanTitle(item.title);
|
||||
if (item.publication) item.publication = cleanTitle(item.publication);
|
||||
if (item.bookTitle) item.bookTitle = cleanTitle(item.bookTitle);
|
||||
if (item.series) item.series = cleanTitle(item.series);
|
||||
if (item.place) item.place = item.place.replace(/\s+/g, ' ');
|
||||
if (item.ISSN) item.ISSN = ZU.cleanISSN(item.ISSN);
|
||||
if (item.pages && item.pages.includes('No Pagination Specified')) {
|
||||
delete item.pages;
|
||||
}
|
||||
for (var i = 0; i < item.tags.length; i++) {
|
||||
item.tags[i] = item.tags[i].replace(/^\*/, '');
|
||||
}
|
||||
if (pdfURL) {
|
||||
item.attachments.push({
|
||||
url: pdfURL,
|
||||
title: "Full Text PDF",
|
||||
mimeType: "application/pdf"
|
||||
});
|
||||
}
|
||||
else {
|
||||
item.attachments.push({
|
||||
title: "Snapshot",
|
||||
document: doc
|
||||
});
|
||||
}
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
|
||||
// try to figure out ids that we can use for fetching RIS
|
||||
async function getIds(doc, url) {
|
||||
Z.debug('Finding IDs in ' + url);
|
||||
// try to extract uid from the table
|
||||
var uid = text(doc, '#uid + dd') || text(doc, '#bookUID');
|
||||
if (uid) {
|
||||
return uid;
|
||||
}
|
||||
|
||||
// try to extract uid from the url
|
||||
if (url.includes('/record/') || url.includes('/fulltext/')) {
|
||||
let m = url.match(/\/(?:record|fulltext)\/([\d-]*)/);
|
||||
if (m && m[1]) {
|
||||
return m[1];
|
||||
}
|
||||
}
|
||||
|
||||
// DOI landing pages include a link to the /record/ page
|
||||
if (url.includes('/doiLanding') && doc.querySelector('.title > a')) {
|
||||
let m = attr(doc, '.title > a', 'href').match(/\/record\/([\d-]*)/);
|
||||
if (m && m[1]) {
|
||||
return m[1];
|
||||
}
|
||||
}
|
||||
|
||||
/** on the book pages, we can find the UID in
|
||||
* the Front matter and Back matter links
|
||||
*/
|
||||
if (url.includes('/PsycBOOKS/')) {
|
||||
var link = attr(doc, '.bookMatterLinks a', 'href');
|
||||
if (link) {
|
||||
let m = link.match(/\/fulltext\/([^&]+?)-(?:FRM|BKM)/i);
|
||||
if (m && m[1]) {
|
||||
return m[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** for pages with buy.optionToBuy
|
||||
* we can fetch the id from the url
|
||||
* alternatively, the id is in a javascript section (this is messy)
|
||||
*/
|
||||
if (url.includes('/buy/')) {
|
||||
let m = url.match(/\/buy\/([\d-]*)/);
|
||||
if (m) {
|
||||
return m[1];
|
||||
}
|
||||
|
||||
m = doc.documentElement.textContent.match(/\bitemUID\s*=\s*(['"])(.*?)\1/);
|
||||
if (m && m[2]) {
|
||||
return m[2];
|
||||
}
|
||||
}
|
||||
|
||||
/** check for a purchase link
|
||||
*/
|
||||
var purchaseLink = attr(doc, 'a.purchase[href*="/buy/"]', 'href');
|
||||
if (purchaseLink) {
|
||||
let m = purchaseLink.match(/\/buy\/([\d-]*)/);
|
||||
return m[1];
|
||||
}
|
||||
|
||||
// Worst-case fallback if we're on a search result page: make some requests
|
||||
if (url.includes('/search/display?')) {
|
||||
let searchParams = new URL(url).searchParams;
|
||||
let id = searchParams.get('id');
|
||||
if (id) {
|
||||
let searchObj = await requestJSON('/api/request/recentSearch.get', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
api: 'recentSearch.get',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
});
|
||||
let recordId = parseInt(searchParams.get('recordId'));
|
||||
let recordWithCount = await requestJSON('/api/request/search.recordWithCount', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
api: 'search.recordWithCount',
|
||||
params: {
|
||||
...searchObj,
|
||||
responseParameters: {
|
||||
...searchObj.responseParameters,
|
||||
start: recordId - 1,
|
||||
rows: 1
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
return recordWithCount.results.result.doc[0].UID;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function cleanTitle(title) {
|
||||
// delete point at the end of a title,
|
||||
// except it looks like an abbreviation
|
||||
if (/\b\w\.$/.test(title)) {
|
||||
return title;
|
||||
}
|
||||
else {
|
||||
return title.replace(/\.$/, '');
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/2004-16644-010",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Neuropsychology of Adults With Attention-Deficit/Hyperactivity Disorder: A Meta-Analytic Review",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Hervey",
|
||||
"firstName": "Aaron S.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Epstein",
|
||||
"firstName": "Jeffery N.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Curry",
|
||||
"firstName": "John F.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2004",
|
||||
"DOI": "10.1037/0894-4105.18.3.485",
|
||||
"ISSN": "1931-1559",
|
||||
"abstractNote": "A comprehensive, empirically based review of the published studies addressing neuropsychological performance in adults diagnosed with attention-deficit/hyperactivity disorder (ADHD) was conducted to identify patterns of performance deficits. Findings from 33 published studies were submitted to a meta-analytic procedure producing sample-size-weighted mean effect sizes across test measures. Results suggest that neuropsychological deficits are expressed in adults with ADHD across multiple domains of functioning, with notable impairments in attention, behavioral inhibition, and memory, whereas normal performance is noted in simple reaction time. Theoretical and developmental considerations are discussed, including the role of behavioral inhibition and working memory impairment. Future directions for research based on these findings are highlighted, including further exploration of specific impairments and an emphasis on particular tests and testing conditions. (PsycInfo Database Record (c) 2022 APA, all rights reserved)",
|
||||
"issue": "3",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "485-503",
|
||||
"publicationTitle": "Neuropsychology",
|
||||
"shortTitle": "Neuropsychology of Adults With Attention-Deficit/Hyperactivity Disorder",
|
||||
"volume": "18",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Attention Deficit Disorder with Hyperactivity"
|
||||
},
|
||||
{
|
||||
"tag": "Behavioral Inhibition"
|
||||
},
|
||||
{
|
||||
"tag": "Empirical Methods"
|
||||
},
|
||||
{
|
||||
"tag": "Experimentation"
|
||||
},
|
||||
{
|
||||
"tag": "Hyperactivity"
|
||||
},
|
||||
{
|
||||
"tag": "Inhibition (Personality)"
|
||||
},
|
||||
{
|
||||
"tag": "Neuropsychological Assessment"
|
||||
},
|
||||
{
|
||||
"tag": "Neuropsychology"
|
||||
},
|
||||
{
|
||||
"tag": "Reaction Time"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/1956-05944-001",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Factor analysis of meaning",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Osgood",
|
||||
"firstName": "Charles E.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Suci",
|
||||
"firstName": "George J.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1955",
|
||||
"DOI": "10.1037/h0043965",
|
||||
"ISSN": "0022-1015",
|
||||
"abstractNote": "Two factor analytic studies of meaningful judgments based upon the same sample of 50 bipolar descriptive scales are reported. Both analyses reveal three major connotative factors: evaluation, potency, and activity. These factors appear to be independent dimensions of the semantic space within which the meanings of concepts may be specified. (PsycINFO Database Record (c) 2016 APA, all rights reserved)",
|
||||
"issue": "5",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "325-338",
|
||||
"publicationTitle": "Journal of Experimental Psychology",
|
||||
"volume": "50",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Factor Analysis"
|
||||
},
|
||||
{
|
||||
"tag": "Factor Structure"
|
||||
},
|
||||
{
|
||||
"tag": "Judgment"
|
||||
},
|
||||
{
|
||||
"tag": "Meaning"
|
||||
},
|
||||
{
|
||||
"tag": "Semantics"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/1992-98221-010",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Catatonia: Tonic immobility: Evolutionary underpinnings of human catalepsy and catatonia",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Gallup Jr.",
|
||||
"firstName": "Gordon G.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Maser",
|
||||
"firstName": "Jack D.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1977",
|
||||
"ISBN": "9780716703686 9780716703679",
|
||||
"abstractNote": "tonic immobility [animal hypnosis] might be a useful laboratory analog or research model for catatonia / we have been collaborating on an interdisciplinary program of research in an effort to pinpoint the behavioral antecedents and biological bases for tonic immobility / attempt to briefly summarize our findings, and . . . discuss the implications of these data in terms of the model characteristics of tonic immobility / hypnosis / catatonia, catalepsy, and cataplexy / tonic immobility as a model for catatonia / fear potentiation / fear alleviation / fear or arousal / learned helplessness / neurological correlates / pharmacology and neurochemistry / genetic underpinnings / evolutionary considerations / implications for human psychopathology (PsycInfo Database Record (c) 2022 APA, all rights reserved)",
|
||||
"bookTitle": "Psychopathology: Experimental models",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "334-357",
|
||||
"place": "New York, NY, US",
|
||||
"publisher": "W H Freeman/Times Books/ Henry Holt & Co",
|
||||
"series": "A series of books in psychology",
|
||||
"shortTitle": "Catatonia",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Animal Models"
|
||||
},
|
||||
{
|
||||
"tag": "Catalepsy"
|
||||
},
|
||||
{
|
||||
"tag": "Catatonia"
|
||||
},
|
||||
{
|
||||
"tag": "Fear"
|
||||
},
|
||||
{
|
||||
"tag": "Genetics"
|
||||
},
|
||||
{
|
||||
"tag": "Neurology"
|
||||
},
|
||||
{
|
||||
"tag": "Pharmacology"
|
||||
},
|
||||
{
|
||||
"tag": "Tonic Immobility"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/2004-16329-000?doi=1",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "The abnormal personality: A textbook",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "White",
|
||||
"firstName": "Robert W.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1948",
|
||||
"abstractNote": "The author's intent is to write about abnormal people in a way that will be valuable and interesting to students new to the subject. A first course in abnormal psychology is not intended to train specialists. Its goal is more general: it should provide the student with the opportunity to whet his interest, expand his horizons, register a certain body of new facts, and relate this to the rest of his knowledge about mankind. I have tried to present the subject in such a way as to emphasize its usefulness to all students of human nature. I have tried the experiment of writing two introductory chapters, one historical and the other clinical. This reflects my desire to set the subject-matter in a broad perspective and at the same time to anchor it in concrete fact. Next comes a block of six chapters designed to set forth the topics of maladjustment and neurosis. The two chapters on psychotherapy complete the more purely psychological or developmental part of the work. In the final chapter the problem of disordered personalities is allowed to expand to its full social dimensions. Treatment, care, and prevention call for social effort and social organization. I have sought to show some of the lines, both professional and nonprofessional, along which this effort can be expended. (PsycInfo Database Record (c) 2022 APA, all rights reserved)",
|
||||
"extra": "DOI: 10.1037/10023-000",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"numPages": "x, 617",
|
||||
"place": "New York, NY, US",
|
||||
"publisher": "Ronald Press Company",
|
||||
"series": "The abnormal personality: A textbook",
|
||||
"shortTitle": "The abnormal personality",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Abnormal Psychology"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/fulltext/2022-40433-002.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Expertise in emotion: A scoping review and unifying framework for individual differences in the mental representation of emotional experience",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Hoemann",
|
||||
"firstName": "Katie",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Nielson",
|
||||
"firstName": "Catie",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Yuen",
|
||||
"firstName": "Ashley",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Gurera",
|
||||
"firstName": "J. W.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Quigley",
|
||||
"firstName": "Karen S.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Barrett",
|
||||
"firstName": "Lisa Feldman",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021",
|
||||
"DOI": "10.1037/bul0000327",
|
||||
"ISSN": "1939-1455",
|
||||
"abstractNote": "Expertise refers to outstanding skill or ability in a particular domain. In the domain of emotion, expertise refers to the observation that some people are better at a range of competencies related to understanding and experiencing emotions, and these competencies may help them lead healthier lives. These individual differences are represented by multiple constructs including emotional awareness, emotional clarity, emotional complexity, emotional granularity, and emotional intelligence. These constructs derive from different theoretical perspectives, highlight different competencies, and are operationalized and measured in different ways. The full set of relationships between these constructs has not yet been considered, hindering scientific progress and the translation of findings to aid mental and physical well-being. In this article, we use a scoping review procedure to integrate these constructs within a shared conceptual space. Scoping reviews provide a principled means of synthesizing large and diverse literature in a transparent fashion, enabling the identification of similarities as well as gaps and inconsistencies across constructs. Using domain-general accounts of expertise as a guide, we build a unifying framework for expertise in emotion and apply this to constructs that describe how people understand and experience their own emotions. Our approach offers opportunities to identify potential mechanisms of expertise in emotion, encouraging future research on those mechanisms and on educational or clinical interventions. (PsycInfo Database Record (c) 2023 APA, all rights reserved)",
|
||||
"issue": "11",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "1159-1183",
|
||||
"publicationTitle": "Psychological Bulletin",
|
||||
"shortTitle": "Expertise in emotion",
|
||||
"volume": "147",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Alexithymia"
|
||||
},
|
||||
{
|
||||
"tag": "Awareness"
|
||||
},
|
||||
{
|
||||
"tag": "Conceptual Imagery"
|
||||
},
|
||||
{
|
||||
"tag": "Creativity"
|
||||
},
|
||||
{
|
||||
"tag": "Emotional Intelligence"
|
||||
},
|
||||
{
|
||||
"tag": "Emotions"
|
||||
},
|
||||
{
|
||||
"tag": "Experience Level"
|
||||
},
|
||||
{
|
||||
"tag": "Experiences (Events)"
|
||||
},
|
||||
{
|
||||
"tag": "Individual Differences"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://psycnet.apa.org/buy/2004-16329-002",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Clinical introduction: Examples of disordered personalities",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "White",
|
||||
"firstName": "Robert W.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1948",
|
||||
"abstractNote": "This chapter examines some representative examples of disordered personalities. The reader should be forewarned that the five cases described here will be frequently referred to in later chapters of the book. They display to advantage many of the problems and principles that will occupy us when we undertake to build up a systematic account of abnormal psychology. It will be assumed that the cases given in this chapter are well remembered, and with this in mind the reader should not only go through them but study and compare them rather carefully. The main varieties of disordered personalities and student attitudes toward abnormality are discussed before the case histories are presented. (PsycINFO Database Record (c) 2016 APA, all rights reserved)",
|
||||
"bookTitle": "The abnormal personality: A textbook",
|
||||
"extra": "DOI: 10.1037/10023-002",
|
||||
"libraryCatalog": "APA PsycNET",
|
||||
"pages": "54-101",
|
||||
"place": "New York, NY, US",
|
||||
"publisher": "Ronald Press Company",
|
||||
"shortTitle": "Clinical introduction",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Abnormal Psychology"
|
||||
},
|
||||
{
|
||||
"tag": "Personality Disorders"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/2010-19350-001",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Predicting behavior in economic games by looking through the eyes of the players",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Mellers",
|
||||
"firstName": "Barbara A.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Haselhuhn",
|
||||
"firstName": "Michael P.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Tetlock",
|
||||
"firstName": "Philip E.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Silva",
|
||||
"firstName": "José C.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Isen",
|
||||
"firstName": "Alice M.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2010",
|
||||
"DOI": "10.1037/a0020280",
|
||||
"ISSN": "1939-2222",
|
||||
"abstractNote": "Social scientists often rely on economic experiments such as ultimatum and dictator games to understand human cooperation. Systematic deviations from economic predictions have inspired broader conceptions of self-interest that incorporate concerns for fairness. Yet no framework can describe all of the major results. We take a different approach by asking players directly about their self-interest—defined as what they want to do (pleasure-maximizing options). We also ask players directly about their sense of fairness—defined as what they think they ought to do (fairness-maximizing options). Player-defined measures of self-interest and fairness predict (a) the majority of ultimatum-game and dictator-game offers, (b) ultimatum-game rejections, (c) exiting behavior (i.e., escaping social expectations to cooperate) in the dictator game, and (d) who cooperates more after a positive mood induction. Adopting the players' perspectives of self-interest and fairness permits better predictions about who cooperates, why they cooperate, and when they punish noncooperators. (PsycINFO Database Record (c) 2016 APA, all rights reserved)",
|
||||
"issue": "4",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "743-755",
|
||||
"publicationTitle": "Journal of Experimental Psychology: General",
|
||||
"volume": "139",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Behavior"
|
||||
},
|
||||
{
|
||||
"tag": "Cooperation"
|
||||
},
|
||||
{
|
||||
"tag": "Economics"
|
||||
},
|
||||
{
|
||||
"tag": "Emotional States"
|
||||
},
|
||||
{
|
||||
"tag": "Games"
|
||||
},
|
||||
{
|
||||
"tag": "Prediction"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/2010-09295-002",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "The self in vocational psychology: Object, subject, and project",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Savickas",
|
||||
"firstName": "Mark L.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"ISBN": "9781433808616 9781433808623",
|
||||
"abstractNote": "In this chapter, I seek to redress vocational psychology’s inattention to the self and address the ambiguity of the meaning of self. To begin, I offer a chronological survey of vocational psychology’s three main views of human singularity. During succeeding historical eras, different aspects of human singularity interested vocational psychologists, so they developed a new set of terms and concepts to deal with shifts in the meaning of individuality. Over time, vocational psychology developed what Kuhn (2000) referred to as language communities, each with its own paradigm for understanding the self and vocational behavior. Because the self is fundamentally ambiguous, adherents to each paradigm describe it with an agreed on language and metaphors. Thus, each paradigm has a textual tradition, or way of talking about the self. As readers shall see, when they talk about individuals, differentialists use the language of personality, developmentalists use the language of personhood, and constructionists use the language of identity. (PsycInfo Database Record (c) 2024 APA, all rights reserved)",
|
||||
"bookTitle": "Developing self in work and career: Concepts, cases, and contexts",
|
||||
"extra": "DOI: 10.1037/12348-002",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"pages": "17-33",
|
||||
"place": "Washington, DC, US",
|
||||
"publisher": "American Psychological Association",
|
||||
"shortTitle": "The self in vocational psychology",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Occupational Guidance"
|
||||
},
|
||||
{
|
||||
"tag": "Personality"
|
||||
},
|
||||
{
|
||||
"tag": "Self-Concept"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://psycnet.apa.org/record/2025-80032-001?doi=1",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Linking adolescent bullying perpetration with adult fertility: Two preliminary studies",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Volk",
|
||||
"firstName": "Anthony A.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Brazil",
|
||||
"firstName": "Kristopher J.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Dane",
|
||||
"firstName": "Andrew V.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Vaillancourt",
|
||||
"firstName": "Tracy",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Al-Jbouri",
|
||||
"firstName": "Elizabeth",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Farrell",
|
||||
"firstName": "Ann H.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2025",
|
||||
"DOI": "10.1037/ebs0000374",
|
||||
"ISSN": "2330-2933",
|
||||
"abstractNote": "Researchers have suggested that bullying perpetration is, at least in part, an evolved adaptation. A key prediction of this evolutionary perspective is that bullying facilitates the transmission of genes from one generation to the next. To date, only one study (using a limited measure of bullying) has examined the link between adolescent bullying and adult fertility, showing a positive association between adolescent bullying and number of children in adulthood. We sought to replicate and expand this unique finding using a more robust measure of adolescent bullying and young adults’ parental status in a prospective longitudinal study of Canadians (Study 1), along with an MTurk study of retrospective adolescent bullying and current adult fertility (Study 2). In support of an evolutionary theory of bullying, we found that higher bullying was associated with having children in young adulthood (ages 23 and/or 24 years, Study 1) and that retrospective reports of adolescent bullying were associated with having more children in adulthood (Study 2). Overall, our studies offer additional support for the idea that adolescent bullying is, at least in part, an evolutionary adaptation that may help individuals to later pass on their genes to future generations through enhanced reproductive and perhaps parental effort. Although needing replication, our data highlight the importance of considering reproductive outcomes when designing future bullying research or interventions. (PsycInfo Database Record (c) 2025 APA, all rights reserved)",
|
||||
"libraryCatalog": "APA PsycNet",
|
||||
"publicationTitle": "Evolutionary Behavioral Sciences",
|
||||
"shortTitle": "Linking adolescent bullying perpetration with adult fertility",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Adaptation"
|
||||
},
|
||||
{
|
||||
"tag": "Adolescent Characteristics"
|
||||
},
|
||||
{
|
||||
"tag": "Bullying"
|
||||
},
|
||||
{
|
||||
"tag": "Fertility"
|
||||
},
|
||||
{
|
||||
"tag": "Genes"
|
||||
},
|
||||
{
|
||||
"tag": "Parenthood Status"
|
||||
},
|
||||
{
|
||||
"tag": "Theory of Evolution"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
132
translators/APN.ru.js
Normal file
132
translators/APN.ru.js
Normal file
File diff suppressed because one or more lines are too long
204
translators/APS-Physics.js
Normal file
204
translators/APS-Physics.js
Normal file
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"translatorID": "f318ab1e-71c6-4f67-8ac3-4b1144e5bf4e",
|
||||
"label": "APS-Physics",
|
||||
"creator": "Will Shanks and Abe Jellinek",
|
||||
"target": "^https?://(www\\.)?(physics)\\.aps\\.org/",
|
||||
"minVersion": "2.1.9",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-31 22:13:29"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.querySelector('meta[name="citation_title"]')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h3.feed-item-title > a[href*="/articles/"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
if (!item.DOI) {
|
||||
item.DOI = ZU.cleanDOI(attr(doc, 'a[href*="link.aps.org/doi"]', 'href'));
|
||||
}
|
||||
|
||||
// both snapshot and PDF: HTML is commentary, PDF is article
|
||||
item.attachments = [];
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
item.attachments.push({
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf',
|
||||
url: `https://physics.aps.org/articles/pdf/${item.DOI}`
|
||||
});
|
||||
|
||||
item.libraryCatalog = 'APS Physics';
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.addCustomFields({
|
||||
'citation_pages': 'pages'
|
||||
});
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://physics.aps.org/articles/v5/100",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Surface Folds Make Tears and Chips",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Sissi de",
|
||||
"lastName": "Beer",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Martin H.",
|
||||
"lastName": "Müser",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012/09/04",
|
||||
"DOI": "10.1103/PhysRevLett.109.106001",
|
||||
"abstractNote": "Fluidlike folding instabilities of solid surfaces complicate the machining of metals to perfection",
|
||||
"language": "en",
|
||||
"libraryCatalog": "APS Physics",
|
||||
"pages": "100",
|
||||
"publicationTitle": "Physics",
|
||||
"rights": "©2012 by the American Physical Society. All rights reserved.",
|
||||
"url": "https://physics.aps.org/articles/v5/100",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://physics.aps.org/articles/v5/101",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Measuring the Smallest Trickle",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Michael",
|
||||
"lastName": "Schirber",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012/09/10",
|
||||
"DOI": "10.1103/PhysRevLett.109.118302",
|
||||
"abstractNote": "Researchers used a nanoscale tunnel in a silicon chip to measure a flow rate of a few picoliters per minute, which is smaller than any previous observation.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "APS Physics",
|
||||
"pages": "101",
|
||||
"publicationTitle": "Physics",
|
||||
"rights": "©2012 by the American Physical Society. All rights reserved.",
|
||||
"url": "https://physics.aps.org/articles/v5/101",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://physics.aps.org/browse/?page=1&per_page=10&sort=relevance&q=test",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
542
translators/APS.js
Normal file
542
translators/APS.js
Normal file
@@ -0,0 +1,542 @@
|
||||
{
|
||||
"translatorID": "2c310a37-a4dd-48d2-82c9-bd29c53c1c76",
|
||||
"label": "APS",
|
||||
"creator": "Aurimas Vinckevicius and Abe Jellinek",
|
||||
"target": "^https?://journals\\.aps\\.org/([^/]+/(abstract|supplemental|references|cited-by|issues)/|search(\\?|/))",
|
||||
"minVersion": "3.0.12",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-11-21 18:50:09"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2024 Aurimas Vinckevicius and Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.querySelector('#article-body #export-article-dialog')
|
||||
|| doc.querySelector('main#main') && /^\/[^/]+\/(abstract|supplemental|references|cited-by)\//.test(new URL(url).pathname)) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('#issue-body .headline .title > a');
|
||||
if (!rows.length) {
|
||||
rows = doc.querySelectorAll('#search-main h3 > a');
|
||||
}
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(cleanMath(rows[i].textContent));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Extension to mimeType mapping
|
||||
var suppTypeMap = {
|
||||
pdf: 'application/pdf',
|
||||
zip: 'application/zip',
|
||||
doc: 'application/msword',
|
||||
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
xls: 'application/vnd.ms-excel',
|
||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
mov: 'video/quicktime'
|
||||
};
|
||||
|
||||
var dontDownload = [
|
||||
'application/zip',
|
||||
'video/quicktime'
|
||||
];
|
||||
|
||||
function scrape(doc, url) {
|
||||
url = url.replace(/[?#].*/, '');
|
||||
|
||||
if (!url.includes('/abstract/')) {
|
||||
// Go to Abstract page first so we can scrape the abstract
|
||||
url = url.replace(/\/(?:supplemental|references|cited-by)\//, '/abstract/');
|
||||
if (!url.includes('/abstract/')) {
|
||||
Zotero.debug('Unrecognized URL ' + url);
|
||||
return;
|
||||
}
|
||||
|
||||
ZU.processDocuments(url, function (doc, url) {
|
||||
if (!url.includes('/abstract/')) {
|
||||
Zotero.debug('Redirected when trying to go to abstract page. ' + url);
|
||||
return;
|
||||
}
|
||||
scrape(doc, url);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
url = url.replace(/\/abstract\//, '/{REPLACE}/');
|
||||
|
||||
// fetch RIS
|
||||
var risUrl = url.replace('{REPLACE}', 'export')
|
||||
+ '?type=ris&download=true';
|
||||
ZU.doGet(risUrl, function (risText) {
|
||||
risText = risText.replace(/^ID\s+-\s+/mg, 'DO - ');
|
||||
var trans = Zotero.loadTranslator('import');
|
||||
trans.setTranslator('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'); //RIS
|
||||
trans.setString(risText);
|
||||
trans.setHandler('itemDone', function (obj, item) {
|
||||
// scrape abstract from page
|
||||
item.abstractNote = ZU.trimInternal(cleanMath(
|
||||
text(doc, '#abstract-section-content p')
|
||||
));
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Full Text PDF',
|
||||
url: url.replace('{REPLACE}', 'pdf'),
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
|
||||
item.attachments.push({
|
||||
title: "APS Snapshot",
|
||||
document: doc
|
||||
});
|
||||
|
||||
if (Z.getHiddenPref && Z.getHiddenPref('attachSupplementary')) {
|
||||
try {
|
||||
var asLink = Z.getHiddenPref('supplementaryAsLink');
|
||||
var suppFiles = doc.querySelectorAll('.supplemental-file');
|
||||
for (let suppFile of suppFiles) {
|
||||
let link = suppFile.querySelector('a');
|
||||
if (!link || !link.href) continue;
|
||||
var title = link.getAttribute('data-id') || 'Supplementary Data';
|
||||
var type = suppTypeMap[link.href.split('.').pop()];
|
||||
if (asLink || dontDownload.includes(type)) {
|
||||
item.attachments.push({
|
||||
title: title,
|
||||
url: link.href,
|
||||
mimeType: type || 'text/html',
|
||||
snapshot: false
|
||||
});
|
||||
}
|
||||
else {
|
||||
item.attachments.push({
|
||||
title: title,
|
||||
url: link.href,
|
||||
mimeType: type
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
Z.debug('Could not attach supplemental data');
|
||||
Z.debug(e);
|
||||
}
|
||||
}
|
||||
item.complete();
|
||||
});
|
||||
trans.translate();
|
||||
});
|
||||
}
|
||||
|
||||
function cleanMath(str) {
|
||||
//math tags appear to have duplicate content and are somehow left in even after textContent
|
||||
return str.replace(/<(math|mi)[^<>]*>.*?<\/\1>/g, '');
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prd/abstract/10.1103/PhysRevD.84.077701",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Hints for a nonstandard Higgs boson from the LHC",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Raidal",
|
||||
"firstName": "Martti",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Strumia",
|
||||
"firstName": "Alessandro",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011-10-21",
|
||||
"DOI": "10.1103/PhysRevD.84.077701",
|
||||
"abstractNote": "We reconsider Higgs boson invisible decays into Dark Matter in the light of recent Higgs searches at the LHC. Present hints in the Compact Muon Solenoid and ATLAS data favor a nonstandard Higgs boson with approximately 50% invisible branching ratio, and mass around 143 GeV. This situation can be realized within the simplest thermal scalar singlet Dark Matter model, predicting a Dark Matter mass around 50 GeV and direct detection cross section just below present bound. The present runs of the Xenon100 and LHC experiments can test this possibility.",
|
||||
"issue": "7",
|
||||
"journalAbbreviation": "Phys. Rev. D",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "077701",
|
||||
"publicationTitle": "Physical Review D",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevD.84.077701",
|
||||
"volume": "84",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prd/issues/84/7",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/search/results?sort=relevance&clauses=%5B%7B%22operator%22:%22AND%22,%22field%22:%22all%22,%22value%22:%22test%22%7D%5D",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.114.098105",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Magnetic Flattening of Stem-Cell Spheroids Indicates a Size-Dependent Elastocapillary Transition",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Mazuel",
|
||||
"firstName": "Francois",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Reffay",
|
||||
"firstName": "Myriam",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Du",
|
||||
"firstName": "Vicard",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Bacri",
|
||||
"firstName": "Jean-Claude",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Rieu",
|
||||
"firstName": "Jean-Paul",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Wilhelm",
|
||||
"firstName": "Claire",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2015-03-04",
|
||||
"DOI": "10.1103/PhysRevLett.114.098105",
|
||||
"abstractNote": "Cellular aggregates (spheroids) are widely used in biophysics and tissue engineering as model systems for biological tissues. In this Letter we propose novel methods for molding stem-cell spheroids, deforming them, and measuring their interfacial and elastic properties with a single method based on cell tagging with magnetic nanoparticles and application of a magnetic field gradient. Magnetic molding yields spheroids of unprecedented sizes (up to a few mm in diameter) and preserves tissue integrity. On subjecting these spheroids to magnetic flattening (over ), we observed a size-dependent elastocapillary transition with two modes of deformation: liquid-drop-like behavior for small spheroids, and elastic-sphere-like behavior for larger spheroids, followed by relaxation to a liquidlike drop.",
|
||||
"issue": "9",
|
||||
"journalAbbreviation": "Phys. Rev. Lett.",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "098105",
|
||||
"publicationTitle": "Physical Review Letters",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevLett.114.098105",
|
||||
"volume": "114",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prx/supplemental/10.1103/PhysRevX.5.011029",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Weyl Semimetal Phase in Noncentrosymmetric Transition-Metal Monophosphides",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Weng",
|
||||
"firstName": "Hongming",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Fang",
|
||||
"firstName": "Chen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Fang",
|
||||
"firstName": "Zhong",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Bernevig",
|
||||
"firstName": "B. Andrei",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Dai",
|
||||
"firstName": "Xi",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2015-03-17",
|
||||
"DOI": "10.1103/PhysRevX.5.011029",
|
||||
"abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Phys. Rev. X",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "011029",
|
||||
"publicationTitle": "Physical Review X",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevX.5.011029",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prx/references/10.1103/PhysRevX.5.011029",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Weyl Semimetal Phase in Noncentrosymmetric Transition-Metal Monophosphides",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Weng",
|
||||
"firstName": "Hongming",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Fang",
|
||||
"firstName": "Chen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Fang",
|
||||
"firstName": "Zhong",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Bernevig",
|
||||
"firstName": "B. Andrei",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Dai",
|
||||
"firstName": "Xi",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2015-03-17",
|
||||
"DOI": "10.1103/PhysRevX.5.011029",
|
||||
"abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Phys. Rev. X",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "011029",
|
||||
"publicationTitle": "Physical Review X",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevX.5.011029",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/prx/cited-by/10.1103/PhysRevX.5.011003",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Ideal Negative Measurements in Quantum Walks Disprove Theories Based on Classical Trajectories",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Robens",
|
||||
"firstName": "Carsten",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Alt",
|
||||
"firstName": "Wolfgang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Meschede",
|
||||
"firstName": "Dieter",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Emary",
|
||||
"firstName": "Clive",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Alberti",
|
||||
"firstName": "Andrea",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2015-01-20",
|
||||
"DOI": "10.1103/PhysRevX.5.011003",
|
||||
"abstractNote": "We report on a stringent test of the nonclassicality of the motion of a massive quantum particle, which propagates on a discrete lattice. Measuring temporal correlations of the position of single atoms performing a quantum walk, we observe a 6σ violation of the Leggett-Garg inequality. Our results rigorously excludes (i.e., falsifies) any explanation of quantum transport based on classical, well-defined trajectories. We use so-called ideal negative measurements—an essential requisite for any genuine Leggett-Garg test—to acquire information about the atom’s position, yet avoiding any direct interaction with it. The interaction-free measurement is based on a novel atom transport system, which allows us to directly probe the absence rather than the presence of atoms at a chosen lattice site. Beyond the fundamental aspect of this test, we demonstrate the application of the Leggett-Garg correlation function as a witness of quantum superposition. Here, we employ the witness to discriminate different types of walks spanning from merely classical to wholly quantum dynamics.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Phys. Rev. X",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "011003",
|
||||
"publicationTitle": "Physical Review X",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevX.5.011003",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.65.032314",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Computable measure of entanglement",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Vidal",
|
||||
"firstName": "G.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Werner",
|
||||
"firstName": "R. F.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2002-02-22",
|
||||
"DOI": "10.1103/PhysRevA.65.032314",
|
||||
"abstractNote": "We present a measure of entanglement that can be computed effectively for any mixed state of an arbitrary bipartite system. We show that it does not increase under local manipulations of the system, and use it to obtain a bound on the teleportation capacity and on the distillable entanglement of mixed states.",
|
||||
"issue": "3",
|
||||
"journalAbbreviation": "Phys. Rev. A",
|
||||
"libraryCatalog": "APS",
|
||||
"pages": "032314",
|
||||
"publicationTitle": "Physical Review A",
|
||||
"url": "https://link.aps.org/doi/10.1103/PhysRevA.65.032314",
|
||||
"volume": "65",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "APS Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
283
translators/ARTFL Encyclopedie.js
Normal file
283
translators/ARTFL Encyclopedie.js
Normal file
@@ -0,0 +1,283 @@
|
||||
{
|
||||
"translatorID": "72cb2536-3211-41e0-ae8b-974c0385e085",
|
||||
"label": "ARTFL Encyclopedie",
|
||||
"creator": "Sean Takats, Sebastian Karcher, and Abe Jellinek",
|
||||
"target": "^https?://artflsrv\\d+\\.uchicago\\.edu/philologic4/encyclopedie\\d+/(navigate/|query)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-06-30 19:55:06"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/navigate/')) {
|
||||
return "encyclopediaArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.philologic_cite .citation:first-child a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
let path = url.match(/(\/philologic4\/[^/]+\/)navigate((?:\/\d+)+)/);
|
||||
if (!path) {
|
||||
throw new Error('Unknown entry path format');
|
||||
}
|
||||
|
||||
let [, base, id] = path;
|
||||
id = id.replace(/\//g, ' ').trim();
|
||||
|
||||
ZU.doGet(
|
||||
`${base}reports/navigation.py?report=navigation&philo_id=${id}&byte=`,
|
||||
function (respText) {
|
||||
let json = JSON.parse(respText);
|
||||
scrapeFromJSON(doc, url, json);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function scrapeFromJSON(doc, url, json) {
|
||||
let item = new Zotero.Item('encyclopediaArticle');
|
||||
let meta = json.metadata_fields;
|
||||
|
||||
item.title = meta.head;
|
||||
item.encyclopediaTitle = meta.title.replace(/\.?\s*Tome \d+\.?/, '');
|
||||
item.volume = meta.vol;
|
||||
item.numberOfVolumes = '17';
|
||||
item.place = meta.pub_place;
|
||||
item.publisher = meta.publisher;
|
||||
item.date = meta.pub_date;
|
||||
|
||||
let firstPage;
|
||||
let lastPage;
|
||||
|
||||
let pageRe = /\[page \d+:([\da-zA-Z]+)\]/g;
|
||||
let matchArray;
|
||||
while ((matchArray = pageRe.exec(json.text)) !== null) {
|
||||
// iterate through page heading matches. if we haven't set the first
|
||||
// page yet, set it to the page in the heading we just found. always
|
||||
// set the last page to the heading we just found. when we're done,
|
||||
// the first page will correspond to the first heading and the last page
|
||||
// to the last.
|
||||
|
||||
if (!firstPage) {
|
||||
firstPage = matchArray[1];
|
||||
}
|
||||
lastPage = matchArray[1];
|
||||
}
|
||||
|
||||
if (firstPage && lastPage) {
|
||||
if (firstPage == lastPage) {
|
||||
item.pages = firstPage;
|
||||
}
|
||||
else {
|
||||
item.pages = `${firstPage}-${lastPage}`;
|
||||
}
|
||||
}
|
||||
|
||||
item.url = url;
|
||||
item.language = 'fr';
|
||||
item.archive = 'ARTFL Encyclopédie Project (Spring 2021 Edition)';
|
||||
item.libraryCatalog = '';
|
||||
|
||||
item.creators.push({
|
||||
firstName: "Denis",
|
||||
lastName: "Diderot",
|
||||
creatorType: "editor"
|
||||
});
|
||||
|
||||
item.creators.push({
|
||||
firstName: "Jean le Rond",
|
||||
lastName: "d'Alembert",
|
||||
creatorType: "editor"
|
||||
});
|
||||
|
||||
item.creators.push(
|
||||
ZU.cleanAuthor(
|
||||
meta.kafauth.replace(/\s*\(.*\)/, ''), 'author', true
|
||||
)
|
||||
);
|
||||
|
||||
if (doc) {
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
}
|
||||
|
||||
if (json.imgs.current_obj_img && json.imgs.current_obj_img.length) {
|
||||
let url = json.imgs.current_obj_img[0];
|
||||
item.attachments.push({
|
||||
title: 'Page Scan',
|
||||
mimeType: `image/${url.split('.').pop()}`,
|
||||
url
|
||||
});
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://artflsrv03.uchicago.edu/philologic4/encyclopedie0521/navigate/1/929/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "encyclopediaArticle",
|
||||
"title": "ADULTERE",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Denis",
|
||||
"lastName": "Diderot",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Jean le Rond",
|
||||
"lastName": "d'Alembert",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "François-Vincent",
|
||||
"lastName": "Toussaint",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1751",
|
||||
"archive": "ARTFL Encyclopédie Project (Spring 2021 Edition)",
|
||||
"encyclopediaTitle": "Encyclopédie, Dictionnaire raisonné des sciences, des arts et des métiers, par une Société de Gens de lettres",
|
||||
"language": "fr",
|
||||
"numberOfVolumes": "17",
|
||||
"pages": "150",
|
||||
"place": "Paris",
|
||||
"publisher": "Le Breton",
|
||||
"url": "https://artflsrv03.uchicago.edu/philologic4/encyclopedie0521/navigate/1/929/",
|
||||
"volume": "1",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "Page Scan",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://artflsrv03.uchicago.edu/philologic4/encyclopedie0521/navigate/1/925/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "encyclopediaArticle",
|
||||
"title": "ADULTE",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Denis",
|
||||
"lastName": "Diderot",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Jean le Rond",
|
||||
"lastName": "d'Alembert",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Pierre",
|
||||
"lastName": "Tarin",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1751",
|
||||
"archive": "ARTFL Encyclopédie Project (Spring 2021 Edition)",
|
||||
"encyclopediaTitle": "Encyclopédie, Dictionnaire raisonné des sciences, des arts et des métiers, par une Société de Gens de lettres",
|
||||
"language": "fr",
|
||||
"numberOfVolumes": "17",
|
||||
"pages": "150",
|
||||
"place": "Paris",
|
||||
"publisher": "Le Breton",
|
||||
"url": "https://artflsrv03.uchicago.edu/philologic4/encyclopedie0521/navigate/1/925/",
|
||||
"volume": "1",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "Page Scan",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://artflsrv03.uchicago.edu/philologic4/encyclopedie0521/query?report=concordance&method=proxy&attribution=&objecttype=&q=amour&start=0&end=0",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
155
translators/ARTnews.js
Normal file
155
translators/ARTnews.js
Normal file
File diff suppressed because one or more lines are too long
619
translators/ARTstor.js
Normal file
619
translators/ARTstor.js
Normal file
@@ -0,0 +1,619 @@
|
||||
{
|
||||
"translatorID": "5278b20c-7c2c-4599-a785-12198ea648bf",
|
||||
"label": "ARTstor",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://library\\.artstor\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-23 05:46:04"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('#/asset/')) {
|
||||
if (text(doc, '[data-qa-id="worktype"]').includes('Map')) {
|
||||
return "map";
|
||||
}
|
||||
else if (doc.querySelector('.video-player')) {
|
||||
return "videoRecording";
|
||||
}
|
||||
else {
|
||||
return "artwork";
|
||||
}
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
Z.monitorDOMChanges(doc.querySelector('app-root'));
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.card');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(text(row, '.asset-title'));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) {
|
||||
Object.keys(items).forEach((url) => {
|
||||
ZU.doGet(buildMetadataURL(url),
|
||||
function (respText) {
|
||||
scrape(doc, url, JSON.parse(respText));
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
ZU.doGet(buildMetadataURL(url), function (respText) {
|
||||
scrape(doc, url, JSON.parse(respText));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function buildMetadataURL(pageURL) {
|
||||
let idMatches = pageURL.match(/\/asset\/([^/;]+)(;|$)/);
|
||||
if (idMatches) {
|
||||
let id = idMatches[1];
|
||||
return `https://library.artstor.org/api/v1/metadata?object_ids=${id}&legacy=false`;
|
||||
}
|
||||
|
||||
// "encrypted" IDs (external collections)
|
||||
idMatches = pageURL.match(/\/asset\/[^/]+\/[^/]+\/([^?/;]+)/);
|
||||
if (!idMatches) {
|
||||
throw new Error('Could not extract ID from ARTstor URL: ' + pageURL);
|
||||
}
|
||||
|
||||
let id = idMatches[1];
|
||||
return `https://library.artstor.org/api/v2/items/resolve?encrypted_id=${id}&ref=&legacy=false&openlib=true`;
|
||||
}
|
||||
|
||||
function scrape(doc, url, json) {
|
||||
if (!json.success || !json.metadata.length) {
|
||||
throw new Error('ARTstor metadata retrieval failed');
|
||||
}
|
||||
|
||||
let meta = json.metadata[0];
|
||||
let item = new Zotero.Item(resolveTypeID(meta.object_type_id));
|
||||
|
||||
item.DOI = ZU.cleanDOI(meta.doi);
|
||||
// URL will be overwritten if the accession number has a source link
|
||||
if (url.includes(';')) {
|
||||
url = url.substring(0, url.indexOf(';'));
|
||||
}
|
||||
item.url = url;
|
||||
|
||||
for (let { fieldName, fieldValue } of meta.metadata_json) {
|
||||
switch (fieldName) {
|
||||
case 'Work Type':
|
||||
if (fieldValue.includes('Map')) {
|
||||
item.itemType = 'map';
|
||||
}
|
||||
item.tags.push({ fieldValue });
|
||||
break;
|
||||
case 'Creator': {
|
||||
let type = 'artist';
|
||||
if (item.itemType == 'map') {
|
||||
type = 'cartographer';
|
||||
}
|
||||
else if (item.itemType == 'videoRecording') {
|
||||
type = 'contributor'; // sometimes cast member, sometimes director
|
||||
}
|
||||
|
||||
fieldValue = fieldValue
|
||||
.replace(/^[^:]+:/, '')
|
||||
.replace(/\(.*\)/, '')
|
||||
.replace(/\d+-(\d+)?/, '');
|
||||
|
||||
item.creators.push(ZU.cleanAuthor(fieldValue, type, true));
|
||||
break;
|
||||
}
|
||||
case 'Title':
|
||||
if (!item.title) {
|
||||
// titles after the first are usually annotated or otherwise
|
||||
// difficult to deal with
|
||||
item.title = fieldValue;
|
||||
}
|
||||
else {
|
||||
item.extra = append(item.extra, `Alternate Title: ${fieldValue}`);
|
||||
}
|
||||
break;
|
||||
case 'Date':
|
||||
item.date = ZU.strToISO(fieldValue);
|
||||
break;
|
||||
case 'Measurements':
|
||||
item.artworkSize = fieldValue;
|
||||
break;
|
||||
case 'Description':
|
||||
case 'Collector\'s Notes':
|
||||
item.abstractNote = append(item.abstractNote, fieldValue);
|
||||
break;
|
||||
case 'Repository':
|
||||
item.archive = ZU.cleanTags(fieldValue);
|
||||
break;
|
||||
case 'Accession Number':
|
||||
case 'Physical Location of Original': {
|
||||
item.archiveLocation = ZU.cleanTags(fieldValue);
|
||||
let linkMatches = fieldValue.match(/<a href=["']?([^>]+)["']?>/i);
|
||||
if (linkMatches) {
|
||||
item.url = linkMatches[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'Subject':
|
||||
item.tags.push(...fieldValue.split(';').map(tag => ({ tag })));
|
||||
break;
|
||||
case '_Archival Location':
|
||||
if (!item.archiveLocation) {
|
||||
// these are not often as useful as accession numbers
|
||||
item.archiveLocation = fieldValue;
|
||||
}
|
||||
break;
|
||||
case 'Rights':
|
||||
case 'License':
|
||||
item.rights = append(item.rights, ZU.cleanTags(fieldValue));
|
||||
break;
|
||||
case 'Location':
|
||||
item.extra = append(item.extra, `Depicted Location: ${fieldValue}`);
|
||||
break;
|
||||
case 'Source':
|
||||
if (fieldValue.startsWith('Photographer:')) {
|
||||
item.creators.push(
|
||||
ZU.cleanAuthor(
|
||||
fieldValue.substring('Photographer:'.length),
|
||||
'artist'
|
||||
)
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 'Notes':
|
||||
item.notes.push({ note: fieldValue });
|
||||
break;
|
||||
case 'Scale':
|
||||
if (item.itemType == 'map') {
|
||||
item.scale = fieldValue;
|
||||
}
|
||||
break;
|
||||
case 'Type':
|
||||
if (item.itemType == 'map') {
|
||||
item.mapType = fieldValue;
|
||||
}
|
||||
break;
|
||||
case 'Extent':
|
||||
if (item.itemType == 'videoRecording') {
|
||||
item.runningTime = fieldValue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Z.debug(`Unknown field: ${fieldName} = ${fieldValue}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.title) {
|
||||
item.title = 'Untitled';
|
||||
}
|
||||
|
||||
// PDF attachments not handled yet
|
||||
|
||||
if (json.imageUrl) {
|
||||
// ideal situation: the JSON has a direct image URL in it
|
||||
item.attachments.push({
|
||||
title: 'Artwork Image',
|
||||
mimeType: 'image/jpeg',
|
||||
url: (json.imageServer || 'https://stor.artstor.org/') + json.imageUrl
|
||||
});
|
||||
}
|
||||
else if (meta.image_url) {
|
||||
// almost ideal: we get a URL with some extraneous info that we need to
|
||||
// clean, but after we do that, we can fetch the image directly
|
||||
let basePart = 'https://stor.artstor.org/iiif/fpx/';
|
||||
let idPart = meta.image_url.replace(/\.fpx.*/, '.fpx');
|
||||
let imagePart = `/full/${meta.width},/0/default.jpg`;
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Artwork Image',
|
||||
mimeType: 'image/jpeg',
|
||||
url: basePart + idPart + imagePart
|
||||
});
|
||||
}
|
||||
else if (meta.image_compound_urls && meta.image_compound_urls.length) {
|
||||
// not really very ideal: we need to make a second GET request for the
|
||||
// "compound image" metadata
|
||||
let imageURLs = meta.image_compound_urls
|
||||
.map(imgURL => 'https://stor.artstor.org/iiif/' + imgURL);
|
||||
ZU.doGet(imageURLs, function (respText) {
|
||||
let { '@id': imageURL, width } = JSON.parse(respText);
|
||||
item.attachments.push({
|
||||
title: 'Artwork Image',
|
||||
mimeType: 'image/jpeg',
|
||||
url: `${imageURL}/full/${width},/0/default.jpg`
|
||||
});
|
||||
}, function () {
|
||||
// when all requests have completed
|
||||
item.complete();
|
||||
});
|
||||
return;
|
||||
}
|
||||
else if (doc) {
|
||||
// bad: this last resort will fail if the user hasn't clicked the
|
||||
// download link already (which they probably haven't). but at least
|
||||
// it'll alert them that the translator *tried* to download the image,
|
||||
// so they can do it themselves if they need to.
|
||||
item.attachments.push({
|
||||
title: 'Artwork Image',
|
||||
mimeType: 'image/jpeg',
|
||||
url: attr(doc, '#downloadAssetLink', 'href')
|
||||
});
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function resolveTypeID(typeID) {
|
||||
switch (typeID) {
|
||||
case 24:
|
||||
return 'videoRecording';
|
||||
default:
|
||||
Z.debug('Unknown type ID (probably artwork): ' + typeID);
|
||||
return 'artwork';
|
||||
}
|
||||
}
|
||||
|
||||
function append(existingText, newText) {
|
||||
if (!existingText) {
|
||||
return newText;
|
||||
}
|
||||
|
||||
if (!newText) {
|
||||
return existingText;
|
||||
}
|
||||
|
||||
return existingText + '\n' + newText;
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/openlibrary/external/4jEkdDElLjUzRkY6fz5%252BRXlDOHkje1x9fg%253D%253D",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Trailer Home",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Barbara",
|
||||
"lastName": "Lane",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "2001",
|
||||
"extra": "Alternate Title: Exterior view\nDepicted Location: Bradford County, Pennsylvania",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "Bryn Mawr College has made these images, which were taken by current and former faculty, students, and staff, and in some cases friends of the College, available for personal or research use. Users of these images are expected to abide by all copyright and other intellectual property laws. Where we know that Bryn Mawr College owns the copyright, we have attempted to include that information, because Bryn Mawr College grants any user the right to make any use of those images. In other cases the College has secured permission to make the image available, but the photographer still owns the copyright and all rights outside this limited license. Images currently protected by copyright that are not owned by Bryn Mawr College cannot be published or exhibited without obtaining the legally required permission from the copyright owner. It is the obligation of the researcher to determine and satisfy copyright and other restrictions. We recommend, where applicable, that patrons retain a record of their fair use determinations or attempts to secure permissions. Questions can be directed to sscommons@brynmawr.edu.\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"url": "https://library.artstor.org/#/asset/openlibrary/external/4jEkdDElLjUzRkY6fz5%252BRXlDOHkje1x9fg%253D%253D",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/28315008",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Tolu trade card (recto and verso)",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Lawrence and Martin",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"abstractNote": "Unmounted medical trade card with text in English on the recto and verso.\nTrade cards promoting medical services and products were designed to directly connect patent medicine manufacturers to the consumer public. The peak popularity of trade cards is estimated to have been between 1870 and 1890.\nPhotographed by staff at the Center for Jewish History in 2020.",
|
||||
"archive": "Medical Center Archives at NewYork Presbyterian/Weill Cornell Medicine",
|
||||
"archiveLocation": "P-15356",
|
||||
"artworkSize": "3.10\" x 4.45\"",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "Presumed to be in the public domain, though please note that rights ownership varies and the researcher must determine these issues and assume full responsibility for fulfilling the usage terms connected with all archival material, as well as any third party or the licensing of any additional rights. In the event that the image becomes a source for publication, we request a credit line indicating the Medical Center Archives of NewYork-Presbyterian/Weill Cornell Medicine.\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"url": "https://library.artstor.org/#/asset/28315008",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Advertising cards"
|
||||
},
|
||||
{
|
||||
"tag": "Cold (Disease)"
|
||||
},
|
||||
{
|
||||
"tag": "Cough"
|
||||
},
|
||||
{
|
||||
"tag": "Lungs -- Diseases"
|
||||
},
|
||||
{
|
||||
"tag": "Throat -- Diseases"
|
||||
},
|
||||
{
|
||||
"tag": "Tuberculosis"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/28362645",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Ubekendt dame med blomsterkrans",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Cornelius",
|
||||
"lastName": "Høyer",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "1756",
|
||||
"archive": "Statens Museum for Kunst",
|
||||
"archiveLocation": "KMS4919",
|
||||
"artworkSize": "54 x 47 mm",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "Creative Commons: Free Reuse (CC0)",
|
||||
"url": "https://collection.smk.dk/#/en/detail/KMS4919",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/SS7730456_7730456_11870403",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "map",
|
||||
"title": "The Map Maker",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Arthur",
|
||||
"lastName": "Szyk",
|
||||
"creatorType": "artist"
|
||||
},
|
||||
{
|
||||
"lastName": "Other Creators",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "1942",
|
||||
"abstractNote": "A satirical map attacking the Axis by the artist Arthur Szyk, published in Esquire Magazine in 1942. Goebbels welcomes General Tojo to the Axis, announcing that \"Now that you've joined us, the Fuhrer will make a special map for you,\" as Hitler paints the swastika over a bloody map of South and Latin America.\nSzyk was a Polish Jew whose work typically featured social and political issues. He emigrated to London in 1937 and to New York in 1940, and produced a number of attacks on the Nazis before and during World War II.",
|
||||
"extra": "Alternate Title: Full TItle: The Map Maker [Hitler]",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"mapType": "Map published in book or serial - source in collection",
|
||||
"rights": "For important information about copyright and use, see http://persuasivemaps.library.cornell.edu/copyright.\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"url": "https://library.artstor.org/#/asset/SS7730456_7730456_11870403",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Pictorial"
|
||||
},
|
||||
{
|
||||
"tag": "Satirical"
|
||||
},
|
||||
{
|
||||
"tag": "World War II"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "For further information on the Collector’s Notes and a Feedback/Contact Link, see https://persuasivemaps.library.cornell.edu/content/about-collection-personal-statement and https://persuasivemaps.library.cornell.edu/content/feedback-and-contact"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/SS33851_33851_1648337",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "map",
|
||||
"title": "Dolph's map of Wilmington and northern New Castle County",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Dolph Map Company",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"abstractNote": "Index to streets",
|
||||
"archive": "Special Collections, University of Delaware Library / Newark, Delaware 19717-5267",
|
||||
"archiveLocation": "Spec, Oversized map drawers, Oversized drawer 3 Folder 7",
|
||||
"extra": "Alternate Title: Municipal maps\nDepicted Location: United States--Delaware--New Castle County--Wilmington",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "Use of materials from this collection beyond the exceptions provided for in the Fair Use and Educational Use clauses of the U.S. Copyright Law may violate federal law. Permission to publish is required from the copyright holder. Please contact Special Collections, University of Delaware Library, http://www.lib.udel.edu/cgi-bin/askspec.cgi\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"scale": "3000 feet to the inch",
|
||||
"url": "https://library.artstor.org/#/asset/SS33851_33851_1648337",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": " Delaware--Maps."
|
||||
},
|
||||
{
|
||||
"tag": "Wilmington (Del.)--Maps."
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "One of five maps on a single sheet. Top corner torn (inset map of Newark). Additional information in collection folders."
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/SS7730507_7730507_8920869",
|
||||
"defer": true,
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Congressional Conversation: Pell and Brooke (a)",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Senator Claiborne Pell",
|
||||
"creatorType": "contributor"
|
||||
}
|
||||
],
|
||||
"date": "1969",
|
||||
"abstractNote": "Congressional Conversation(a): Senators Pell and Brooke discuss political issues including the Vietnam War, Justice Fortas' resignation, ethics rules, and the state of the fishing industry.",
|
||||
"archive": "University of Rhode Island Libraries",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "All rights reserved. For copyright and permissions, contact the University of Rhode Island Libraries at archives@etal.uri.edu.\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"runningTime": "00:28:36",
|
||||
"shortTitle": "Congressional Conversation",
|
||||
"url": "https://library.artstor.org/#/asset/SS7730507_7730507_8920869",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://library.artstor.org/#/asset/SS35428_35428_20594675",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Big Trees of the West - Second Cut from a Redwood Log.; verso: G28 Pacific Novelty Company, Publishers, San Francisco, Cal. Made in Germany [divided back, no message]",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "American",
|
||||
"lastName": "Pacific Novelty Company (publisher",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "1907",
|
||||
"archive": "Trinity College, Watkinson Library (Hartford, Connecticut, USA)",
|
||||
"archiveLocation": "Box 19.174-3",
|
||||
"artworkSize": "9 x 14 cm (3.54 x 5.51 inches) approximately",
|
||||
"extra": "Alternate Title: overall\nAlternate Title: recto",
|
||||
"libraryCatalog": "ARTstor",
|
||||
"rights": "This digital collection and its contents are made available by Trinity College Library for limited non-commercial, educational and personal use only. For other uses, or for additional information regarding the collection, contact the staff of Watkinson Library (www.watkinsonlibrary.org).\nThis image has been selected and made available by a user using Artstor's software tools. Artstor has not screened or selected this image or cleared any rights to it and is acting as an online service provider pursuant to 17 U.S.C. §512. Artstor disclaims any liability associated with the use of this image. Should you have any legal objection to the use of this image, please visit http://www.artstor.org/copyright for contact information and instructions on how to proceed.",
|
||||
"shortTitle": "Big Trees of the West - Second Cut from a Redwood Log.; verso",
|
||||
"url": "https://library.artstor.org/#/asset/SS35428_35428_20594675",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Artwork Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": " California (USA)"
|
||||
},
|
||||
{
|
||||
"tag": " Logging"
|
||||
},
|
||||
{
|
||||
"tag": " Lumber industry"
|
||||
},
|
||||
{
|
||||
"tag": " Redwood (genus, Sequoia)"
|
||||
},
|
||||
{
|
||||
"tag": " Sequoiadendron giganteum (Giant redwood, species)"
|
||||
},
|
||||
{
|
||||
"tag": " Trees"
|
||||
},
|
||||
{
|
||||
"tag": "Postcards"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
199
translators/ASCE.js
Normal file
199
translators/ASCE.js
Normal file
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"translatorID": "303bdfc5-11b8-4107-bca1-63ca97701a0f",
|
||||
"label": "ASCE",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://(www\\.)?ascelibrary\\.org/(toc|doi|action)/",
|
||||
"minVersion": "2.1.9",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2020-06-28 02:29:25"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2020 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// attr()/text() v2
|
||||
// eslint-disable-next-line
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (/\/doi\/((abs|full)\/)?10\./.test(url)) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('div[class*="art_title"]>a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
// EM only gets a social media preview for the abastract
|
||||
let abstract = text(doc, 'article.article div[class*="Abstract"]>p');
|
||||
|
||||
// Z.debug(abstract);
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
item.libraryCatalog = "ASCE";
|
||||
if (abstract) {
|
||||
item.abstractNote = abstract;
|
||||
}
|
||||
// Remove mapping from DC:coverage to archiveLocation
|
||||
item.archiveLocation = "";
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://ascelibrary.org/action/doSearch?text1=test&field1=AllField&logicalOpe1=AND&text2=&field2=AllField&logicalOpe2=NOT&text3=&field3=AllField&logicalOpe3=AND&text4=&field4=AllField&logicalOpe4=AND&text5=&field5=AllField&logicalOpe5=AND&text6=&field6=AllField&logicalOpe6=AND&text7=&field7=AllField&AfterMonth=&AfterYear=&BeforeMonth=&BeforeYear=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ascelibrary.org/doi/abs/10.1061/%28ASCE%290887-381X%282003%2917%3A1%2837%29",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Friction Measurement on Cycleways Using a Portable Friction Tester",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "A.",
|
||||
"lastName": "Bergström",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "H.",
|
||||
"lastName": "Åström",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "R.",
|
||||
"lastName": "Magnusson",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2003/03/01",
|
||||
"DOI": "10.1061/(ASCE)0887-381X(2003)17:1(37)",
|
||||
"ISSN": "0887-381X",
|
||||
"abstractNote": "In seeking to promote cycling in wintertime, it is desirable to understand how important the winter maintenance service level is in people’s decision to cycle or not, and methods to compare different road conditions on cycleways are therefore needed. By measuring friction, an assessment of the service level can be achieved, but methods available often involve the use of large vehicles, which can lead to overloading damage on cycleways, and constitute a safety risk for cyclists and pedestrians. A portable friction tester (PFT), originally designed to measure friction on road markings, was thought to be an appropriate instrument for cycleways and was, therefore, tested on different winter road conditions, and on different cycleway pavement materials. In this study, it was found that the PFT is a valuable tool for measuring friction on cycleways. Different winter road conditions, as well as different pavement materials, can be distinguished from each other through PFT measurements. The PFT provides a good complement to visual inspections of cycleways in winter maintenance evaluation and can, for example, be used to determine if desired service levels have been achieved.",
|
||||
"issue": "1",
|
||||
"language": "EN",
|
||||
"libraryCatalog": "ASCE",
|
||||
"pages": "37-57",
|
||||
"publicationTitle": "Journal of Cold Regions Engineering",
|
||||
"rights": "Copyright © 2003 American Society of Civil Engineers",
|
||||
"url": "https://ascelibrary.org/doi/abs/10.1061/%28ASCE%290887-381X%282003%2917%3A1%2837%29",
|
||||
"volume": "17",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Bicycles"
|
||||
},
|
||||
{
|
||||
"tag": "Friction"
|
||||
},
|
||||
{
|
||||
"tag": "Maintenance"
|
||||
},
|
||||
{
|
||||
"tag": "Measurement"
|
||||
},
|
||||
{
|
||||
"tag": "Roads"
|
||||
},
|
||||
{
|
||||
"tag": "friction"
|
||||
},
|
||||
{
|
||||
"tag": "inspection"
|
||||
},
|
||||
{
|
||||
"tag": "maintenance engineering"
|
||||
},
|
||||
{
|
||||
"tag": "road traffic"
|
||||
},
|
||||
{
|
||||
"tag": "safety"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://ascelibrary.org/toc/jcemd4/138/5",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
153
translators/ASCO Meeting Library.js
Normal file
153
translators/ASCO Meeting Library.js
Normal file
File diff suppressed because one or more lines are too long
337
translators/ASTIS.js
Normal file
337
translators/ASTIS.js
Normal file
@@ -0,0 +1,337 @@
|
||||
{
|
||||
"translatorID": "d4e227c0-cebb-425a-ac8d-a6625c4bfdd2",
|
||||
"label": "ASTIS",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://(www\\.)?aina\\.ucalgary\\.ca/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-04 19:44:55"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.querySelector('a[href*="doi."]')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('a[href*="?RECORD"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, _url) {
|
||||
let DOI = ZU.cleanDOI(attr(doc, 'a[href*="doi."]', 'href'));
|
||||
|
||||
let search = Zotero.loadTranslator('search');
|
||||
|
||||
search.setHandler('translators', function (_, translators) {
|
||||
search.setTranslator(translators);
|
||||
search.setHandler('itemDone', function (_, item) {
|
||||
item.complete();
|
||||
});
|
||||
search.translate();
|
||||
});
|
||||
|
||||
search.setSearch({ DOI });
|
||||
search.getTranslators();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aina.ucalgary.ca/scripts/mwimain.dll/415/4/1?RECLIST&DATABASE=ASTIS&TM=1628105772.604",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.aina.ucalgary.ca/scripts/mwimain.dll/415/4/4/85845?RECORD&DATABASE=ASTIS",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Parasitoids indicate major climate‐induced shifts in arctic communities",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Tuomas",
|
||||
"lastName": "Kankaanpää"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Eero",
|
||||
"lastName": "Vesterinen"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Bess",
|
||||
"lastName": "Hardwick"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Niels M.",
|
||||
"lastName": "Schmidt"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Tommi",
|
||||
"lastName": "Andersson"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Paul E.",
|
||||
"lastName": "Aspholm"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Isabel C.",
|
||||
"lastName": "Barrio"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Niklas",
|
||||
"lastName": "Beckers"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Joël",
|
||||
"lastName": "Bêty"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Tone",
|
||||
"lastName": "Birkemoe"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Melissa",
|
||||
"lastName": "DeSiervo"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Katherine H. I.",
|
||||
"lastName": "Drotos"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Dorothee",
|
||||
"lastName": "Ehrich"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Olivier",
|
||||
"lastName": "Gilg"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Vladimir",
|
||||
"lastName": "Gilg"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Nils",
|
||||
"lastName": "Hein"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Toke T.",
|
||||
"lastName": "Høye"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Kristian M.",
|
||||
"lastName": "Jakobsen"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Camille",
|
||||
"lastName": "Jodouin"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Jesse",
|
||||
"lastName": "Jorna"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Mikhail V.",
|
||||
"lastName": "Kozlov"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Jean‐Claude",
|
||||
"lastName": "Kresse"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Don‐Jean",
|
||||
"lastName": "Leandri‐Breton"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Nicolas",
|
||||
"lastName": "Lecomte"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Maarten",
|
||||
"lastName": "Loonen"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Philipp",
|
||||
"lastName": "Marr"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Spencer K.",
|
||||
"lastName": "Monckton"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Maia",
|
||||
"lastName": "Olsen"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Josée‐Anne",
|
||||
"lastName": "Otis"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Michelle",
|
||||
"lastName": "Pyle"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Ruben E.",
|
||||
"lastName": "Roos"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Katrine",
|
||||
"lastName": "Raundrup"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Daria",
|
||||
"lastName": "Rozhkova"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Brigitte",
|
||||
"lastName": "Sabard"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Aleksandr",
|
||||
"lastName": "Sokolov"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Natalia",
|
||||
"lastName": "Sokolova"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Anna M.",
|
||||
"lastName": "Solecki"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Christine",
|
||||
"lastName": "Urbanowicz"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Catherine",
|
||||
"lastName": "Villeneuve"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Evgenya",
|
||||
"lastName": "Vyguzova"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Vitali",
|
||||
"lastName": "Zverev"
|
||||
},
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Tomas",
|
||||
"lastName": "Roslin"
|
||||
}
|
||||
],
|
||||
"date": "11/2020",
|
||||
"DOI": "10.1111/gcb.15297",
|
||||
"ISSN": "1354-1013, 1365-2486",
|
||||
"issue": "11",
|
||||
"journalAbbreviation": "Glob Change Biol",
|
||||
"language": "en",
|
||||
"libraryCatalog": "DOI.org (Crossref)",
|
||||
"pages": "6276-6295",
|
||||
"publicationTitle": "Global Change Biology",
|
||||
"url": "https://onlinelibrary.wiley.com/doi/10.1111/gcb.15297",
|
||||
"volume": "26",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
290
translators/ATS International Journal.js
Normal file
290
translators/ATS International Journal.js
Normal file
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"translatorID": "ec0628ad-e508-444e-9e4c-e1819766a1ae",
|
||||
"label": "ATS International Journal",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(www\\.)?atsinternationaljournal\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2019-09-10 19:50:28"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2019 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// attr()/text() v2
|
||||
// eslint-disable-next-line
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;}
|
||||
|
||||
|
||||
// convert a roman number, e.g. XLVIII into an arabic number, e.g. 48
|
||||
function roman2arabic(roman) {
|
||||
let mapping = {
|
||||
M: 1000,
|
||||
D: 500,
|
||||
C: 100,
|
||||
L: 50,
|
||||
X: 10,
|
||||
V: 5,
|
||||
I: 1
|
||||
};
|
||||
let result = 0;
|
||||
for (let i = 0; i < roman.length; i++) {
|
||||
let value = mapping[roman[i]];
|
||||
if (i + 1 < roman.length) {
|
||||
if (value >= mapping[roman[i + 1]]) {
|
||||
result += mapping[roman[i]];
|
||||
}
|
||||
else {
|
||||
result -= mapping[roman[i]];
|
||||
}
|
||||
}
|
||||
else {
|
||||
result += mapping[roman[i]];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
// TODO: can wo do this better?
|
||||
if (url.split('/').length == 7) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.article-title a, .search-results a, .category li a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var item = new Zotero.Item('journalArticle');
|
||||
item.title = text(doc, 'h1.article-title');
|
||||
// we use volume here because the issues are numbered
|
||||
// consecutively over years
|
||||
item.volume = text(doc, 'h1.page-title');
|
||||
if (item.volume) {
|
||||
item.date = ZU.strToISO(item.volume);
|
||||
// convert the volume numbers into arabic numbers
|
||||
if (item.volume.includes(' - ')) {
|
||||
let conversion = roman2arabic(item.volume.split(' - ')[0]);
|
||||
if (conversion !== 0) {
|
||||
item.volume = conversion;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Special Issue 2018 Vol2 --> Special Issue 2
|
||||
item.volume = item.volume.replace(/\d\d\d\d(\s+Vol\.?\s*)?/, '');
|
||||
}
|
||||
}
|
||||
var authors = text(doc, 'section.article-content em');
|
||||
if (authors) {
|
||||
item.creators = authors.split(',').map(name => ZU.cleanAuthor(name, "author"));
|
||||
}
|
||||
var tags = doc.querySelectorAll('.tags *[itemprop=keywords]');
|
||||
item.tags = [];
|
||||
for (let tag of tags) {
|
||||
item.tags.push(tag.textContent.trim());
|
||||
}
|
||||
item.pages = ZU.xpathText(doc, '//section[contains(@class, "article-content")]//strong[contains(., "Pages")]/following-sibling::text()[1]');
|
||||
item.abstractNote = ZU.xpathText(doc, '//section[contains(@class, "article-content")]//strong[contains(., "Abstract")]/following-sibling::text()[1]');
|
||||
var keywords = ZU.xpathText(doc, '//section[contains(@class, "article-content")]//strong[contains(., "Keywords")]/following-sibling::text()[1]');
|
||||
if (keywords && item.tags.length === 0) {
|
||||
item.tags = keywords.split(';');
|
||||
}
|
||||
|
||||
item.url = url;
|
||||
item.ISSN = '1824-5463';
|
||||
item.language = 'en';
|
||||
item.publicationTitle = 'Advances in Transportation Studies';
|
||||
item.journalAbbreviation = 'ATS';
|
||||
item.extra = 'pusblisher:Aracne Editrice\nplace:Roma';
|
||||
item.complete();
|
||||
}
|
||||
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/2019-issues/xlviii-july-2019/1056-do-drivers-have-a-good-understanding-of-distraction-by-wrap-advertisements-investigating-the-impact-of-wrap-advertisement-on-distraction-related-driver-s-accidents",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Do drivers have a good understanding of distraction by wrap advertisements? Investigating the impact of wrap advertisement on distraction-related driver’s accidents",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "A. R.",
|
||||
"lastName": "Mahpour",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "A. Mohammadian",
|
||||
"lastName": "Amiri",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "E. Shah",
|
||||
"lastName": "Ebrahimi",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2019-07",
|
||||
"ISSN": "1824-5463",
|
||||
"abstractNote": "Drivers encounter a variety of outdoor advertising including fixed and wrap advertisement and large amounts of information and data in different locations, which can sometimes confuse the audience due to congestion, accumulation, and non-compliance with the standards and diversity of concepts. Fully understanding how small distractions can influence the ability to drive could prevent a serious accident. Despite the enormous amount of effort has been devoted to evaluating the impact of fix advertising on traffic safety, the importance of investing wrap advertisements seems to be disregarded. Therefore, the present study seeks firstly to compare the importance of distraction caused by wrap advertisement with other parameters affecting drivers’ awareness, then to find out which aspects of wrap advertisement may distract drivers while driving. To address this objective, at first, a questionnaire-based accidents database was prepared regarding those occurred because of distraction, and then the weight of distraction caused by wrap advertisement was identified using AHP. Subsequently, accidents that occurred because of this specific issue were modeled using the discrete choice technique. The results showed that in contrast with the prevailing opinion of drivers, the probability of distraction while driving caused by wrap advertisement is relatively high which can be considered as an alarming issue. Moreover, according to the results of discrete choice modeling, drivers with different characteristics, such as age or gender can be affected by wrap advertisement in different ways.",
|
||||
"extra": "pusblisher:Aracne Editrice\nplace:Roma",
|
||||
"journalAbbreviation": "ATS",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ATS International Journal",
|
||||
"pages": "19-30",
|
||||
"publicationTitle": "Advances in Transportation Studies",
|
||||
"shortTitle": "Do drivers have a good understanding of distraction by wrap advertisements?",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/2019-issues/xlviii-july-2019/1056-do-drivers-have-a-good-understanding-of-distraction-by-wrap-advertisements-investigating-the-impact-of-wrap-advertisement-on-distraction-related-driver-s-accidents",
|
||||
"volume": 48,
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Analysis"
|
||||
},
|
||||
{
|
||||
"tag": "Crashes"
|
||||
},
|
||||
{
|
||||
"tag": "Driver"
|
||||
},
|
||||
{
|
||||
"tag": "Driver Behaviour"
|
||||
},
|
||||
{
|
||||
"tag": "Models"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/2004-issues/special-issue-2004",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/paper-search?q=reference+management",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/2018-issues/special-issue-2018-vol2/989-dynamic-traffic-safety-grade-evaluation-model-for-road-sections-based-on-gray-fixed-weight-clustering",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Dynamic traffic safety grade evaluation model for road sections based on gray fixed weight clustering",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "H. L.",
|
||||
"lastName": "Jing",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "L. T.",
|
||||
"lastName": "Ye",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "J. Z.",
|
||||
"lastName": "Wang",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Z.",
|
||||
"lastName": "Xie",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "M.",
|
||||
"lastName": "Brown",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2018",
|
||||
"ISSN": "1824-5463",
|
||||
"abstractNote": "The conventional gray predication model GM (1, 1) cannot accurately analyze the dynamic traffic index information of complex and scattered road sections because it may cause relatively large error and performs not well in stability. In order to solve this problem, a dynamic traffic safety grade evaluation model for road sections based on gray fixed weight clustering is designed. In this method, In this method, the gray clustering evaluation method is adopted for gray clustering to complex and scattered traffic safety grade evaluation indexes, and the gray fixed weight clustering method is adopted to weight each clustering index in advance; the clustering weight of each index is set by a fuzzy consistent matrix, on which the fixed weight coefficient of the index is calculated and the clustering vector is constructed; the cluster coefficients and cluster vectors are combined to obtain the clustering indexes of traffic safety evaluation; then a BP neural network dynamic traffic safety grade evaluation model for road sections is constructed according to the indexes, so as to accurately evaluate the dynamic traffic safety grade of road sections. The experiment results show that the designed model method can effectively evaluate the dynamic traffic safety grade of 31 road sections in areas with a high probability of traffic congestion with small evaluation error and high stability, so it meets the design requirements.",
|
||||
"extra": "pusblisher:Aracne Editrice\nplace:Roma",
|
||||
"journalAbbreviation": "ATS",
|
||||
"language": "en",
|
||||
"libraryCatalog": "ATS International Journal",
|
||||
"pages": "15-24",
|
||||
"publicationTitle": "Advances in Transportation Studies",
|
||||
"url": "http://www.atsinternationaljournal.com/index.php/2018-issues/special-issue-2018-vol2/989-dynamic-traffic-safety-grade-evaluation-model-for-road-sections-based-on-gray-fixed-weight-clustering",
|
||||
"volume": "Special Issue 2",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Models"
|
||||
},
|
||||
{
|
||||
"tag": "Road Safety"
|
||||
},
|
||||
{
|
||||
"tag": "Traffic"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
384
translators/Access Engineering.js
Normal file
384
translators/Access Engineering.js
Normal file
@@ -0,0 +1,384 @@
|
||||
{
|
||||
"translatorID": "d120a8a7-9d45-446e-8c18-ad9ef0a6bf47",
|
||||
"label": "Access Engineering",
|
||||
"creator": "Vinoth K - highwirepress.com",
|
||||
"target": "^https?://www\\.accessengineeringlibrary\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-09-09 09:42:36"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Copyright © 2020-2021 Vinoth K - highwirepress.com
|
||||
|
||||
This file is part of Zotero.
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
let title = attr(doc, 'meta[name="citation_title"]', 'content');
|
||||
if (title) {
|
||||
if (doc.querySelector('meta[name="citation_isbn"]')) {
|
||||
let bookTitle = attr(doc, 'meta[name="citation_book_title"]', 'content');
|
||||
if (!bookTitle || title == bookTitle) {
|
||||
return "book";
|
||||
}
|
||||
else {
|
||||
return "bookSection";
|
||||
}
|
||||
}
|
||||
else if (url.includes('content/video/')) {
|
||||
return 'videoRecording';
|
||||
}
|
||||
else {
|
||||
return "journalArticle";
|
||||
}
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.results-item a[href]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
// Missing editions for books and books chapter page
|
||||
// Removed html element in abstract for video and tutorial page
|
||||
// Author not updating in metatag correctly from data and read
|
||||
// client advised to split and handled through custom data attr/obj
|
||||
// - so we'll fill those in manually.
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// Edition
|
||||
let edition = ZU.xpathText(doc, '//meta[@name="citation_edition"]/@content');
|
||||
if (edition) item.edition = edition;
|
||||
|
||||
// Author
|
||||
// Some of old pages not having firstname, lastname seperation in markup and ignore if not
|
||||
let author = doc.querySelectorAll("ul.contributor-list > [data-firstnames]");
|
||||
item.creators = [];
|
||||
for (let i = 0; i < author.length; i++) {
|
||||
let creatorData = author[i].dataset;
|
||||
item.creators.push({
|
||||
firstName: creatorData.firstnames,
|
||||
lastName: creatorData.surname,
|
||||
creatorType: creatorData.authortype
|
||||
});
|
||||
}
|
||||
|
||||
// Abstract
|
||||
let abstractNote = ZU.xpathText(doc, '//meta[@name="citation_abstract"]/@content');
|
||||
if (abstractNote) item.abstractNote = ZU.cleanTags(abstractNote);
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
// Detect web not get trigger for scape EM translator
|
||||
// - so wll fill those in manually.
|
||||
trans.itemType = detectWeb(doc, url);
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/book/9781259860225",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Handbook of Environmental Engineering",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Rao Y.",
|
||||
"lastName": "Surampalli",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Tian C.",
|
||||
"lastName": "Zhang",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Satinder Kaur",
|
||||
"lastName": "Brar",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Krishnamoorthy",
|
||||
"lastName": "Hegde",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Rama",
|
||||
"lastName": "Pulicharla",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Mausam",
|
||||
"lastName": "Verma",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2018",
|
||||
"ISBN": "9781259860225",
|
||||
"abstractNote": "A complete guide to environmental regulations and remediation.This practical resource offers thorough coverage of current environmental issues and policies along with step-by-step remediation procedures. With contributions from dozens of industry-recognized experts, Handbook of Environmental Engineering features information on all segments of the market—including water and air quality and hazardous waste—and enables you to ensure compliance with all applicable regulations. You will get details about sensors, monitoring, and toxicity treatment and controls as well as waste management and safe disposal. Real-world examples demonstrate how to apply techniques and achieve compliance, while environmental impact assessments and measurement data enhance the book9s utility.Coverage includes:• Environmental legislation• Environmental impact assessments• Air pollution control and management• Potable water treatment• Wastewater treatment and reuse• Solid waste management• Hazardous waste management• Emerging wastes in the environment• Environmental monitoring and measurements",
|
||||
"edition": "1st Edition",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"publisher": "McGraw-Hill Education",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/book/9781259860225",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/book/9781259860225/toc-chapter/chapter3/section/section1",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "CHAPTER PRELIMINARIES",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Ashok",
|
||||
"lastName": "Kumar",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Hamid",
|
||||
"lastName": "Omidvarborna",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Rao Y.",
|
||||
"lastName": "Surampalli",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Tian C.",
|
||||
"lastName": "Zhang",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Satinder Kaur",
|
||||
"lastName": "Brar",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Krishnamoorthy",
|
||||
"lastName": "Hegde",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Rama",
|
||||
"lastName": "Pulicharla",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "Mausam",
|
||||
"lastName": "Verma",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2018",
|
||||
"ISBN": "9781259860225",
|
||||
"abstractNote": "A complete guide to environmental regulations and remediation.This practical resource offers thorough coverage of current environmental issues and policies along with step-by-step remediation procedures. With contributions from dozens of industry-recognized experts, Handbook of Environmental Engineering features information on all segments of the market—including water and air quality and hazardous waste—and enables you to ensure compliance with all applicable regulations. You will get details about sensors, monitoring, and toxicity treatment and controls as well as waste management and safe disposal. Real-world examples demonstrate how to apply techniques and achieve compliance, while environmental impact assessments and measurement data enhance the book's utility.Coverage includes:• Environmental legislation• Environmental impact assessments• Air pollution control and management• Potable water treatment• Wastewater treatment and reuse• Solid waste management• Hazardous waste management• Emerging wastes in the environment• Environmental monitoring and measurements",
|
||||
"bookTitle": "Handbook of Environmental Engineering",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"publisher": "McGraw-Hill Education",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/book/9781259860225/toc-chapter/chapter3/section/section1",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/video/V4005352521001",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "123D Design: Cut Text Through a Plane",
|
||||
"creators": [],
|
||||
"date": "2014",
|
||||
"abstractNote": "This video shows how to cut text through a plane with Combine/Subtract.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"shortTitle": "123D Design",
|
||||
"studio": "McGraw-Hill Education",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/video/V4005352521001",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/calculator/S0071_Basic_Transformer_Calculations",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Basic Transformer Calculations",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Bhagyalakshmi",
|
||||
"lastName": "Kerekare",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2022/06/25/",
|
||||
"abstractNote": "This Excel workbook contains four worksheets. The first worksheet covers the basic concepts of single phase transformer such as turns ratio, primary current, secondary current, primary voltage, secondary voltage, and transformer ratio calculations. The second worksheet covers the basic concepts of power, efficiency, primary/secondary EMF and transformer rating calculations. The third worksheet covers the basic concepts of three phase transformers, highlighting the star and delta connections. Calculations are done for phase voltage, phase current, line voltage, and line current for star and delta connections. The fourth worksheet covers the basic concepts kVA Ratings, 3-phase primary, and secondary full load current 3-phase voltage calculations.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/calculator/S0071_Basic_Transformer_Calculations",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/case-study/CS0004_Atrial_Fibrillation",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Atrial Fibrillation: Improving Therapy via Engineering Advancements",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Michael J.",
|
||||
"lastName": "Rust",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-04-23",
|
||||
"abstractNote": "This case will explore atrial fibrillation from several perspectives, including the underlying physiology, clinical relevance, and instrumentation used for diagnosis and therapy. Students will identify and investigate unmet clinical needs that led to recent developments in technologies to treat atrial fibrillation.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"shortTitle": "Atrial Fibrillation",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/case-study/CS0004_Atrial_Fibrillation",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/tutorial/T0004_Partially_Full_Pipe_Flow_Calculations_Using_Excel_Spreadsheets",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Partially Full Pipe Flow Calculations Using Excel Spreadsheets",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Harlan H.",
|
||||
"lastName": "Bengtson",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2014/02/01/",
|
||||
"abstractNote": "This tutorial provides discussion of, and illustration by, examples for use of an Excel spreadsheet for making a variety of calculations for the flow of water in a partially full circular pipe using the Manning Equation. Equations for calculating area, wetted perimeter, and hydraulic radius for partially full pipe flow are included in this tutorial along with a brief review of the Manning Equation and discussion of its use to calculate a) the flow rate in a given pipe (given diameter, slope, & Manning roughness) at a specified depth of flow, b) the required diameter for a specified flow rate at a target percent full in a given pipe, and c) the normal depth (depth of flow) for a specified flow rate in a given pipe. This includes presentation and discussion of the equations for the calculations, example calculations, and screenshots of spreadsheets to facilitate the calculations.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessengineeringlibrary.com",
|
||||
"url": "https://www.accessengineeringlibrary.com/content/tutorial/T0004_Partially_Full_Pipe_Flow_Calculations_Using_Excel_Spreadsheets",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessengineeringlibrary.com/search?query=&f%5B0%5D=content_type%3ABooks&f%5B1%5D=book_component%3ATitles",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
343
translators/Access Medicine.js
Normal file
343
translators/Access Medicine.js
Normal file
@@ -0,0 +1,343 @@
|
||||
{
|
||||
"translatorID": "60e55b65-08cb-4a8f-8a61-c36338ec8754",
|
||||
"label": "Access Medicine",
|
||||
"creator": "Jaret M. Karnuta",
|
||||
"target": "^https?://(0-)?(access(anesthesiology|cardiology|emergencymedicine|medicine|pediatrics|surgery)|neurology)\\.mhmedical\\.com",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2017-01-12 22:14:02"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2016 Jaret M. Karnuta
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url){
|
||||
//check if search page
|
||||
//case differs between browsers, force lower case
|
||||
var pattern = /\/searchresults/i;
|
||||
var search = url.search(pattern) != -1;
|
||||
if (search){
|
||||
return "multiple";
|
||||
}
|
||||
//check if book section
|
||||
pattern = /\/content.*/i;
|
||||
var section = url.search(pattern) != -1;
|
||||
if (section){
|
||||
return "bookSection";
|
||||
}
|
||||
}
|
||||
|
||||
function doWeb(doc, url){
|
||||
var contentType = detectWeb(doc, url);
|
||||
if (contentType == "multiple"){
|
||||
//for formatting citation, recall case differences in url (see detectWeb)
|
||||
var pattern = /\/searchresults.*/i;
|
||||
var baseUrl = url.replace(pattern,'');
|
||||
var baseCitation = baseUrl + "/downloadCitation.aspx?format=ris§ionid=";
|
||||
|
||||
//search page
|
||||
//easier to use XPaths here
|
||||
var sections = ZU.xpath(doc, '//div[@class="search-entries"]/div[@class="row-fluid bordered-bottom"]/div[@class="span10"]');
|
||||
var sectionDict = {};
|
||||
var selectedSections = [];
|
||||
for (var i=0;i<sections.length;i++){
|
||||
var section = sections[i];
|
||||
var titleElement = ZU.xpath(section,'.//h3')[0];
|
||||
var title = ZU.trimInternal(titleElement.textContent);
|
||||
var bookElement = ZU.xpath(section, './/p')[0];
|
||||
var bookTitle = ZU.trimInternal(bookElement.textContent);
|
||||
var sectionId = ZU.xpath(titleElement,'.//a')[0].href;
|
||||
//sectionId is first query element in url
|
||||
var beginCut = sectionId.indexOf("=");
|
||||
var endCut = sectionId.indexOf("&");
|
||||
title = title+" ("+bookTitle+")";
|
||||
sectionId = sectionId.substring(beginCut+1, endCut);
|
||||
var link = baseCitation+sectionId;
|
||||
//prevent overriding, keep most relevant title
|
||||
if (!sectionDict[link]){
|
||||
sectionDict[link]=title;
|
||||
}
|
||||
}
|
||||
Z.selectItems(sectionDict, function(selected){
|
||||
if (!selected){
|
||||
return;
|
||||
}
|
||||
for (var link in selected){
|
||||
//got weird results with ZU.processDocuments
|
||||
//using a little hack instead
|
||||
risTranslate(doc, link, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
//only book section from now on
|
||||
var pattern = /\/content.*/i;
|
||||
var baseUrl = url.replace(pattern,'');
|
||||
var baseCitation = baseUrl + "/downloadCitation.aspx?format=ris§ionid=";
|
||||
var sectionId = url.toLowerCase().split("sectionid=")[1];
|
||||
var link = baseCitation + sectionId;
|
||||
risTranslate(doc, link, true);
|
||||
}
|
||||
}
|
||||
|
||||
function risTranslate(doc, link, bookSection){
|
||||
Zotero.Utilities.doGet(link, function(risText){
|
||||
//set RIS import translator
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(risText);
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
if (bookSection){
|
||||
var chapterSpan = doc.getElementById('pageContent_lblChapterTitle1');
|
||||
if (chapterSpan) {
|
||||
//remove 'chapter' text if present
|
||||
var chapterText = chapterSpan.innerHTML.trim();
|
||||
//item.notes.push('Chapter: '+chapterText);
|
||||
item.notes.push({note:chapterText});
|
||||
}
|
||||
item.attachments.push({
|
||||
title: "Snapshot",
|
||||
document: doc
|
||||
});
|
||||
}
|
||||
//parse out edition from title
|
||||
var bookTitle = item.bookTitle;
|
||||
if (bookTitle.indexOf(",") != -1){
|
||||
//get last substring (book title might have commas in it)
|
||||
var splitOnComma = bookTitle.split(",");
|
||||
var len = splitOnComma.length;
|
||||
var edition = splitOnComma[len-1];
|
||||
//remove e
|
||||
if (edition.indexOf("e") != -1){
|
||||
edition = edition.replace("e","");
|
||||
}
|
||||
edition = edition.trim();
|
||||
item.edition=edition;
|
||||
//rebuild book title
|
||||
splitOnComma.splice(-1);
|
||||
var newBookTitle=splitOnComma.join(",");
|
||||
item.bookTitle=newBookTitle;
|
||||
}
|
||||
|
||||
|
||||
if (item.abstractNote) {
|
||||
//make sure abstract text has spaces after periods
|
||||
var adjustedAbstract = item.abstractNote.replace('.','. ');
|
||||
//remove extra spaces from abstract notes field (common throughout)
|
||||
adjustedAbstract = adjustedAbstract.replace(/\s+/g, ' ');
|
||||
item.abstractNote = adjustedAbstract;
|
||||
}
|
||||
|
||||
//remove numberOfVolumes, incorrectly set in RIS
|
||||
item.numberOfVolumes="";
|
||||
|
||||
//remove authors if they dont have a first and last name
|
||||
for (var i=0;i<item.creators.length;i++){
|
||||
var author = item.creators[i];
|
||||
if (!author.lastName || !author.firstName){
|
||||
item.creators.splice(i,1);
|
||||
}
|
||||
}
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://accesssurgery.mhmedical.com/SearchResults.aspx?q=roux+en+y",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://accessemergencymedicine.mhmedical.com/content.aspx?sectionid=72121336&bookid=1345&Resultclick=2",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Foreign Bodies",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Tenenbein",
|
||||
"firstName": "Milton",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Schafermeyer",
|
||||
"firstName": "Robert",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Tenenbein",
|
||||
"firstName": "Milton",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Macias",
|
||||
"firstName": "Charles G.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Sharieff",
|
||||
"firstName": "Ghazala Q.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Yamamoto",
|
||||
"firstName": "Loren G.",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2015",
|
||||
"abstractNote": "Endobronchial and esophageal foreign bodies are marked by three clinical stages—an initial symptomatic stage of coughing, choking, and discomfort; a stage of relative amelioration of symptoms; followed by a stage of complications due to obstruction and infection. The gold standard for the diagnosis of an endobronchial foreign body is bronchoscopy.An asymptomatic or mildly symptomatic child with a coin in the esophagus can be observed for 8 to 16 hours because the coin will spontaneously pass into the stomach in 25% to 30% of these children.A useful method for removal of most intranasal foreign bodies is a positive-pressure technique such as the parent's kiss or a bag-valve-mask resuscitator.A useful initial method for removal of most foreign bodies from the external auditory canal is irrigation. This technique requires very little patient cooperation.An immobile battery, for example, in the esophagus, nose or ear, requires emergent removal to prevent perforation at the site of impaction and subsequent infection.Two or more rare-earth magnets in the gastrointestinal tract or on both sides of the nasal septum require emergent removal because of the potential of erosion and perforation of the tissue between the two adherent magnets.",
|
||||
"bookTitle": "Strange and Schafermeyer's Pediatric Emergency Medicine",
|
||||
"edition": "4",
|
||||
"libraryCatalog": "Access Medicine",
|
||||
"place": "New York, NY",
|
||||
"publisher": "McGraw-Hill Education",
|
||||
"url": "accessemergencymedicine.mhmedical.com/content.aspx?aid=1105680244",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Chapter 11"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://accessmedicine.mhmedical.com/content.aspx?sectionid=59610885&bookid=980&jumpsectionID=100405209&Resultclick=2",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Orthopedic Surgery",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Thomas",
|
||||
"firstName": "Bert J.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Fu",
|
||||
"firstName": "Freddie H.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Muller",
|
||||
"firstName": "Bart",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Vyas",
|
||||
"firstName": "Dharmesh",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Niesen",
|
||||
"firstName": "Matt",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Pribaz",
|
||||
"firstName": "Jonathan",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Draenert",
|
||||
"firstName": "Klaus",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Brunicardi",
|
||||
"firstName": "F. Charles",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Andersen",
|
||||
"firstName": "Dana K.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Billiar",
|
||||
"firstName": "Timothy R.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Dunn",
|
||||
"firstName": "David L.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Hunter",
|
||||
"firstName": "John G.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Matthews",
|
||||
"firstName": "Jeffrey B.",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"lastName": "Pollock",
|
||||
"firstName": "Raphael E.",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2014",
|
||||
"abstractNote": "The main principle of internal fixation for fracture care (most commonly intramedullary nails or plate and screw fixation) is to create a stable construct that will allow the fracture to heal in proper alignment. Often, in open fractures, definitive treatment of the fracture is delayed until the wound is sufficiently cleaned and healthy soft tissue is available to cover the fracture.When compartment syndrome is suspected, emergent fasciotomy must be performed in which the overlying tight fascia is released through long incisions. These must be done as soon as possible because the damage to muscles and nerves will result in irreversible necrosis and contractures causing severe loss of function.Fractures of the scapula often result from significant trauma and can be associated with injuries to the head, lungs, ribs, and spine.The shoulder is one of the most commonly dislocated joints and most dislocations are anterior. Posterior dislocations are associated with seizures or electric shock.Humeral shaft fractures occur from direct trauma to the arm or from a fall on an outstretched arm, especially in elderly patients. The radial nerve spirals around the humeral shaft and is at risk for injury, therefore a careful neurovascular exam is important.Hemorrhage from pelvic trauma can be life threatening. An important first line treatment in the emergency room is the application of a pelvic binder or sheet that is wrapped tightly around the pelvis to control bleeding.In spinal injury spinal stability must be assessed, and the patient immobilized until his spine is cleared. CT scan is more reliable in assessing spine injury than plain radiographs.Spinal cord injuries should be triaged to trauma centers since trauma center care is associated with reduced paralysis.According to the CDC and the National Health Interview Survey approximately 50 million adults (22% of the US population) have been diagnosed with some form of arthritis. This number is projected to grow to an astounding 67 million adults by 2030 (or 25% of the U.S. population).Weight loss of as little as 11 pounds has been shown to decrease the risk of developing knee osteoarthritis in women by 50%. Similarly, patients who engage in regular physical activity have been found to have lower incidence of arthritis.Smaller incisions come with the disadvantage of decreased visualization intra-operatively and associated risks of component malposition, intraoperative fracture and nerve or vascular injury. The only documented benefit of minimally invasive techniques appears to be improved cosmesis.",
|
||||
"bookTitle": "Schwartz's Principles of Surgery",
|
||||
"edition": "10",
|
||||
"libraryCatalog": "Access Medicine",
|
||||
"place": "New York, NY",
|
||||
"publisher": "McGraw-Hill Education",
|
||||
"url": "accessmedicine.mhmedical.com/content.aspx?aid=1117754305",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Chapter 43"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
391
translators/Access Science.js
Normal file
391
translators/Access Science.js
Normal file
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"translatorID": "558330ca-3531-467a-8003-86cd9602cc48",
|
||||
"label": "Access Science",
|
||||
"creator": "Vinoth K - highwirepress.com",
|
||||
"target": "^https?://www\\.accessscience\\.com/",
|
||||
"minVersion": "5.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-10-17 20:19:39"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2023 Vinoth K - highwirepress.com
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
let title = attr(doc, 'meta[name="citation_title"]', 'content');
|
||||
if (title) {
|
||||
if (doc.querySelector('meta[name="citation_isbn"]')) {
|
||||
let bookTitle = attr(doc, 'meta[name="citation_book_title"]', 'content');
|
||||
if (!bookTitle || title == bookTitle) {
|
||||
return "book";
|
||||
}
|
||||
else {
|
||||
return "bookSection";
|
||||
}
|
||||
}
|
||||
else if (url.includes('content/video/') || url.includes('content/video-biography')) {
|
||||
return 'videoRecording';
|
||||
}
|
||||
else if (url.includes('content/article/')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (url.includes('news') || url.includes('briefing')) {
|
||||
return "magazineArticle";
|
||||
}
|
||||
else {
|
||||
return "webpage";
|
||||
}
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.search-middle-right a[href]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// Author
|
||||
// Some of video pages having old content which does not contain the
|
||||
// firstname and lastname. which is binding in a single string in
|
||||
// metadata tags, So those cases we were split and mapped accordingly
|
||||
if (item.itemType == 'videoRecording') {
|
||||
let authorName = attr(doc, 'meta[name="citation_author"]', 'content');
|
||||
if (authorName) {
|
||||
item.creators = [];
|
||||
if (authorName.includes(',') && authorName.split(',').length > 2) {
|
||||
authorName = authorName.split(',')[0];
|
||||
item.creators.push(ZU.cleanAuthor(authorName, "author", false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let abstractNote = attr(doc, 'meta[name="citation_abstract"]', 'content');
|
||||
item.abstractNote = abstractNote && ZU.cleanTags(abstractNote);
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = detectWeb(doc, url);
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/book/9781260452297",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Casarett & Doull's Essentials of Toxicology",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Curtis D.",
|
||||
"lastName": "Klaassen",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "John B. Watkins",
|
||||
"lastName": "Iii",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2022",
|
||||
"ISBN": "9781260452297",
|
||||
"abstractNote": "Doody9s Core Titles for 2021!\n\nFor more than 25 years, Casarett & Doull9s Toxicology: The Basic Science of Poisons has set the standard for providing thorough, academic, and authoritative information in clear and engaging ways. Distilling the major principles and concepts from that renowned text, Casarett & Doull9s Essentials of Toxicology delivers an accessible and highly readable introduction to the science and clinical field of medical toxicology. The book reflects the expertise of more than 60 renowned contributors.\n\nPresented in full-color, this new edition builds on the wide success of previous editions, with extensive updates that make the book more clinically relevant to students and beginners in toxicology, pharmacology, pharmacy, and environmental sciences. Chapter-ending self-assessment Q&As and other features make the learning process more effective and efficient.\n\nCasarett and Doull9s Essentials of Toxicology is organized into seven units:\n\n• General Principles of Toxicology\n\n• Disposition of Toxicants\n\n• Nonorgan-directed Toxicity\n\n• Target Organ Toxicity\n\n• Toxic Agents\n\n• Environmental Toxicology\n\n• Applications of Toxicology\n\nSuccinct, yet comprehensive, the text covers essential principles, toxicokinetics, how toxic effects are passed on to succeeding generations, how each body system responds to poisons, and the specific effects of a wide range of toxic agents—from pesticides to radiation.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"publisher": "McGraw Hill",
|
||||
"url": "https://www.accessscience.com/content/book/9781260452297",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/book/9781260452297/chapter/chapter2",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Principles of Toxicology",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Lauren M.",
|
||||
"lastName": "Aleksunes",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "David L.",
|
||||
"lastName": "Eaton",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Curtis D.",
|
||||
"lastName": "Klaassen",
|
||||
"creatorType": "editor"
|
||||
},
|
||||
{
|
||||
"firstName": "John B. Watkins",
|
||||
"lastName": "Iii",
|
||||
"creatorType": "editor"
|
||||
}
|
||||
],
|
||||
"date": "2022",
|
||||
"ISBN": "9781260452297",
|
||||
"bookTitle": "Casarett & Doull's Essentials of Toxicology",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"publisher": "McGraw Hill",
|
||||
"url": "https://www.accessscience.com/content/book/9781260452297/chapter/chapter2",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/video/V2537194263001",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Supplementary Problem 10.12",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Rebecca B.",
|
||||
"lastName": "DeVasher",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2013",
|
||||
"abstractNote": "This video details a problem involving unit cells and the calculation of the mass of a cell, length of a cell and radius of an atom in the unit cell based on the density of a solid.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"studio": "McGraw Hill",
|
||||
"url": "https://www.accessscience.com/content/video/V2537194263001",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/video-biography/VB0014",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Anderson, John R.",
|
||||
"creators": [],
|
||||
"date": "2011",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"studio": "McGraw Hill",
|
||||
"url": "https://www.accessscience.com/content/video-biography/VB0014",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/article/a694300?implicit-login=true",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "3D printing",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Wenchao",
|
||||
"lastName": "Zhou",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2023",
|
||||
"DOI": "10.1036/1097-8542.694300",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"url": "https://www.accessscience.com/content/article/a694300",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/news/aSN2301171?implicit-login=true",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "These chemists cracked the code to long-lasting Roman concrete",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Carolyn",
|
||||
"lastName": "Gramling",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2023",
|
||||
"extra": "DOI: 10.1036/1097-8542.SN0000000",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"url": "https://www.accessscience.com/content/news/aSN2301171",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/video/an600010",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Henrietta Leavitt: The Woman Who Measured the Universe",
|
||||
"creators": [],
|
||||
"abstractNote": "Born in 1868, Henrietta Leavitt was an astronomer ahead of her time, whose work helped to revolutionize our understanding of the universe. While working at Harvard Observatory, Leavitt began to study stars of fluctuating brightness. This video describes her crucial observation about variable stars, which gave astronomers a new way to measure distances, ultimately leading to such impactful discoveries as the expansion of the universe.\n\nCredit: ESA Hubble Videos; Hubblecast 116: Henrietta Leavitt — ahead of her time; Directed by: Mathias Jäger; Visual design and editing: Martin Kornmesser; Written by: Sara Rigby; Narration: Sara Mendes da Costa; Images: ESA/Hubble and NASA, ESO, Hubble Heritage Team (STScI/AURA), Library of Congress Prints and Photographs Division Washington, Harvard College Observatory, Huntington Library, California Institute of Technology, Digitized Sky Survey 2, M. Kornmesser, R. Gendler, Arnold Reinhold, Davide De Martin; Videos: NASA, ESA, M. Kornmesser, Luis Calcada; Music: Johan B. Monell; Web and technical support: Mathias André and Raquel Yumi Shida; Executive producer: Lars Lindberg Christensen",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.accessscience.com",
|
||||
"shortTitle": "Henrietta Leavitt",
|
||||
"studio": "McGraw Hill",
|
||||
"url": "https://www.accessscience.com/content/video/an600010",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/content/biography/m0073908",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "webpage",
|
||||
"title": "Abbe, Cleveland (1838–1916)",
|
||||
"creators": [],
|
||||
"language": "en",
|
||||
"url": "https://www.accessscience.com/content/biography/m0073908",
|
||||
"websiteTitle": "McGraw Hill's AccessScience",
|
||||
"websiteType": "text",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.accessscience.com/search?query=&items_per_page=10",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
405
translators/Adam Matthew Digital.js
Normal file
405
translators/Adam Matthew Digital.js
Normal file
@@ -0,0 +1,405 @@
|
||||
{
|
||||
"translatorID": "0701696c-3523-47ba-9617-b04eee03b6ba",
|
||||
"label": "Adam Matthew Digital",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://www\\.([^.]+)\\.amdigital\\.co\\.uk/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-10-21 05:00:48"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/DocumentDetails.aspx') // older collections
|
||||
|| url.includes('/DocumentDetailsSearch.aspx')) {
|
||||
return 'manuscript';
|
||||
}
|
||||
if (url.includes('/Documents/Details/') // newer collections
|
||||
|| url.includes('/Documents/SearchDetails')) {
|
||||
return getTypeNew(doc);
|
||||
}
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (doc.querySelector('.DocumentsList')) {
|
||||
Z.monitorDOMChanges(doc.querySelector('.DocumentsList'));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTypeNew(doc) {
|
||||
let type = text(doc, 'tr[data-field-name="Document Type"] td[data-field-role="value"]');
|
||||
if (!type) {
|
||||
if (doc.body.classList.contains('cinema')) {
|
||||
return 'videoRecording';
|
||||
}
|
||||
else {
|
||||
return 'document';
|
||||
}
|
||||
}
|
||||
|
||||
type = ZU.trimInternal(type).toLowerCase();
|
||||
|
||||
if (type.includes('book')) {
|
||||
return 'book';
|
||||
}
|
||||
if (type.includes('manuscript')) {
|
||||
return 'manuscript';
|
||||
}
|
||||
if (type.includes('drawing') || type.includes('illustration')
|
||||
|| type.includes('photograph')) {
|
||||
return 'artwork';
|
||||
}
|
||||
if (type.includes('map')) {
|
||||
return 'map';
|
||||
}
|
||||
if (type.includes('correspondence')) {
|
||||
return 'letter';
|
||||
}
|
||||
return 'document';
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
const items = {};
|
||||
let found = false;
|
||||
const rows = doc.querySelectorAll(
|
||||
'.contentsList .tableRow .descriptionCell a, .SearchList tbody .title a, .DocumentsList tbody .title a');
|
||||
for (const row of rows) {
|
||||
const href = row.href;
|
||||
const title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
if (url.includes('/Documents/')) {
|
||||
// newer collections (served with HTTPS, no .aspx pages) have a
|
||||
// completely different, and much easier to parse, structure
|
||||
scrapeNew(doc, url);
|
||||
}
|
||||
else {
|
||||
scrapeOld(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrapeNew(doc, url) {
|
||||
function fromTable(fieldName) {
|
||||
return text(doc, `tr[data-field-name="${fieldName}"] td[data-field-role="value"]`);
|
||||
}
|
||||
|
||||
let item = new Zotero.Item(getTypeNew(doc));
|
||||
|
||||
item.title = fromTable('Title');
|
||||
item.abstractNote = fromTable('Abstract') || fromTable('Additional Information');
|
||||
item.date = ZU.strToISO(fromTable('Date'));
|
||||
item.place = fromTable('Places');
|
||||
item.rights = fromTable('Copyright');
|
||||
item.publisher = fromTable('Publisher');
|
||||
item.language = fromTable('Language');
|
||||
|
||||
item.creators = fromTable('Names')
|
||||
.split('; ')
|
||||
.map(name => ZU.cleanAuthor(name, 'author', true));
|
||||
|
||||
let director = fromTable('Director');
|
||||
if (director) {
|
||||
item.creators.push(ZU.cleanAuthor(director, 'director', true));
|
||||
}
|
||||
|
||||
let pageSelect = doc.querySelector('#DownloadPageFrom');
|
||||
if (pageSelect) {
|
||||
item.numPages = pageSelect.childElementCount;
|
||||
}
|
||||
item.archive = fromTable('Library/Archive') || fromTable('Collection');
|
||||
item.archiveLocation = fromTable('Reference');
|
||||
item.libraryCatalog = extractCatalogName(doc.title);
|
||||
item.url = url.replace('/SearchDetails/', '/Details/')
|
||||
.replace('?SessionExpired=True', '');
|
||||
|
||||
if (item.itemType != 'videoRecording') {
|
||||
item.attachments.push({
|
||||
title: "Full Text PDF",
|
||||
mimeType: 'application/pdf',
|
||||
url: attr(doc, 'a[href*="/FullDownload"]', 'href')
|
||||
});
|
||||
}
|
||||
|
||||
item.tags = [...doc.querySelectorAll('tr[data-field-name="Subjects"] td[data-field-role="value"] a')]
|
||||
.map(el => ({ tag: el.textContent }));
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function scrapeOld(doc, url) {
|
||||
function fromTable(selector) {
|
||||
return text(doc, selector + ' > .detCol2') || text(doc, selector);
|
||||
}
|
||||
|
||||
let item = new Zotero.Item('manuscript');
|
||||
|
||||
item.title = fromTable('#Body_DocumentDetailsMeta_descSpan')
|
||||
|| fromTable('#Body_descriptionElement');
|
||||
let abstract = doc.querySelector('#Body_DocumentDetailsMeta_notesElement>.detCol2, #Body_notesElement>.detCol2');
|
||||
item.abstractNote = abstract ? abstract.innerText : "";
|
||||
item.date = ZU.strToISO(fromTable('#Body_DocumentDetailsMeta_dateElement'));
|
||||
|
||||
let pageSelect = doc.querySelector('.pageRangeSelect'); // either will do
|
||||
if (pageSelect) {
|
||||
item.numPages = pageSelect.childElementCount;
|
||||
}
|
||||
item.archive = fromTable('#Body_DocumentDetailsMeta_sourceElement');
|
||||
|
||||
let box = fromTable('#Body_DocumentDetailsMeta_boxElement')
|
||||
|| fromTable('#Body_boxElement');
|
||||
let folder = fromTable('#Body_DocumentDetailsMeta_folderElement')
|
||||
|| fromTable('#Body_folderElement');
|
||||
item.archiveLocation = `Box ${box}, folder ${folder}`;
|
||||
item.libraryCatalog = extractCatalogName(doc.title);
|
||||
item.attachments.push({
|
||||
title: "Full Text PDF",
|
||||
mimeType: 'application/pdf',
|
||||
url: attr(doc, '.downloadPDFLink > a', 'href')
|
||||
});
|
||||
// we want a URL without any search strings, navigation data, etc
|
||||
item.url = url.replace(/\?.*(documentid=[^&]+).*/, '?$1');
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/**
|
||||
* get the site's name by taking everything after the first segment of the title:
|
||||
* "Search Results - Jewish Life in America - Adam Matthew Digital"
|
||||
* becomes "Jewish Life in America - Adam Matthew Digital"
|
||||
*/
|
||||
function extractCatalogName(title) {
|
||||
return title.substring(title.indexOf('-') + 2);
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.jewishlife.amdigital.co.uk/Contents/DocumentDetailsSearch.aspx?documentid=289906&prevPos=289906&vpath=SearchResults&searchmode=true&pi=1",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "Manuscript notebook of poems",
|
||||
"creators": [],
|
||||
"abstractNote": "Page\n\n1 'The New Colossus'\n\n2 'Progress and Poverty'\n\n3 'Venus of the Louvre'\n\n4 'Destiny I'\n\n5 'Destiny II'\n\n6 'Influence'\n\n7 'Success'\n\n8-11 'Chopin I, II, III, IV'\n\n12 'With a Copy of Don Quixote'\n\n13 'To F.P.'\n\n14 'One Augur to Another'\n\n15 'Cranes of Ibicus'\n\n16 'Reconciliation'\n\n17 'Incident at Sea' 18 'Will O' the Wisp'\n\n19 'Assurance'\n\n20 'Echoes'\n\n21 'St. Michael's Chapel'\n\n22-23 'Under the Sea. I, II'\n\n24 'Taming of the Falcon'\n\n25 'Supreme Sacrifice'\n\n26 'Life and Art'\n\n27 'Sympathy'\n\n28 'Dreaming Castle'\n\n29 'To R.W.E.'\n\n30-37 'Symphonic Studies (after Robert Schumann). Prelude, I, II, III, IV, V, VI Epilogue'\n\n38 'City Visions'\n\n40 'Long Island Sound'\n\n41-49 Translated Sonnets:\n\nPage 41 'Art the Redeemer'\n\nPage 42 'From the French of Fran<61>ois Copp<70>'\n\nPages 44-49 'Six Sonnets from the Studies of Petrarch, a. 'In Vita LXVII', b. 'In Vita LXXVI', c. 'In Morte XLIII', d. 'In Morte II. On the Death of Cardinal Colonna and Laura', e. 'In Vita CIX', f. 'In Vita, CV'\n\n50 '1492'\n\n51 'Restlessness'\n\n52 'Child at the Bath. R. de K. G.'\n\n54 'Autumn Sadness'\n\n56 'Song. Venus'\n\n57 'From the Arabian Nights'\n\n58 'Reed Song'\n\n59 'Moonlight, from German of Eichendorff'\n\n60 'Songs from Eichendroff'\n\n61 'Lida and the Swan. Faust. Part II. Act II. Scene 2'\n\n62-72 'Phaon'\n\n73 'To the Moon after Sunrise'\n\n75-79 'Fragments from Petrarch'\n\nPage 75 'Canzone XII. 5'\n\nPage 76 'Trionfo Della Morte'\n\nPage 77 'Trionfo D'Amore'\n\nPage 78 'Triumph of Death'\n\n80 'Sunrise'\n\n85 'To Nelly [?] Sleeping'\n\n89-97 'The Creation of Man. Miwk [Mohawk] Fable'\n\n98-105 'The New Cupid. From the German of Goethe'\n\n106-111 'August Moon'\n\n112-115 'My Goddess. From the German of Goethe'\n\n116-119 'The Old Year-1883. Affectionately dedicated to W.S.P. & W.A.P.'\n\n120 'Ariel and Euphorion' [clippings pasted into notebook, unknown journal]\n\n122 'Don Rafael' [clippings pasted into notebook, unknown journal]\n\n122 'Two Sonnets' [clippings pasted into notebook, unknown journal]: 'Sonnet I. Petrarch: To a Friend', 'Sonnet II. Art, the Redeemer'\n\n123 'The New Ezekiel' [clippings pasted into notebook, unknown journal]\n\n123 'The Choice' [clippings pasted into notebook, for The American Hebrew]\n\n123 'The Supreme Sacrifice' [clippings pasted into notebook, for The American Hebrew]\n\n123 'Zulieka. Translated from Goethe's 'West Gestliche Divan' [clippings pasted into notebook, unknown journal, most possibly in Jewish Messenger]\n\n124 'The World's Justice' [clippings pasted into notebook, unknown journal]\n\n124 'The Feast of Lights' [clippings pasted into notebook, for The American Hebrew]\n\n126-130 'Grotesque'\n\n131-136 'Translations from Copp<70>'\n\n137-149 ['By the Waters of Babylon'] 'Little Poems in Prose:\n\nPage 137 'I. The Exodus'\n\nPage 140 'II. Treasures'\n\nPage 141 'III. The Sower'\n\nPage 143 'IV. The Test'\n\nPage 144 'V. The Prophet'\n\nPage 146-147 Pages are blank in the original\n\nPage 148 'VI. Currents'\n\nPage 149 'VII. Chrysalis'\n\n150 'Gifts'\n\n152 'A Masque of Venice'\n\n156 'To Carmen Sylva'\n\n[Page 156 is followed by 159, with no gaps in poetry]\n\n161-163 'In a Gothic Church' (never completed).",
|
||||
"archive": "American Jewish Historical Society",
|
||||
"archiveLocation": "Box 1, folder 2",
|
||||
"libraryCatalog": "Jewish Life in America - Adam Matthew Digital",
|
||||
"numPages": 165,
|
||||
"url": "http://www.jewishlife.amdigital.co.uk/Contents/DocumentDetailsSearch.aspx?documentid=289906",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.jewishlife.amdigital.co.uk/Contents/DocumentDetails.aspx?documentid=288444&prevPos=288444&filter=0%7c1%7c2&vpath=contents&pi=1",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "Baron de Hirsch Fund colonies and schools",
|
||||
"creators": [],
|
||||
"abstractNote": "See also P19/OS1/2",
|
||||
"archiveLocation": "Box 3, folder 2",
|
||||
"libraryCatalog": "Jewish Life in America - Adam Matthew Digital",
|
||||
"numPages": 38,
|
||||
"url": "http://www.jewishlife.amdigital.co.uk/Contents/DocumentDetails.aspx?documentid=288444",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.jewishlife.amdigital.co.uk/Contents/Default.aspx?filter=1%7c0",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.gender.amdigital.co.uk/Documents/Details/Etiquette%20for%20Ladies%20and%20Gentlemen%20London%201876?SessionExpired=True",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Etiquette for Ladies and Gentlemen",
|
||||
"creators": [],
|
||||
"date": "1876",
|
||||
"archive": "Bodleian Library, University of Oxford",
|
||||
"archiveLocation": "268 c.457",
|
||||
"libraryCatalog": "Defining Gender - Adam Matthew Digital",
|
||||
"numPages": 65,
|
||||
"publisher": "Frederick Warne and Co.",
|
||||
"url": "https://www.gender.amdigital.co.uk/Documents/Details/Etiquette%20for%20Ladies%20and%20Gentlemen%20London%201876",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.americanwest.amdigital.co.uk/Documents/Details/Graff_2445",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "document",
|
||||
"title": "$150 reward. Whereas a robbery was committed in the vicinity of the town of Fort Madison, on the 22d Inst….",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Jacob",
|
||||
"lastName": "Guy",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Jacob",
|
||||
"lastName": "Bowers",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "W. Braxton",
|
||||
"lastName": "Gillock",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1840",
|
||||
"archive": "Everett D. Graff Collection of Western Americana",
|
||||
"archiveLocation": "Graff 2445",
|
||||
"libraryCatalog": "American West - Adam Matthew Digital",
|
||||
"url": "https://www.americanwest.amdigital.co.uk/Documents/Details/Graff_2445",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.socialismonfilm.amdigital.co.uk/Documents/Details/BFI_ETV_Advance_Democracy_25SD_Prores-4?SessionExpired=True#MediaSummary",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "videoRecording",
|
||||
"title": "Advance Democracy",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Ralph",
|
||||
"lastName": "Bond",
|
||||
"creatorType": "director"
|
||||
}
|
||||
],
|
||||
"abstractNote": "Starts with a discussion of inequality in London contrasting the rich with the lives of the poor. Features the hard lives of dock workers and a semi-dramatization of them complaining about taxes and their uses to fight wars. A wife talks to her husband about the merits of the Co-operative, and the husband later listens to a speech about democracy and the co-operative movement which mentions the sacrifices of the Tolpuddle Martyrs, the Chartists and the Rochdale Equitable Pioneers. Warns of the dangers of Nazis (with archive footage of Hitler and war). The protagonist of the film is won over and mobilises his colleagues to march on May Day. Features a medley of labour movement songs.",
|
||||
"language": "English (Dialogue)",
|
||||
"libraryCatalog": "Socialism on Film: The Cold War and International Propaganda - Adam Matthew Digital",
|
||||
"place": "United Kingdom London",
|
||||
"rights": "The British Film Institute",
|
||||
"url": "https://www.socialismonfilm.amdigital.co.uk/Documents/Details/BFI_ETV_Advance_Democracy_25SD_Prores-4#MediaSummary",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Co-operatives"
|
||||
},
|
||||
{
|
||||
"tag": "Family"
|
||||
},
|
||||
{
|
||||
"tag": "Industry"
|
||||
},
|
||||
{
|
||||
"tag": "Music"
|
||||
},
|
||||
{
|
||||
"tag": "Politics"
|
||||
},
|
||||
{
|
||||
"tag": "Ships and shipping"
|
||||
},
|
||||
{
|
||||
"tag": "Shopping"
|
||||
},
|
||||
{
|
||||
"tag": "Social class"
|
||||
},
|
||||
{
|
||||
"tag": "Trade unions"
|
||||
},
|
||||
{
|
||||
"tag": "Women"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
77
translators/Agencia del ISBN.js
Normal file
77
translators/Agencia del ISBN.js
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"translatorID": "b8a86e36-c270-48c9-bdd1-22aaa167ef46",
|
||||
"label": "Agencia del ISBN",
|
||||
"creator": "Michael Berkowitz",
|
||||
"target": "^https?://www\\.mcu\\.es/webISBN",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcs",
|
||||
"lastUpdated": "2015-06-10 11:33:38"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.evaluate('//div[@class="isbnResultado"]/div[@class="isbnResDescripcion"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
return "multiple";
|
||||
} else if (doc.evaluate('//div[@class="fichaISBN"]/div[@class="cabecera"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
return "book";
|
||||
}
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var books = new Array();
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
var boxes = doc.evaluate('//div[@class="isbnResultado"]/div[@class="isbnResDescripcion"]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var box;
|
||||
while (box = boxes.iterateNext()) {
|
||||
var book = doc.evaluate('./p/span/strong/a', box, null, XPathResult.ANY_TYPE, null).iterateNext();
|
||||
items[book.href] = book.textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
for (var i in items) {
|
||||
books.push(i);
|
||||
}
|
||||
Zotero.Utilities.processDocuments(books, scrape);
|
||||
});
|
||||
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape (doc, url){
|
||||
var data = new Object();
|
||||
var rows = doc.evaluate('//div[@class="fichaISBN"]/table/tbody/tr', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var next_row;
|
||||
while (next_row = rows.iterateNext()) {
|
||||
var heading = doc.evaluate('./th', next_row, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
var value = doc.evaluate('./td', next_row, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
data[heading.replace(/\W/g, "")] = value;
|
||||
}
|
||||
var isbn = Zotero.Utilities.trimInternal(doc.evaluate('//span[@class="cabTitulo"]/strong', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent);
|
||||
var item = new Zotero.Item("book");
|
||||
item.ISBN = isbn;
|
||||
item.title = Zotero.Utilities.trimInternal(data['Ttulo']);
|
||||
item.title= item.title.replace(/\s+:/, ":");
|
||||
author = data['Autores'];
|
||||
if (author) {
|
||||
var authors = author.match(/\b.*,\s+\w+[^([]/g);
|
||||
for (var i=0; i<authors.length; i++) {
|
||||
var aut = Zotero.Utilities.trimInternal(authors[i]);
|
||||
item.creators.push(Zotero.Utilities.cleanAuthor(Zotero.Utilities.trimInternal(aut), "author", true));
|
||||
}
|
||||
}
|
||||
if (data['Publicacin']) item.publisher = Zotero.Utilities.trimInternal(data['Publicacin']);
|
||||
if (data['FechaEdicin']) item.date = Zotero.Utilities.trimInternal(data['FechaEdicin']);
|
||||
item.complete();
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = []
|
||||
/** END TEST CASES **/
|
||||
309
translators/Ahval News.js
Normal file
309
translators/Ahval News.js
Normal file
@@ -0,0 +1,309 @@
|
||||
{
|
||||
"translatorID": "64f4a2b8-33d8-4303-834a-3b71065cf6c6",
|
||||
"label": "Ahval News",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://ahvalnews\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-12 20:49:38"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (getJSONLD(doc)) {
|
||||
return "newspaperArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h2.field-title > a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, _url) {
|
||||
let item = new Zotero.Item('newspaperArticle');
|
||||
let json = getJSONLD(doc);
|
||||
|
||||
item.title = json.headline;
|
||||
item.abstractNote = json.description;
|
||||
item.publicationTitle = 'Ahval';
|
||||
item.date = ZU.strToISO(json.dateModified || json.datePublished);
|
||||
item.section = json.articleSection;
|
||||
item.language = doc.documentElement.lang;
|
||||
item.url = json.url;
|
||||
|
||||
if (json.author && json.author.name != 'Ahval') {
|
||||
// usually no authors, sometimes one
|
||||
item.creators.push(ZU.cleanAuthor(json.author.name, 'author'));
|
||||
}
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function getJSONLD(doc) {
|
||||
let jsonLDText = text(doc, 'script[type="application/ld+json"]');
|
||||
if (!jsonLDText.trim()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let json = JSON.parse(jsonLDText);
|
||||
if (!json['@graph']) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (let graphObj of json['@graph']) {
|
||||
if (graphObj['@type'] == 'NewsArticle') {
|
||||
return graphObj;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/turkish-lira/turkey-signs-2-billion-currency-swap-deal-south-korea",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Turkey signs $2 billion currency swap deal with South Korea",
|
||||
"creators": [],
|
||||
"date": "2021-08-12",
|
||||
"abstractNote": "Turkey’s central bank and the Bank of Korea signed a currency swap agreement in lira and won worth as much as $2 billion.\r\n\r\nThe deal, effective for three years from Thursday, is designed to promote bilateral trade and financial cooperation for the economic development of both countries, the Bank of Korea said in a statement on its website.\r\n\r\nTurkey has sought to obtain currency swaps with central banks around the world to help bolster its foreign exchange reserves, which have fallen into negative territory when accounting for liabilities. The agreements, which have included arrangements worth about $10 billion with Turkey’s regional ally Qatar, have failed to halt a slide in the lira’s value to successive record lows since a 2018 currency crisis.\r\n\r\nIt is interesting that “another G20 central bank seems willing to support and prolong the continuation of really questionable monetary policy settings in Turkey”, said Tim Ash, a senior emerging markets strategist at BlueBay Asset Management in London. The deal \"does not really touch the sides\" in terms of defending the lira, he said.\r\n\r\nTurkey’s central bank kept interest rates at below inflation for much of last year to help the government engineer a borrowing boom. That led to an exodus of capital from the lira as deposit holders saw returns from their investments, net of inflation, disappear.\r\n\r\nThe lira rose 0.3 percent to 8.6 per dollar after the swap deal was announced after trading up 0.1 percent earlier in the day.\r\n\r\nThe agreement with the Bank of Korea was announced hours before the Turkish central bank was due to publish a monthly decision on interest rates. The benchmark rate in Turkey stands at 19 percent, marginally above annual consumer price inflation of 18.95 percent.\r\n\r\nPresident Recep Tayyip Erdoğan is calling for rate cuts and has sacked three central bank governors in just over two years due to disagreements over monetary policy. Erdoğan holds the unorthodox view that higher interest rates are inflationary. The latest governor, appointed in March, has kept rates unchanged even as inflation accelerated from 15.6 percent in February.\r\n\r\nSouth Korean companies make substantial investments in Turkey’s economy, particularly in the construction, energy and technology industries. The investments have included a 2017 contract for the building of the world’s longest suspension bridge over the Dardanelles straits worth around $2.7 billion.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "News",
|
||||
"url": "https://ahvalnews.com/turkish-lira/turkey-signs-2-billion-currency-swap-deal-south-korea",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/northern-cyprus-turkey/former-turkish-cypriot-leader-akincis-adviser-banned-entering-turkey",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Former Turkish Cypriot leader Akıncı’s adviser banned from entering Turkey",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Tümay",
|
||||
"lastName": "Tuğyan",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-07-13",
|
||||
"abstractNote": "Ali Bizden, the press and communications coordinator of former Turkish Cypriot leader Mustafa Akıncı, was banned from entering Turkey for five years on charges of acting against the country’s national security.\r\n\r\nBizden was informed of the ban by immigration police in Turkey on Tuesday night after he sought to pass through passport control at Istanbul’s Sabiha Gökçen Airport. The ban had been ordered back in September last year, he said via social media on Wednesday.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "News",
|
||||
"url": "https://ahvalnews.com/northern-cyprus-turkey/former-turkish-cypriot-leader-akincis-adviser-banned-entering-turkey",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/turkish-lira/turkey-signs-2-billion-currency-swap-deal-south-korea",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Turkey signs $2 billion currency swap deal with South Korea",
|
||||
"creators": [],
|
||||
"date": "2021-08-12",
|
||||
"abstractNote": "Turkey’s central bank and the Bank of Korea signed a currency swap agreement in lira and won worth as much as $2 billion.\r\n\r\nThe deal, effective for three years from Thursday, is designed to promote bilateral trade and financial cooperation for the economic development of both countries, the Bank of Korea said in a statement on its website.\r\n\r\nTurkey has sought to obtain currency swaps with central banks around the world to help bolster its foreign exchange reserves, which have fallen into negative territory when accounting for liabilities. The agreements, which have included arrangements worth about $10 billion with Turkey’s regional ally Qatar, have failed to halt a slide in the lira’s value to successive record lows since a 2018 currency crisis.\r\n\r\nIt is interesting that “another G20 central bank seems willing to support and prolong the continuation of really questionable monetary policy settings in Turkey”, said Tim Ash, a senior emerging markets strategist at BlueBay Asset Management in London. The deal \"does not really touch the sides\" in terms of defending the lira, he said.\r\n\r\nTurkey’s central bank kept interest rates at below inflation for much of last year to help the government engineer a borrowing boom. That led to an exodus of capital from the lira as deposit holders saw returns from their investments, net of inflation, disappear.\r\n\r\nThe lira rose 0.3 percent to 8.6 per dollar after the swap deal was announced after trading up 0.1 percent earlier in the day.\r\n\r\nThe agreement with the Bank of Korea was announced hours before the Turkish central bank was due to publish a monthly decision on interest rates. The benchmark rate in Turkey stands at 19 percent, marginally above annual consumer price inflation of 18.95 percent.\r\n\r\nPresident Recep Tayyip Erdoğan is calling for rate cuts and has sacked three central bank governors in just over two years due to disagreements over monetary policy. Erdoğan holds the unorthodox view that higher interest rates are inflationary. The latest governor, appointed in March, has kept rates unchanged even as inflation accelerated from 15.6 percent in February.\r\n\r\nSouth Korean companies make substantial investments in Turkey’s economy, particularly in the construction, energy and technology industries. The investments have included a 2017 contract for the building of the world’s longest suspension bridge over the Dardanelles straits worth around $2.7 billion.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "News",
|
||||
"url": "https://ahvalnews.com/turkish-lira/turkey-signs-2-billion-currency-swap-deal-south-korea",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/tr/din/secme-sacmalar-hukuk-islam-allah-kelami-vs",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Seçme saçmalar: Hukuk, İslam, Allah kelamı vs.",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Sevan",
|
||||
"lastName": "Nişanyan",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-08-11",
|
||||
"abstractNote": "“Laik toplumlarda kanunlar kutsal değildir. Zaman içinde insanların gelişen ihtiyaçlarına göre hukukta iyileştirme yapılabilir. Laik toplumlarda insanlar kendi yasalarını yapar, tanrı onların dünyada yaptıklarına karışmaz.”\r\n\r\nKanunları alelumum ‘insanlar’ yapmaz. ‘Birileri’ yapar. \r\n\r\n“Kanunlar zaman ve zemine göre değiştirilebilir” dediğiniz zaman kimin ne zaman ve hangi koşullarda değiştirebileceğini de belirtmeniz gerekir. \r\n\r\nYoksa birileri çıkar “arkadaşlar yarın beni padişah ilan edeceğiz” der, yahut gece yarısı torba yasa çıkarır, gık diyemezsin.\r\n\r\nKarşı taraf haklı mıdır, haksız mıdır ayrı mevzu. Ama laiklik hayranlarının yüz senedir halâ karşı tarafın gerekçesini fark etmemiş görünmeleri hayreti muciptir. \r\n\r\nKarşı taraf diyor ki, kanunlar kutsaldır. Yani kafana esti diye zırt pırt değiştiremezsin. O yetkiyi sana verirsek sonucu kaçınılmaz bir kesinlikle zorbalıktır, hukukun paçavra edilmesidir. Hukuku zamana uydurmak gerekiyor ise nasıl uydurulacağına devlet sopasını elinde tutanlar değil, ak sakallı alimler karar versin.\r\n\r\nAyrıca, müsterih olun, tanrı bir şeye karışmaz. \r\n\r\nÇünkü tanrı hayaldir. \r\n\r\nSadece yasa yapmanın farklı yöntemleri vardır.\r\n\r\n“Roma imparatorluğunda kanunlarla toplumda kutsal olan ve olmayan net bir şekilde ayrılmıştır. Laiklik esas alınmıştır.”\r\n\r\nBiraz Roma tarihi bilen bilir ki Roma hukuku ve siyasi kurumları iliğine kadar dini inanç ve törelerle yoğrulmuştur; dinsizliğin, dine zarar vermenin cezası ölümdür. \r\n\r\nMerak ediyorsanız Mommsen yahut Fustel de Coulanges okuyun. \r\n\r\nEski Roma dini geniş meşrepli olduğundan insanları çok üzmemiştir. \r\n\r\nHıristiyanlık resmi din olduğunda ise muhtemelen insanlık tarihinin en feci yobazlık sahneleri yaşandı. Yanlış inanç sahipleri acımasızca kovuşturuldu, tapınakları yakıldı, dini zulümden kaçanlar yüzünden koca vilayetler ıssız kaldı.\r\n\r\nKutsal olanla dünyevinin ayrışması Batı Avrupa Ortaçağının eseridir. Roma devleti Batıda yıkılınca kilise uzun süre tek medeni otorite mercii olarak kaldı. Sonra devletler yeniden güçlenince gücünü onlarla paylaşmamak için çatır çatır direndi. \r\n\r\nSonunda otoriteyi paylaşmaktan ve birbirinin alanına fazla bulaşmamayı kabul etmekten başka çare bulamadılar.\r\n\r\nDoğu Roma’da devlet çökmediği için böyle bir şey olmadı. Ne Bizans’ta, ne Rusya’da, ne Osmanlı’da o yüzden din ve devletin ayrılması diye bir şey duyulmamıştır.\r\n\r\n“Kuranın tanrıdan geldiğine inanıldığından değiştirilemez özelliği vardır. Bu durumda Kurandaki toplum yönetim yasalarını, hukuku değiştirebilir misiniz? Değiştiremezsiniz.”\r\n\r\nKuran’da birtakım şiirsel imgeler, muğlak deklarasyonlar, ne manaya geldiği belirsiz meseller ve bolca öfke krizi vardır. Hemen her ayetin zıddını söyleyen bir ayet illa ki bulunur. \r\n\r\nBu tuhaf metinden (ve onu tamamlamak için uydurulan on binlerce hadisten) bir hukuk sistemi kendiliğinden üremedi. Üretmek için çağın en parlak alimleri canhıraş bir gayretle 200 sene uğraştılar. Ürettikleri sistemi yorumlamak için, eskisi kadar parlak olmayan varisleri bin küsur senedir hala uğraşıyor. Siz orada değiştirilmez bir tanrı yasası bulduğunuzu iddia ediyorsanız yolunuz açık olsun.\r\n\r\nİslam hukukunun iki ana yolu ve dört tali mezhebi (ve tabii bugün terk edilmiş olan onlarca alternatifi) Abbasi devletinin ilk yüzyıllarında oluşturuldu. \r\n\r\nYani Kuran’ın telifinden kaba hesap 100 ila 200 yıl sonra. \r\n\r\nAllah’ı referans göstermeleri politik bir tercihti. Aşırı güçlenen ve meşruiyet zemini sarsak olan halife devletine karşı hukuk mesleği sırtını “Allah kelamına” dayama ihtiyacını hissetti. Buyur askeriye senin, vergi senin, ama hukuk senin tasarrufunda değil, ilmiye sınıfının tekelidir, dediler. \r\n\r\nSenin kılıcın varsa bizim de Allahımız ve kitabımız var diye kendi kendilerini teselli ettiler.\r\n\r\nSon derece akıllıca bir hamleydi. Sonuçta ilim mesleğinin yüzyıllar içinde aşırı derecede muhafazakarlaşmasına, kılıç sahibinin tasallutuna karşı istiridye gibi içine kapanmasına yol açtı, o ayrı mevzu.\r\n\r\nBugün “İslam değişir mi? Değişmez!” diyerek kendi sorup kendi cevaplayanların bu hakikatleri aklında tutmasında yarar vardır. \r\n\r\nİslam hukuku konusunda ahkam kesmeyi toplumun en cahil ve ezik sınıflarına terk edip sonra onların kalın kafalılığından şikayet etmek pek de rasyonel bir tavır olmasa gerek.\r\n\r\n\r\n* Bu yazı, Sevan Nişanyan’ın blogundan alınmıştır.",
|
||||
"language": "tr",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "Yazarlar",
|
||||
"shortTitle": "Seçme saçmalar",
|
||||
"url": "https://ahvalnews.com/tr/din/secme-sacmalar-hukuk-islam-allah-kelami-vs",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/ar/70-mn-alatrak-ydwn-laghlaq-alhdwd-fy-wjh-allajyyn/alnsryt-altrkyt",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "70% من الأتراك يدعون لإغلاق الحدود في وجه اللاجئين",
|
||||
"creators": [],
|
||||
"date": "2021-08-12",
|
||||
"abstractNote": "اعتقلت السلطات التركية الخميس نحو ثمانين شخصا يشتبه بأنهم شجعوا أو شاركوا في الهجوم على محلات تجارية لسوريين في أنقرة على أثر مشاجرة سقط فيها قتيل في أجواء تصاعد خطاب كراهية الأجانب في تركيا.",
|
||||
"language": "ar",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "أخبار",
|
||||
"url": "https://ahvalnews.com/ar/70-mn-alatrak-ydwn-laghlaq-alhdwd-fy-wjh-allajyyn/alnsryt-altrkyt",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/ar/hl-ymkn-ltrkya-walhnd-ttqabla-wjhaan-lwjh-fy-afghanstan/alhnd",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "هل يمكن لتركيا والهند أن تتقابلا وجهاً لوجه في أفغانستان؟",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "نيكولاس",
|
||||
"lastName": "مورغان",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-08-10",
|
||||
"abstractNote": "لماذا ترحب #الهند بدور #تركيا في #أفغانستان بعد خروج الولايات المتحدة رغم خلافات البلدين العميقة؟",
|
||||
"language": "ar",
|
||||
"libraryCatalog": "Ahval News",
|
||||
"publicationTitle": "Ahval",
|
||||
"section": "رأي",
|
||||
"url": "https://ahvalnews.com/ar/hl-ymkn-ltrkya-walhnd-ttqabla-wjhaan-lwjh-fy-afghanstan/alhnd",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ahvalnews.com/special-feature",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
236
translators/Air University Journals.js
Normal file
236
translators/Air University Journals.js
Normal file
@@ -0,0 +1,236 @@
|
||||
{
|
||||
"translatorID": "e317b4d4-03cf-4356-aa3c-defadc6fd10e",
|
||||
"label": "Air University Journals",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "https?://www\\.airuniversity\\.af\\.edu/(ASPJ|SSQ)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-10-14 19:04:37"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2017 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function detectWeb(doc, url) {
|
||||
if (text(doc, 'a[title="View Article"], h2>a[href*="documents"]', 1)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var rows = ZU.xpath(doc, '//div[@class="da_black"]/table[tbody//a[@title="View Article"]]');
|
||||
if (rows.length < 3) {
|
||||
rows = ZU.xpath(doc, '//div[@class="da_black"]//p[span//a[@title="View Article"]]');
|
||||
}
|
||||
if (!rows.length) {
|
||||
// New layout, e.g. https://www.airuniversity.af.edu/SSQ/Display/Article/2748342/volume-15-issue-3-fall-2021/
|
||||
rows = ZU.xpath(doc, '//div[@class="da_black"]//li//div[h2/a or h2/em/a]');
|
||||
}
|
||||
|
||||
var items = {};
|
||||
var journal, abbr, ISSN;
|
||||
if (url.includes("/ASPJ/")) {
|
||||
journal = "Air & Space Power Journal";
|
||||
abbr = "ASPJ";
|
||||
ISSN = "1554-2505";
|
||||
}
|
||||
else if (url.includes("/SSQ/")) {
|
||||
journal = "Strategic Studies Quarterly";
|
||||
abbr = "SSQ";
|
||||
ISSN = "1936-1815";
|
||||
}
|
||||
var voliss = text(doc, 'h1.title');
|
||||
var date = text(doc, 'p.da_story_info');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
var title = text(rows[i], 'span > a[title="View Article"]');
|
||||
var id = attr(rows[i], 'span > a[title="View Article"]', "href");
|
||||
if (!title) {
|
||||
title = text(rows[i], 'strong > a[title="View Article"]');
|
||||
id = attr(rows[i], 'strong > a[title="View Article"]', "href");
|
||||
}
|
||||
|
||||
if (!title) {
|
||||
title = text(rows[i], 'h2 > a, h2>em>a');
|
||||
id = attr(rows[i], 'h2 > a, h2>em>a', "href");
|
||||
}
|
||||
if (title !== null) {
|
||||
items[id] = title;
|
||||
}
|
||||
}
|
||||
|
||||
Zotero.selectItems(items, function (items) {
|
||||
// Z.debug(items);
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
for (let id in items) {
|
||||
scrapeMultiples(doc, id, date, voliss, journal, abbr, ISSN);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrapeMultiples(doc, id, date, voliss, journal, abbr, ISSN) {
|
||||
var item = new Z.Item('journalArticle');
|
||||
|
||||
var titleXpath = '//span/a[contains(@href, "' + id + '")]';
|
||||
var title = ZU.xpathText(doc, titleXpath);
|
||||
var link = id;
|
||||
|
||||
if (!title) {
|
||||
titleXpath = '//strong/a[contains(@href, "' + id + '")]';
|
||||
title = ZU.xpathText(doc, titleXpath);
|
||||
link = id;
|
||||
}
|
||||
|
||||
// Newer issues
|
||||
if (!title) {
|
||||
titleXpath = '//h2//a[contains(@href, "' + id + '")]';
|
||||
title = ZU.xpathText(doc, titleXpath);
|
||||
link = id;
|
||||
}
|
||||
item.title = ZU.trimInternal(title.trim());
|
||||
|
||||
var sectionXpath = '//div[@class="da_black"]/table[tbody//a[@href="' + id + '"]]';
|
||||
var section = ZU.xpath(doc, sectionXpath);
|
||||
if (!section.length) {
|
||||
sectionXpath = '//div[@class="da_black"]/p[span//a[@href="' + id + '"]]';
|
||||
section = ZU.xpath(doc, sectionXpath);
|
||||
}
|
||||
|
||||
// Newer issues
|
||||
if (!section.length) {
|
||||
sectionXpath = '//div[@class="da_black"]//div[h2//a[@href="' + id + '"]]';
|
||||
section = ZU.xpath(doc, sectionXpath);
|
||||
}
|
||||
|
||||
if (section.length) {
|
||||
var authors = text(section[0], 'p>span>strong');
|
||||
if (!authors) authors = text(section[0], 'p>strong>span');
|
||||
|
||||
// Newer issues
|
||||
if (!authors) authors = text(section[0], 'strong');
|
||||
|
||||
if (authors) {
|
||||
if (authors.includes("Reviewed by")) {
|
||||
var reviewedAuthor = authors.match(/^by\s(.+)/);
|
||||
var reviewer = authors.match(/Reviewed by\s(.+)/);
|
||||
|
||||
if (reviewedAuthor) {
|
||||
reviewedAuthor = parseAuthors(reviewedAuthor[1], "reviewedAuthor");
|
||||
}
|
||||
if (reviewer) {
|
||||
reviewer = parseAuthors(reviewer[1], "author");
|
||||
}
|
||||
|
||||
if (reviewedAuthor && reviewer) {
|
||||
item.creators = reviewer.concat(reviewedAuthor);
|
||||
}
|
||||
|
||||
else {
|
||||
item.creators = reviewer || reviewedAuthor;
|
||||
}
|
||||
}
|
||||
else {
|
||||
authors = ZU.trimInternal(authors.trim());
|
||||
// delete name suffixes
|
||||
item.creators = parseAuthors(authors, "author");
|
||||
}
|
||||
}
|
||||
// ASPJ
|
||||
var abstract = text(section[0], 'p > span', 1);
|
||||
|
||||
// SSQ
|
||||
if (!abstract) abstract = ZU.xpathText(section[0], './/p/span[1]/text()');
|
||||
|
||||
// Newer issues
|
||||
if (!abstract) abstract = ZU.xpathText(section[0], './/p/text()');
|
||||
if (abstract) {
|
||||
item.abstractNote = ZU.trimInternal(abstract.trim().replace(/^,\s/, ""));
|
||||
}
|
||||
}
|
||||
|
||||
if (date && date.includes("Published ")) {
|
||||
item.date = date.match(/Published (.+)/)[1];
|
||||
}
|
||||
|
||||
|
||||
if (voliss && voliss.includes("Volume")) {
|
||||
item.volume = voliss.match(/Volume (\d+)/)[1];
|
||||
}
|
||||
if (voliss && voliss.includes("Issue")) {
|
||||
item.issue = voliss.match(/Issue (\d+)/)[1];
|
||||
}
|
||||
|
||||
item.publicationTitle = journal;
|
||||
item.journalAbbreviation = abbr;
|
||||
item.ISSN = ISSN;
|
||||
|
||||
item.attachments.push({
|
||||
url: link,
|
||||
title: "Full Text PDF",
|
||||
mimeType: "application/pdf"
|
||||
});
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function parseAuthors(creators, type) {
|
||||
creators = ZU.trimInternal(creators.trim());
|
||||
// delete name suffixes
|
||||
creators = creators.replace(/, (USAF|USN|Retired|PE|LMFT|USA|[^,]+Air Force)\b/g, "");
|
||||
let creatorsList = creators.split(/\/|,?\sand\s|,\s/);
|
||||
var rank = /^(By:|Adm|Rear Adm|Col|Lt Col|LTC|Brig Gen|Gen|Maj Gen \(sel\)|Maj|Capt|CAPT|Maj Gen|2nd Lt|W(in)?g Cdr|Mr?s\.|Mr\.|Dr\.)\s/;
|
||||
var creatorsArray = [];
|
||||
for (let creator of creatorsList) {
|
||||
creator = creator.trim().replace(rank, "");
|
||||
creatorsArray.push(ZU.cleanAuthor(creator, type));
|
||||
}
|
||||
return creatorsArray;
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.airuniversity.af.edu/SSQ/Display/Article/1261066/volume-11-issue-3-fall-2017/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.airuniversity.af.edu/ASPJ/Display/Article/1151902/volume-30-issue-2-summer-2016/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.airuniversity.af.edu/SSQ/Display/Article/2748342/volume-15-issue-3-fall-2021/",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
423
translators/Airiti.js
Normal file
423
translators/Airiti.js
Normal file
File diff suppressed because one or more lines are too long
198
translators/Alexander Street Press.js
Normal file
198
translators/Alexander Street Press.js
Normal file
@@ -0,0 +1,198 @@
|
||||
{
|
||||
"translatorID": "0a84a653-79ea-4c6a-8a68-da933e3b504a",
|
||||
"label": "Alexander Street Press",
|
||||
"creator": "John West and Michael Berkowitz",
|
||||
"target": "^https?://(www\\.)alexanderstreet",
|
||||
"minVersion": "1.0.0b4.r5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-12-28 04:42:00"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if ( url.indexOf("object.details.aspx") != -1 ) {
|
||||
var zitemtype = doc.getElementById("ctl00_ctl00_MasterContentBody_ContentPlaceHolder1_txtZType").value;
|
||||
switch (zitemtype.toLowerCase()) {
|
||||
case "book":
|
||||
return "book";
|
||||
break;
|
||||
case "chapter":
|
||||
return "bookSection";
|
||||
break;
|
||||
case "journal":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "manuscript":
|
||||
return "manuscript";
|
||||
break;
|
||||
case "audio":
|
||||
return "audioRecording";
|
||||
break;
|
||||
case "video":
|
||||
return "videoRecording";
|
||||
break;
|
||||
case "issue":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "article":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "series":
|
||||
return "interview";
|
||||
break;
|
||||
case "session":
|
||||
return "interview";
|
||||
break;
|
||||
default:
|
||||
return "document";
|
||||
}
|
||||
} else if (url.indexOf("results.aspx") != -1) {
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
// set prefix for serverside control
|
||||
var p = "ctl00_ctl00_MasterContentBody_ContentPlaceHolder1_txtZ";
|
||||
|
||||
// get values from hidden inputs
|
||||
var ztype = GetItemType(doc.getElementById(p+"Type").value);
|
||||
var ztitle = doc.getElementById(p+"Title").value;
|
||||
var zbooktitle = doc.getElementById(p+"BookTitle").value;
|
||||
var znotes = doc.getElementById(p+"Notes").value;
|
||||
var zurl = doc.getElementById(p+"URL").value;
|
||||
var zrights = doc.getElementById(p+"Rights").value;
|
||||
var zseries = doc.getElementById(p+"Series").value;
|
||||
var zvolume = doc.getElementById(p+"Volume").value;
|
||||
var zissue = doc.getElementById(p+"Issue").value;
|
||||
var zedition = doc.getElementById(p+"Edition").value;
|
||||
var zplace = doc.getElementById(p+"Place").value;
|
||||
var zpublisher = doc.getElementById(p+"Publisher").value;
|
||||
var zpages = doc.getElementById(p+"Pages").value;
|
||||
var zrepository = doc.getElementById(p+"Repository").value;
|
||||
var zlabel = doc.getElementById(p+"Label").value;
|
||||
var zrunningTime = doc.getElementById(p+"RunningTime").value;
|
||||
var zlanguage = doc.getElementById(p+"Language").value;
|
||||
var zauthor = doc.getElementById(p+"Author").value;
|
||||
var zeditor = doc.getElementById(p+"Editor").value;
|
||||
var ztranslator = doc.getElementById(p+"Translator").value;
|
||||
var zinterviewee = doc.getElementById(p+"Interviewee").value;
|
||||
var zinterviewer = doc.getElementById(p+"Interviewer").value;
|
||||
var zrecipient = doc.getElementById(p+"Recipient").value;
|
||||
var zdirector = doc.getElementById(p+"Director").value;
|
||||
var zscriptwriter = doc.getElementById(p+"ScriptWriter").value;
|
||||
var zproducer = doc.getElementById(p+"Producer").value;
|
||||
var zcastMember = doc.getElementById(p+"CastMember").value;
|
||||
var zperformer = doc.getElementById(p+"Performer").value;
|
||||
var zcomposer = doc.getElementById(p+"Composer").value;
|
||||
|
||||
// create Zotero item
|
||||
var newArticle = new Zotero.Item(ztype);
|
||||
|
||||
// populate Zotero item
|
||||
newArticle.title = ztitle;
|
||||
newArticle.bookTitle = zbooktitle;
|
||||
newArticle.notes = znotes;
|
||||
newArticle.url = zurl;
|
||||
newArticle.place = zplace;
|
||||
newArticle.publisher = zpublisher;
|
||||
newArticle.pages = zpages;
|
||||
newArticle.rights = zrights;
|
||||
newArticle.series = zseries;
|
||||
newArticle.volume = zvolume;
|
||||
newArticle.issue = zissue;
|
||||
newArticle.edition = zedition;
|
||||
newArticle.repository = zrepository;
|
||||
newArticle.label = zlabel;
|
||||
newArticle.runningTime = zrunningTime;
|
||||
newArticle.language = zlanguage;
|
||||
newArticle.editor = zeditor;
|
||||
newArticle.translator = ztranslator;
|
||||
newArticle.interviewee = zinterviewee;
|
||||
newArticle.interviewer = zinterviewer;
|
||||
newArticle.recipient = zrecipient;
|
||||
newArticle.director = zdirector;
|
||||
newArticle.scriptwriter = zscriptwriter;
|
||||
newArticle.producer = zproducer;
|
||||
newArticle.castMember = zcastMember;
|
||||
newArticle.performer = zperformer;
|
||||
newArticle.composer = zcomposer;
|
||||
var aus = zauthor.split(";");
|
||||
for (var i=0; i< aus.length ; i++) {
|
||||
newArticle.creators.push(Zotero.Utilities.cleanAuthor(aus[i], "author", true));
|
||||
}
|
||||
|
||||
newArticle.attachments = [{url:doc.location.href, title:"Alexander Street Press Snapshot", mimeType:"text/html"}];
|
||||
if (doc.evaluate('//a[contains(@href, "get.pdf")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
var pdfurl = doc.evaluate('//a[contains(@href, "get.pdf")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().href;
|
||||
newArticle.attachments.push({url:pdfurl, title:"Alexander Street Press PDF", mimeType:"application/pdf"});
|
||||
} else if (doc.evaluate('//a[contains(@href, "get.jpg")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
var imgurl = doc.evaluate('//a[contains(@href, "get.jpg")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().href.replace(/.{2}$/, "01");
|
||||
newArticle.attachments.push({url:imgurl, title:"Alexander Street Press Pg 1", mimeType:"image/jpg"});
|
||||
newArticle.notes = [{note:"Further page images can be found by following the URL of the 'Alexander Street Press Pg 1' attachment and iterating the final digits of the URL"}];
|
||||
}
|
||||
// save Zotero item
|
||||
newArticle.complete();
|
||||
|
||||
}
|
||||
|
||||
function GetItemType(zitemtype) {
|
||||
switch (zitemtype.toLowerCase()) {
|
||||
case "book":
|
||||
return "book";
|
||||
break;
|
||||
case "chapter":
|
||||
return "bookSection";
|
||||
break;
|
||||
case "journal":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "manuscript":
|
||||
return "manuscript";
|
||||
break;
|
||||
case "audio":
|
||||
return "audioRecording";
|
||||
break;
|
||||
case "video":
|
||||
return "videoRecording";
|
||||
break;
|
||||
case "issue":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "article":
|
||||
return "journalArticle";
|
||||
break;
|
||||
case "series":
|
||||
return "interview";
|
||||
break;
|
||||
case "session":
|
||||
return "interview";
|
||||
break;
|
||||
default:
|
||||
return "document";
|
||||
}
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var articles = new Array();
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
var xpath = '//tbody/tr/td[2][@class="data"]/a[1]';
|
||||
var titles = doc.evaluate(xpath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var next_title;
|
||||
while (next_title = titles.iterateNext()) {
|
||||
items[next_title.href] = next_title.textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) return;
|
||||
ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = []
|
||||
/** END TEST CASES **/
|
||||
291
translators/AllAfrica.js
Normal file
291
translators/AllAfrica.js
Normal file
@@ -0,0 +1,291 @@
|
||||
{
|
||||
"translatorID": "34B1E0EA-FD02-4069-BAE4-ED4D98674A5E",
|
||||
"label": "AllAfrica",
|
||||
"creator": "Sebastian Karcher and Abe Jellinek",
|
||||
"target": "^https?://(fr\\.)?allafrica\\.com/(stories|search)/",
|
||||
"minVersion": "1.0.0b4.r5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsv",
|
||||
"lastUpdated": "2021-10-22 19:33:08"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Sebastian Karcher and Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/stories/')) {
|
||||
return "newspaperArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('ul.stories li > a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
let publication = text(doc, '.publisher-name');
|
||||
if (publication) {
|
||||
item.publicationTitle = publication.match(/[^(]+/)[0];
|
||||
item.place = (publication.match(/\((.*)\)/) || [])[1];
|
||||
}
|
||||
|
||||
item.libraryCatalog = 'AllAfrica';
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = "newspaperArticle";
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://allafrica.com/stories/201110180002.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Angola: Political Upheaval Ahead of 2012 Polls",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Lisa",
|
||||
"lastName": "Otto",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011-10-18T02:24:01+0000",
|
||||
"abstractNote": "Analysis - Angola is due to hold presidential and parliamentary elections next year, and all indications are that tensions are mounting amidst varied incidents of political upheaval ahead of the polls.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AllAfrica",
|
||||
"place": "Tshwane/Pretoria",
|
||||
"publicationTitle": "Institute for Security Studies",
|
||||
"section": "News",
|
||||
"shortTitle": "Angola",
|
||||
"url": "https://allafrica.com/stories/201110180002.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Angola"
|
||||
},
|
||||
{
|
||||
"tag": "Central Africa"
|
||||
},
|
||||
{
|
||||
"tag": "Governance"
|
||||
},
|
||||
{
|
||||
"tag": "Human Rights"
|
||||
},
|
||||
{
|
||||
"tag": "Southern Africa"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://allafrica.com/stories/201110040606.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Angola: Justice Minister On Voter's Registration Update",
|
||||
"creators": [],
|
||||
"date": "2011-10-04T09:49:38+0000",
|
||||
"abstractNote": "The updating of the electoral registration means the fulfillment of an obligation of each citizens so the process is well organised with regard to voting stations, Angop has learnt.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AllAfrica",
|
||||
"place": "Luanda",
|
||||
"publicationTitle": "Angola Press Agency",
|
||||
"section": "News",
|
||||
"shortTitle": "Angola",
|
||||
"url": "https://allafrica.com/stories/201110040606.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Angola"
|
||||
},
|
||||
{
|
||||
"tag": "Central Africa"
|
||||
},
|
||||
{
|
||||
"tag": "Governance"
|
||||
},
|
||||
{
|
||||
"tag": "Southern Africa"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://allafrica.com/search/?search_string=microcredits",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://allafrica.com/stories/202110220312.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Kenya Surpasses Global Average of Female Board Directors",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Kamau",
|
||||
"lastName": "Maichuhie",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021-10-22T08:59:56+0000",
|
||||
"abstractNote": "Kenya has outperformed the global average of female board directors after witnessing significant progress in board diversity and inclusion in the last nine years, a new report shows.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AllAfrica",
|
||||
"place": "Nairobi",
|
||||
"publicationTitle": "The Nation",
|
||||
"section": "News",
|
||||
"url": "https://allafrica.com/stories/202110220312.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "East Africa"
|
||||
},
|
||||
{
|
||||
"tag": "Kenya"
|
||||
},
|
||||
{
|
||||
"tag": "Women and Gender"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://fr.allafrica.com/stories/202110210703.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Afrique: Le Parlement européen adopte la résolution sur la Tunisie",
|
||||
"creators": [],
|
||||
"date": "2021-10-21T16:15:11+0000",
|
||||
"abstractNote": "Le Parlement européen a adopté, jeudi après-midi, la résolution sur la situation en Tunisie par 534 voix pour, 45 contre et 106 abstentions.",
|
||||
"language": "fr",
|
||||
"libraryCatalog": "AllAfrica",
|
||||
"place": "Tunis",
|
||||
"publicationTitle": "Tunis Afrique Presse",
|
||||
"section": "News",
|
||||
"shortTitle": "Afrique",
|
||||
"url": "https://fr.allafrica.com/stories/202110210703.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Africa"
|
||||
},
|
||||
{
|
||||
"tag": "Europe and Africa"
|
||||
},
|
||||
{
|
||||
"tag": "External Relations"
|
||||
},
|
||||
{
|
||||
"tag": "Governance"
|
||||
},
|
||||
{
|
||||
"tag": "North Africa"
|
||||
},
|
||||
{
|
||||
"tag": "Tunisia"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
242
translators/Alsharekh.js
Normal file
242
translators/Alsharekh.js
Normal file
@@ -0,0 +1,242 @@
|
||||
{
|
||||
"translatorID": "70fbaf2f-ba02-426c-8beb-4ddfbbefd14b",
|
||||
"label": "Alsharekh",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https://archive\\.alsharekh\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-07-24 02:21:59"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
let apiBase = 'https://archiveapi.alsharekh.org';
|
||||
let urlRe = /\/Articles\/([^/]+)\/([^/]+)\/([^/?#]+)/;
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (urlRe.test(url)) {
|
||||
return "magazineArticle";
|
||||
}
|
||||
let appElem = doc.querySelector("app-root");
|
||||
if (appElem) {
|
||||
Z.monitorDOMChanges(appElem);
|
||||
}
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('td > a[href^="/Articles/"], th > a[href^="/Articles/"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
let items = await Z.selectItems(getSearchResults(doc));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(null, url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
async function scrape(doc, url) {
|
||||
let item = new Zotero.Item('magazineArticle');
|
||||
|
||||
let [, MID, IID, AID] = url.match(urlRe);
|
||||
let issue = await requestJSON(`${apiBase}/Search/IssueHInfo?MID=${MID}&IID=${IID}`);
|
||||
let article = await requestJSON(`${apiBase}/Search/ArticleHInfo?AID=${AID}`);
|
||||
|
||||
item.title = article.articleTitle.replace(' : ', ": ");
|
||||
item.pages = article.pageNo;
|
||||
item.creators.push(ZU.cleanAuthor(article.articleAuthor, 'author'));
|
||||
|
||||
item.publicationTitle = issue.magazineArabicName;
|
||||
item.place = issue.countryName;
|
||||
item.issue = issue.issuenumber || issue.issueName;
|
||||
item.date = ZU.strToISO(arabicToEnglishDate(issue.newIssueDate));
|
||||
|
||||
item.url = url;
|
||||
|
||||
let attachment = { title: "Snapshot" };
|
||||
if (doc) {
|
||||
attachment.document = doc;
|
||||
}
|
||||
else {
|
||||
attachment.url = url;
|
||||
}
|
||||
item.attachments.push(attachment);
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
// just so we get months on non-Arabic locales
|
||||
function arabicToEnglishDate(date) {
|
||||
return date
|
||||
.replace('يناير', 'January')
|
||||
.replace('فبراير', 'February')
|
||||
.replace('مارس', 'March')
|
||||
.replace('أبريل', 'April')
|
||||
.replace('إبريل', 'April')
|
||||
.replace('مايو', 'May')
|
||||
.replace('يونيو', 'June')
|
||||
.replace('يونية', 'June')
|
||||
.replace('يوليو', 'July')
|
||||
.replace('يوليو', 'July')
|
||||
.replace('أغسطس', 'August')
|
||||
.replace('سبتمبر', 'September')
|
||||
.replace('أكتوبر', 'October')
|
||||
.replace('نوفمبر', 'November')
|
||||
.replace('ديسمبر', 'December');
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archive.alsharekh.org/Articles/290/20647/469598",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "الخط العربي: فلسفة التأصيل الجمالي والتفريع الفني",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "بركات محمد",
|
||||
"lastName": "مراد",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2004-04-01",
|
||||
"issue": "11",
|
||||
"libraryCatalog": "Alsharekh",
|
||||
"publicationTitle": "حروف عربية",
|
||||
"shortTitle": "الخط العربي",
|
||||
"url": "https://archive.alsharekh.org/Articles/290/20647/469598",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archive.alsharekh.org/Articles/312/21129/479105",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "الرحالة والباحثون الروس في تاريخ الجزيرة العربية وآثارها \"دراسة تقويمية\"",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "عبد الرحمن الطيب",
|
||||
"lastName": "الأنصاري",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2005-01-01",
|
||||
"issue": "11",
|
||||
"libraryCatalog": "Alsharekh",
|
||||
"publicationTitle": "أدوماتو",
|
||||
"url": "https://archive.alsharekh.org/Articles/312/21129/479105",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archive.alsharekh.org/Articles/174/16356/368236",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "أسلوب النقض في كتابات الرحالة الأوربيين",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "حسن",
|
||||
"lastName": "غزالة",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2005-06-01",
|
||||
"issue": "20",
|
||||
"libraryCatalog": "Alsharekh",
|
||||
"publicationTitle": "جذور",
|
||||
"url": "https://archive.alsharekh.org/Articles/174/16356/368236",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archive.alsharekh.org/contents/174/19785",
|
||||
"defer": true,
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archive.alsharekh.org/AuthorArticles/124",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
134
translators/AlterNet.js
Normal file
134
translators/AlterNet.js
Normal file
File diff suppressed because one or more lines are too long
261
translators/Aluka.js
Normal file
261
translators/Aluka.js
Normal file
@@ -0,0 +1,261 @@
|
||||
{
|
||||
"translatorID": "e8fc7ebc-b63d-4eb3-a16c-91da232f7220",
|
||||
"label": "Aluka",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(www\\.)aluka\\.org/(stable/|struggles/search\\?|struggles/collection/)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2016-09-27 06:02:24"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2016 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url){
|
||||
var type = ZU.xpathText(doc, '//div[contains(@class, "resource-type")]//div[contains(@class, "metadata-value")]');
|
||||
var itemType = typeMap[type]
|
||||
if (itemType) {
|
||||
return itemType
|
||||
} else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
} else {
|
||||
Z.debug("Unrecognized type: " + type);
|
||||
return "report";
|
||||
}
|
||||
}
|
||||
|
||||
// Aluka types we can import
|
||||
// TODO: Improve support for other Aluka item types?
|
||||
// Correspondence, Circulars, Newsletters, Interviews, Pamphlets, Policy Documents, Posters, Press Releases, Reports, Testimonies, Transcripts
|
||||
var typeMap = {
|
||||
"Books":"book",
|
||||
"Aluka Essays":"report",
|
||||
"photograph":"artwork",
|
||||
"Photographs":"artwork",
|
||||
"Slides (Photographs)": "artwork",
|
||||
"Panoramas":"artwork",
|
||||
"Journals (Periodicals)":"journalArticle",
|
||||
"Magazines (Periodicals)" : "magazineArticle",
|
||||
"Articles":"journalArticle",
|
||||
"Correspondence":"letter",
|
||||
"Letters (Correspondence)" : "letter",
|
||||
"Interviews":"interview",
|
||||
"Reports":"report",
|
||||
"Transcripts":"presentation",
|
||||
"Memorandums":"report"
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//h3[@class="title"]/a');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var itemType = detectWeb(doc, url);
|
||||
var newItem = new Zotero.Item(itemType);
|
||||
newItem.title = ZU.xpathText(doc, '//h1[contains(@class, "title")]');
|
||||
var rows = ZU.xpath(doc, '//section[contains(@class, "metadata-section")]/div[contains(@class, "row")]');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var label = rows[i].className.replace("row", "").trim();
|
||||
var values = ZU.xpathText(rows[i], './/div[contains(@class, "metadata-value")]', null, "|");
|
||||
//Z.debug(label); Z.debug(values);
|
||||
switch (label) {
|
||||
case "date":
|
||||
newItem.date = values;
|
||||
break;
|
||||
case "topic":
|
||||
case "coverage-spatial":
|
||||
case "coverage-temporal":
|
||||
var tags = values.split("|");
|
||||
for (var j=0; j<tags.length; j++) {
|
||||
newItem.tags.push(ZU.cleanTags(tags[j]));
|
||||
}
|
||||
break;
|
||||
case "author":
|
||||
var authors = values.split("|");
|
||||
for (var j=0; j<authors.length; j++) {
|
||||
newItem.creators.push(ZU.cleanAuthor(authors[j], "author", true));
|
||||
}
|
||||
break;
|
||||
case "contributor":
|
||||
var authors = values.split("|");
|
||||
for (var j=0; j<authors.length; j++) {
|
||||
newItem.creators.push(ZU.cleanAuthor(authors[j], "contributor", true));
|
||||
}
|
||||
break;
|
||||
case "publisher":
|
||||
newItem.publisher = values;
|
||||
break;
|
||||
case "description":
|
||||
newItem.abstractNote = values;
|
||||
break;
|
||||
case "language":
|
||||
newItem.language = values;
|
||||
break;
|
||||
case "format-extent-lenghtsize":
|
||||
newItem.numPages = values;
|
||||
break;
|
||||
case "attribution":
|
||||
newItem.rights = values;
|
||||
break;
|
||||
case "collection":
|
||||
newItem.series = values;
|
||||
break;
|
||||
case "repository":
|
||||
newItem.archive = values;
|
||||
break;
|
||||
case "source":
|
||||
//newItem.extra = values;
|
||||
break;
|
||||
}
|
||||
}
|
||||
newItem.url = url;
|
||||
newItem.complete();
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.aluka.org/struggles/search?so=ps_collection_name_str+asc&Query=argentina",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.aluka.org/stable/10.5555/AL.SFF.DOCUMENT.ydlwcc0342",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "letter",
|
||||
"title": "[Letter from P. Abrecht (WCC, Geneva) to L. Nillus, Buenos Aires]",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Programme to Combat Racism",
|
||||
"lastName": "World Council of Churches",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Paul",
|
||||
"lastName": "Abrecht",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1968-12-13",
|
||||
"archive": "World Council of Churches",
|
||||
"language": "English",
|
||||
"libraryCatalog": "Aluka",
|
||||
"rights": "By kind permission of the World Council of Churches (WCC).",
|
||||
"url": "http://www.aluka.org/stable/10.5555/AL.SFF.DOCUMENT.ydlwcc0342",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
"1969",
|
||||
"Argentina",
|
||||
"Brazil",
|
||||
"Colombia",
|
||||
"Global",
|
||||
"Regional And International Contexts",
|
||||
"United Kingdom"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.aluka.org/stable/10.5555/al.sff.document.af000284?searchUri=so%3Dps_collection_name_str%2Basc%26Query%3Dstruggle",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "presentation",
|
||||
"title": "Nelson Mandela Speaks to Workers About the Struggle for Freedom in South Africa",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Nelson",
|
||||
"lastName": "Mandela",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Africa Fund",
|
||||
"creatorType": "contributor"
|
||||
},
|
||||
{
|
||||
"lastName": "National Union of Mineworkers",
|
||||
"creatorType": "contributor"
|
||||
}
|
||||
],
|
||||
"date": "1991-04",
|
||||
"abstractNote": "Struggle for Freedom. African National Congress. Nelson Mandela. National Union of Mineworkers. Political violence. Negotiations. F. W. de Klerk. Adriaan Vlok. NUM. ANC. Inkatha. Political Prisoners. Apartheid. Resolution on Sanctions. White domination. Anti-apartheid movement. Death squads. Police. Soweto. COSATU. Gold. Human rights. Goldstone. Investment code. General Van der Merwe. Sebokeng. Interim government. Constituent Assembly. Democratic government.",
|
||||
"language": "English",
|
||||
"rights": "By kind permission of Africa Action, incorporating the American Committee on Africa, The Africa Fund, and the Africa Policy Information Center.",
|
||||
"url": "http://www.aluka.org/stable/10.5555/al.sff.document.af000284?searchUri=so%3Dps_collection_name_str%2Basc%26Query%3Dstruggle",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
"1990 - 1991",
|
||||
"Economic Systems",
|
||||
"Internal Conflicts",
|
||||
"Judicial Systems",
|
||||
"North America",
|
||||
"Popular Resistance",
|
||||
"Regional And International Contexts",
|
||||
"South Africa",
|
||||
"The Colonial System And Its Consequences",
|
||||
"Wars Of Liberation, Internal Conflicts, And Destabilization"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
1043
translators/Amazon.js
Normal file
1043
translators/Amazon.js
Normal file
File diff suppressed because it is too large
Load Diff
592
translators/American Archive of Public Broadcasting.js
Normal file
592
translators/American Archive of Public Broadcasting.js
Normal file
@@ -0,0 +1,592 @@
|
||||
{
|
||||
"translatorID": "d13eb92e-fb16-41e0-9a24-73bad50f9bb7",
|
||||
"label": "American Archive of Public Broadcasting",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://(www\\.)?americanarchive\\.org/catalog",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-28 19:23:21"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.querySelector('meta[property="og:video"]')) {
|
||||
return "tvBroadcast";
|
||||
}
|
||||
else if (doc.querySelector('meta[property="og:audio"]')) {
|
||||
return "radioBroadcast";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h2 > a[href*="/catalog/"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
if (item.abstractNote) {
|
||||
item.abstractNote = item.abstractNote.replace(/\n+/g, ' ');
|
||||
}
|
||||
|
||||
for (let entry of doc.querySelectorAll('.contributors dl')) {
|
||||
for (let b of entry.querySelectorAll('b')) {
|
||||
let label = b.textContent;
|
||||
let name = b.nextSibling.textContent.trim().replace(/^Dr\b/, '');
|
||||
let type = 'contributor';
|
||||
let institution = false;
|
||||
|
||||
if (label.includes('Reporter') || label.includes('Host')) {
|
||||
type = 'castMember';
|
||||
}
|
||||
else if (label.includes('Director')) {
|
||||
type = 'director';
|
||||
}
|
||||
else if (label.includes('Writer')) {
|
||||
type = 'scriptwriter';
|
||||
}
|
||||
else if (label.includes('Produc')) {
|
||||
type = 'producer';
|
||||
}
|
||||
else if (label.includes('Copyright Holder')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (label.includes('Organization')) {
|
||||
institution = true;
|
||||
}
|
||||
|
||||
if (institution) {
|
||||
item.creators.push({
|
||||
lastName: name,
|
||||
creatorType: type,
|
||||
fieldMode: 1
|
||||
});
|
||||
}
|
||||
else {
|
||||
item.creators.push(ZU.cleanAuthor(name, type, name.includes(', ')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let dt of doc.querySelectorAll('dt')) {
|
||||
let key = ZU.trimInternal(dt.textContent);
|
||||
|
||||
let dd = dt.nextElementSibling;
|
||||
while (dd && dd.tagName == 'DD') {
|
||||
let value = ZU.trimInternal(dd.textContent);
|
||||
|
||||
switch (key) {
|
||||
case 'Contributing Organization':
|
||||
case 'Producing Organization': {
|
||||
if (item.network) break;
|
||||
|
||||
if (!item.creators.length) {
|
||||
item.creators.push({
|
||||
lastName: value.replace(/\s*\(.*\)/, ''),
|
||||
creatorType: 'contributor',
|
||||
fieldMode: 1
|
||||
});
|
||||
}
|
||||
|
||||
let [, broadcaster, place] = value.match(/^([^(]*)(?:\((.+)\))?/);
|
||||
|
||||
if (/([WK][A-Z]{2,3}|PBS|NPR|Broadcast|Network)/.test(broadcaster)) {
|
||||
item.network = broadcaster;
|
||||
}
|
||||
|
||||
if (place) item.place = place;
|
||||
|
||||
break;
|
||||
}
|
||||
case 'Date':
|
||||
case 'Created':
|
||||
if (!item.date) {
|
||||
item.date = ZU.strToISO(value);
|
||||
}
|
||||
break;
|
||||
case 'Genres':
|
||||
case 'Topics':
|
||||
item.tags.push({ tag: value });
|
||||
break;
|
||||
case 'Duration':
|
||||
item.runningTime = value;
|
||||
break;
|
||||
case 'Series':
|
||||
item.programTitle = value;
|
||||
break;
|
||||
case 'Episode':
|
||||
item.title = value;
|
||||
break;
|
||||
case 'Episode Number':
|
||||
item.episodeNumber = value;
|
||||
break;
|
||||
case 'Rights':
|
||||
item.rights = value;
|
||||
break;
|
||||
}
|
||||
|
||||
dd = dd.nextElementSibling;
|
||||
}
|
||||
}
|
||||
|
||||
// from the suggested citation on item pages
|
||||
item.archive = 'American Archive of Public Broadcasting (GBH and the Library of Congress)';
|
||||
|
||||
// would like to grab the video file and attach it here, but they do a
|
||||
// referer check that precludes that.
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = detectWeb(doc, url);
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip_83-407wmf7g",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "tvBroadcast",
|
||||
"title": "One More Harvest",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "PBS Utah",
|
||||
"creatorType": "contributor",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"date": "1984",
|
||||
"abstractNote": "This program profiles Utah farmer Melvin Good and his family. During the program, Melvin reminisces about his life and growing up on the farm; his grandchildren discuss the decision to becoming farmers or pursue another vocation; family members describe Melvin's and their passion for farming; and Melvin describes the process of harvesting a crop.",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "PBS Utah",
|
||||
"place": "Salt Lake City, Utah",
|
||||
"rights": "KUED",
|
||||
"runningTime": "00:28:27",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-83-407wmf7g",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Agriculture"
|
||||
},
|
||||
{
|
||||
"tag": "Documentary"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip_223-225b07vs",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "radioBroadcast",
|
||||
"title": "Art and Violence",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Amy",
|
||||
"lastName": "Tardiff",
|
||||
"creatorType": "castMember"
|
||||
}
|
||||
],
|
||||
"date": "1995-06-17",
|
||||
"abstractNote": "This segment reports on an artist who discusses the importance of art in response to the violence of contemporary society.",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "WGCU Public Media",
|
||||
"place": "Fort Myers, Florida",
|
||||
"rights": "No copyright statement in content.",
|
||||
"runningTime": "00:04:33",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-223-225b07vs",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Fine Arts"
|
||||
},
|
||||
{
|
||||
"tag": "Local Communities"
|
||||
},
|
||||
{
|
||||
"tag": "News"
|
||||
},
|
||||
{
|
||||
"tag": "News Report"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip-526-cv4bn9z59z",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "tvBroadcast",
|
||||
"title": "The Test",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "WTVI",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
},
|
||||
{
|
||||
"lastName": "Charlotte-Mecklenburg Board of Education",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"abstractNote": "\"'THE TEST' contains practical suggestions on how to reduce a student's trauma when taking a standardized test.\"--1979 Peabody Awards entry form.",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "WTVI",
|
||||
"runningTime": "00:10:32.265",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-526-cv4bn9z59z",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip-153-956djvtx",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "tvBroadcast",
|
||||
"title": "Front Street Weekly",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Vivian",
|
||||
"lastName": "Condeni",
|
||||
"creatorType": "producer"
|
||||
},
|
||||
{
|
||||
"firstName": "Lyle",
|
||||
"lastName": "Graham",
|
||||
"creatorType": "director"
|
||||
},
|
||||
{
|
||||
"firstName": "Lyle",
|
||||
"lastName": "Graham",
|
||||
"creatorType": "producer"
|
||||
},
|
||||
{
|
||||
"firstName": "Gwyneth Gamble",
|
||||
"lastName": "Booth",
|
||||
"creatorType": "castMember"
|
||||
},
|
||||
{
|
||||
"lastName": "Oregon Public Broadcasting",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"date": "1984-11-21",
|
||||
"abstractNote": "This episode contains the following segments. The first segment, \"Spiritual Epidemic?,\" features individuals whose search for enlightenment has become all-consuming. The second, \"Magic in the Night?,\" investigates fire-walking and whether it amounts to anything more than a financial scam. The third segment, \"Salem Art Fair '85,\" is a profile on the annual 3-day summer festival. Front Street Weekly is a news magazine featuring segments on current events and topics of interest to the local community.",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "Oregon Public Broadcasting",
|
||||
"programTitle": "Front Street Weekly",
|
||||
"rights": "Oregon Public Broadcasting c. 1985",
|
||||
"runningTime": "00:29:48",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-153-956djvtx",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Crafts"
|
||||
},
|
||||
{
|
||||
"tag": "Health"
|
||||
},
|
||||
{
|
||||
"tag": "Local Communities"
|
||||
},
|
||||
{
|
||||
"tag": "Magazine"
|
||||
},
|
||||
{
|
||||
"tag": "News"
|
||||
},
|
||||
{
|
||||
"tag": "News Report"
|
||||
},
|
||||
{
|
||||
"tag": "Religion"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip_260-2683bp5r",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "tvBroadcast",
|
||||
"title": "Gerry Spence",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Kyle",
|
||||
"lastName": "Nicholoff",
|
||||
"creatorType": "director"
|
||||
},
|
||||
{
|
||||
"firstName": "Ruby",
|
||||
"lastName": "Calvert",
|
||||
"creatorType": "producer"
|
||||
},
|
||||
{
|
||||
"firstName": "Gerry",
|
||||
"lastName": "Spence",
|
||||
"creatorType": "contributor"
|
||||
},
|
||||
{
|
||||
"firstName": "Deborah",
|
||||
"lastName": "Hammons",
|
||||
"creatorType": "castMember"
|
||||
},
|
||||
{
|
||||
"firstName": "Deborah",
|
||||
"lastName": "Hammons",
|
||||
"creatorType": "producer"
|
||||
},
|
||||
{
|
||||
"lastName": "Wyoming PBS",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"abstractNote": "The subject of this episode is Wyoming native Gerry Spence, a best-selling author considered by many to be America's greatest trial lawyer. He sits down with Deborah Hammons to talk about his past growing up in the city of Riverton. \"Main Street, Wyoming is a documentary series exploring aspects of Wyoming's local history and culture.\"",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"episodeNumber": "605",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "Wyoming PBS",
|
||||
"programTitle": "Main Street, Wyoming",
|
||||
"rights": "Main Street, Wyoming is a public affairs presentation of Wyoming Public Television 1995 KCWC-TV",
|
||||
"runningTime": "00:29:10",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-260-2683bp5r",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "History"
|
||||
},
|
||||
{
|
||||
"tag": "Interview"
|
||||
},
|
||||
{
|
||||
"tag": "Local Communities"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip-3d6c55fdb1b",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "radioBroadcast",
|
||||
"title": "Big Bird - America's Favorite Flightless Bird",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "BirdNote",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
},
|
||||
{
|
||||
"firstName": "Bob",
|
||||
"lastName": "Sundstrom",
|
||||
"creatorType": "scriptwriter"
|
||||
}
|
||||
],
|
||||
"date": "2018-11-20",
|
||||
"abstractNote": "There’s at least one bird that nearly everyone knows on sight: Big Bird. He’s been a Sesame Street celebrity since 1969, cutting a colorful figure for pre-school fans and their parents across the world. Big Bird is really a big kid with a kind heart, who makes friends everywhere he goes. He helps children feel okay about not knowing everything because, well, Big Bird is still figuring things out himself. Like the alphabet. When Big Bird first saw the alphabet, he thought it was one really, really long word. And Michael Stein knows how to pronounce it. Have a listen!",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"place": "Seattle, Washington",
|
||||
"programTitle": "BirdNote",
|
||||
"rights": "Sounds for BirdNote stories were provided by the Macaulay Library at the Cornell Lab of Ornithology, Xeno-Canto, Martyn Stewart, Chris Peterson, John Kessler, and others. Where music was used, fair use was taken into consideration. Individual credits are found at the bottom of each transcript.",
|
||||
"runningTime": "00:01:45.195",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-3d6c55fdb1b",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Science"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog/cpb-aacip-529-df6k06z734",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "radioBroadcast",
|
||||
"title": "An Examination of Testing",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "William",
|
||||
"lastName": "Koch",
|
||||
"creatorType": "contributor"
|
||||
},
|
||||
{
|
||||
"firstName": "Panchita",
|
||||
"lastName": "Garrett",
|
||||
"creatorType": "contributor"
|
||||
},
|
||||
{
|
||||
"firstName": "Kathy",
|
||||
"lastName": "Glover",
|
||||
"creatorType": "contributor"
|
||||
},
|
||||
{
|
||||
"lastName": "KUT Longhorn Radio Network",
|
||||
"creatorType": "producer",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"date": "1982-04-02",
|
||||
"abstractNote": "Hosts Kathy Glover and Panchita Garrett talks with Dr. William Koch, Assoc. Dir. Of the Measurement and Evaluation Center at UT Austin. They discuss the nature of standardized testing, how, when and where it is used.",
|
||||
"archive": "American Archive of Public Broadcasting (GBH and the Library of Congress)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "americanarchive.org",
|
||||
"network": "KUT Longhorn Radio Network",
|
||||
"programTitle": "The Inquiring Mind",
|
||||
"rights": "KUT, COPIES OKAY",
|
||||
"runningTime": "00:24:32",
|
||||
"url": "http://americanarchive.org/catalog/cpb-aacip-529-df6k06z734",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Education"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://americanarchive.org/catalog?q=The+Inquiring+Mind&utf8=%E2%9C%93&f[access_types][]=online",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"translatorID": "75edc5a1-6470-465a-a928-ccb77d95eb72",
|
||||
"label": "American Institute of Aeronautics and Astronautics",
|
||||
"creator": "Michael Berkowitz",
|
||||
"target": "^https?://arc\\.aiaa\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcv",
|
||||
"lastUpdated": "2013-12-12 03:22:14"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
AIAA Translator
|
||||
(Based on ASCE)
|
||||
Copyright © 2013 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.match(/\/doi\/abs\/10\.|\/doi\/full\/10\./)) {
|
||||
return "journalArticle";
|
||||
} else if (url.match(/\/action\/doSearch\?|\/toc\//))
|
||||
{
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
var rows = ZU.xpath(doc, '//table[@class="articleEntry"]');
|
||||
var doi;
|
||||
var title;
|
||||
for (var i=0, n=rows.length; i<n; i++) {
|
||||
doi = ZU.xpathText(rows[i], './/a[contains(@href, "/doi/abs/10.")]/@href') //.match(/10\..+/)
|
||||
//Z.debug(doi)
|
||||
title = ZU.xpathText(rows[i], './/div[@class="art_title"]')
|
||||
if (doi && title) {
|
||||
items[doi.match(/10\.[^\?]+/)[0]] = title;
|
||||
}
|
||||
}
|
||||
//Z.debug(items)
|
||||
Zotero.selectItems(items, function(selectedItems){
|
||||
if (!selectedItems) return true;
|
||||
|
||||
var dois = new Array();
|
||||
for (var i in selectedItems) {
|
||||
dois.push(i);
|
||||
}
|
||||
scrape(null, url,dois);
|
||||
});
|
||||
} else {
|
||||
var doi = url.match(/\/doi\/(?:abs|full)\/(10\.[^?#]+)/);
|
||||
scrape(doc, url,[doi[1]]);
|
||||
}
|
||||
}
|
||||
|
||||
function finalizeItem(item, doc, doi, baseUrl) {
|
||||
var pdfurl = '/doi/pdf/';
|
||||
var absurl = '/doi/abs/';
|
||||
|
||||
//add attachments
|
||||
item.attachments = [{
|
||||
title: 'AIAA Full Text PDF',
|
||||
url: pdfurl + doi,
|
||||
mimeType: 'application/pdf'
|
||||
}];
|
||||
if (doc) {
|
||||
item.attachments.push({
|
||||
title: 'AIAA Snapshot',
|
||||
document: doc
|
||||
});
|
||||
} else {
|
||||
item.attachments.push({
|
||||
title: 'AIAA Snapshot',
|
||||
url: item.url || absurl + doi,
|
||||
mimeType: 'text/html'
|
||||
});
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function scrape(doc, url, dois) {
|
||||
var postUrl = '/action/downloadCitation';
|
||||
var postBody = 'downloadFileName=citation&' +
|
||||
'direct=true&' +
|
||||
'include=abs&' +
|
||||
'doi=';
|
||||
var risFormat = '&format=ris';
|
||||
var bibtexFormat = '&format=bibtex';
|
||||
|
||||
for (var i=0, n=dois.length; i<n; i++) {
|
||||
(function(doi) {
|
||||
ZU.doPost(postUrl, postBody + doi + bibtexFormat, function(text) {
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
// Use BibTeX translator
|
||||
translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4");
|
||||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
item.bookTitle = item.publicationTitle;
|
||||
//Z.debug(text)
|
||||
//unfortunately, bibtex is missing some data
|
||||
//publisher, ISSN/ISBN
|
||||
ZU.doPost(postUrl, postBody + doi + risFormat, function(text) {
|
||||
//Z.debug(text)
|
||||
risTrans = Zotero.loadTranslator("import");
|
||||
risTrans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
risTrans.setString(text);
|
||||
risTrans.setHandler("itemDone", function(obj, risItem) {
|
||||
item.publisher = risItem.publisher;
|
||||
item.ISSN = risItem.ISSN;
|
||||
item.ISBN = risItem.ISBN;
|
||||
finalizeItem(item, doc, doi);
|
||||
});
|
||||
risTrans.translate();
|
||||
});
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
})(dois[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://arc.aiaa.org/action/doSearch?AllField=titanium",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://arc.aiaa.org/doi/abs/10.2514/1.T3744?prevSearch=&searchHistoryKey=",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Solidification Characteristics of Titania Nanofluids",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Songping",
|
||||
"lastName": "Mo",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Ying",
|
||||
"lastName": "Chen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Xing",
|
||||
"lastName": "Li",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Lisi",
|
||||
"lastName": "Jia",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012",
|
||||
"DOI": "10.2514/1.T3744",
|
||||
"ISSN": "0887-8722",
|
||||
"issue": "1",
|
||||
"itemID": "doi:10.2514/1.T3744",
|
||||
"libraryCatalog": "American Institute of Aeronautics and Astronautics",
|
||||
"pages": "192-196",
|
||||
"publicationTitle": "Journal of Thermophysics and Heat Transfer",
|
||||
"url": "https://doi.org/10.2514/1.T3744",
|
||||
"volume": "26",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "AIAA Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "AIAA Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
114
translators/American Prospect.js
Normal file
114
translators/American Prospect.js
Normal file
File diff suppressed because one or more lines are too long
382
translators/Anarchist Library.js
Normal file
382
translators/Anarchist Library.js
Normal file
@@ -0,0 +1,382 @@
|
||||
{
|
||||
"translatorID": "1a31e4c5-22ed-4b5b-a75f-55476db29a44",
|
||||
"label": "Anarchist Library",
|
||||
"creator": "Sister Baæ'l",
|
||||
"target": "https://theanarchistlibrary\\.org/(latest|library|stats/popular|category/topic|category/author|special/index|search)",
|
||||
"minVersion": "7.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-10-25 01:31:43"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2025 Dandelion Good and the righteous Anti Toil Theologians at Iliff
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/*
|
||||
***** BEGIN ATTRIBUTION BLOCK *****
|
||||
This translator was developed by Dandelion Good.
|
||||
|
||||
If you do any work on this translator, please add yourself here <3.
|
||||
*/
|
||||
|
||||
var allAttachmentTypes = {
|
||||
"Plain PDF": { ext: ".pdf", mimeType: "application/pdf" },
|
||||
"A4 PDF": { ext: ".a4.pdf", mimeType: "application/pdf" },
|
||||
"Letter PDF": { ext: ".lt.pdf", mimeType: "application/pdf" },
|
||||
EPub: { ext: ".epub", mimeType: "application/epub+zip" },
|
||||
"Printer-friendly HTML": { ext: ".html", mimeType: "text/html" },
|
||||
LaTeX: { ext: ".tex", mimeType: "application/x-tex" },
|
||||
"Plain Text": { ext: ".muse", mimeType: "text/plain" },
|
||||
"Source Zip:": { ext: ".zip", mimeType: "application/zip" },
|
||||
Snapshot: { ext: "snapshot", mimeType: "text/html" }
|
||||
};
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll("a.list-group-item");
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(text(row, "strong"));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
async function scrape(doc, url = doc.location.href) {
|
||||
// ToDo: get fancier here, allow other types
|
||||
let item = new Zotero.Item('manuscript');
|
||||
|
||||
// These may be expanded on in the future
|
||||
let attachmentTypes = {
|
||||
PDF: allAttachmentTypes["Plain PDF"],
|
||||
};
|
||||
|
||||
item.url = url;
|
||||
item.language = attr(doc, "html", "lang");
|
||||
|
||||
let itemType = attr(doc, '[property~="og:type"]', 'content');
|
||||
let tagNodeList = doc.querySelectorAll(`[property~="og:${itemType}:tag"]`);
|
||||
let description = attr(doc, '[property~="og:description"]', 'content');
|
||||
let author = attr(doc, `[property~="og:${itemType}:author"]`, 'content');
|
||||
item.creators.push(ZU.cleanAuthor(author, "author"));
|
||||
|
||||
if (description) {
|
||||
item.description = description;
|
||||
// misses https://theanarchistlibrary.org/library/leo-tolstoy-the-complete-works-of-count-tolstoy-volume-12
|
||||
let re = /(?<=[Tt]ranslated(?: +to [Ee]nglish)? +by ).*$/u;
|
||||
let translatedMatch = description.match(re);
|
||||
if (translatedMatch) {
|
||||
item.creators.push(ZU.cleanAuthor(translatedMatch[0], "translator", translatedMatch[0].includes(",")));
|
||||
}
|
||||
}
|
||||
|
||||
let date = getPreambleVal(doc, "textdate");
|
||||
let notes = getPreambleVal(doc, "preamblenotes");
|
||||
// misses link here: https://theanarchistlibrary.org/library/margaret-killjoy-it-s-time-to-build-resilient-communities
|
||||
let source = getPreambleVal(doc, "preamblesrc");
|
||||
|
||||
for (let tagNode of tagNodeList) {
|
||||
item.tags.push({ tag: tagNode.content });
|
||||
}
|
||||
|
||||
let title = attr(doc.head, '[property~="og:title"][content]', 'content');
|
||||
item.title = title;
|
||||
item.date = date;
|
||||
if (notes) {
|
||||
item.notes.push({ note: ZU.trimInternal(notes) });
|
||||
}
|
||||
if (source) {
|
||||
item.notes.push({ note: `Source: ${ZU.trimInternal(source)}` });
|
||||
}
|
||||
|
||||
for (let [typeName, typeInfo] of Object.entries(attachmentTypes)) {
|
||||
let attachment = {
|
||||
title: typeName,
|
||||
url: `${doc.location.href}${typeInfo.ext}`,
|
||||
mimeType: typeInfo.mimeType
|
||||
};
|
||||
|
||||
if (typeInfo.ext == "snapshot") {
|
||||
attachment.document = doc;
|
||||
}
|
||||
|
||||
item.attachments.push(attachment);
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
var libraryRe = /library\//;
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (libraryRe.test(url)) {
|
||||
return 'manuscript';
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getPreambleVal(doc, id) {
|
||||
let preamble = doc.body.querySelector("div#preamble");
|
||||
return text(preamble, `div#${id}`).slice(text(preamble, `span#${id}-label`).length);
|
||||
}
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(await requestDocument(url));
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/library/abel-paz-durruti-in-the-spanish-revolution",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "Durruti in the Spanish Revolution",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Abel",
|
||||
"lastName": "Paz"
|
||||
},
|
||||
{
|
||||
"creatorType": "translator",
|
||||
"firstName": "Chuck",
|
||||
"lastName": "Morse"
|
||||
}
|
||||
],
|
||||
"date": "1996",
|
||||
"url": "https://theanarchistlibrary.org/library/abel-paz-durruti-in-the-spanish-revolution",
|
||||
"language": "en",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Buenaventura Durruti"
|
||||
},
|
||||
{
|
||||
"tag": "Spanish Revolution"
|
||||
},
|
||||
{
|
||||
"tag": "biography"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Translated to English by Chuck Morse"
|
||||
},
|
||||
{
|
||||
"note": "Source: Published by AK Press in 2006 (please support the publisher!). Retrieved on 19th September 2020 from https://libcom.org/library/durruti-spanish-revolution"
|
||||
}
|
||||
],
|
||||
"seeAlso": [],
|
||||
"libraryCatalog": "Anarchist Library"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/library/errico-malatesta-the-general-strike-and-the-insurrection-in-italy",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "The General Strike and the Insurrection in Italy",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Errico",
|
||||
"lastName": "Malatesta"
|
||||
}
|
||||
],
|
||||
"date": "1914",
|
||||
"language": "en",
|
||||
"url": "https://theanarchistlibrary.org/library/errico-malatesta-the-general-strike-and-the-insurrection-in-italy",
|
||||
"libraryCatalog": "Anarchist Library",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "General Strike"
|
||||
},
|
||||
{
|
||||
"tag": "Italy"
|
||||
},
|
||||
{
|
||||
"tag": "history"
|
||||
},
|
||||
{
|
||||
"tag": "insurrection"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Freedom (London) 28, no. 303 (July 1914). In the article, written shortly after his escape from Italy and return to London, Malatesta provides an account of the Red Week, which broke out on 7 June 1914 in Ancona, where Malatesta lived."
|
||||
},
|
||||
{
|
||||
"note": "Source: The Method of Freedom: An Errico Malatesta Reader, edited by Davide Turcato, translated by Paul Sharkey."
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/library/ulrika-holgersson-britta-grondahl",
|
||||
"items": [
|
||||
{
|
||||
"title": "Britta Gröndahl",
|
||||
"itemType": "manuscript",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Ulrika",
|
||||
"lastName": "Holgersson",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alexia",
|
||||
"lastName": "Grosjean",
|
||||
"creatorType": "translator"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Translated by Alexia Grosjean."
|
||||
},
|
||||
{
|
||||
"note": "Source: Retrieved on 11th March 2025 from www.skbl.se"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Sweden"
|
||||
},
|
||||
{
|
||||
"tag": "biography"
|
||||
}
|
||||
],
|
||||
"date": "2018-03-08",
|
||||
"seeAlso": [],
|
||||
"libraryCatalog": "Anarchist Library",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"url": "https://theanarchistlibrary.org/library/ulrika-holgersson-britta-grondahl",
|
||||
"language": "en"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/library/emile-armand-the-forerunners-of-anarchism",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "The Forerunners of Anarchism",
|
||||
"creators": [
|
||||
{
|
||||
"creatorType": "author",
|
||||
"firstName": "Emile",
|
||||
"lastName": "Armand"
|
||||
},
|
||||
{
|
||||
"creatorType": "translator",
|
||||
"firstName": "",
|
||||
"lastName": "Reddebrek"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Translated by Reddebrek."
|
||||
},
|
||||
{
|
||||
"note": "Source: Provided by the translator."
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "history"
|
||||
},
|
||||
{
|
||||
"tag": "individualism"
|
||||
},
|
||||
{
|
||||
"tag": "proto-anarchism"
|
||||
}
|
||||
],
|
||||
"date": "1933",
|
||||
"seeAlso": [],
|
||||
"libraryCatalog": "Anarchist Library",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"url": "https://theanarchistlibrary.org/library/emile-armand-the-forerunners-of-anarchism",
|
||||
"language": "en"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/search?query=kropotkin",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://theanarchistlibrary.org/search?query=spirit",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
164
translators/Ancestry.com US Federal Census.js
Normal file
164
translators/Ancestry.com US Federal Census.js
Normal file
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"translatorID": "0dda3f89-15de-4479-987f-cc13f1ba7999",
|
||||
"label": "Ancestry.com US Federal Census",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://(www\\.)?ancestry\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcibv",
|
||||
"lastUpdated": "2021-07-22 19:20:28"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (text(doc, '.pageTitle .pageIntro a').includes('United States Federal Census')) {
|
||||
return "bookSection";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
scrape(doc, url);
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
let item = new Zotero.Item('bookSection');
|
||||
|
||||
item.title = text(doc, '.pageTitle span');
|
||||
let [date, place, roll, page] = doc.querySelectorAll('.sourceText em'); // not ideal
|
||||
item.bookTitle = text(doc, '.pageTitle .pageIntro a').trim()
|
||||
+ ` [${place.textContent}]`;
|
||||
item.publisher = 'National Archives and Records Administration';
|
||||
// technically the Census is published 72 years after it's taken, but citing
|
||||
// that way doesn't seem to be the convention.
|
||||
item.date = date.textContent;
|
||||
item.pages = `${page.textContent} (roll ${roll.textContent})`;
|
||||
item.archive = 'Ancestry.com';
|
||||
item.url = url.replace(/[?#].*/, '');
|
||||
|
||||
let recordTable = doc.querySelector('#recordServiceData');
|
||||
if (recordTable) {
|
||||
recordTable = recordTable.cloneNode(true);
|
||||
|
||||
let familyMembers = recordTable.querySelector('.tableContainerRow');
|
||||
if (familyMembers) familyMembers.remove();
|
||||
|
||||
item.notes.push({
|
||||
note: ZU.trimInternal(recordTable.outerHTML)
|
||||
});
|
||||
}
|
||||
|
||||
let imageSrc = attr(doc, '.photo.clickable img', 'src');
|
||||
let dbId = imageSrc.match(/\/namespaces\/([^/]+)/)[1];
|
||||
let imageId = imageSrc.match(/([^/]+)\.jpg/)[1];
|
||||
ZU.doGet(
|
||||
`/imageviewer/api/media/token?dbId=${dbId}&imageId=${imageId}`,
|
||||
function (respText) {
|
||||
try {
|
||||
let json = JSON.parse(respText);
|
||||
item.attachments.push({
|
||||
title: 'Census Record',
|
||||
mimeType: 'image/jpeg',
|
||||
url: json.imageDownloadUrl
|
||||
});
|
||||
item.complete();
|
||||
}
|
||||
catch (_) {
|
||||
item.complete(); // whatever, this is fragile
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ancestry.com/discoveryui-content/view/131479739:2442?tid=&pid=&queryId=2a5ea51171527460c8a3755eb4b3fc1e&_phsrc=BYN5&_phstart=successSource",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Albert Einstein",
|
||||
"creators": [],
|
||||
"date": "1940",
|
||||
"archive": "Ancestry.com",
|
||||
"bookTitle": "1940 United States Federal Census [Princeton, Mercer, New Jersey]",
|
||||
"libraryCatalog": "Ancestry.com US Federal Census",
|
||||
"pages": "10B (roll m-t0627-02357)",
|
||||
"publisher": "National Archives and Records Administration",
|
||||
"url": "https://www.ancestry.com/discoveryui-content/view/131479739:2442",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Census Record",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "<table id=\"recordServiceData\" class=\"table tableHorizontal tableHorizontalRuled\"> <tbody> <tr> <th>Name:</th> <td> Albert Einstein </td> </tr> <tr> <th>Respondent:</th> <td> Yes </td> </tr> <tr> <th>Age:</th> <td> 61 </td> </tr> <tr> <th>Estimated Birth Year:</th> <td> <span class=\"srchHit\"> <span title=\"Alternate values for this record\" class=\"altValue\">[abt 1879]</span> </span> <span title=\"This value was member submitted. Click to see details.\" class=\"altValue\"> [<button class=\"link correction\" data-tracking-event=\"content : correction clicked\">14 Mar 1879</button>] </span> </td> </tr> <tr> <th>Gender:</th> <td> Male </td> </tr> <tr> <th>Race:</th> <td> White </td> </tr> <tr> <th>Birthplace:</th> <td> Germany </td> </tr> <tr> <th>Marital Status:</th> <td> Widowed </td> </tr> <tr> <th>Relation to Head of House:</th> <td> Head </td> </tr> <tr> <th>Home in 1940:</th> <td> Princeton, Mercer, New Jersey </td> </tr> <tr> <th>Map of Home in 1940:</th> <td> <button type=\"button\" title=\"View map\" class=\"link mapLink\" data-modal-title=\"Princeton, Mercer, New Jersey\" data-place-names=\"Princeton,Mercer,New Jersey\" data-tracking-event=\"content : map link clicked\">Princeton, Mercer, New Jersey</button> </td> </tr> <tr> <th>Street:</th> <td> Mercer - Street </td> </tr> <tr> <th>House Number:</th> <td> 112 </td> </tr> <tr> <th>Farm:</th> <td> No </td> </tr> <tr> <th>Inferred Residence in 1935:</th> <td> Princeton, Mercer, New Jersey </td> </tr> <tr> <th>Residence in 1935:</th> <td> Princeton </td> </tr> <tr> <th>Resident on farm in 1935:</th> <td> No </td> </tr> <tr> <th>Citizenship:</th> <td> Having first papers </td> </tr> <tr> <th>Sheet Number:</th> <td> 10B </td> </tr> <tr> <th>Number of Household in Order of Visitation:</th> <td> 267 </td> </tr> <tr> <th>Occupation:</th> <td> Pychies Professor </td> </tr> <tr> <th>Industry:</th> <td> Private School </td> </tr> <tr> <th>House Owned or Rented:</th> <td> Owned </td> </tr> <tr> <th>Value of Home or Monthly Rental if Rented:</th> <td> 22000 </td> </tr> <tr> <th>Attended School or College:</th> <td> No </td> </tr> <tr> <th>Highest Grade Completed:</th> <td> College, 5th or subsequent year </td> </tr> <tr> <th>Hours Worked Week Prior to Census:</th> <td> 44 </td> </tr> <tr> <th>Class of Worker:</th> <td> Wage or salary worker in private work </td> </tr> <tr> <th>Weeks Worked in 1939:</th> <td> 52 </td> </tr> <tr> <th>Income:</th> <td> 5000 </td> </tr> <tr> <th>Income Other Sources:</th> <td> Yes </td> </tr> <tr> <th>Neighbors:</th> <td> <button type=\"button\" title=\"View others on page\" class=\"link neighborsLink\" data-modal-title=\"View others on page\" data-image-gid=\"m-t0627-02357-00675:2442\" data-tracking-event=\"content : neighbors link clicked\">View others on page</button> </td> </tr> </tbody> </table>"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ancestry.com/discoveryui-content/view/18443183:7884?tid=&pid=&queryId=283135001368664572d798e1a9012c06&_phsrc=oJW436&_phstart=successSource",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Pauline Rosenboom",
|
||||
"creators": [],
|
||||
"date": "1910",
|
||||
"archive": "Ancestry.com",
|
||||
"bookTitle": "1910 United States Federal Census [Bronx Assembly District 34, New York, New York]",
|
||||
"libraryCatalog": "Ancestry.com US Federal Census",
|
||||
"pages": "4A (roll T624_1001)",
|
||||
"publisher": "National Archives and Records Administration",
|
||||
"url": "https://www.ancestry.com/discoveryui-content/view/18443183:7884",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Census Record",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "<table id=\"recordServiceData\" class=\"table tableHorizontal tableHorizontalRuled\"> <tbody> <tr> <th>Name:</th> <td> <span class=\"srchHit\">Pauline Rosenboom <span title=\"Alternate name for this record\" class=\"altValue\">[Pauline Rosenbaum]</span> </span> </td> </tr> <tr> <th>Age in 1910:</th> <td> 51 </td> </tr> <tr> <th>Birth Date:</th> <td> <span class=\"srchHit\">1859 <span title=\"Alternate date for this record\" class=\"altValue\">[1859]</span> </span> </td> </tr> <tr> <th>Birthplace:</th> <td> Austria </td> </tr> <tr> <th>Home in 1910:</th> <td> Bronx Assembly District 34, New York, New York, USA </td> </tr> <tr> <th>Street:</th> <td> est Clenton Ave </td> </tr> <tr> <th>Race:</th> <td> White </td> </tr> <tr> <th>Gender:</th> <td> Female </td> </tr> <tr> <th>Immigration Year:</th> <td> 1887 </td> </tr> <tr> <th>Relation to Head of House:</th> <td> Mother-in-law </td> </tr> <tr> <th>Marital Status:</th> <td> Widowed </td> </tr> <tr> <th>Father's Birthplace:</th> <td> Austria </td> </tr> <tr> <th>Mother's Birthplace:</th> <td> Austria </td> </tr> <tr> <th>Native Tongue:</th> <td> English </td> </tr> <tr> <th>Attended School:</th> <td> No </td> </tr> <tr> <th>Able to read:</th> <td> Yes </td> </tr> <tr> <th>Able to Write:</th> <td> Yes </td> </tr> <tr> <th>Number of Children Born:</th> <td> 7 </td> </tr> <tr> <th>Number of Children Living:</th> <td> 5 </td> </tr> <tr> <th>Neighbors:</th> <td> <button type=\"button\" title=\"View others on page\" class=\"link neighborsLink\" data-modal-title=\"View others on page\" data-image-gid=\"4450082_00484:7884\" data-tracking-event=\"content : neighbors link clicked\">View others on page</button> </td> </tr> </tbody> </table>"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
329
translators/Annual Reviews.js
Normal file
329
translators/Annual Reviews.js
Normal file
@@ -0,0 +1,329 @@
|
||||
{
|
||||
"translatorID": "5f22bd25-5b70-11e1-bb1d-c4f24aa18c1e",
|
||||
"label": "Annual Reviews",
|
||||
"creator": "Aurimas Vinckevicius and Abe Jellinek",
|
||||
"target": "^https?://[^/]*annualreviews\\.org(:[\\d]+)?(?=/)[^?]*(/(toc|journal|doi)/|showMost(Read|Cited)Articles|doSearch)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 150,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2022-08-02 12:48:22"
|
||||
}
|
||||
|
||||
/**
|
||||
Copyright (c) 2012-2021 Aurimas Vinckevicius and Abe Jellinek
|
||||
|
||||
This program is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU Affero General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// add using BibTex
|
||||
function addByBibTex(doi, tags) {
|
||||
var baseUrl = 'http://www.annualreviews.org';
|
||||
var risRequest = baseUrl + '/action/downloadCitation';
|
||||
var pdfUrl = baseUrl + '/doi/pdf/' + doi;
|
||||
|
||||
var postData = 'include=abs&direct=on&submit=Download+chapter+metadata&downloadFileName=citation'
|
||||
+ '&format=bibtex' // bibtex
|
||||
+ '&doi=' + encodeURIComponent(doi);
|
||||
|
||||
Zotero.Utilities.HTTP.doPost(risRequest, postData, function (text) {
|
||||
var translator = Zotero.loadTranslator('import');
|
||||
translator.setTranslator('9cb70025-a888-4a29-a210-93ec52da40d4'); // bibtex
|
||||
translator.setString(text);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// title is sometimes in all caps
|
||||
if (item.title == item.title.toUpperCase()) item.title = ZU.capitalizeTitle(item.title, true);
|
||||
if (item.abstractNote) {
|
||||
item.abstractNote = item.abstractNote.replace(/^...?Abstract/, "");
|
||||
}
|
||||
// add tags
|
||||
if (tags) {
|
||||
item.tags = tags;
|
||||
}
|
||||
|
||||
// set PDF file
|
||||
item.attachments = [{
|
||||
url: pdfUrl,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
}];
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.translate();
|
||||
});
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (/\/doi\/(abs|full|pdf|10\.)/.test(url)) {
|
||||
return 'journalArticle';
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.articleBoxWrapper');
|
||||
if (!rows.length) rows = doc.querySelectorAll('.teaser');
|
||||
for (let row of rows) {
|
||||
let doi = attr(row, 'input[name="doi"]', 'value');
|
||||
if (!doi) doi = ZU.cleanDOI(attr(row, 'h2 > a', 'href'));
|
||||
let title = ZU.trimInternal(text(row, 'h2 > a'));
|
||||
if (!doi || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[doi] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) Object.keys(items).forEach(addByBibTex);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
// match both /doi/abs/10.1146 (etc.) and /doi/10.1146
|
||||
var match = url.match(/\/(?:doi)\/(?:abs|full|pdf)?\/?([^?]+)/);
|
||||
if (match) {
|
||||
let tags = attr(doc, 'meta[name="dc.Subject"]', 'content')
|
||||
.split('; ')
|
||||
.map(tag => ({ tag }));
|
||||
addByBibTex(match[1], tags);
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/action/doSearch?pageSize=20&sortBy=relevancy&text1=something&field1=AllField&logicalOpe1=and&text2=&field2=Abstract&logicalOpe2=and&text3=&field3=Title&filterByPub=all&publication=1449&AfterYear=&BeforeYear=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/journal/biophys",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/toc/biophys/40/1",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/action/showMostCitedArticles?topArticlesType=sinceInception&journalCode=biophys",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/action/showMostReadArticles?topArticlesType=sinceInception&journalCode=biophys",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.annualreviews.org/doi/abs/10.1146/annurev.biophys.29.1.545?prevSearch=&searchHistoryKey=",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Molecular Mechanisms Controlling Actin Filament Dynamics in Nonmuscle Cells",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Thomas D.",
|
||||
"lastName": "Pollard",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Laurent",
|
||||
"lastName": "Blanchoin",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "R. Dyche",
|
||||
"lastName": "Mullins",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2000",
|
||||
"DOI": "10.1146/annurev.biophys.29.1.545",
|
||||
"abstractNote": "We review how motile cells regulate actin filament assembly at their leading edge. Activation of cell surface receptors generates signals (including activated Rho family GTPases) that converge on integrating proteins of the WASp family (WASp, N-WASP, and Scar/WAVE). WASP family proteins stimulate Arp2/3 complex to nucleate actin filaments, which grow at a fixed 70° angle from the side of pre-existing actin filaments. These filaments push the membrane forward as they grow at their barbed ends. Arp2/3 complex is incorporated into the network, and new filaments are capped rapidly, so that activated Arp2/3 complex must be supplied continuously to keep the network growing. Hydrolysis of ATP bound to polymerized actin followed by phosphate dissociation marks older filaments for depolymerization by ADF/cofilins. Profilin catalyzes exchange of ADP for ATP, recycling actin back to a pool of unpolymerized monomers bound to profilin and thymosin-β4 that is poised for rapid elongation of new barbed ends.",
|
||||
"extra": "PMID: 10940259",
|
||||
"issue": "1",
|
||||
"itemID": "doi:10.1146/annurev.biophys.29.1.545",
|
||||
"libraryCatalog": "Annual Reviews",
|
||||
"pages": "545-576",
|
||||
"publicationTitle": "Annual Review of Biophysics and Biomolecular Structure",
|
||||
"url": "https://doi.org/10.1146/annurev.biophys.29.1.545",
|
||||
"volume": "29",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "ADF/cofilins"
|
||||
},
|
||||
{
|
||||
"tag": "Arp2/3 complex"
|
||||
},
|
||||
{
|
||||
"tag": "WASp"
|
||||
},
|
||||
{
|
||||
"tag": "cell motility"
|
||||
},
|
||||
{
|
||||
"tag": "profilin"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.annualreviews.org/toc/anchem/5/1",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.annualreviews.org/toc/linguistics/current",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.annualreviews.org/doi/abs/10.1146/annurev-linguistics-081720-111352",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Linguistics Then and Now: Some Personal Reflections",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Noam",
|
||||
"lastName": "Chomsky",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2021",
|
||||
"DOI": "10.1146/annurev-linguistics-081720-111352",
|
||||
"abstractNote": "By mid-twentieth century, a working consensus had been reached in the linguistics community, based on the great achievements of preceding years. Synchronic linguistics had been established as a science, a “taxonomic” science, with sophisticated procedures of analysis of data. Taxonomic science has limits. It does not ask “why?” The time was ripe to seek explanatory theories, using insights provided by the theory of computation and studies of explanatory depth. That effort became the generative enterprise within the biolinguistics framework. Tensions quickly arose: The elements of explanatory theories (generative grammars) were far beyond the reach of taxonomic procedures. The structuralist principle that language is a matter of training and habit, extended by analogy, was unsustainable. More generally, the mood of “virtually everything is known” became “almost nothing is understood,” a familiar phenomenon in the history of science, opening a new and exciting era for a flourishing discipline.",
|
||||
"issue": "1",
|
||||
"itemID": "doi:10.1146/annurev-linguistics-081720-111352",
|
||||
"libraryCatalog": "Annual Reviews",
|
||||
"pages": "1-11",
|
||||
"publicationTitle": "Annual Review of Linguistics",
|
||||
"shortTitle": "Linguistics Then and Now",
|
||||
"url": "https://doi.org/10.1146/annurev-linguistics-081720-111352",
|
||||
"volume": "7",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "autobiography"
|
||||
},
|
||||
{
|
||||
"tag": "biolinguistics program"
|
||||
},
|
||||
{
|
||||
"tag": "explanatory linguistic theory"
|
||||
},
|
||||
{
|
||||
"tag": "explanatory theories"
|
||||
},
|
||||
{
|
||||
"tag": "generative enterprise"
|
||||
},
|
||||
{
|
||||
"tag": "history of linguistics"
|
||||
},
|
||||
{
|
||||
"tag": "history of science"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.annualreviews.org/doi/10.1146/annurev-physchem-040513-103712",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Phase Separation in Bulk Heterojunctions of Semiconducting Polymers and Fullerenes for Photovoltaics",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Neil D.",
|
||||
"lastName": "Treat",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Michael L.",
|
||||
"lastName": "Chabinyc",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2014",
|
||||
"DOI": "10.1146/annurev-physchem-040513-103712",
|
||||
"abstractNote": "Thin-film solar cells are an important source of renewable energy. The most efficient thin-film solar cells made with organic materials are blends of semiconducting polymers and fullerenes called the bulk heterojunction (BHJ). Efficient BHJs have a nanoscale phase-separated morphology that is formed during solution casting. This article reviews recent work to understand the nature of the phase-separation process resulting in the formation of the domains in polymer-fullerene BHJs. The BHJ is now viewed as a mixture of polymer-rich, fullerene-rich, and mixed polymer-fullerene domains. The formation of this structure can be understood through fundamental knowledge of polymer physics. The implications of this structure for charge transport and charge generation are given.",
|
||||
"extra": "PMID: 24689796",
|
||||
"issue": "1",
|
||||
"itemID": "doi:10.1146/annurev-physchem-040513-103712",
|
||||
"libraryCatalog": "Annual Reviews",
|
||||
"pages": "59-81",
|
||||
"publicationTitle": "Annual Review of Physical Chemistry",
|
||||
"url": "https://doi.org/10.1146/annurev-physchem-040513-103712",
|
||||
"volume": "65",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "organic electronics"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
280
translators/Antikvarium.hu.js
Normal file
280
translators/Antikvarium.hu.js
Normal file
@@ -0,0 +1,280 @@
|
||||
{
|
||||
"translatorID": "68a54283-67e0-4e1c-ad3d-5b699868b194",
|
||||
"label": "Antikvarium.hu",
|
||||
"creator": "Velősy Péter Kristóf",
|
||||
"target": "^https?://(www\\.)?antikvarium\\.hu/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-09-22 19:39:49"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2017-2021 Velősy Péter Kristóf
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('konyv')) {
|
||||
return "book";
|
||||
}
|
||||
else if (url.includes('index.php?type=search') && getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.src-result-book');
|
||||
for (let row of rows) {
|
||||
var href = attr(row, '#searchResultKonyv-csempes', 'href');
|
||||
var title = ZU.trimInternal(text(row, '.book-title-src'));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, _url) {
|
||||
var newItem = new Zotero.Item('book');
|
||||
|
||||
newItem.title = text(doc, '[itemprop=name]', 0).trim();
|
||||
|
||||
var subtitle = text(doc, '[itemprop=alternateName]', 0) ? text(doc, '[itemprop=alternateName]', 0).trim() : null;
|
||||
if (subtitle) {
|
||||
newItem.title = newItem.title + ': ' + capitalizeHungarianTitle(subtitle, true);
|
||||
}
|
||||
|
||||
var authors = Array.from(doc.querySelectorAll('[itemprop=author]')).map(x => cleanHungarianAuthor(x.innerText));
|
||||
authors.forEach(x => newItem.creators.push(x));
|
||||
|
||||
var abstract = text(doc, 'fulszovegFull', 0) || text(doc, 'eloszoFull', 0);
|
||||
if (abstract) {
|
||||
newItem.abstractNote = abstract.replace(' Vissza', '').trim();
|
||||
}
|
||||
|
||||
var seriesElement = doc.getElementById('konyvAdatlapSorozatLink');
|
||||
if (seriesElement && seriesElement.length) {
|
||||
newItem.series = seriesElement.innerText;
|
||||
newItem.seriesNumber = getElementByInnerText('th', 'Kötetszám:').parentElement.children[1].innerText;
|
||||
newItem.volume = newItem.seriesNumber;
|
||||
}
|
||||
|
||||
var publisherName = text(doc, '#konyvAdatlapKiadoLink [itemprop=name]')
|
||||
|| text(doc, '[itemprop=name]', 1);
|
||||
if (publisherName) {
|
||||
newItem.publisher = publisherName;
|
||||
}
|
||||
|
||||
var publisherPlace = firstText(doc, '[itemprop=address]');
|
||||
if (publisherPlace) {
|
||||
newItem.place = publisherPlace.replace('(', '').replace(')', '');
|
||||
}
|
||||
|
||||
newItem.date = firstText(doc, '[itemprop=datePublished]');
|
||||
|
||||
newItem.numPages = firstText(doc, '[itemprop=numberOfPages]');
|
||||
|
||||
newItem.language = firstText(doc, '[itemprop=inLanguage]');
|
||||
|
||||
var isbnElement = getElementByInnerText(doc, 'th', 'ISBN:');
|
||||
if (isbnElement) {
|
||||
newItem.ISBN = isbnElement.parentElement.children[1].innerText;
|
||||
}
|
||||
|
||||
var contentsElement = doc.getElementById('tartalomFull');
|
||||
if (contentsElement) {
|
||||
newItem.notes.push({ note: contentsElement.innerText });
|
||||
}
|
||||
|
||||
newItem.attachments.push({ document: doc, title: "Antikvarium.hu Snapshot", mimeType: "text/html" });
|
||||
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the first element matching the selector with non-empty text.
|
||||
*/
|
||||
function firstText(docOrElem, selector) {
|
||||
for (let elem of docOrElem.querySelectorAll(selector)) {
|
||||
let elemText = elem.textContent.trim();
|
||||
if (elemText) return elemText;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function getElementByInnerText(doc, elementType, innerText) {
|
||||
var tags = doc.getElementsByTagName(elementType);
|
||||
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
if (tags[i].textContent == innerText) {
|
||||
return tags[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function cleanHungarianAuthor(authorName) {
|
||||
if (authorName.includes(',')) {
|
||||
return Zotero.Utilities.cleanAuthor(authorName, 'author', true);
|
||||
}
|
||||
else {
|
||||
var author = Zotero.Utilities.cleanAuthor(authorName, 'author', false);
|
||||
var firstName = author.lastName;
|
||||
var lastName = author.firstName;
|
||||
author.firstName = firstName;
|
||||
author.lastName = lastName;
|
||||
return author;
|
||||
}
|
||||
}
|
||||
|
||||
function capitalizeHungarianTitle(title) {
|
||||
title = title[0].toUpperCase() + title.substring(1).toLowerCase();
|
||||
var words = title.split(/[ !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/);
|
||||
words.forEach((w) => {
|
||||
if (isRomanNumeral(w)) {
|
||||
title = title.replace(w, w.toUpperCase());
|
||||
}
|
||||
});
|
||||
return title;
|
||||
}
|
||||
|
||||
function isRomanNumeral(word) {
|
||||
var romanRegex = /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/;
|
||||
return !!word.toUpperCase().match(romanRegex);
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.antikvarium.hu/konyv/erdei-janos-atlasz-almai-82276",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Atlasz álmai: Borges a szovjetunióban/az öröklét előszobája és egyéb történetek",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "János",
|
||||
"lastName": "Erdei",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1991",
|
||||
"language": "Magyar",
|
||||
"libraryCatalog": "Antikvarium.hu",
|
||||
"numPages": "140",
|
||||
"place": "Budapest",
|
||||
"publisher": "Aero & Rádió Kft.",
|
||||
"shortTitle": "Atlasz álmai",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Antikvarium.hu Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "TARTALOM\nElőszó\t5\nMásodik ébredés\t7\nMegvilágosodás\t9\nSzemelvények Gusavson műveiből\t17\nHalvány kétkedés\t17\nMegjegyzés\t20\nJótékony hazugság\t21\nA föltámadt Krisztus dilemmája\t23\nÁbrahám\t24\nSzerelmes ébredés és álom\t27\nRáébredés: a rabszolga\t33\nDacos ébredés, avagy az ötödik evangélista\t35\nElalvás előtt I.\t40\nKét álmodó\t40\nElalvás előtt II.\t43\nA kivégzési jegy\t45\nGyújtópont\t53\nFelvillanás\t55\nAngyali üdvözlet\t63\nA fellendülés okai\t65\nFéreg által homályosan\t71\nBorges a Szovjetunióban\t81\nA nevetés köve\t89\nA Nagy Rendszer\t93\nTúl az álmokon: az igazhitű\t97\nAz öröklét előszobája\t101\nElragadottság\t109\nA legvidámabb eretnek\t113\nÚjabb fejlemények az Oidipusz-ügyben\t117\nVisszahívták a Szfinxet!\t121\nAz egyetlen lehetőség\t125\nZavaros álom: letisztulás\t127\nN. és a tenger\t135\nUtószó\t137"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.antikvarium.hu/index.php?type=search&ksz=atlasz&reszletes=0&newSearch=1&searchstart=ksz&interfaceid=101",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.antikvarium.hu/konyv/peter-harrison-mary-harrison-misztikus-erok-51027-0",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Misztikus erők: Mistic forces/testen túli tapasztalatok",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Harrison",
|
||||
"lastName": "Peter",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Harrison",
|
||||
"lastName": "Mary",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Nóra",
|
||||
"lastName": "Rohonczi",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"ISBN": "9789637994043",
|
||||
"language": "Magyar",
|
||||
"libraryCatalog": "Antikvarium.hu",
|
||||
"numPages": "274",
|
||||
"place": "Budapest",
|
||||
"publisher": "Pesti Szalon Könyvkiadó",
|
||||
"shortTitle": "Misztikus erők",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Antikvarium.hu Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "TARTALOM\nKöszönetnyilvánítás\t3\nElőszó\t5\nBevezetés\t9\nMi a TTT?\t13\nA fény\t23\nA magaslati nézőpont\t35\nA mennyországban?\t49\nA gyógyító erő\t55\nKülönös hatóerők\t75\nÁllatok\t91\nZene\t105\nA határterület\t111\nIdőutazások\t121\nA döntés\t141\nAz ezüstzsinór\t151\nEgybeesések\t163\nA fátum\t173\nMenekülés\t193\nGyermekek\t201\nA halálfélelem legyőzése\t213\nMegérzések\t231\nAz okkultizmus veszélyei\t235\nA lélek illata\t247\nAngyalok\t257\nPozitív végkövetkeztetések\t273"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
390
translators/AquaDocs.js
Normal file
390
translators/AquaDocs.js
Normal file
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"translatorID": "97b65138-71b7-424f-b305-4a2161e90661",
|
||||
"label": "AquaDocs",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://aquadocs\\.org/(handle|discover|browse)",
|
||||
"minVersion": "5.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2023-08-24 02:41:29"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2023 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/handle/') && attr(doc, 'meta[name="DC.type"]', 'content')) {
|
||||
let type = attr(doc, 'meta[name="DC.type"]', 'content');
|
||||
// Z.debug(type);
|
||||
return getType(type);
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.main-content .description-content a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
await scrape(url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
await scrape(url);
|
||||
}
|
||||
}
|
||||
|
||||
function getType(string) {
|
||||
string = string.toLowerCase();
|
||||
if (string.includes("book_section") || string.includes("chapter")) {
|
||||
return "bookSection";
|
||||
}
|
||||
else if (string.includes("book") || string.includes("monograph")) {
|
||||
return "book";
|
||||
}
|
||||
else if (string.includes("report")) {
|
||||
return "report";
|
||||
}
|
||||
else if (string.includes("proceedings") || string.includes("conference")) {
|
||||
return "conferencePaper";
|
||||
}
|
||||
else {
|
||||
return "journalArticle"; // default -- most of the catalog
|
||||
}
|
||||
}
|
||||
|
||||
async function scrape(url) {
|
||||
let xmlURL = url.replace("/handle/", "/metadata/handle/").replace(/[?#].*$/, "") + "/mets.xml";
|
||||
// Z.debug(xmlURL);
|
||||
let xmlText = await requestText(xmlURL);
|
||||
// Z.debug(xmlText)
|
||||
let translator = Zotero.loadTranslator('import');
|
||||
translator.setTranslator('2c05e2d1-a533-448f-aa20-e919584864cb'); // DIM
|
||||
translator.setString(xmlText);
|
||||
translator.setHandler('itemDone', (_obj, item) => {
|
||||
for (let attachment of item.attachments) {
|
||||
if (attachment.url && !attachment.url.startsWith("http")) {
|
||||
attachment.url = "https://aquadocs.org" + attachment.url;
|
||||
}
|
||||
}
|
||||
item.complete();
|
||||
});
|
||||
await translator.translate();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/handle/1834/42391",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Upwelling phenomenon in the marine regions of Southern Central of Vietnam: a review",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Hong Long",
|
||||
"lastName": "Bui",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Minh Thu",
|
||||
"lastName": "Phan",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2022",
|
||||
"ISSN": "1859-3097",
|
||||
"abstractNote": "Upwelling is an oceanographic phenomenon that involves the physical process and contributes to changes in chemistry, biology, and natural resources. So, systematically, it is the particular ecosystems of whole marine regions with the upwelling. The strong upwelling waters in South Central Regions of Vietnam have uncertain features of the East Vietnam Sea (Bien Dong) and special characteristics of a coastal upwelling area, recorded in international scientific papers in the twentieth century. Their first signals were discovered in the early 1930s through conceptual ideas. The upwelling phenomenon is officially confirmed by scientific results of marine investigations of the NAGA Expedition (1959–1961). The paper aims to review and discuss the physical from Vietnamese investigation and results since 1990s. The following factors are the most contributing to forming and developing the strong upwelling in Southern Central Waters: (1) Influence scale (Mezo- and micro-scale); (2) Forming causes and developing mechanism of upwelling phenomenon, such as monsoon, morphography, shoreline, and western boundary current system of the East Vietnam Sea; (3) Influence of the water-mass from Mekong River on the upwelling area; (4) Ecological environmental consequences; (5) Impacts of the atmospheric-oceanic interaction processes on the western EVS on upwelling. Additionally, the review has targeted findings of upwelling phenomenon mainly in Vietnamese waters based on remote sensing analysis and reanalysis data series to simulate their forming, mechanizing, fluctuating models and the impacts of upwelling in the EVS on resources and ecosystems. The coupled atmosphere-ocean models resulted the upwelling mechanisms and formation. The long-time series of upwelling phenomenon (Macroscale) were evaluated by remote sensing and reanalyzed data series. It is also providing the supplementing and detailing causes and mechanisms of upwelling formation; impacts and interactions of upwelling on marine physics and hydrodynamics (ocean vortexes, seawater temperature), biochemical (nutrients, plankton organisms), and resources (fish, seafood). Within the framework of strong upwelling waters in the Southern Central Regions (Vietnam), the review has not only mentioned partly clarified scientific results but also indicates the limitations and challenges which were faced and encountered in the forecasters of upwelling phenomena in the future.",
|
||||
"issue": "2",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AquaDocs",
|
||||
"pages": "103-122",
|
||||
"publicationTitle": "Vietnam of Journal Marine Science and Technology",
|
||||
"shortTitle": "Upwelling phenomenon in the marine regions of Southern Central of Vietnam",
|
||||
"url": "http://hdl.handle.net/1834/42391",
|
||||
"volume": "22",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Natural resources"
|
||||
},
|
||||
{
|
||||
"tag": "Upwelling phenomenon"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/handle/1834/20117?show=full",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "M/V CONNECTED Coral Reef Restoration Monitoring Report, Monitoring Events 2004-2005. Florida Keys National Marine Sanctuary Monroe County, Florida",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Joe",
|
||||
"lastName": "Schittone",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Erik C.",
|
||||
"lastName": "Franklin",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "J. Harold",
|
||||
"lastName": "Hudson",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Jeff",
|
||||
"lastName": "Anderson",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2006",
|
||||
"abstractNote": "This document presents the results of the monitoring of a repaired coral reef injured by the M/V Connected vessel grounding incident of March 27, 2001. This groundingoccurred in Florida state waters within the boundaries of the Florida Keys National Marine Sanctuary (FKNMS). The National Oceanic and Atmospheric Administration (NOAA) and the Board of Trustees of the Internal Improvement Trust Fund of the State of Florida, (“State of Florida” or “state”) are the co-trustees for the natural resourceswithin the FKNMS and, thus, are responsible for mediating the restoration of the damaged marine resources and monitoring the outcome of the restoration actions. Therestoration monitoring program tracks patterns of biological recovery, determines the success of restoration measures, and assesses the resiliency to environmental andanthropogenic disturbances of the site over time.The monitoring program at the Connected site was to have included an assessment of the structural stability of installed restoration modules and biological condition of reattached corals performed on the following schedule: immediately (i.e., baseline), 1, 3, and 6 years after restoration and following a catastrophic event. Restoration of this site was completed on July 20, 2001. Due to unavoidable delays in the settlement of the case, the“baseline” monitoring event for this site occurred in July 2004. The catastrophic monitoring event occurred on August 31, 2004, some 2 ½ weeks after the passage of Hurricane Charley which passed nearby, almost directly over the Dry Tortugas. In September 2005, the year one monitoring event occurred shortly after the passage of Hurricane Katrina, some 70 km to the NW. This report presents the results of all three monitoring events. (PDF contains 37 pages.)",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AquaDocs",
|
||||
"place": "Silver Spring, MD",
|
||||
"publisher": "NOAA/National Ocean Service/National Marine Sanctuary Program",
|
||||
"series": "Marine Sanctuaries Conservation Series",
|
||||
"url": "http://hdl.handle.net/1834/20117",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Acropora palmata"
|
||||
},
|
||||
{
|
||||
"tag": "Coral"
|
||||
},
|
||||
{
|
||||
"tag": "Ecology"
|
||||
},
|
||||
{
|
||||
"tag": "Environment"
|
||||
},
|
||||
{
|
||||
"tag": "Florida Keys National Marine Sanctuary"
|
||||
},
|
||||
{
|
||||
"tag": "Grounding"
|
||||
},
|
||||
{
|
||||
"tag": "Hurricane Charley"
|
||||
},
|
||||
{
|
||||
"tag": "Hurricane Katrina"
|
||||
},
|
||||
{
|
||||
"tag": "Management"
|
||||
},
|
||||
{
|
||||
"tag": "Monitoring"
|
||||
},
|
||||
{
|
||||
"tag": "Restoration"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/discover",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/browse?type=subject&value=A.+gueldenstaedtii",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/handle/1834/30052?show=full",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Ecological Attribute Alteration: Measurement and Evaluation: Activity Assessment Routine: Ecological Systems Component, Ecological Systems Component Handbook",
|
||||
"creators": [],
|
||||
"date": "1978-08",
|
||||
"abstractNote": "This technical paper is intended to provide a more complete treatment of implicit principles and assumptions contained in the user's manual for the ecological systems component of the activity assessment routine. The ecological systems component (ESC) defines a method for evaluating changes in an ecosystem which may result from resource use and consumption. This paper begins by characterizing an ecosystem as an organized collection of attributes mutually dependent on energy exchange. The magnitude matrix with which altered energy flows are scaled is described in Chapter 4. The magnitude of an alteration is assessed somewhat differently for the two categories of attributes: discussion of conventions relevant to this distinction is provided in Chapter 5. However, effects on attributes are variable through time, and additional remarks concerning duration are included in Chapter 6. Finally, possible exceptions to the general guidelines for designating the direction of an effect are introduced in Chapter 7.",
|
||||
"bookTitle": "Ecological Systems Component Handbook",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AquaDocs",
|
||||
"place": "Austin, TX",
|
||||
"publisher": "RPC, Inc.",
|
||||
"series": "Technical Paper",
|
||||
"shortTitle": "Ecological Attribute Alteration",
|
||||
"url": "http://hdl.handle.net/1834/30052",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Ecology"
|
||||
},
|
||||
{
|
||||
"tag": "Management"
|
||||
},
|
||||
{
|
||||
"tag": "coastal zone management"
|
||||
},
|
||||
{
|
||||
"tag": "ecological assessment"
|
||||
},
|
||||
{
|
||||
"tag": "evaluation"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/handle/1834/970?show=full",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Report from the WPB on the Data Situation for Billfish",
|
||||
"creators": [],
|
||||
"date": "2000",
|
||||
"conferenceName": "IOTC 3",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AquaDocs",
|
||||
"pages": "102-103",
|
||||
"proceedingsTitle": "IOTC Proceedings no. 3",
|
||||
"publisher": "IOTC",
|
||||
"url": "http://hdl.handle.net/1834/970",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Billfisheries"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://aquadocs.org/handle/1834/31638?show=full",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "conferencePaper",
|
||||
"title": "Introduction",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Caroline M.",
|
||||
"lastName": "Isaacs",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1997",
|
||||
"abstractNote": "The Thirteenth Annual PACLIM Workshop was held at the Asilomar Conference Center on April 14-17, 1996. Attended by about 100 registered participants, the workshop included 27 talks and 26 poster presentations. The talks consisted of a one-day theme session of seven 45-minute talks and two featured evening talks. Throughout the remainder of the meeting were nearly 20 shorter, 20-minute presentations. Poster presenters gave a short 1-2 minute introduction to their posters, which were displayed during the entire meeting.All presenters were invited to expand their abstracts into a manuscript for inclusion in the Proceedings volume, and nearly all presentations are included in manuscript or abstract form. In this Proceedings volume, manuscripts are presented first, and abstracts of talks and then posters follow.",
|
||||
"conferenceName": "Thirteenth Annual Pacific Climate (PACLIM) Workshop",
|
||||
"language": "en",
|
||||
"libraryCatalog": "AquaDocs",
|
||||
"pages": "1-8",
|
||||
"url": "http://hdl.handle.net/1834/31638",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Atmospheric Sciences"
|
||||
},
|
||||
{
|
||||
"tag": "Earth Sciences"
|
||||
},
|
||||
{
|
||||
"tag": "Ecology"
|
||||
},
|
||||
{
|
||||
"tag": "Limnology"
|
||||
},
|
||||
{
|
||||
"tag": "Oceanography"
|
||||
},
|
||||
{
|
||||
"tag": "PACLIM"
|
||||
},
|
||||
{
|
||||
"tag": "hydrology"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
249
translators/Archeion.js
Normal file
249
translators/Archeion.js
Normal file
@@ -0,0 +1,249 @@
|
||||
{
|
||||
"translatorID": "f6717cbb-2771-4043-bde9-dbae19129bb3",
|
||||
"label": "Archeion",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://www\\.(archeion|memorybc|albertaonrecord)\\.ca",
|
||||
"minVersion": "2.1.9",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2018-03-05 07:08:54"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2012 Sebastian Karcher
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// attr()/text() v2
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;}
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/informationobject/browse?') && getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
} else if (url.match(/;rad$/)|| ZU.xpathText(doc, '//section[@id="action-icons"]//a[contains(@href, ";dc?sf_format=xml")]/@href')) {
|
||||
return "book";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.search-result-description .title a');
|
||||
for (let i=0; i<rows.length; i++) {
|
||||
let href = rows[i].href;
|
||||
let title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var dcUrl = url.replace(/;rad$/, "") + ";dc?sf_format=xml";
|
||||
Zotero.Utilities.doGet(dcUrl, function (text) {
|
||||
//Z.debug(text)
|
||||
text = text.replace(/\&([^a])/, "&$1");
|
||||
text = text.replace(/xsi:type=\"dcterms:ISO639-3\"/, "");
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("5e3ad958-ac79-463d-812b-a86a9235c28f");
|
||||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
//the DC doesn't distinguish between personal and institutional authors - get them from the page and parse
|
||||
var authors = ZU.xpath(doc, '//div[@id="archivalDescriptionArea"]//div[@class="field"]/h3[contains(text(), "Name of creator")]/following-sibling::div/a');
|
||||
for (let i=0; i<authors.length; i++) {
|
||||
//remove location (in parentheses) from creators, since it often contains a comma that messes with author parsing
|
||||
item.creators[i] = ZU.cleanAuthor(authors[i].textContent.replace(/\(.+\)\s*$/, ""), "author", true);
|
||||
if (!item.creators[i].firstName) item.creators[i].fieldMode = 1;
|
||||
}
|
||||
//The Archive gets mapped to the relations tag - we want its name, not the description in archeion
|
||||
for (let i=0; i<item.seeAlso.length; i++) {
|
||||
if (item.seeAlso[i].indexOf("http://") == -1) {
|
||||
item.archive = item.seeAlso[i];
|
||||
}
|
||||
}
|
||||
item.seeAlso = [];
|
||||
//the RDF translator doesn't get the full identifier - get it from the page
|
||||
var loc = ZU.xpathText(doc, '//section[@id="titleAndStatementOfResponsibilityArea"]//div[@class="field"]/h3[contains(text(), "Reference code")]/following-sibling::div');
|
||||
//Z.debug(loc)
|
||||
item.archiveLocation = loc;
|
||||
item.libraryCatalog = "Archeion - MemoryBC - Aberta on Record";
|
||||
if (item.extra) item.notes.push(item.extra);
|
||||
item.extra = "";
|
||||
item.itemID = "";
|
||||
item.complete();
|
||||
});
|
||||
translator.getTranslatorObject(function(trans) {
|
||||
trans.defaultUnknownType = 'book';
|
||||
trans.doImport();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.archeion.ca/informationobject/browse?topLod=0&query=montreal&repos=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.archeion.ca/kydd-memorial-presbyterian-church-montreal-quebec-fonds;rad",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Kydd Memorial Presbyterian Church (Montreal, Quebec) fonds",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Kydd Memorial Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Rosemount Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Fairmount-Taylor Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Fairmount Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Taylor Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Mount Royal Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Outremont Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Quebec)",
|
||||
"lastName": "Outremont-Mount Royal Presbyterian Church (Montreal",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1908-1990",
|
||||
"abstractNote": "Fonds consists of registers, minutes and other records of Kydd Memorial Presbyterian Church (Montreal, Quebec) and of the records of the amalgamated Fairmount-Taylor Presbyterian Church (Montreal, Quebec) and of Outremont-Mount Royal Presbyterian Church (Montreal, Quebec). Records of Kydd Presbyterian Church consist of: Registers including Baptisms, Marriages and Burials (1927-1982); Court Orders (1982-1990); Session minutes (1928-1982); Congregational meetings (1948-1975); Communion Rolls (1927-1942, 1946-1978); Orders of Service (1928-1982); Annual Reports (1963-1981); Board of Managers Meeting minutes (1944-1978); a history (1975) and other records. Records of Fairmount Presbyterian Church consist of: Registers of Baptisms, Marriages and Burials (1910-1925); Session minutes (1910-1925); Communion Rolls (1910-1923) and Board of Managers Meeting minutes (1908-1922). Records of Fairmount-Taylor Presbyterian Church consist of: Registers of Baptisms, Marriages and Burials (1925-1969); Session minutes (1934-1962); Session Reports (1965-1968); Session Correspondence (1948-1970); Communion Rolls (1923-1966); Membership Lists (1967); Orders of Service (1967); Congregational minutes (1909-1969); Annual reports (1939); Board of Managers Reports (1964-1969); Auditor's Reports and Financial Statements (1932, 1950, 1966, 1969) and other records.",
|
||||
"archive": "The Presbyterian Church in Canada",
|
||||
"archiveLocation": "CA ON00313 CONG-147",
|
||||
"libraryCatalog": "Archeion - MemoryBC - Aberta on Record",
|
||||
"rights": "Notes Session minutes are restricted for a period of 50 years from the date they were written.",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://albertaonrecord.ca/informationobject/browse?topLod=0&query=alphabet&repos=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.albertaonrecord.ca/northwest-mennonite-conference-fonds;rad",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Northwest Mennonite Conference fonds",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Northwest Mennonite",
|
||||
"lastName": "Conference",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Mennonite Church Northwest",
|
||||
"lastName": "Conference",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alberta-Saskatchewan Mennonite",
|
||||
"lastName": "Conference",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1949-2003",
|
||||
"abstractNote": "The fonds consists of four series: A) Alphabet Files, B) Congregations, C) Conferences, and D) Northwest Mennonite Conference Centennial Anniversary",
|
||||
"archive": "Mennonite Historical Society of Alberta",
|
||||
"archiveLocation": "MENN menn-22",
|
||||
"language": "the material is in english.",
|
||||
"libraryCatalog": "Archeion - MemoryBC - Aberta on Record",
|
||||
"rights": "Access to personal information in financial or medical records is subject to relevant legislation and MHSA privacy policy",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
"Alberta-Saskatchewan Mennonite Conference",
|
||||
"Mennonite Church. Northwest Conference",
|
||||
"Northwest Mennonite Conference",
|
||||
"Religions"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.archeion.ca/informationobject/browse?topLod=0&names=73890",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
157
translators/Archiv fuer Sozialgeschichte.js
Normal file
157
translators/Archiv fuer Sozialgeschichte.js
Normal file
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"translatorID": "7ecb9512-9195-478a-a525-40e71b01f3b0",
|
||||
"label": "Archiv fuer Sozialgeschichte",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://library\\.fes\\.de/jportal/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcbv",
|
||||
"lastUpdated": "2013-05-15 20:05:47"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2013 Sebastian Karcher
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.indexOf("MCRSearchServlet?mode=results")!=-1 || url.indexOf("/receive/jportal_jpvolume_")!=-1) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (url.indexOf("/receive/jportal_jparticle")!=-1) return "journalArticle"
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var staticURL = ZU.xpathText(doc, '//td[@id="detailed-staticurl2"]/a/@href');
|
||||
var pdfURL = ZU.xpathText(doc, '//tr[@id="detailed-contents"]/td/a[contains(@href, ".pdf")]/@href');
|
||||
if (url.indexOf("?")!=-1) var xmlUrl = url + "&XSL.Style=xmlexport"
|
||||
else var xmlUrl = url + "?XSL.Style=xmlexport";
|
||||
Zotero.Utilities.doGet(xmlUrl, function (text) {
|
||||
//Z.debug(text)
|
||||
var docxml = (new DOMParser()).parseFromString(text, "text/xml");
|
||||
ns = {
|
||||
"acl" : "xalan://org.mycore.access.MCRAccessManager",
|
||||
"xsi" : "http://www.w3.org/2001/XMLSchema-instance",
|
||||
"xlink" : "http://www.w3.org/1999/xlink"};
|
||||
|
||||
var item = new Zotero.Item("journalArticle");
|
||||
var title = ZU.xpathText(docxml, '//maintitle[1]', ns);
|
||||
item.title = title.replace(/\/[^\/]+$/, "").replace(/\s*:/, ":");
|
||||
var authors = ZU.xpath(docxml, '//participants/participant[@xlink:title="author" or @xlink:title="reviewer"]', ns);
|
||||
var author;
|
||||
for (var i in authors){
|
||||
author = ZU.xpathText(authors[i], './@xlink:label', ns)
|
||||
item.creators.push(ZU.cleanAuthor(author, "author", true))
|
||||
}
|
||||
var reviewedauthors = ZU.xpath(docxml, '//participants/participant[@xlink:title="authorOfReviewer"]', ns);
|
||||
var reviewedauthor;
|
||||
for (var i in reviewedauthors){
|
||||
reviewedauthor = ZU.xpathText(reviewedauthors[i], './@xlink:label', ns)
|
||||
item.creators.push(ZU.cleanAuthor(reviewedauthor, "reviewedAuthor", true))
|
||||
}
|
||||
item.page = ZU.xpathText(docxml, '//sizes/size', ns);
|
||||
item.date = ZU.xpathText(docxml, '//dates/date[1]', ns);
|
||||
item.volume = ZU.xpathText(docxml, '//maintitle[contains(text(), "Band")]', ns).replace(/Band\s*/, "");
|
||||
item.language = "de-DE";
|
||||
item.url = staticURL;
|
||||
if (pdfURL) item.attachments.push({url: pdfURL, title: "AFS - Full Text PDF", mimeType: "application/pdf"})
|
||||
item.journalAbbreviation = "AFS";
|
||||
item.complete();
|
||||
});
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var articles = new Array();
|
||||
var items = new Object();
|
||||
|
||||
//search results
|
||||
var titles = ZU.xpath(doc, '//td[@id="leaf_afs-linkarea2"]//a[contains(@href, "/receive/jportal_jparticle")]');
|
||||
//volume browsing
|
||||
if (titles.length<1){
|
||||
titles = ZU.xpath(doc, '//td[@id="leaf-linkarea2"]//a[contains(@href, "/receive/jportal_jparticle")]');
|
||||
}
|
||||
for (var i in titles) {
|
||||
items[titles[i].href] = titles[i].textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
Zotero.Utilities.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://library.fes.de/jportal/receive/jportal_jparticle_00010003",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Otto-Ernst",
|
||||
"lastName": "Schüddekopf",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Karl",
|
||||
"lastName": "Radek",
|
||||
"creatorType": "reviewedAuthor"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "AFS - Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"title": "Karl Radek in Berlin: ein Kapitel deutsch-russischer Beziehungen im Jahre 1919",
|
||||
"page": "87 - 166",
|
||||
"date": "1962",
|
||||
"volume": "2",
|
||||
"language": "de-DE",
|
||||
"url": "http://library.fes.de/jportal/receive/jportal_jparticle_00010003",
|
||||
"journalAbbreviation": "AFS",
|
||||
"libraryCatalog": "Archiv fuer Sozialgeschichte",
|
||||
"accessDate": "CURRENT_TIMESTAMP",
|
||||
"shortTitle": "Karl Radek in Berlin"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://library.fes.de/jportal/receive/jportal_jpvolume_00010000?XSL.view.objectmetadata.SESSION=true&XSL.toc.pos.SESSION=1",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"translatorID": "dedcae51-073c-48fb-85ce-2425e97f128d",
|
||||
"label": "Archive Ouverte en Sciences de l'Information et de la Communication (AOSIC)",
|
||||
"creator": "Michael Berkowitz",
|
||||
"target": "^https?://archivesic\\.ccsd\\.cnrs\\.fr/",
|
||||
"minVersion": "1.0.0b4.r5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-12-27 20:43:34"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2018 Sylvain Machefert
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.title.toLowerCase().match(/:: search|:: recherche/)) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (url.match(/sic_\d+|tel-\d+/)) {
|
||||
return "journalArticle";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var metaTags = {
|
||||
"DC.relation": "url",
|
||||
"DC.date": "date",
|
||||
"DC.description": "abstractNote",
|
||||
"DC.creator": "creators",
|
||||
"DC.title": "title",
|
||||
};
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = Zotero.Utilities.getItemArray(doc, doc, /sic_\d+|tel-\d+/);
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) return;
|
||||
ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc) {
|
||||
var xpath = '//meta[@name]';
|
||||
var data = {};
|
||||
var metas = doc.evaluate(xpath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var meta;
|
||||
|
||||
meta = metas.iterateNext();
|
||||
while (meta) {
|
||||
if (data[meta.name]) {
|
||||
data[meta.name] = data[meta.name] + ";" + meta.content;
|
||||
}
|
||||
else {
|
||||
data[meta.name] = meta.content;
|
||||
}
|
||||
meta = metas.iterateNext();
|
||||
}
|
||||
|
||||
var item = new Zotero.Item("journalArticle");
|
||||
for (var tag in metaTags) {
|
||||
if (tag == "DC.creator") {
|
||||
var authors = data['DC.creator'].split(";");
|
||||
for (var i = 0; i < authors.length; i++) {
|
||||
var aut = authors[i];
|
||||
aut = aut.replace(/^([^,]+),\s+(.*)$/, "$2 $1");
|
||||
item.creators.push(Zotero.Utilities.cleanAuthor(aut, "author"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
item[metaTags[tag]] = data[tag];
|
||||
}
|
||||
}
|
||||
|
||||
var pdfurl = data.citation_pdf_url;
|
||||
|
||||
if (pdfurl) {
|
||||
item.attachments = [
|
||||
{ url: item.url, title: "AOSIC Snapshot", mimeType: "text/html" },
|
||||
{ url: pdfurl, title: "AOSIC Full Text PDF", mimeType: "application/pdf" }
|
||||
];
|
||||
}
|
||||
item.complete();
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://archivesic.ccsd.cnrs.fr/sic_00665224/fr/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "comprendre une organisation par l'analyse de ses documents",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Brigitte",
|
||||
"lastName": "Guyot",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"abstractNote": "s'appuyer sur des observables que sont les documents d'entreprise donne à voir à la fois une dynamique de formalisation des écrits professionnels, une activité particulière, celle d'éditorialisation, ainsi que des traces d'intervention institutionnelle ; tout cela fait du document un miroir et un porteur d'ordre.",
|
||||
"libraryCatalog": "Archive Ouverte en Sciences de l'Information et de la Communication (AOSIC)",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "AOSIC Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "AOSIC Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://tel.archives-ouvertes.fr/tel-00483442/fr/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Valorisation d'un patrimoine documentaire industriel et évolution vers un système de gestion des connaissances orienté métiers",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Caroline",
|
||||
"lastName": "Djambian",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2010/04/14",
|
||||
"abstractNote": "Le patrimoine documentaire des entreprises s'est souvent accumulé sans que ces dernières puissent s'adapter au rythme des évolutions des technologies de l'information. La mémoire collective qui ne cesse d'être produite voit sa masse croître et est devenue éparse et hétérogène. Comme nombre d'entreprises, des problématiques transverses imposent aujourd'hui à la Division Ingénierie Nucléaire (DIN) d'EDF d'être capable de mobiliser ses connaissances de façon opérationnelle. Mais la valorisation de son patrimoine informationnel dépasse largement les aspects techniques pour prendre en compte l'organisation dans sa globalité. Ce sont en effet les métiers cœurs de l'entreprise qui sont le point de départ de notre réflexion. Dans ce contexte d'ingénierie c'est par la documentation que les connaissances techniques transitent et sont exprimées par des concepts propres aux métiers. La terminologie métiers est la clé permettant de valoriser les connaissances et de mieux gérer le patrimoine de la DIN. Elle nous permet d'aller vers une représentation explicite, au sein d'une base de connaissances centrée sur le \" sens métier \" de l'organisation. Notre approche résolument empirique et qualitative aboutit à une méthode de construction d'une base de connaissances métiers appliquée à un domaine délimité de la Division Ingénierie Nucléaire d'EDF.",
|
||||
"libraryCatalog": "Archive Ouverte en Sciences de l'Information et de la Communication (AOSIC)",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "AOSIC Snapshot",
|
||||
"mimeType": "text/html"
|
||||
},
|
||||
{
|
||||
"title": "AOSIC Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
142
translators/Archives Canada.js
Normal file
142
translators/Archives Canada.js
Normal file
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"translatorID": "18bc329c-51af-497e-a7cf-aa572fae363d",
|
||||
"label": "Archives Canada",
|
||||
"creator": "Adam Crymble",
|
||||
"target": "^https?://(www\\.)?archivescanada\\.ca",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsb",
|
||||
"lastUpdated": "2019-06-13 23:00:25"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2019 Adam Crymble
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.location.href.match("RouteRqst")) {
|
||||
return "multiple";
|
||||
}
|
||||
else if (doc.location.href.match("ItemDisplay")) {
|
||||
return "book";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function associateData(newItem, dataTags, field, zoteroField) {
|
||||
if (dataTags[field]) {
|
||||
newItem[zoteroField] = dataTags[field];
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, _url) {
|
||||
var dataTags = {};
|
||||
var tagsContent = [];
|
||||
var cainNo;
|
||||
var newItem = new Zotero.Item("book");
|
||||
|
||||
var data = doc.evaluate('//td/p', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var dataCount = doc.evaluate('count (//td/p)', doc, null, XPathResult.ANY_TYPE, null);
|
||||
|
||||
for (i = 0; i < dataCount.numberValue; i++) {
|
||||
let data1 = data.iterateNext().textContent.replace(/^\s*|\s*$/g, '').split(":");
|
||||
let fieldTitle = data1[0].replace(/\s+/g, '');
|
||||
|
||||
if (fieldTitle == "PROVENANCE") {
|
||||
var multiAuthors = data1[1].split(/\n/);
|
||||
|
||||
for (var j = 0; j < multiAuthors.length; j++) {
|
||||
if (multiAuthors[j].match(",")) {
|
||||
var authorName = multiAuthors[j].replace(/^\s*|\s*$/g, '').split(",");
|
||||
|
||||
authorName[0] = authorName[0].replace(/\s+/g, '');
|
||||
dataTags.PROVENANCE = (authorName[1] + (" ") + authorName[0]);
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(dataTags.PROVENANCE, "author"));
|
||||
}
|
||||
else {
|
||||
newItem.creators.push({ lastName: multiAuthors[j].replace(/^\s*|\s*$/g, ''), creatorType: "creator" });
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldTitle == "SUBJECTS" | fieldTitle == "MATIÈRES") {
|
||||
tagsContent = data1[1].split(/\n/);
|
||||
}
|
||||
else {
|
||||
dataTags[fieldTitle] = data1[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (doc.evaluate('//tr[3]/td/table/tbody/tr[1]/td/table/tbody/tr[2]/td/table/tbody/tr/td[1]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
cainNo = doc.evaluate('//tr[3]/td/table/tbody/tr[1]/td/table/tbody/tr[2]/td/table/tbody/tr/td[1]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
newItem.archiveLocation = cainNo.replace(/^\s*|\s*$/g, '');
|
||||
}
|
||||
for (var i = 0; i < tagsContent.length; i++) {
|
||||
newItem.tags[i] = tagsContent[i].replace(/^\s*|\s*$/g, '');
|
||||
}
|
||||
|
||||
associateData(newItem, dataTags, "TITLE", "title");
|
||||
associateData(newItem, dataTags, "REPOSITORY", "repository");
|
||||
associateData(newItem, dataTags, "RETRIEVALNUMBER", "callNumber");
|
||||
associateData(newItem, dataTags, "DATES", "date");
|
||||
associateData(newItem, dataTags, "SCOPEANDCONTENT", "abstractNote");
|
||||
associateData(newItem, dataTags, "LANGUAGE", "language");
|
||||
|
||||
associateData(newItem, dataTags, "LANGUE", "language");
|
||||
associateData(newItem, dataTags, "TITRE", "title");
|
||||
associateData(newItem, dataTags, "CENTRED'ARCHIVES", "repository");
|
||||
associateData(newItem, dataTags, "NUMÉROD'EXTRACTION", "callNumber");
|
||||
associateData(newItem, dataTags, "PORTÉEETCONTENU", "abstractNote");
|
||||
|
||||
newItem.url = doc.location.href;
|
||||
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var articles = [];
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = {};
|
||||
|
||||
var titles = doc.evaluate('//td[3]/a', doc, null, XPathResult.ANY_TYPE, null);
|
||||
|
||||
var nextTitle;
|
||||
while (nextTitle = titles.iterateNext()) { // eslint-disable-line no-cond-assign
|
||||
items[nextTitle.href] = nextTitle.textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) return;
|
||||
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
Zotero.Utilities.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
203
translators/Ariana News.js
Normal file
203
translators/Ariana News.js
Normal file
@@ -0,0 +1,203 @@
|
||||
{
|
||||
"translatorID": "44552245-d911-4613-8b4f-19f41a5e5b0d",
|
||||
"label": "Ariana News",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https://ariananews\\.af/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-16 15:20:38"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.body.classList.contains('single')) {
|
||||
return "newspaperArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('ul.mvp-blog-story-list li a');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(text(row, 'h2'));
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
item.tags = item.tags.filter(tag => tag != 'featured' && tag != 'acci');
|
||||
|
||||
if (item.abstractNote) {
|
||||
item.abstractNote = item.abstractNote.replace(/^\([^)]+\)/, '');
|
||||
}
|
||||
|
||||
if (item.creators.length == 1 && item.creators[0].lastName == 'News') {
|
||||
item.creators = [];
|
||||
}
|
||||
|
||||
item.date = attr(doc, '[itemprop="datePublished"]', 'datetime');
|
||||
item.publicationTitle = 'Ariana News';
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = "newspaperArticle";
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ariananews.af/afghan-carpet-industry-facing-major-challenges-acci/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Afghan carpet industry facing major challenges: ACCI",
|
||||
"creators": [],
|
||||
"date": "2021-07-26",
|
||||
"abstractNote": "Afghanistan’s Chamber of Commerce and Investment (ACCI) said on Sunday that the Afghan carpet industry is facing numerous challenges despite the foreign aid that has been injected into the industry. The ACCI said that the lack of a dedicated industrial park and a suitable place to produce carpets are a […]",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "ariananews.af",
|
||||
"publicationTitle": "Ariana News",
|
||||
"shortTitle": "Afghan carpet industry facing major challenges",
|
||||
"url": "https://ariananews.af/afghan-carpet-industry-facing-major-challenges-acci/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "carpet"
|
||||
},
|
||||
{
|
||||
"tag": "export"
|
||||
},
|
||||
{
|
||||
"tag": "kabul"
|
||||
},
|
||||
{
|
||||
"tag": "production"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ariananews.af/us-troops-arrive-in-kabul-to-assist-with-evacuations/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "US troops arrive in Kabul to assist with evacuations",
|
||||
"creators": [],
|
||||
"date": "2021-08-14",
|
||||
"abstractNote": "American troops have flown into Kabul to help evacuate embassy personnel and other civilians in the Afghan capital, a U.S. official said on Saturday, a day after Taliban insurgents seized the country’s second- and third-biggest cities. The Pentagon has said two battalions of Marines and one infantry battalion will arrive […]",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "ariananews.af",
|
||||
"publicationTitle": "Ariana News",
|
||||
"url": "https://ariananews.af/us-troops-arrive-in-kabul-to-assist-with-evacuations/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "attacsk"
|
||||
},
|
||||
{
|
||||
"tag": "doha"
|
||||
},
|
||||
{
|
||||
"tag": "embassy"
|
||||
},
|
||||
{
|
||||
"tag": "peace"
|
||||
},
|
||||
{
|
||||
"tag": "taliban"
|
||||
},
|
||||
{
|
||||
"tag": "troops"
|
||||
},
|
||||
{
|
||||
"tag": "us"
|
||||
},
|
||||
{
|
||||
"tag": "violence"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://ariananews.af/?s=covid",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
279
translators/Art Institute of Chicago.js
Normal file
279
translators/Art Institute of Chicago.js
Normal file
@@ -0,0 +1,279 @@
|
||||
{
|
||||
"translatorID": "8e98b11a-5648-42b2-8542-5f366cb953f6",
|
||||
"label": "Art Institute of Chicago",
|
||||
"creator": "nikhil trivedi, Illya Moskvin",
|
||||
"target": "^https?://(www\\.)?artic\\.edu/(artworks/|collection)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-06-04 20:08:22"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Art Institute of Chicago
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc) {
|
||||
if (ZU.xpathText(doc, '//html[contains(@class, "p-artwork-show")]')) {
|
||||
return 'artwork';
|
||||
}
|
||||
else if (ZU.xpathText(doc, '//html[contains(@class, "p-collection-index")]')) {
|
||||
return 'multiple';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc) {
|
||||
if (detectWeb(doc) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
return true;
|
||||
});
|
||||
} else {
|
||||
scrape(doc);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc) {
|
||||
var item = new Zotero.Item('artwork');
|
||||
item.title = ZU.xpathText(doc, '//h1');
|
||||
|
||||
var artists = ZU.xpath(doc, '//meta[contains(@name, "citation_author")]');
|
||||
for (var i = 0; i < artists.length; i++) {
|
||||
var cleaned = artists[i].content.replace(/\(.*\)$/, '').trim();
|
||||
item.creators.push(ZU.cleanAuthor(cleaned, 'artist'));
|
||||
}
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
|
||||
item.date = ZU
|
||||
.xpath(doc, '//dl[@id="dl-artwork-details"]/dd[@itemprop="dateCreated"]/*/a')
|
||||
.map(function (date) {
|
||||
return date.textContent;
|
||||
})
|
||||
.join(', ');
|
||||
|
||||
item.artworkMedium = ZU.xpathText(doc, '//dl[@id="dl-artwork-details"]/dd[@itemprop="material"]');
|
||||
item.artworkSize = ZU.xpathText(doc, '//dl[@id="dl-artwork-details"]/dd[@itemprop="size"]');
|
||||
item.callNumber = ZU.xpathText(doc, '//dl[@id="dl-artwork-details"]/dd[@itemprop="identifier"]');
|
||||
|
||||
item.url = ZU.xpathText(doc, '//link[@rel="canonical"]/@href');
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//ul[@id="artworksList"]/li/a');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artic.edu/artworks/129884/starry-night-and-the-astronauts",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Starry Night and the Astronauts",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Alma",
|
||||
"lastName": "Thomas",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "1972",
|
||||
"artworkMedium": "Acrylic on canvas",
|
||||
"artworkSize": "152.4 × 134.6 cm (60 × 53 in.)",
|
||||
"callNumber": "1994.36",
|
||||
"libraryCatalog": "Art Institute of Chicago",
|
||||
"url": "https://www.artic.edu/artworks/129884/starry-night-and-the-astronauts",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artic.edu/artworks/156538/chicago-stock-exchange-trading-room-reconstruction-at-the-art-institute-of-chicago",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Chicago Stock Exchange Trading Room: Reconstruction at the Art Institute of Chicago",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Architects",
|
||||
"creatorType": "artist",
|
||||
"firstName": "Adler & Sullivan"
|
||||
}
|
||||
],
|
||||
"date": "Built 1893–1894",
|
||||
"artworkMedium": "Mixed media recreation of room",
|
||||
"artworkSize": "Room is roughly 5,704 square feet (not including gallery)",
|
||||
"callNumber": "RX23310/0002",
|
||||
"libraryCatalog": "Art Institute of Chicago",
|
||||
"shortTitle": "Chicago Stock Exchange Trading Room",
|
||||
"url": "https://www.artic.edu/artworks/156538/chicago-stock-exchange-trading-room-reconstruction-at-the-art-institute-of-chicago",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artic.edu/artworks/28560/the-bedroom",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "The Bedroom",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Gogh",
|
||||
"creatorType": "artist",
|
||||
"firstName": "Vincent van"
|
||||
}
|
||||
],
|
||||
"date": "1889",
|
||||
"artworkMedium": "Oil on canvas",
|
||||
"artworkSize": "73.6 × 92.3 cm (29 × 36 5/8 in.)",
|
||||
"callNumber": "1926.417",
|
||||
"libraryCatalog": "Art Institute of Chicago",
|
||||
"url": "https://www.artic.edu/artworks/28560/the-bedroom",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artic.edu/artworks/52273/platform-bench",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Platform Bench",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "George",
|
||||
"lastName": "Nelson",
|
||||
"creatorType": "artist"
|
||||
},
|
||||
{
|
||||
"lastName": "Inc",
|
||||
"creatorType": "artist",
|
||||
"firstName": "Herman Miller"
|
||||
}
|
||||
],
|
||||
"date": "Designed 1946, Made 1946-1967, c. 1946-1967",
|
||||
"artworkMedium": "Birch",
|
||||
"artworkSize": "35.5 × 47 × 183.5 cm (14 × 18 1/2 × 72 1/4 in.)",
|
||||
"callNumber": "1978.141",
|
||||
"libraryCatalog": "Art Institute of Chicago",
|
||||
"url": "https://www.artic.edu/artworks/52273/platform-bench",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artic.edu/artworks/7691/gathering-seaweed-at-omori",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Gathering Seaweed at Omori",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Utagawa",
|
||||
"lastName": "Kuniyoshi",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"artworkMedium": "Ink and red pigment on paper",
|
||||
"callNumber": "1958.191",
|
||||
"libraryCatalog": "Art Institute of Chicago",
|
||||
"url": "https://www.artic.edu/artworks/7691/gathering-seaweed-at-omori",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
192
translators/Artefacts Canada.js
Normal file
192
translators/Artefacts Canada.js
Normal file
@@ -0,0 +1,192 @@
|
||||
{
|
||||
"translatorID": "661fc39a-2500-4710-8285-2d67ddc00a69",
|
||||
"label": "Artefacts Canada",
|
||||
"creator": "Adam Crymble",
|
||||
"target": "^https?://(www\\.)?pro\\.rcip-chin\\.gc\\.ca",
|
||||
"minVersion": "1.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2013-09-16 00:25:18"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
var multi1 = '';
|
||||
var single1 = '';
|
||||
|
||||
if (doc.evaluate('//div[@id="mainContent"]/table/tbody/tr/td[1]/h1', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
|
||||
multi1 = doc.evaluate('//div[@id="mainContent"]/table/tbody/tr/td[1]/h1', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
}
|
||||
|
||||
var xpath = '//tbody/tr[1]/td[2]/span';
|
||||
if (doc.evaluate(xpath, doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
single1 = doc.evaluate(xpath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
}
|
||||
|
||||
if (multi1.match("Search Results") || multi1.match("Résultats de recherche")) {
|
||||
return "multiple";
|
||||
} else if (single1.match("Document") || single1.match("Enregistrement")) {
|
||||
return "artwork";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function associateData (newItem, dataTags, field, zoteroField) {
|
||||
if (dataTags[field]) {
|
||||
newItem[zoteroField] = dataTags[field];
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
|
||||
var dataTags = new Object();
|
||||
var tagsContent = new Array();
|
||||
var fieldTitle;
|
||||
|
||||
var newItem = new Zotero.Item("artwork");
|
||||
|
||||
var headers = doc.evaluate('//td[1][@class="leftResTitle"]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var contents = doc.evaluate('//td[2][@class="pageText"]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
|
||||
while (fieldTitle = headers.iterateNext()) {
|
||||
fieldTitle = fieldTitle.textContent.replace(/\s+/g, '');
|
||||
if (fieldTitle == "Titre:") {
|
||||
fieldTitle = "Title:";
|
||||
} else if (fieldTitle == "Nomdel'objet:") {
|
||||
fieldTitle = "NameofObject:";
|
||||
} else if (fieldTitle == "Sujetouimage:") {
|
||||
fieldTitle = "Subject/Image:";
|
||||
} else if (fieldTitle == "Numérod'accession:") {
|
||||
fieldTitle = "AccessionNumber:";
|
||||
} else if (fieldTitle == "Artisteouartisan:") {
|
||||
fieldTitle = "Artist/Maker:";
|
||||
} else if (fieldTitle == "Fabricant:") {
|
||||
fieldTitle = "Manufacturer:";
|
||||
}
|
||||
|
||||
dataTags[fieldTitle] = contents.iterateNext().textContent.replace(/^\s*|\s*$/g, '')
|
||||
}
|
||||
|
||||
Zotero.debug(dataTags);
|
||||
|
||||
if (dataTags["Artist/Maker:"]) {
|
||||
if (dataTags["Artist/Maker:"].match(", ")) {
|
||||
var authors = dataTags["Artist/Maker:"].split(", ");
|
||||
authors = authors[0] + ' ' + authors[1];
|
||||
newItem.creators.push(authors, "creator");
|
||||
} else {
|
||||
newItem.creators.push(dataTags["Artist/Make:"], "creator");
|
||||
}
|
||||
}
|
||||
|
||||
if (dataTags["Manufacturer:"]) {
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(dataTags["Manufacturer:"], "creator"));
|
||||
}
|
||||
|
||||
if (dataTags["AccessionNumber:"]) {
|
||||
newItem.locInArchive = "Accession Number: " + dataTags["AccessionNumber:"];
|
||||
}
|
||||
|
||||
if (dataTags["Subject/Image:"]) {
|
||||
if (dataTags["Subject/Image:"].match(/\n/)) {
|
||||
var subjects = dataTags["Subject/Image:"].split(/\n/);
|
||||
for (var i = 0; i < subjects.length; i++) {
|
||||
newItem.tags[i] = subjects[i];
|
||||
}
|
||||
} else {
|
||||
newItem.tags[0] = dataTags["Subject/Image:"].match(/\n/);
|
||||
}
|
||||
}
|
||||
|
||||
if (dataTags["Title:"]) {
|
||||
associateData (newItem, dataTags, "Title:", "title");
|
||||
associateData (newItem, dataTags, "NameofObject:", "medium");
|
||||
} else if (dataTags["NameofObject:"]) {
|
||||
associateData (newItem, dataTags, "NameofObject:", "title");
|
||||
} else {
|
||||
newItem.title = "No Title Found";
|
||||
}
|
||||
|
||||
associateData (newItem, dataTags, "LatestProductionDate:", "date");
|
||||
associateData (newItem, dataTags, "Datedefindeproduction:", "date");
|
||||
|
||||
associateData (newItem, dataTags, "Institution:", "repository");
|
||||
associateData (newItem, dataTags, "Établissement:", "repository");
|
||||
|
||||
associateData (newItem, dataTags, "Description:", "description");
|
||||
|
||||
associateData (newItem, dataTags, "Medium:", "medium");
|
||||
associateData (newItem, dataTags, "Médium:", "medium");
|
||||
|
||||
newItem.url = doc.location.href;
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
|
||||
var articles = new Array();
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
|
||||
var titles = doc.evaluate('//tr[1]/td[2][@class="pageText"]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var links = doc.evaluate('//td/a[contains(@class, "moreInfoink")]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
|
||||
var next_title;
|
||||
while (next_title = titles.iterateNext()) {
|
||||
|
||||
items[links.iterateNext().href] = next_title.textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
Zotero.Utilities.processDocuments(articles, scrape, function (){});
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url)
|
||||
}
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.pro.rcip-chin.gc.ca/bd-dl/artefacts-eng.jsp?emu=en.artefacts:/Proxac/ws/human/user/www/ResultSet&w=NATIVE(%27(WAT%20ph%20is%20%27%27montreal%27%27%20or%20WHAIR%20ph%20is%20%27%27montreal%27%27%20or%20WHOO%20ph%20is%20%27%27montreal%27%27%20or%20WEN%20ph%20is%20%27%27montreal%27%27%20or%20HOUU%20ph%20is%20%27%27montreal%27%27)%27)&upp=0&currLang=English",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.pro.rcip-chin.gc.ca/bd-dl/artefacts-eng.jsp?emu=en.artefacts:/Proxac/ws/human/user/www/Record;jsessionid=hb7jhiecd1&upp=0&m=13&w=NATIVE%28%27%28WAT%20ph%20is%20%27%27montreal%27%27%20or%20WHAIR%20ph%20is%20%27%27montreal%27%27%20or%20WHOO%20ph%20is%20%27%27montreal%27%27%20or%20WEN%20ph%20is%20%27%27montreal%27%27%20or%20HOUU%20ph%20is%20%27%27montreal%27%27%29%27%29",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "",
|
||||
"lastName": "Bourbon",
|
||||
"creatorType": "creator"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [],
|
||||
"seeAlso": [],
|
||||
"attachments": [],
|
||||
"locInArchive": "Accession Number: 2005.385",
|
||||
"title": "Canada 1976",
|
||||
"medium": "porte-clefs",
|
||||
"date": "1976",
|
||||
"description": "Porte-clefs en métal doré décoré d'un médaillon en acrylique clair présentant le logo des Jeux olympiques de Montréal.",
|
||||
"url": "http://www.pro.rcip-chin.gc.ca/bd-dl/artefacts-eng.jsp?emu=en.artefacts:/Proxac/ws/human/user/www/Record;jsessionid=hb7jhiecd1&upp=0&m=13&w=NATIVE%28%27%28WAT%20ph%20is%20%27%27montreal%27%27%20or%20WHAIR%20ph%20is%20%27%27montreal%27%27%20or%20WHOO%20ph%20is%20%27%27montreal%27%27%20or%20WEN%20ph%20is%20%27%27montreal%27%27%20or%20HOUU%20ph%20is%20%27%27montreal%27%27%29%27%29",
|
||||
"libraryCatalog": "Centre d'histoire de Montréal",
|
||||
"accessDate": "CURRENT_TIMESTAMP"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
438
translators/Artforum.js
Normal file
438
translators/Artforum.js
Normal file
@@ -0,0 +1,438 @@
|
||||
{
|
||||
"translatorID": "a127f012-4ea4-4d05-a657-24d47f91b016",
|
||||
"label": "Artforum",
|
||||
"creator": "czar",
|
||||
"target": "^https?://(www\\.)?artforum\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-09-02 00:33:38"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2018 czar
|
||||
http://en.wikipedia.org/wiki/User_talk:Czar
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (/-\d{5,}([?#].*)?$/.test(url)) {
|
||||
if (doc.querySelector('h3.print-article__issue-title')) {
|
||||
return "magazineArticle";
|
||||
}
|
||||
return "blogPost";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); // embedded metadata (EM)
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) { // corrections to EM
|
||||
item.publicationTitle = "Artforum";
|
||||
item.language = 'en-US';
|
||||
var jsonLD = doc.querySelector('script[type="application/ld+json"]');
|
||||
if (jsonLD) {
|
||||
jsonLD = JSON.parse(jsonLD.textContent);
|
||||
item.title = jsonLD.name;
|
||||
item.date = jsonLD.dateModified || jsonLD.datePublished;
|
||||
|
||||
if (!item.creators.length && jsonLD.author) {
|
||||
item.creators.push(ZU.cleanAuthor(jsonLD.author.name, 'author'));
|
||||
}
|
||||
}
|
||||
var authorMetadata = doc.querySelectorAll('.contrib-link a');
|
||||
for (let author of authorMetadata) {
|
||||
item.creators.push(ZU.cleanAuthor(author.text, "author"));
|
||||
}
|
||||
if (url.includes('/print/')) {
|
||||
item.itemType = "magazineArticle";
|
||||
item.ISSN = "0004-3532";
|
||||
var issueDate = doc.querySelector('h3.print-article__issue-title');
|
||||
if (issueDate) {
|
||||
item.date = issueDate.textContent.trim().replace('PRINT ','');
|
||||
ZU.doGet(issueDate.querySelector('a').href, function (respText) {
|
||||
var voliss = respText.match(/Vol\.\s(\d+),\sNo\.\s(\d+)/);
|
||||
item.volume = voliss[1];
|
||||
item.issue = voliss[2];
|
||||
item.complete();
|
||||
});
|
||||
} else item.complete();
|
||||
} else item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function(trans) {
|
||||
trans.itemType = 'blogPost';
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
// 1st for search page, 2nd for issue ToC, 3rd/4th/5th for sections, 5th+ for homepage
|
||||
var rows = doc.querySelectorAll('h1.results-list__h1, .toc-article__title, .news-list h1, .reviews-list h1, .article-list h1, p.hp-singlefeature-author__writer, h3.hp-news__title, h3.hp-twocolumn__title a, h3.hp-artguide__title, p.hp-bloglist__teaser a');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
let href = attr(rows[i], 'a', 'href');
|
||||
if (!href) {
|
||||
let link = rows[i].closest('a');
|
||||
if (link) href = link.href;
|
||||
}
|
||||
let title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
switch (detectWeb(doc, url)) {
|
||||
case "multiple":
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
scrape(doc, url);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/news/ugochukwu-smooth-nzewi-appointed-curator-of-hood-museum-40747",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Ugochukwu-Smooth Nzewi Appointed Curator of Hood Museum",
|
||||
"creators": [],
|
||||
"date": "2013-05-06",
|
||||
"abstractNote": "The Hood Museum of Art at Dartmouth College, Hanover, has appointed Ugochukwu-Smooth Nzewi as its first curator of African Art, reports Artdaily. Born in Nigeria, Nzewi received his PhD in Art History from Emory University. A specialist in modern and contemporary African and African Diaspora arts, he will be responsible in his new role for the documentation, preservation, and research of Hood’s African Art collection, which includes some 1,900 objects. He will also engage Dartmouth faculty and students in the development of curricular programming related to the museum’s African holdings. Nzewi",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/news/ugochukwu-smooth-nzewi-appointed-curator-of-hood-museum-40747",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/diary/kaitlin-phillips-at-the-11th-new-york-art-book-fair-63626",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Fine Print",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Kaitlin",
|
||||
"lastName": "Phillips",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2016-09-22",
|
||||
"abstractNote": "LAST THURSDAY, at the opening night preview of Printed Matter’s NY Book Fair at MoMA PS1, in the popup white dome in the courtyard, at one of the end-to-end merchandise tables, V. Vale (“That’s the name I’m famous under”), founder of RE/Search, complains to a fan that the fair, in its eleventh year, and its host city, have lost their street cred:“I never come to New York. Yeah, I never come to New York. I never come to New York,” says Vale, beaming defiantly.“Well, New York may have jumped the shark.”“I don’t know what that means. Jump the shark.”“It means that something has hit its peak, and",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/diary/kaitlin-phillips-at-the-11th-new-york-art-book-fair-63626",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/picks/alex-da-corte-62421",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Alex Da Corte",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Aria",
|
||||
"lastName": "Dean",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2016-07-28",
|
||||
"abstractNote": "As you enter this space, your senses are bombarded by Alex Da Corte’s scrambled, saturated landscape. A supersized witch’s hat fills the first area, lit by green and red neon from above. This is flanked by a stained-glass window depicting a red rose, referencing Disney’s Beauty and the Beast, and a floor-to-ceiling, blown-up image of a weeping bridesmaid. The exhibition is like a dream: Recognizable elements are mashed together, but something is off, and it gradually morphs into a surreal nightmare.The gallery buzzes with sound from three video works—the focal point of the second room—depicting",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/picks/alex-da-corte-62421",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/film/nick-pinkerton-on-gimme-shelter-hollywood-north-66885",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Canadian Makin’",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Nick",
|
||||
"lastName": "Pinkerton",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2017-02-24",
|
||||
"abstractNote": "AFTER THE EMERGENCE of alluring Canadian production subsidies in the late 1990s, moviegoers of the aughts became inured to watching downtown Vancouver fill in for AnyCity, USA, in a parade of multiplex productions that managed to extract bland back-lot anonymity from location shooting. But Anthology Film Archives’ twelve-film series “Gimme Shelter: Hollywood North” pays tribute to a very different, pioneering era of runaway production, part of an ongoing sesquicentennial celebration of our neighbors above to be followed by “1970s Canadian Independents,” beginning at Anthology on March 9.The",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/film/nick-pinkerton-on-gimme-shelter-hollywood-north-66885",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/print/previews/201701/whitney-biennial-2017-65484",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "Whitney Biennial 2017",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Beau",
|
||||
"lastName": "Rutland",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "January 2017",
|
||||
"ISSN": "0004-3532",
|
||||
"abstractNote": "Curated by Christopher Y. Lew and Mia LocksFollowing a three-year hiatus to accommodate the museum’s move downtown, the Whitney Biennial makes its Gansevoort Street debut this March. As the republic falls before our very eyes, one hopes that this divisive survey of American art will react against, and not just reflect, the current state of affairs. This year’s roster of sixty-three artists and collectives is thankfully diverse in perspectives and refreshingly full of emerging and underrecognized voices—absent are the many elder statesmen often gratuitously included in these affairs. The",
|
||||
"issue": "5",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "www.artforum.com",
|
||||
"publicationTitle": "Artforum",
|
||||
"url": "https://www.artforum.com/print/previews/201701/whitney-biennial-2017-65484",
|
||||
"volume": "55",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/interviews/jamie-stewart-talks-about-xiu-xiu-s-record-forget-and-recent-collaborations-66615",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Jamie Stewart",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Paige K.",
|
||||
"lastName": "Bradley",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2017-02-21",
|
||||
"abstractNote": "Across thirteen albums and a handful of EPs, Xiu Xiu have remained a prickly, relentless force, inspiring loyalty, love, annoyance, and disgust in equal measure. Some people never get over their music, and some you couldn’t pay to even approach it. On the occasion of the release of their latest album, FORGET, the band’s mainstay Jamie Stewart discusses how he met Vaginal Davis (who performs on its last track), the band’s collaborations with Danh Vō, and the concept behind the record’s title. Polyvinyl will release FORGET on February 24, 2017.HOW I MET VAGINAL DAVIS is actually a long story and",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/interviews/jamie-stewart-talks-about-xiu-xiu-s-record-forget-and-recent-collaborations-66615",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/print/reviews/201408/dak-art-2014-48214",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "Dak’Art 2014",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Chika",
|
||||
"lastName": "Okeke-Agulu",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "October 2014",
|
||||
"ISSN": "0004-3532",
|
||||
"abstractNote": "THE ELEVENTH EDITION of the Dak’Art Biennial of Contemporary African Art, which took place this past summer, may well have been the most ambitious since the exhibition’s inception in 1992. It was the largest and most diverse yet, not only showcasing emerging artists from across Africa but also including the work of many superstars from the established biennial circuit. This roster showed that the global art world must reckon with Dak’Art, which seems poised to take its place among the most established international art shows. Yet this year’s iteration also suggested that the biennial is still",
|
||||
"issue": "2",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "www.artforum.com",
|
||||
"publicationTitle": "Artforum",
|
||||
"url": "https://www.artforum.com/print/reviews/201408/dak-art-2014-48214",
|
||||
"volume": "53",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/search?search=1%3A54&sort=date",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/print/previews/current/new-york",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/print/201806",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/news/levy-gorvy-amalia-dayan-salon-94-merge-to-form-upper-east-side-megagallery-86598",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "New York Dealers Lévy Gorvy, Amalia Dayan, Salon 94, Announce Merger",
|
||||
"creators": [],
|
||||
"date": "2021-09-01",
|
||||
"abstractNote": "Two New York galleries—Lévy Gorvy and Salon 94—and dealer Amalia Dayan have announced that they are joining forces to establish a single consortium, called LGDR, whose flagship will be situated on the city’s tony Upper East Side. The news, first reported in the New York Times, is said to have come as a shock to a number of the galleries’ artists, whose fate is unclear.The new entity, which takes its name from the last initials of its owners—Dominique Lévy and Brett Gorvy, cofounders of Lévy Gorvy; veteran dealer Amalia Dayan; and Jeanne Greenberg Rohatyn, the owner of Salon 94—will occupy digs",
|
||||
"blogTitle": "Artforum",
|
||||
"language": "en-US",
|
||||
"url": "https://www.artforum.com/news/levy-gorvy-amalia-dayan-salon-94-merge-to-form-upper-east-side-megagallery-86598",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.artforum.com/print/202107/david-salle-on-janet-malcolm-86314",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "JANET MALCOLM (1934–2021)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "David",
|
||||
"lastName": "Salle",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September 2021",
|
||||
"ISSN": "0004-3532",
|
||||
"abstractNote": "ABOUT TWENTY-FIVE YEARS AGO Janet Malcolm published a profile of me in the New Yorker that became something of a touchstone of art journalism. It served as the title essay of one of her collections, and has been reprinted several times. I’m told it’s often assigned in classes on art writing, on the assumption that it sheds some light on that murky enterprise.It’s uncommon for the subject of a profile to warmly remember the profiler, and my friendship with Janet struck some people as odd. For some, it would be hard, or so they imagined, to get past the discomforts of so much self-exposure, and",
|
||||
"issue": "1",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "www.artforum.com",
|
||||
"publicationTitle": "Artforum",
|
||||
"url": "https://www.artforum.com/print/202107/david-salle-on-janet-malcolm-86314",
|
||||
"volume": "60",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
311
translators/Atlanta Journal-Constitution.js
Normal file
311
translators/Atlanta Journal-Constitution.js
Normal file
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"translatorID": "01322929-5782-4612-81f7-d861fb46d9f2",
|
||||
"label": "Atlanta Journal-Constitution",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://(www\\.)?ajc\\.com",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-14 19:41:44"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.querySelector('.c-articleContent')
|
||||
&& doc.querySelector('script[type="application/ld+json"]')) {
|
||||
if (url.includes('blog/')) {
|
||||
return "blogPost";
|
||||
}
|
||||
else {
|
||||
return "newspaperArticle";
|
||||
}
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('a.gs-title');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
let json = JSON.parse(text(doc, 'script[type="application/ld+json"]'));
|
||||
|
||||
let item = new Zotero.Item(
|
||||
url.includes('blog/')
|
||||
? 'blogPost'
|
||||
: 'newspaperArticle'
|
||||
);
|
||||
|
||||
item.title = json.headline;
|
||||
item.abstractNote = json.description
|
||||
|| attr(doc, 'meta[name="description"]', 'content');
|
||||
item.place = extractPlace(item.abstractNote);
|
||||
|
||||
let sectionLabel = text(doc, '.section-label');
|
||||
if (item.itemType == 'blogPost') {
|
||||
item.blogTitle = `${sectionLabel} (The Atlanta Journal-Constitution)`;
|
||||
}
|
||||
else {
|
||||
item.section = sectionLabel;
|
||||
item.publicationTitle = 'The Atlanta Journal-Constitution';
|
||||
item.ISSN = '1539-7459';
|
||||
}
|
||||
|
||||
item.language = attr(doc, 'meta[name="language"]', 'content');
|
||||
item.libraryCatalog = 'AJC.com';
|
||||
|
||||
for (let author of json.author.name.split(', ')) {
|
||||
item.creators.push(ZU.cleanAuthor(author, 'author'));
|
||||
}
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
function extractPlace(leadText) {
|
||||
let placeRe = /^\s*([A-Z\-']{3,})\b/;
|
||||
if (placeRe.test(leadText)) {
|
||||
return ZU.capitalizeTitle(leadText.match(placeRe)[1], true);
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/politics/georgia-republicans-center-campaigns-on-false-claims-of-election-fraud/JNRJYNAG6BD5JC5BB2TQG3LYGA/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Georgia Republicans center campaigns on false claims of election fraud",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Greg",
|
||||
"lastName": "Bluestein",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"ISSN": "1539-7459",
|
||||
"abstractNote": "ROME — The organizers at the door handed out soft-pink “Trump Won” signs to each attendee. An out-of-state radio host spouted far-right conspiracies.",
|
||||
"language": "English",
|
||||
"libraryCatalog": "AJC.com",
|
||||
"place": "Rome",
|
||||
"publicationTitle": "The Atlanta Journal-Constitution",
|
||||
"section": "Politics",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/politics/politics-blog/the-jolt-details-emerge-about-ames-barnett-possible-brian-kemp-primary-foe/MI6WFP3L7VH4NADGFHSXOUS6KM/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "The Jolt: Details emerge about Ames Barnett, possible Brian Kemp primary foe",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Patricia",
|
||||
"lastName": "Murphy",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Greg",
|
||||
"lastName": "Bluestein",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Tia",
|
||||
"lastName": "Mitchell",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"abstractNote": "Ames Barnett, a wealthy businessman and former small-town mayor, is moving closer to a Republican primary challenge against Gov. Brian Kemp. But his r",
|
||||
"blogTitle": "Political Insider (The Atlanta Journal-Constitution)",
|
||||
"language": "English",
|
||||
"shortTitle": "The Jolt",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/neighborhoods/cobb/marietta-officials-homeowner-property-tax-bills-will-go-down-for-third-year-in-a-row/3AIW5PLTXRHLDCWF4Q6HYQVQKQ/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Marietta officials: Homeowner property tax bills will go down for third year in a row",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Matt",
|
||||
"lastName": "Bruce",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"ISSN": "1539-7459",
|
||||
"abstractNote": "Property values have surged during the pandemic, but Marietta officials say homeowners will pay less in taxes.",
|
||||
"language": "English",
|
||||
"libraryCatalog": "AJC.com",
|
||||
"publicationTitle": "The Atlanta Journal-Constitution",
|
||||
"section": "Cobb County",
|
||||
"shortTitle": "Marietta officials",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/things-to-do/restaurant-refresh/patio-picks-treat-yourself-to-alfresco-elegance/ZF4FZUMJYBB6HJXTS32QCEYGSA/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Atlanta patio picks: Treat yourself to alfresco elegance",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Ligaya",
|
||||
"lastName": "Figueras",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Wendell",
|
||||
"lastName": "Brock",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"ISSN": "1539-7459",
|
||||
"abstractNote": "Check out four of the best patios in metro Atlanta to eat and drink, including the Chastain, Delbar, Banshee and Willow Bar.",
|
||||
"language": "English",
|
||||
"libraryCatalog": "AJC.com",
|
||||
"publicationTitle": "The Atlanta Journal-Constitution",
|
||||
"section": "Restaurant Refresh",
|
||||
"shortTitle": "Atlanta patio picks",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/life/radiotvtalk-blog/whats-filming-in-georgia-in-july-2021/7UJ6NZIF7NA6LJFG7QPHE4HFDM/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "What’s filming in Georgia in July 2021?",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Rodney",
|
||||
"lastName": "Ho",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"abstractNote": "\"Black Panther: Wakanda Forever\" began production in late June 2021 at Trilith Studios in Fayetteville.",
|
||||
"blogTitle": "Radio & TV Talk Blog (The Atlanta Journal-Constitution)",
|
||||
"language": "English",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.ajc.com/search/?q=labor",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
1204
translators/Atypon Journals.js
Normal file
1204
translators/Atypon Journals.js
Normal file
File diff suppressed because it is too large
Load Diff
604
translators/AustLII and NZLII.js
Normal file
604
translators/AustLII and NZLII.js
Normal file
@@ -0,0 +1,604 @@
|
||||
{
|
||||
"translatorID": "5ed5ab01-899f-4a3b-a74c-290fb2a1c9a4",
|
||||
"label": "AustLII and NZLII",
|
||||
"creator": "Justin Warren, Philipp Zumstein",
|
||||
"target": "^https?://(www\\d?|classic)\\.(austlii\\.edu\\.au|nzlii\\.org)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-11-21 18:54:11"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2018 Justin Warren, Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
var classes = attr(doc, 'body', 'class');
|
||||
|
||||
if (classes.includes('case')) {
|
||||
return "case";
|
||||
}
|
||||
if (classes.includes('legislation')) {
|
||||
return "statute";
|
||||
}
|
||||
if (classes.includes('journals')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
if (url.includes('nzlii.org/nz/cases/') && url.includes('.html')) {
|
||||
return "case";
|
||||
}
|
||||
if (url.includes('austlii.edu.au/cgi-bin/sinodisp/au/cases/') && url.includes('.html')) {
|
||||
return "case";
|
||||
}
|
||||
if (url.includes('classic.austlii.edu.au') && url.includes('.html')) {
|
||||
return "case";
|
||||
}
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('#page-main ul>li>a');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
let href = rows[i].href;
|
||||
let title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (!href.includes('.html')) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
let items = await Zotero.selectItems(getSearchResults(doc, false));
|
||||
if (!items) return;
|
||||
for (let url of Object.keys(items)) {
|
||||
scrape(await requestDocument(url), url);
|
||||
}
|
||||
}
|
||||
else if (new URL(url).hostname === 'classic.austlii.edu.au') {
|
||||
let urlObj = new URL(url);
|
||||
urlObj.hostname = 'www.austlii.edu.au';
|
||||
url = urlObj.toString();
|
||||
scrape(await requestDocument(url), url);
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust some jurisdiction abbreviations
|
||||
*/
|
||||
var jurisdictionAbbrev = {
|
||||
"Commonwealth": "Cth",
|
||||
"CTH": "Cth",
|
||||
"Australian Capital Territory": "ACT",
|
||||
"New South Wales": "NSW",
|
||||
"Northern Territory": "NT",
|
||||
"Queensland": "Qld",
|
||||
"QLD": "Qld",
|
||||
"South Australia": "SA",
|
||||
"Tasmania": "Tas",
|
||||
"TAS": "Tas",
|
||||
"Victoria": "Vic",
|
||||
"VIC": "Vic",
|
||||
"Western Australia": "WA"
|
||||
};
|
||||
|
||||
/*
|
||||
* ZU.capitalizeTitle doesn't cope with Act Names (With Parenthetical Names) Acts
|
||||
* so we give it a bit of help.
|
||||
*/
|
||||
function capitalizeWithPunctuation(string) {
|
||||
const actNameDelimRegex = /( \(|\) )/;
|
||||
var words = string.split(actNameDelimRegex);
|
||||
|
||||
var newString = "";
|
||||
var lastWordIndex = words.length - 1;
|
||||
for (var i = 0; i <= lastWordIndex; i++) {
|
||||
if (actNameDelimRegex.test(words[i])) {
|
||||
newString += words[i];
|
||||
}
|
||||
else {
|
||||
newString += ZU.capitalizeTitle(words[i].toLowerCase(), true);
|
||||
}
|
||||
}
|
||||
return newString;
|
||||
}
|
||||
|
||||
/*
|
||||
* AustLII includes the date on the end of all Acts
|
||||
*/
|
||||
function parseActName(nameOfAct) {
|
||||
// Split at the last space before the year
|
||||
const parsed = nameOfAct.split(/\s(\d{4})/);
|
||||
// Zotero.debug(parsed);
|
||||
let actName = parsed[0], actYear = parsed[1];
|
||||
actName = capitalizeWithPunctuation(actName);
|
||||
return { actName, actYear };
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var type = detectWeb(doc, url);
|
||||
var newItem = new Zotero.Item(type);
|
||||
var fullJurisdiction = text(doc, 'li.ribbon-jurisdiction > a > span');
|
||||
var jurisdiction = jurisdictionAbbrev[fullJurisdiction] || fullJurisdiction;
|
||||
if (jurisdiction && ZU.fieldIsValidForType('code', type)) {
|
||||
newItem.code = jurisdiction;
|
||||
}
|
||||
var citation = text(doc, 'li.ribbon-citation>a>span');
|
||||
var voliss;
|
||||
var m;
|
||||
|
||||
if (text(doc, '#ribbon')) {
|
||||
if (type == "case") {
|
||||
voliss = text(doc, 'head>title');
|
||||
// e.g. C & M [2006] FamCA 212 (20 January 2006)
|
||||
newItem.caseName = voliss.replace(/\s?\[.*$/, '');
|
||||
newItem.title = newItem.caseName;
|
||||
|
||||
var lastParenthesis = voliss.match(/\(([^)]*)\)$/);
|
||||
if (lastParenthesis) {
|
||||
newItem.dateDecided = ZU.strToISO(lastParenthesis[1]);
|
||||
}
|
||||
else {
|
||||
newItem.dateDecided = text(doc, 'li.ribbon-year>a>span');
|
||||
}
|
||||
var courtAbbrevInURL = url.match(/\/cases\/[^/]+\/([^/]+)\//);
|
||||
if (courtAbbrevInURL) {
|
||||
newItem.court = decodeURIComponent(courtAbbrevInURL[1]);
|
||||
}
|
||||
else {
|
||||
// Full court name
|
||||
newItem.court = text(doc, 'li.ribbon-database > a > span');
|
||||
}
|
||||
if (citation) {
|
||||
var lastNumber = citation.match(/(\d+)$/);
|
||||
if (lastNumber) {
|
||||
newItem.docketNumber = lastNumber[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type == "statute") {
|
||||
// All AustLII Act titles end in the year the Act was passed
|
||||
const actInfo = parseActName(citation);
|
||||
newItem.nameOfAct = actInfo.actName;
|
||||
newItem.dateEnacted = actInfo.actYear;
|
||||
// section
|
||||
newItem.section = text(doc, 'li.ribbon-subject>a>span');
|
||||
if (newItem.section) newItem.section = newItem.section.replace(/^SECT /, '');
|
||||
}
|
||||
if (type == "journalArticle") {
|
||||
var title = text(doc, 'title');
|
||||
m = title.match(/(.*) --- "([^"]*)"/);
|
||||
if (m) {
|
||||
newItem.title = m[2];
|
||||
var authors = m[1].split(';');
|
||||
for (let i = 0; i < authors.length; i++) {
|
||||
newItem.creators.push(ZU.cleanAuthor(authors[i], 'author', authors[i].includes(',')));
|
||||
}
|
||||
}
|
||||
else {
|
||||
newItem.title = title;
|
||||
}
|
||||
newItem.publicationTitle = text(doc, 'li.ribbon-database>a>span');
|
||||
newItem.date = text(doc, 'li.ribbon-year>a>span');
|
||||
}
|
||||
}
|
||||
else {
|
||||
voliss = text(doc, 'head>title');
|
||||
// e.g. C & M [2006] FamCA 212 (20 January 2006)
|
||||
m = voliss.match(/^([^[]*)\[(\d+)\](.*)\(([^)]*)\)$/);
|
||||
if (m) {
|
||||
newItem.title = m[1];
|
||||
newItem.dateDecided = ZU.strToISO(m[4]);
|
||||
var courtNumber = m[3].trim().split(' ');
|
||||
if (courtNumber.length >= 2) {
|
||||
newItem.court = courtNumber[0];
|
||||
newItem.docketNumber = courtNumber[1].replace(/[^\w]*$/, '');
|
||||
}
|
||||
}
|
||||
else {
|
||||
newItem.title = voliss;
|
||||
}
|
||||
}
|
||||
|
||||
newItem.url = url
|
||||
.replace(/^http:\/\//, 'https://')
|
||||
.replace(/^(https:\/\/www)\d/, '$1');
|
||||
newItem.attachments = [{
|
||||
document: doc,
|
||||
title: "Snapshot",
|
||||
mimeType: "text/html"
|
||||
}];
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FamCA/2006/212.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "C & M",
|
||||
"creators": [],
|
||||
"dateDecided": "2006-01-20",
|
||||
"court": "FamCA",
|
||||
"docketNumber": "212",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FamCA/2006/212.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FCA/2010/1.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Yeo, in the matter of AES Services (Aust) Pty Ltd (ACN 111 306 543) (Administrators Appointed)",
|
||||
"creators": [],
|
||||
"dateDecided": "2010-01-05",
|
||||
"court": "FCA",
|
||||
"docketNumber": "1",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FCA/2010/1.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.nzlii.org/nz/cases/NZSC/2008/1.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Bronwyn Estate Ltd and ors v Gareth Hoole and others",
|
||||
"creators": [],
|
||||
"dateDecided": "2008-02-08",
|
||||
"court": "NZSC",
|
||||
"docketNumber": "1",
|
||||
"url": "https://www.nzlii.org/nz/cases/NZSC/2008/1.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewtoc/au/cases/act/ACTSC/2010/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/134.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "'NM' and Department of Human Services (Freedom of information)",
|
||||
"creators": [],
|
||||
"dateDecided": "2017-12-08",
|
||||
"court": "AICmr",
|
||||
"docketNumber": "134",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/134.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/legis/cth/consol_act/foia1982222/s24ab.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Freedom of Information Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "1982",
|
||||
"code": "Cth",
|
||||
"section": "24AB",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/legis/cth/consol_act/foia1982222/s24ab.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/foia1982222/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Freedom of Information Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "1982",
|
||||
"code": "Cth",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/foia1982222/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/antsasta1999402/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "A New Tax System (Goods and Services Tax) Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "1999",
|
||||
"code": "Cth",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/antsasta1999402/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/caca2010265/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Competition and Consumer Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "2010",
|
||||
"code": "Cth",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/caca2010265/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/journals/AdminRw//2010/9.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Statements of the Decision Maker's Actual Reasons",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Stephen",
|
||||
"lastName": "Lloyd",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Donald",
|
||||
"lastName": "Mitchell",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2010",
|
||||
"libraryCatalog": "AustLII and NZLII",
|
||||
"publicationTitle": "Administrative Review Council - Admin Review",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/journals/AdminRw//2010/9.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.austlii.edu.au/cgi-bin/sinosrch.cgi?mask_path=;method=auto;query=adam%20smith;view=relevance&mask_path=au/cases/act/ACTCA",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www6.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/20.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Cash World Gold Buyers Pty Ltd and Australian Taxation Office (Freedom of information)",
|
||||
"creators": [],
|
||||
"dateDecided": "2017-03-10",
|
||||
"court": "AICmr",
|
||||
"docketNumber": "20",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/20.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/qld/consol_act/pla1974179/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Property Law Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "1974",
|
||||
"code": "Qld",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/qld/consol_act/pla1974179/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/vic/consol_act/ca195882/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Crimes Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "1958",
|
||||
"code": "Vic",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/vic/consol_act/ca195882/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/nsw/consol_act/leara2002451/",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Law Enforcement (Powers and Responsibilities) Act",
|
||||
"creators": [],
|
||||
"dateEnacted": "2002",
|
||||
"code": "NSW",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/nsw/consol_act/leara2002451/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www8.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FedCFamC1A/2024/214.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Dimitrova & Carman",
|
||||
"creators": [],
|
||||
"dateDecided": "2024-11-15",
|
||||
"court": "FedCFamC1A",
|
||||
"docketNumber": "214",
|
||||
"url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FedCFamC1A/2024/214.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
196
translators/Australian Dictionary of Biography.js
Normal file
196
translators/Australian Dictionary of Biography.js
Normal file
@@ -0,0 +1,196 @@
|
||||
{
|
||||
"translatorID": "0aea3026-a246-4201-a4b5-265f75b9a6a7",
|
||||
"label": "Australian Dictionary of Biography",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://adb\\.anu\\.edu\\.au/biograph(y|ies)/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-14 04:18:08"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2012-2021 Sebastian Karcher and Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/biography/')) {
|
||||
return "bookSection";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('a.name');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
let item = new Zotero.Item('bookSection');
|
||||
let main = doc.querySelector('#pageColumnMain');
|
||||
|
||||
item.title = text(main, 'h2');
|
||||
item.abstractNote = text(main, '.biographyContent p');
|
||||
item.bookTitle = 'Australian Dictionary of Biography';
|
||||
|
||||
let noticeMatches = text(main, '.textNotice')
|
||||
.match(/([^,]+), \(MUP\), ([^,]+)/);
|
||||
if (noticeMatches) {
|
||||
item.volume = noticeMatches[1].replace(/^\s*volume/i, '');
|
||||
item.date = ZU.strToISO(noticeMatches[2]);
|
||||
}
|
||||
else {
|
||||
item.date = ZU.strToISO(text(main, '.textNotice'));
|
||||
}
|
||||
|
||||
item.numberOfVolumes = '18';
|
||||
item.publisher = 'National Centre of Biography, Australian National University';
|
||||
item.place = 'Canberra';
|
||||
item.language = 'en';
|
||||
item.url = url;
|
||||
|
||||
for (let author of main.querySelectorAll('.authorName a')) {
|
||||
item.creators.push(ZU.cleanAuthor(author.textContent, 'author'));
|
||||
}
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Snapshot',
|
||||
document: doc
|
||||
});
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://adb.anu.edu.au/biographies/search/?scope=all&query=Smith&x=0&y=0&rs=",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://adb.anu.edu.au/biography/smith-robert-burdett-4613",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Smith, Robert Burdett (1837–1895)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Chris",
|
||||
"lastName": "Cunneen",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1976",
|
||||
"abstractNote": "Robert Burdett Smith (1837-1895), solicitor and politician, was born on 25 August 1837 in Sydney, baptized Robert Lloyd, twin son of John Lloyd Smith and his wife Mary Ann, née Salmon. John, a native of Northumberland, had been convicted of horse-stealing at Edinburgh on 8 January 1830 and sentenced to be transported for seven years, arriving in Sydney in the York on 7 February 1831. Mary Ann, whom he had married with the governor's permission on 2 February 1835, had come free to the colony in the Princess Victoria on 4 February 1834. With his brother-in-law Thomas Armitage Salmon and later on his own, John traded as a carcass butcher in 1838-43; but on 11 April, bankrupt, he was convicted in Port Phillip of forgery and sentenced to transportation for the term of his natural life.",
|
||||
"bookTitle": "Australian Dictionary of Biography",
|
||||
"language": "en",
|
||||
"libraryCatalog": "Australian Dictionary of Biography",
|
||||
"numberOfVolumes": "18",
|
||||
"place": "Canberra",
|
||||
"publisher": "National Centre of Biography, Australian National University",
|
||||
"url": "https://adb.anu.edu.au/biography/smith-robert-burdett-4613",
|
||||
"volume": "6",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://adb.anu.edu.au/biography/bjelkepetersen-hans-christian-5247/text8839",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "bookSection",
|
||||
"title": "Bjelke-Petersen, Hans Christian (1872–1964)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Chris",
|
||||
"lastName": "Cunneen",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "E. A.",
|
||||
"lastName": "McLeod",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1979",
|
||||
"abstractNote": "Hans Christian Bjelke-Petersen (1872-1964), physical culture teacher, was born on 14 April 1872 in Copenhagen, Denmark, son of Georg Peter Bjelke-Petersen, gardener, later master-builder, and his wife Caroline Vilhelmine, née Hansen. His sister was Marie Caroline Bjelke-Petersen. At first educated by his father at home, acquiring a thorough grounding in gymnastics, swimming and the Bible, he later attended schools at Dresden, Germany, and at Copenhagen, graduating from Copenhagen Teachers' College in 1890. The family then went to London and in October 1891 arrived in Tasmania in the Doric.",
|
||||
"bookTitle": "Australian Dictionary of Biography",
|
||||
"language": "en",
|
||||
"libraryCatalog": "Australian Dictionary of Biography",
|
||||
"numberOfVolumes": "18",
|
||||
"place": "Canberra",
|
||||
"publisher": "National Centre of Biography, Australian National University",
|
||||
"url": "https://adb.anu.edu.au/biography/bjelkepetersen-hans-christian-5247/text8839",
|
||||
"volume": "7",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
176
translators/BAILII.js
Normal file
176
translators/BAILII.js
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"translatorID": "5ae63913-669a-4792-9f45-e089a37de9ab",
|
||||
"label": "BAILII",
|
||||
"creator": "Bill McKinney",
|
||||
"target": "^https?://www\\.bailii\\.org(/cgi\\-bin/markup\\.cgi\\?doc\\=)?/\\w+/cases/.+",
|
||||
"minVersion": "1.0.0b4.r1",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-09-16 20:57:17"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Bill McKinney
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
var liiRegexp = /^https?:\/\/www\.bailii\.org(?:\/cgi-bin\/markup\.cgi\?doc=)?\/\w+\/cases\/.+\.html/;
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (liiRegexp.test(url)) {
|
||||
return "case";
|
||||
}
|
||||
else {
|
||||
var aTags = doc.getElementsByTagName("a");
|
||||
for (var i = 0; i < aTags.length; i++) {
|
||||
if (liiRegexp.test(aTags[i].href)) {
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var newItem = new Zotero.Item("case");
|
||||
newItem.title = doc.title;
|
||||
newItem.url = doc.location.href;
|
||||
var titleRegexp = /^(.+)\s+\[(\d+)\]\s+(.+)\s+\((\d+)\s+(\w+)\s+(\d+)\)/;
|
||||
var titleMatch = titleRegexp.exec(doc.title);
|
||||
if (titleMatch) {
|
||||
newItem.caseName = titleMatch[1] + " [" + titleMatch[2] + "] " + titleMatch[3];
|
||||
newItem.dateDecided = titleMatch[4] + " " + titleMatch[5] + " " + titleMatch[6];
|
||||
}
|
||||
else {
|
||||
newItem.caseName = doc.title;
|
||||
newItem.dateDecided = "not found";
|
||||
}
|
||||
|
||||
var courtRegexp = /cases\/([^/]+)\/([^/]+)\//;
|
||||
var courtMatch = courtRegexp.exec(doc.location.href);
|
||||
if (courtMatch) {
|
||||
var divRegexp = /\w+/;
|
||||
var divMatch = divRegexp.exec(courtMatch[2]);
|
||||
if (divMatch) {
|
||||
newItem.court = courtMatch[1] + " (" + courtMatch[2] + ")";
|
||||
}
|
||||
else {
|
||||
newItem.court = courtMatch[1];
|
||||
}
|
||||
}
|
||||
else {
|
||||
newItem.court = "not found";
|
||||
}
|
||||
|
||||
// judge
|
||||
var panel = doc.getElementsByTagName("PANEL");
|
||||
if (panel.length > 0) {
|
||||
let name = panel[0].innerHTML;
|
||||
newItem.creators.push({ lastName: name, creatorType: "author", fieldMode: 1 });
|
||||
}
|
||||
// citation
|
||||
var cite = doc.getElementsByTagName("CITATION");
|
||||
if (cite.length > 0) {
|
||||
let note = cite[0].childNodes[0].innerHTML;
|
||||
newItem.notes.push({ note });
|
||||
}
|
||||
newItem.attachments = [{ url: url, title: "Snapshot", mimeType: "text/html" }];
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (liiRegexp.test(url)) {
|
||||
scrape(doc);
|
||||
}
|
||||
else {
|
||||
var items = Zotero.Utilities.getItemArray(doc, doc, liiRegexp);
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bailii.org/cgi-bin/markup.cgi?doc=/eu/cases/EUECJ/2011/C40308.html&query=copyright&method=boolean",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Football Association Premier League & Ors (Freedom to provide services) [2011] EUECJ C-403/08",
|
||||
"creators": [],
|
||||
"dateDecided": "04 October 2011",
|
||||
"court": "EUECJ (2011)",
|
||||
"url": "https://www.bailii.org/cgi-bin/markup.cgi?doc=/eu/cases/EUECJ/2011/C40308.html&query=copyright&method=boolean",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bailii.org/eu/cases/EUECJ/2007/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bailii.org/ew/cases/EWHC/Comm/2020/170.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "case",
|
||||
"caseName": "Forum Services International Ltd & Anor v OOS International BV [2020] EWHC 170 (Comm)",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "MR JUSTICE ROBIN KNOWLES CBE",
|
||||
"creatorType": "author",
|
||||
"fieldMode": true
|
||||
}
|
||||
],
|
||||
"dateDecided": "31 January 2020",
|
||||
"court": "EWHC (Comm)",
|
||||
"url": "https://www.bailii.org/ew/cases/EWHC/Comm/2020/170.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Neutral Citation Number: [2020] EWHC 170 (Comm)"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
254
translators/BBC Genome.js
Normal file
254
translators/BBC Genome.js
Normal file
@@ -0,0 +1,254 @@
|
||||
{
|
||||
"translatorID": "777e5ce0-0b16-4a12-8e6c-5a1a2cb33189",
|
||||
"label": "BBC Genome",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://genome\\.ch\\.bbc\\.co\\.uk/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2017-09-04 22:38:30"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2017 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// attr()/text() v2
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null}
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.indexOf('/search/')>-1 && getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
} else if (text(doc, 'div.programme-details')) {
|
||||
return "magazineArticle";
|
||||
}
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h2>a.title');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
//each magazinArticle covers one radio or tv show
|
||||
var item = new Zotero.Item("magazineArticle");
|
||||
item.title = text(doc, 'h1');
|
||||
if (item.title == item.title.toUpperCase()) {
|
||||
item.title = ZU.capitalizeTitle(item.title, true);
|
||||
}
|
||||
|
||||
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();
|
||||
if (parts.length>1) item.date = ZU.strToISO(parts[1]);
|
||||
if (parts.length>2) item.pages = parts[2].replace('Page', '').trim();
|
||||
|
||||
var aired = text(doc, '.primary-content a');
|
||||
var urlprogram = attr(doc, '.primary-content a', 'href');
|
||||
var synopsis = text(doc, '.synopsis');
|
||||
item.notes.push({note: aired});
|
||||
if (synopsis) {
|
||||
item.abstractNote = synopsis.trim();
|
||||
}
|
||||
|
||||
item.publicationTitle = 'The Radio Times';
|
||||
item.ISSN = '0033-8060';
|
||||
item.language = 'en-GB';
|
||||
item.url = url;
|
||||
item.itemID = url + '#magazinArticle';
|
||||
item.attachments.push({
|
||||
document: doc,
|
||||
title: "Snapshot"
|
||||
});
|
||||
|
||||
item.complete();
|
||||
|
||||
//we also save a seperate item for the radio/tv show and connect these two
|
||||
//by a seeAlso link
|
||||
var tv = ["bbcone", "bbctwo", "bbcthree", "bbcfour", "cbbc", "cbeebies",
|
||||
"bbcnews", "bbcparliament", "bbchd", "bbctv", "bbcchoice", "bbcknowledge"];
|
||||
var program = urlprogram.split('/')[2];
|
||||
var type = "radioBroadcast";
|
||||
if (tv.indexOf(program)>-1) {
|
||||
type = "tvBroadcast";
|
||||
}
|
||||
|
||||
var additionalItem = new Zotero.Item(type);
|
||||
additionalItem.title = item.title;
|
||||
var pieces = aired.split(',');
|
||||
//e.g ["BBC Radio 4 FM" , "30 September 1967 6.35"]
|
||||
additionalItem.programTitle = pieces[0];
|
||||
if (pieces.length>1) {
|
||||
var date = ZU.strToISO(pieces[1].replace(time, ''));
|
||||
var time = text(doc, '.primary-content a span.time');
|
||||
if (time.indexOf('.') == 1) {
|
||||
time = '0'+time;
|
||||
}
|
||||
additionalItem.date = date +'T'+time.replace('.', ':');
|
||||
}
|
||||
additionalItem.seeAlso.push(item.itemID);
|
||||
additionalItem.complete();
|
||||
}
|
||||
|
||||
|
||||
//Update or test the test cases does not work because of the saving of
|
||||
//two items at each time. But one can create new tests from the urls
|
||||
//and then delete the old tests for updating.
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://genome.ch.bbc.co.uk/09d732e273ae49e490d35ff1b69bf5f9",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "St. Hilda's Band",
|
||||
"creators": [],
|
||||
"date": "1933-10-20",
|
||||
"ISSN": "0033-8060",
|
||||
"abstractNote": "Conducted by JAMES OLIVER \nRelayed from The Town Hall, Walsall",
|
||||
"issue": "525",
|
||||
"itemID": "http://genome.ch.bbc.co.uk/09d732e273ae49e490d35ff1b69bf5f9#magazinArticle",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "BBC Genome",
|
||||
"pages": "68",
|
||||
"publicationTitle": "The Radio Times",
|
||||
"url": "http://genome.ch.bbc.co.uk/09d732e273ae49e490d35ff1b69bf5f9",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Regional Programme Midland, 28 October 1933 20.00"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
},
|
||||
{
|
||||
"itemType": "radioBroadcast",
|
||||
"title": "St. Hilda's Band",
|
||||
"creators": [],
|
||||
"date": "1933-10-28T20:00",
|
||||
"libraryCatalog": "BBC Genome",
|
||||
"programTitle": "Regional Programme Midland",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": [
|
||||
"http://genome.ch.bbc.co.uk/09d732e273ae49e490d35ff1b69bf5f9#magazinArticle"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://genome.ch.bbc.co.uk/4bad6bdda36645d7be09f44bf51eff18",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "Apollo 11",
|
||||
"creators": [],
|
||||
"date": "1969-07-17",
|
||||
"ISSN": "0033-8060",
|
||||
"abstractNote": "The First Man on the Moon\n\nShortly after 7.0 this morning astronaut Neil Armstrong should set foot on the moon. As he goes down the steps Armstrong will switch on the black and white television camera to beam live pictures back to earth. That transmission should also cover the moment when Edwin Aldrin joins Armstrong on the surface and continue throughout the two hours and forty mins. of the Moon Walk.\n\nBefore that more live pictures are expected from the Command Module as Michael Collins looks towards the moon and the landing ground from sixty miles up.\nA report by James Burke with Patrick Moore from the Apollo Space Studio and Michael Charlton at Houston Mission Control",
|
||||
"issue": "2384",
|
||||
"itemID": "http://genome.ch.bbc.co.uk/4bad6bdda36645d7be09f44bf51eff18#magazinArticle",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "BBC Genome",
|
||||
"pages": "16",
|
||||
"publicationTitle": "The Radio Times",
|
||||
"url": "http://genome.ch.bbc.co.uk/4bad6bdda36645d7be09f44bf51eff18",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [
|
||||
{
|
||||
"note": "BBC One London, 21 July 1969 6.00"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
},
|
||||
{
|
||||
"itemType": "tvBroadcast",
|
||||
"title": "Apollo 11",
|
||||
"creators": [],
|
||||
"date": "1969-07-21T06:00",
|
||||
"libraryCatalog": "BBC Genome",
|
||||
"programTitle": "BBC One London",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": [
|
||||
"http://genome.ch.bbc.co.uk/4bad6bdda36645d7be09f44bf51eff18#magazinArticle"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://genome.ch.bbc.co.uk/search/0/20?adv=0&q=apollo+&media=all&yf=1923&yt=2009&mf=1&mt=12&tf=00%3A00&tt=00%3A00#search",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
430
translators/BBC.js
Normal file
430
translators/BBC.js
Normal file
@@ -0,0 +1,430 @@
|
||||
{
|
||||
"translatorID": "f4130157-93f7-4493-8f24-a7c85549013d",
|
||||
"label": "BBC",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(www|news?)\\.bbc\\.(co\\.uk|com)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2019-06-10 21:51:43"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2016 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
url = url.replace(/[?#].+/, "");
|
||||
if (/\d{8}$/.test(url) || /\d{7}\.(stm)$/.test(url)) {
|
||||
var pageNode = doc.getElementById("page");
|
||||
if (pageNode) {
|
||||
// Z.debug(pageNode.className);
|
||||
if (pageNode.className.includes("media-asset-page") || pageNode.className.includes("vxp-headlines")) {
|
||||
return "videoRecording";
|
||||
}
|
||||
}
|
||||
return "newspaperArticle";
|
||||
}
|
||||
if (url.includes("/newsbeat/article")) {
|
||||
return "blogPost";
|
||||
}
|
||||
if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//a[h3]');
|
||||
// for NewsBeat
|
||||
if (!rows.length) {
|
||||
rows = ZU.xpath(doc, '//article/div/h1[@itemprop="headline"]/a');
|
||||
}
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
var articles = [];
|
||||
for (let i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
url = url.replace(/[?#].+/, "");
|
||||
var itemType = detectWeb(doc, url);
|
||||
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// add date and time if missing by one of four attempts:
|
||||
// 1. look at the json-ld data
|
||||
// 2. calculate it from the data-seconds attribute
|
||||
// 3. extract it from a nonstandard meta field
|
||||
// 4. for old pages, get from metadata
|
||||
var jsonld = ZU.xpathText(doc, '//script[@type="application/ld+json"]');
|
||||
var data = JSON.parse(jsonld);
|
||||
// Z.debug(data);
|
||||
if (data && data.datePublished) {
|
||||
item.date = data.datePublished;
|
||||
}
|
||||
else {
|
||||
var seconds = ZU.xpathText(doc, '(//div[h1 or h2]//*[contains(@class, "date")]/@data-seconds)[1]');
|
||||
if (!item.date && seconds) {
|
||||
// Z.debug(seconds);
|
||||
var date = new Date(1000 * seconds);
|
||||
item.date = date.toISOString();
|
||||
}
|
||||
else {
|
||||
item.date = ZU.xpathText(doc, '//meta[@property="rnews:datePublished"]/@content');
|
||||
if (!item.date) {
|
||||
item.date = ZU.xpathText(doc, '//p[@class="timestamp"]');
|
||||
if (!item.date) {
|
||||
item.date = ZU.xpathText(doc, '//meta[@name="OriginalPublicationDate"]/@content');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.date) {
|
||||
item.date = ZU.strToISO(item.date);
|
||||
}
|
||||
// delete wrongly attached creators like
|
||||
// "firstName": "B. B. C.", "lastName": "News"
|
||||
item.creators = [];
|
||||
// add authors from byline__name but only if they
|
||||
// are real authors and not just part of the webpage title
|
||||
// like By BBC Trending, By News from Elsewhere... or By Who, What Why
|
||||
var authorString = ZU.xpathText(doc, '//span[@class="byline__name"]');
|
||||
var webpageTitle = ZU.xpathText(doc, '//h1');
|
||||
if (authorString) {
|
||||
authorString = authorString.replace('By', '').replace('...', '');
|
||||
let authors = authorString.split('&');
|
||||
for (let i = 0; i < authors.length; i++) {
|
||||
if (webpageTitle.toLowerCase().includes(authors[i].trim().toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
item.creators.push(ZU.cleanAuthor(authors[i], "author"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
authorString = ZU.xpathText(doc, '//p[@class="byline"]');
|
||||
var title = ZU.xpathText(doc, '//em[@class="title"]');
|
||||
if (authorString) {
|
||||
authorString = authorString.replace(title, '').replace('By', '');
|
||||
let authors = authorString.split('&');
|
||||
for (let i = 0; i < authors.length; i++) {
|
||||
item.creators.push(ZU.cleanAuthor(authors[i], "author"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (url.includes("/newsbeat/article")) {
|
||||
item.blogTitle = "BBC Newsbeat";
|
||||
}
|
||||
|
||||
// description for old BBC pages
|
||||
if (!item.abstractNote) {
|
||||
item.abstractNote = ZU.xpathText(doc, '//meta[@name="Description"]/@content');
|
||||
}
|
||||
|
||||
for (let i in item.tags) {
|
||||
item.tags[i] = item.tags[i].charAt(0).toUpperCase() + item.tags[i].substring(1);
|
||||
}
|
||||
|
||||
if (!item.language || item.language === "en") {
|
||||
item.language = "en-GB";
|
||||
}
|
||||
|
||||
if (url.substr(-4) == ".stm") {
|
||||
item.title = ZU.xpathText(doc, '//meta[@name="Headline"]/@content');
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = itemType;
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bbc.com/news/magazine-15335899",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Spain's stolen babies",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Katya",
|
||||
"lastName": "Adler",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011-10-18",
|
||||
"abstractNote": "Spanish society has been shaken by revelations of the mass trafficking of babies, dating back to the Franco era but continuing until the 1990s involving respected doctors, nuns and priests.",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "www.bbc.com",
|
||||
"publicationTitle": "BBC News",
|
||||
"section": "Magazine",
|
||||
"url": "https://www.bbc.com/news/magazine-15335899",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bbc.com/news/world/asia/india",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bbc.com/news/blogs-news-from-elsewhere-37117404",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Fines for not liking boss's Weibo posts",
|
||||
"creators": [],
|
||||
"date": "2016-08-18",
|
||||
"abstractNote": "Company in China punishes employees who don't comment on manager's social media posts.",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "www.bbc.com",
|
||||
"publicationTitle": "BBC News",
|
||||
"section": "News from Elsewhere",
|
||||
"url": "https://www.bbc.com/news/blogs-news-from-elsewhere-37117404",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bbc.com/news/magazine-36287752",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "'I found my dad on Facebook'",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Abdirahim",
|
||||
"lastName": "Saeed",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Deirdre",
|
||||
"lastName": "Finnerty",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2016-08-17",
|
||||
"abstractNote": "How a simple post on social media ended a Russian woman's 40-year search for her father.",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "www.bbc.com",
|
||||
"publicationTitle": "BBC News",
|
||||
"section": "Magazine",
|
||||
"url": "https://www.bbc.com/news/magazine-36287752",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bbc.co.uk/search?q=harry+potter",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bbc.co.uk/newsbeat/article/32129457/will-new-music-streaming-service-tidal-make-the-waves-artists-want",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Will new music streaming service Tidal make the waves artists want? - BBC Newsbeat",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Chi Chi",
|
||||
"lastName": "Izundu",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2015-03-31",
|
||||
"abstractNote": "Exclusive music news, big interviews, entertainment, social media trends and video from the news people at BBC Radio 1 and 1Xtra.",
|
||||
"blogTitle": "BBC Newsbeat",
|
||||
"language": "en-GB",
|
||||
"shortTitle": "Will new music streaming service Tidal make the waves artists want?",
|
||||
"url": "http://www.bbc.co.uk/newsbeat/article/32129457/will-new-music-streaming-service-tidal-make-the-waves-artists-want",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bbc.com/sport/olympics/37068610",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Rio Olympics 2016: Joseph Schooling beats Michael Phelps in 100m butterfly",
|
||||
"creators": [],
|
||||
"date": "2016-08-13",
|
||||
"abstractNote": "Singapore's Joseph Schooling wins his nation's first ever gold medal with victory in the 100m butterfly as Michael Phelps finishes joint second.",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "www.bbc.com",
|
||||
"publicationTitle": "BBC Sport",
|
||||
"section": "Olympics",
|
||||
"shortTitle": "Rio Olympics 2016",
|
||||
"url": "https://www.bbc.com/sport/olympics/37068610",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://news.bbc.co.uk/2/hi/uk_news/politics/2116949.stm",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "EU must expand, Straw warns",
|
||||
"creators": [],
|
||||
"date": "2002-07-08",
|
||||
"abstractNote": "Debate on reform of the Common Agricultural Policy must not dilute support for EU enlargement, Foreign Secretary Jack Straw will warn.",
|
||||
"language": "en-GB",
|
||||
"libraryCatalog": "news.bbc.co.uk",
|
||||
"url": "http://news.bbc.co.uk/2/hi/uk_news/politics/2116949.stm",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"BBC",
|
||||
"BBC News",
|
||||
"British",
|
||||
"Foreign",
|
||||
"International",
|
||||
"News",
|
||||
"News online",
|
||||
"Online",
|
||||
"Service",
|
||||
"Uk",
|
||||
"World"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bbc.com/portuguese/internacional-48562081",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Como peixes e até camarões podem ser 'recrutados' como espiões",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Emma",
|
||||
"lastName": "Woollacott",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2019-06-10",
|
||||
"abstractNote": "Animais são usados há muito tempo para fins militares, mas agora um projeto americano quer saber se as criaturas marinhas também podem agir como sensores.",
|
||||
"language": "pt",
|
||||
"libraryCatalog": "www.bbc.com",
|
||||
"publicationTitle": "BBC News Brasil",
|
||||
"section": "Internacional",
|
||||
"url": "https://www.bbc.com/portuguese/internacional-48562081",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
112
translators/BIBSYS.js
Normal file
112
translators/BIBSYS.js
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"translatorID": "ab961e61-2a8a-4be1-b8a3-044f20d52d78",
|
||||
"label": "BIBSYS",
|
||||
"creator": "Ramesh Srigiriraju",
|
||||
"target": "^https?://ask\\.bibsys\\.no/ask/action",
|
||||
"minVersion": "1.0.0b4.r1",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-12-28 04:44:52"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
var multireg=new RegExp("^https?://ask\.bibsys\.no/ask/action/result");
|
||||
if (multireg.test(url))
|
||||
return "multiple";
|
||||
var singlereg=new RegExp("^https?://ask\.bibsys\.no/ask/action/show");
|
||||
if (singlereg.test(url))
|
||||
return "book";
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var multireg=new RegExp("https?://ask\.bibsys\.no/ask/action/result");
|
||||
if (multireg.test(url)) {
|
||||
var titlpath='//tr/td[@width="49%"][@align="left"][@valign="top"]/a/text()';
|
||||
var titles=doc.evaluate(titlpath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var codepath='//tr/td/input[@type="checkbox"][@name="valg"]/@value';
|
||||
var codes=doc.evaluate(codepath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var items=new Array();
|
||||
var title;
|
||||
titles.iterateNext();
|
||||
while (title=titles.iterateNext())
|
||||
items[codes.iterateNext().nodeValue]=title.nodeValue;
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) return;
|
||||
var string="http://ask.bibsys.no/ask/action/result?control=ctr_top";
|
||||
for (var codes in items)
|
||||
string+="&valg="+codes;
|
||||
string+="&control=ctr_bottom&eksportFormat=refmanager&eksportEpostAdresse=&eksportEpostFormat=fortekst&cmd=sendtil";
|
||||
Zotero.Utilities.HTTP.doGet(string, function(text) {
|
||||
var trans=Zotero.loadTranslator("import");
|
||||
trans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
trans.setString(text);
|
||||
trans.setHandler("itemDone", function(obj, item) {
|
||||
item.title = item.title.replace(/\s\s+/, " ").replace(/\s:/, ":");
|
||||
item.complete();
|
||||
});
|
||||
trans.translate();
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
var singlereg=new RegExp("http://ask\.bibsys\.no/ask/action/show");
|
||||
if (singlereg.test(url)) {
|
||||
var urlstring="http://ask.bibsys.no/ask/action/show";
|
||||
var data="visningsformat=ris&eksportFormat=refmanager&eksportEpostAdresse=&eksportEpostFormat=fortekst&cmd=sendtil";
|
||||
Zotero.Utilities.HTTP.doPost(urlstring, data, function(text) {
|
||||
//Z.debug(text)
|
||||
var trans=Zotero.loadTranslator("import");
|
||||
trans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
trans.setString(text);
|
||||
trans.setHandler("itemDone", function(obj, item) {
|
||||
item.title = item.title.replace(/\s\s+/, " ").replace(/\s:/, ":");
|
||||
item.complete();
|
||||
});
|
||||
trans.translate();
|
||||
});
|
||||
|
||||
}
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://ask.bibsys.no/ask/action/result?cmd=&kilde=biblio&q=thelen",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://ask.bibsys.no/ask/action/show?pid=042152526&kid=biblio",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Thelen",
|
||||
"firstName": "Kathleen A.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "<p>Bibliografi: s. 297-322</p>"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"seeAlso": [],
|
||||
"attachments": [],
|
||||
"title": "How institutions evolve: the political economy of skills in Germany, Britain, the United States, and Japan",
|
||||
"date": "2004",
|
||||
"numPages": "XV, 333 s.",
|
||||
"publisher": "Cambridge University Press",
|
||||
"place": "Cambridge",
|
||||
"ISBN": "0-521-83768-5",
|
||||
"libraryCatalog": "BIBSYS",
|
||||
"shortTitle": "How institutions evolve"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
217
translators/BOCC.js
Normal file
217
translators/BOCC.js
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"translatorID": "ecd1b7c6-8d31-4056-8c15-1807b2489254",
|
||||
"label": "BOCC",
|
||||
"creator": "José Antonio Meira da Rocha",
|
||||
"target": "^https?://[^/]*bocc[^/]*/(_listas|_esp)",
|
||||
"minVersion": "1.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsbv",
|
||||
"lastUpdated": "2014-04-04 10:08:43"
|
||||
}
|
||||
|
||||
/* Translator for Biblioteca Online de Ciências da Comunicação (BOCC,
|
||||
Communication Science Online Library, http://www.bocc.ubi.pt/) */
|
||||
|
||||
/*
|
||||
BOCC Translator - Parses BOCC indexes and creates Zotero-based metadata.
|
||||
Copyright (C) 2010 José Antonio Meira da Rocha
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Standard Zotero function
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.evaluate("//table[@class='ag']/tbody/tr[1]/td[@class='agenda']", doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
Zotero.debug("multiple");
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////
|
||||
function getAuthors(newItem, itemsAutors) {
|
||||
//Formatting and saving "Author" field
|
||||
if (items["AUTOR"]) {
|
||||
var author = itemsAutors["AUTOR"];
|
||||
if (author.match(";")) {
|
||||
var authors = author.split(";");
|
||||
for (var i in authors) {
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[i], "author"));
|
||||
}
|
||||
} else {
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author"));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Standard Zotero translator entry point
|
||||
function doWeb(doc, url) {
|
||||
var articles = new Array();
|
||||
var items = new Object();
|
||||
var itemsAutors = new Object();
|
||||
var itemDate = new Object();
|
||||
var nextTitle;
|
||||
var urls = new Array();
|
||||
var bloco;
|
||||
var lines = new Array();
|
||||
var resite = /^https?:\/\/[^\/]*bocc[^\/]*\/(?:_listas|_esp)/;
|
||||
var site = resite.exec(url);
|
||||
site = site[0];
|
||||
site = site.replace("/_esp", "");
|
||||
site = site.replace("/_listas", "");
|
||||
Zotero.debug('Site===>'+site+'<===');
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
// Return XPathResult object
|
||||
// accessible with .iterateNext() method
|
||||
var content = doc.evaluate("//table[@class='ag']/tbody/tr[1]/td[@class='agenda']", doc, null, XPathResult.ANY_TYPE, null);
|
||||
// All articles are in same <td>
|
||||
// Get the first <td> data
|
||||
bloco = content.iterateNext().innerHTML;
|
||||
lines = bloco.split('<br><br>');
|
||||
//Zotero.debug('Artigo===>'+lines[0]+'<===');
|
||||
///////////////////////////////////////////////
|
||||
// Try get tags
|
||||
var tematica = doc.evaluate("//title", doc, null, XPathResult.ANY_TYPE, null);
|
||||
tematica = tematica.iterateNext().textContent;
|
||||
//Zotero.debug('<Title>===>'+tematica+'<===');
|
||||
var isTematica = tematica.match('Temática');
|
||||
if (isTematica) {
|
||||
// Get tematicas list to build tags list
|
||||
var tematicanum;
|
||||
var tematicasnums = doc.evaluate('//a[@class="tematica"]/@href', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var tematicasname;
|
||||
var tematicasnames = doc.evaluate('//a[@class="tematica"]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
|
||||
var tematicas = new Object();
|
||||
while (tematicanum = tematicasnums.iterateNext()) {
|
||||
tematicanum = tematicanum.textContent;
|
||||
tematicanum = tematicanum.match(/=[\d]+$/)[0];
|
||||
tematicanum = tematicanum.replace('=','');
|
||||
tematicaname = tematicasnames.iterateNext().textContent;
|
||||
tematicas[tematicanum] = tematicaname;
|
||||
}
|
||||
////////////////////////////////////////////
|
||||
// Get current tematica
|
||||
var tagsContent = new Array();
|
||||
|
||||
|
||||
tematica = tematica.match(/:\s[\d]*\s-/)[0];
|
||||
tematica = tematica.replace(': ','');
|
||||
tematica = tematica.replace(' -','');
|
||||
tematicaname = tematicas[tematica];
|
||||
//Zotero.debug('Tematica ===>'+tematicaname+'<===');
|
||||
// Build tags
|
||||
if (tematicaname.match(' e ')) {
|
||||
tagsContent = tematicaname.split(' e ');
|
||||
if (tagsContent[0].match(',')) {
|
||||
var temp = tagsContent[0].split(',');
|
||||
tagsContent.push(temp[1]);
|
||||
tagsContent[0] = temp[0];
|
||||
}
|
||||
} else {
|
||||
tagsContent[0] = tematicaname;
|
||||
}
|
||||
//for (var i in tagsContent) {
|
||||
// Zotero.debug('Tag ===>'+i+'='+tagsContent[i]+'<===');
|
||||
//}
|
||||
} // if (isTematica)
|
||||
/////////////////////////////////////////////
|
||||
var title;
|
||||
var docurl;
|
||||
var autores = new Array();
|
||||
var reurl = /href="([^"]+)/ ;
|
||||
var reautor= /autor.php[^>]+"agenda">([^<]+)/g ;
|
||||
var redate = /(\d\d\d\d$)/g ;
|
||||
for (var n in lines) {
|
||||
title = Zotero.Utilities.cleanTags(lines[n].split('<br>')[0]);
|
||||
title = Zotero.Utilities.trimInternal(Zotero.Utilities.trim(title));
|
||||
title = Zotero.Utilities.unescapeHTML(title);
|
||||
docurl = reurl.exec(lines[n]);
|
||||
if (docurl) {
|
||||
if (docurl[1].match('autor')) {
|
||||
docurl = '';
|
||||
} else {
|
||||
items[docurl[1]] = title;
|
||||
autores = lines[n].match(reautor);
|
||||
for (var i in autores){
|
||||
autores[i] = autores[i].split('>')[1];
|
||||
}
|
||||
itemsAutors[docurl[1]] = autores ;
|
||||
date = lines[n].match(redate);
|
||||
//Zotero.debug('Data===>'+date[0]+'<===');
|
||||
itemDate[docurl[1]] = date[0] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Zotero.debug('URL===>'+docurl[1]+'<===');
|
||||
/* Zotero.selectItems()
|
||||
* Presents items to select in the select box.
|
||||
* Assumes window.arguments[0].dataIn is an object with
|
||||
* URLs as keys and descriptions as values
|
||||
*/
|
||||
|
||||
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var filetitle;
|
||||
var filemime;
|
||||
for (var item in items) {
|
||||
var newItem = new Zotero.Item("journalArticle");
|
||||
newItem.title = items[item];
|
||||
newItem.date = itemDate[item];
|
||||
newItem.publicationTitle = "Biblioteca Online de Ciências da Comunicação";
|
||||
newItem.ISSN = '1646-3137';
|
||||
newItem.journalAbbreviation = 'BOCC' ;
|
||||
// http://www.bocc.ubi.pt
|
||||
newItem.url = site+item.replace("..", "");
|
||||
fileurl = site+item.replace("..", "")
|
||||
Zotero.debug('Doc ===>'+fileurl+'<===');
|
||||
if (fileurl.match('.html$|.htm$|.HTML$|.HTM$')) {
|
||||
filetitle = 'Anexo HTML';
|
||||
filemime = 'text/html';
|
||||
};
|
||||
if (fileurl.match('.pdf$|.PDF$')) {
|
||||
filetitle = 'Anexo PDF';
|
||||
filemime = 'application/pdf';
|
||||
};
|
||||
Zotero.debug('File title ===>'+filetitle+'<===');
|
||||
Zotero.debug('File mime ===>'+filemime+'<===');
|
||||
newItem.attachments.push(
|
||||
{url:fileurl, title:filetitle, mimeType:filemime}
|
||||
);
|
||||
temp = itemsAutors[item];
|
||||
for (var i in temp) {
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(temp[i], "author"));
|
||||
}
|
||||
if (isTematica) {
|
||||
for (var i = 0; i < tagsContent.length; i++) {
|
||||
newItem.tags[i] = tagsContent[i];
|
||||
}
|
||||
}
|
||||
newItem.complete();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bocc.ubi.pt/_listas/titulos_letra.php?letra=B",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
229
translators/BOE.js
Normal file
229
translators/BOE.js
Normal file
@@ -0,0 +1,229 @@
|
||||
{
|
||||
"translatorID": "3f1b68b1-8ee7-4ab7-a514-185d72b2f80d",
|
||||
"label": "BOE",
|
||||
"creator": "Félix Brezo (@febrezo)",
|
||||
"target": "^https?://([a-z]+\\.)?boe\\.es/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-26 17:07:40"
|
||||
}
|
||||
|
||||
/*
|
||||
BOE Translator
|
||||
Copyright (C) 2020-2021 Félix Brezo, felixbrezo@disroot.org
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the Affero GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes("diario_boe") || url.includes("www.boe.es/eli") || url.includes("/doc.php")) {
|
||||
return "statute";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var resourceType = detectWeb(doc, url);
|
||||
var newItem = new Zotero.Item(resourceType);
|
||||
|
||||
var metadataUri;
|
||||
if (!url.includes("/xml")) {
|
||||
var index = 0;
|
||||
|
||||
while (true) {
|
||||
index++;
|
||||
metadataUri = ZU.xpathText(doc, "(//meta[@property='http://data.europa.eu/eli/ontology#is_embodied_by'])[" + index + "]/@resource");
|
||||
if (!metadataUri || metadataUri.includes("/xml")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
metadataUri = url;
|
||||
}
|
||||
|
||||
Zotero.Utilities.HTTP.doGet(metadataUri, function (resText) {
|
||||
// Clean and parse metadata web
|
||||
resText = resText.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, "");
|
||||
resText = Zotero.Utilities.trim(resText);
|
||||
var parser = new DOMParser();
|
||||
var metadataDoc = parser.parseFromString(resText, "text/xml");
|
||||
|
||||
// Start scraping
|
||||
var tmpAuthor = ZU.xpathText(metadataDoc, "//departamento");
|
||||
if (tmpAuthor) {
|
||||
newItem.creators.push({ lastName: tmpAuthor, creatorType: "author", fieldMode: 1 });
|
||||
}
|
||||
|
||||
var tmpDate = ZU.xpathText(metadataDoc, "//fecha_publicacion");
|
||||
newItem.dateEnacted = ZU.strToISO(tmpDate.substring(0, 4) + "/" + tmpDate.substring(4, 6) + "/" + tmpDate.substring(6, 8));
|
||||
|
||||
newItem.nameOfAct = ZU.xpathText(metadataDoc, "//titulo").replace(/\.$/, ""); // Remove trailing dot
|
||||
newItem.section = ZU.xpathText(metadataDoc, "//seccion");
|
||||
newItem.pages = ZU.xpathText(metadataDoc, "//pagina_inicial") + "-" + ZU.xpathText(metadataDoc, "//pagina_final");
|
||||
newItem.session = ZU.xpathText(metadataDoc, "//diario") + " núm. " + ZU.xpathText(metadataDoc, "//diario_numero");
|
||||
newItem.codeNumber = ZU.xpathText(metadataDoc, "//identificador");
|
||||
newItem.publicLawNumber = ZU.xpathText(metadataDoc, "//rango") + " " + ZU.xpathText(metadataDoc, "//numero_oficial");
|
||||
newItem.url = ZU.xpathText(metadataDoc, "//url_eli");
|
||||
|
||||
// Adding the attachment
|
||||
newItem.attachments.push({
|
||||
title: "Snapshot",
|
||||
mimeType: "text/html",
|
||||
url: url
|
||||
});
|
||||
|
||||
newItem.complete();
|
||||
});
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.boe.es/eli/es/rd/2020/06/30/614",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Real Decreto 614/2020, de 30 de junio, por el que se establece una cualificación profesional de la familia profesional Comercio y Marketing, que se incluye en el Catálogo Nacional de Cualificaciones Profesionales",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Ministerio de Educación y Formación Profesional",
|
||||
"creatorType": "author",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"dateEnacted": "2020-07-20",
|
||||
"codeNumber": "BOE-A-2020-8150",
|
||||
"pages": "53856-53876",
|
||||
"publicLawNumber": "Real Decreto 614/2020",
|
||||
"section": "1",
|
||||
"session": "Boletín Oficial del Estado núm. 197",
|
||||
"url": "https://www.boe.es/eli/es/rd/2020/06/30/614",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.boe.es/eli/es/rd/2020/06/30/614/dof/spa/xml",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Real Decreto 614/2020, de 30 de junio, por el que se establece una cualificación profesional de la familia profesional Comercio y Marketing, que se incluye en el Catálogo Nacional de Cualificaciones Profesionales",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Ministerio de Educación y Formación Profesional",
|
||||
"creatorType": "author",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"dateEnacted": "2020-07-20",
|
||||
"codeNumber": "BOE-A-2020-8150",
|
||||
"pages": "53856-53876",
|
||||
"publicLawNumber": "Real Decreto 614/2020",
|
||||
"section": "1",
|
||||
"session": "Boletín Oficial del Estado núm. 197",
|
||||
"url": "https://www.boe.es/eli/es/rd/2020/06/30/614",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.boe.es/diario_boe/xml.php?id=BOE-A-1978-31229",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Constitución Española",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Cortes Generales",
|
||||
"creatorType": "author",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"dateEnacted": "1978-12-29",
|
||||
"codeNumber": "BOE-A-1978-31229",
|
||||
"pages": "29313-29424",
|
||||
"publicLawNumber": "Constitución",
|
||||
"section": "1",
|
||||
"session": "Boletín Oficial del Estado núm. 311",
|
||||
"url": "https://www.boe.es/eli/es/c/1978/12/27/(1)",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.boe.es/buscar/doc.php?id=BOE-A-1978-31229",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "statute",
|
||||
"nameOfAct": "Constitución Española",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Cortes Generales",
|
||||
"creatorType": "author",
|
||||
"fieldMode": 1
|
||||
}
|
||||
],
|
||||
"dateEnacted": "1978-12-29",
|
||||
"codeNumber": "BOE-A-1978-31229",
|
||||
"pages": "29313-29424",
|
||||
"publicLawNumber": "Constitución",
|
||||
"section": "1",
|
||||
"session": "Boletín Oficial del Estado núm. 311",
|
||||
"url": "https://www.boe.es/eli/es/c/1978/12/27/(1)",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
132
translators/BOFiP-Impots.js
Normal file
132
translators/BOFiP-Impots.js
Normal file
File diff suppressed because one or more lines are too long
276
translators/Baidu Scholar.js
Normal file
276
translators/Baidu Scholar.js
Normal file
@@ -0,0 +1,276 @@
|
||||
{
|
||||
"translatorID": "e034d9be-c420-42cf-8311-23bca5735a32",
|
||||
"label": "Baidu Scholar",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(www\\.)?xueshu\\.baidu\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-06-16 17:43:54"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2017 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// attr()/text() v2
|
||||
// eslint-disable-next-line
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null}
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('paperid=')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h3>a[href*="show?paperid="]');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, _url) {
|
||||
var dataUrl = attr(doc, 'i.reqdata', 'url');
|
||||
let paperId = undefined;
|
||||
const paperIdMatches = _url.match(/paperid=([a-z0-9]*)/i);
|
||||
if (paperIdMatches[1]) {
|
||||
paperId = paperIdMatches[1];
|
||||
}
|
||||
const risUrl = `https://xueshu.baidu.com/u/citation?type=ris&paperid=${paperId}`;
|
||||
var title = doc.title.replace('_百度学术', '');
|
||||
|
||||
var tags = [];
|
||||
doc.querySelectorAll('p.kw_main span a').forEach(e => tags.push(ZU.trimInternal(e.textContent)));
|
||||
ZU.doGet(risUrl, function (ris) {
|
||||
// Z.debug({ ris });
|
||||
// delete parenthesis in pages information, e.g. SP - 5-7(3)
|
||||
ris = ris.replace(/(SP\s+-\s\d+-\d+)\(\d+\)$/m, "$1");
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(ris);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
item.url = dataUrl;
|
||||
var doiLink = attr(doc, 'a.dl_item[data-url*="doi.org/"]', 'data-url');
|
||||
if (!item.DOI && doiLink) {
|
||||
item.DOI = doiLink.substr(doiLink.indexOf('doi.org/') + 8);
|
||||
}
|
||||
if (!item.abstractNote) {
|
||||
item.abstractNote = text(doc, 'div.sc_abstract') || text(doc, 'p.abstract');
|
||||
}
|
||||
item.attachments.push({
|
||||
title: "Snapshot",
|
||||
document: doc
|
||||
});
|
||||
item.tags = tags;
|
||||
if (!item.title) {
|
||||
item.title = title;
|
||||
}
|
||||
if (!item.creators || item.creators.length == 0) {
|
||||
item.creators = [];
|
||||
doc.querySelectorAll('p.author_text a').forEach((e) => {
|
||||
item.creators.push(ZU.cleanAuthor(e.textContent, 'author', true));
|
||||
});
|
||||
}
|
||||
for (let i = 0, n = item.creators.length; i < n; i++) {
|
||||
let creator = item.creators[i];
|
||||
if (!creator.firstName && creator.lastName.search(/[A-Za-z]/) == -1 && !creator.lastName.includes(' ')) {
|
||||
// Chinese name: first character is last name, the rest are first name (ignoring compound last names which are rare)
|
||||
creator.firstName = creator.lastName.substr(1);
|
||||
creator.lastName = creator.lastName.charAt(0);
|
||||
}
|
||||
item.creators[i] = creator;
|
||||
}
|
||||
if (!item.publicationTitle) {
|
||||
item.publicationTitle = attr(doc, 'a.journal_title', 'title');
|
||||
}
|
||||
if (!item.date && text(doc, 'div.year_wr p.kw_main')) {
|
||||
item.date = ZU.trimInternal(text(doc, 'div.year_wr p.kw_main'));
|
||||
}
|
||||
if (!item.DOI && text(doc, 'div.doi_wr p.kw_main')) {
|
||||
item.DOI = ZU.trimInternal(text(doc, 'div.doi_wr p.kw_main'));
|
||||
}
|
||||
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://xueshu.baidu.com/usercenter/paper/show?paperid=b3ab239032d44d951d8eee26d7bc44bf&site=xueshu_se",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Zotero: information management software 2.0",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Fernandez",
|
||||
"firstName": "P.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2011",
|
||||
"DOI": "10.1108/07419051111154758",
|
||||
"abstractNote": "Purpose – The purpose of this paper is to highlight how the open-source bibliographic management program Zotero harnesses Web 2.0 features to make library resources more accessible to casual users without sacrificing advanced features. This reduces the barriers understanding library resources and provides additional functionality when organizing information resources. Design/methodology/approach – The paper reviews select aspects of the program to illustrate how it can be used by patrons and information professionals, and why information professionals should be aware of it. Findings – Zotero has some limitations, but succeeds in meeting the information management needs of a wide variety of users, particularly users who use online resources. Originality/value – This paper is of interest to information professionals seeking free software that can make managing bibliographic information easier for themselves and their patrons.",
|
||||
"issue": "4",
|
||||
"libraryCatalog": "Baidu Scholar",
|
||||
"pages": "5-7",
|
||||
"publicationTitle": "Library Hi Tech News",
|
||||
"shortTitle": "Zotero",
|
||||
"url": "http://www.emeraldinsight.com/doi/pdfplus/10.1108/07419051111154758",
|
||||
"volume": "28",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Citation management"
|
||||
},
|
||||
{
|
||||
"tag": "Internet"
|
||||
},
|
||||
{
|
||||
"tag": "Library services"
|
||||
},
|
||||
{
|
||||
"tag": "Open source"
|
||||
},
|
||||
{
|
||||
"tag": "Reference management"
|
||||
},
|
||||
{
|
||||
"tag": "Technology"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://xueshu.baidu.com/usercenter/paper/show?paperid=29fcf50a863692823c3f336a9ee1efea&site=xueshu_se",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Comparativo dos softwares de gerenciamento de referências bibliográficas: Mendeley, EndNote e Zotero",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Yamakawa",
|
||||
"firstName": "E. K.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Kubota",
|
||||
"firstName": "F. I.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Beuren",
|
||||
"firstName": "F. H.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Scalvenzi",
|
||||
"firstName": "L.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Miguel",
|
||||
"firstName": "Pac",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2014",
|
||||
"DOI": "10.1590/0103-37862014000200006",
|
||||
"abstractNote": "A elaboração de uma revisão bibliográfica confiável, a partir de trabalhos relevantes publicados anteriormente, é fundamental para evidenciar a originalidade e a contribuição científica dos trabalhos de pesquisa. Devido à grande quantidade de bases de dados e de publicações disponíveis, torna-se necessário utilizar ferramentas que auxiliem na gestão das referências bibliográficas de uma maneira fácil e padronizada. O objetivo deste artigo é examinar três de gerenciamento bibliográfico utilizados com frequência por pesquisadores acadêmicos, são eles: , e . Nesse sentido, buscou-se, em primeiro lugar, evidenciar seus principais benefícios e as possíveis dificuldades de utilização. Em segundo lugar, procurou-se comparar suas principais características por meio de uma pesquisa teórico-conceitual baseada em literatura especializada, o que permitiu utilizá-los e analisá-los de maneira crítica. Assim sendo, evidenciou-se as principais particularidades de cada e foi elaborado um quadro comparativo entre os mesmos. Considerando as características analisadas nos três , concluiu-se que todos, ao mesmo tempo em que facilitam o trabalho dos pesquisadores, possuem ferramentas que facilitam as buscas, a organização e a análise dos artigos.",
|
||||
"issue": "2",
|
||||
"libraryCatalog": "Baidu Scholar",
|
||||
"pages": "167-176",
|
||||
"publicationTitle": "Transinformao",
|
||||
"shortTitle": "Comparativo dos softwares de gerenciamento de referências bibliográficas",
|
||||
"url": "http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0103-37862014000200167&lng=pt&nrm=is",
|
||||
"volume": "26",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://xueshu.baidu.com/s?wd=zotero&rsv_bp=0&tn=SE_baiduxueshu_c1gjeupa&rsv_spt=3&ie=utf-8&f=8&rsv_sug2=0&sc_f_para=sc_tasktype%3D%7BfirstSimpleSearch%7D",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
216
translators/Bangkok Post.js
Normal file
216
translators/Bangkok Post.js
Normal file
@@ -0,0 +1,216 @@
|
||||
{
|
||||
"translatorID": "7f74d823-d2ba-481c-b717-8b12c90ed874",
|
||||
"label": "Bangkok Post",
|
||||
"creator": "Matt Mayer",
|
||||
"target": "^https://www\\.bangkokpost\\.com/[a-z0-9-]+/([a-z0-9-]+/)?[0-9]+",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-06-18 20:46:45"
|
||||
}
|
||||
|
||||
/*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2020 Matt Mayer
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
function detectWeb(_doc, _url) {
|
||||
return 'newspaperArticle';
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
scrape(doc, url);
|
||||
}
|
||||
|
||||
function scrape(doc, _url) {
|
||||
const translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
// Add data for fields that are not covered by Embedded Metadata
|
||||
// Author name is stored as firstname lastname
|
||||
let authorName = attr(doc, "meta[name='lead:author']", "content");
|
||||
if (!authorName) {
|
||||
authorName = text(doc, '.info-opinion .columnnist-name a');
|
||||
}
|
||||
if (authorName) {
|
||||
item.creators = [ZU.cleanAuthor(authorName, "author", false)];
|
||||
}
|
||||
// Date is stored as a timestamp like 2020-09-07T17:37:00+07:00, just extract the YYYY-MM-DD at start
|
||||
const date = attr(doc, "meta[name='lead:published_at']", "content");
|
||||
if (date) {
|
||||
item.date = date.substr(0, 10);
|
||||
}
|
||||
|
||||
item.publicationTitle = "Bangkok Post";
|
||||
item.itemType = "newspaperArticle";
|
||||
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bangkokpost.com/thailand/politics/1981267/house-general-debate-set-for-wednesday",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "House general debate set for Wednesday",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Aekarach",
|
||||
"lastName": "Sattaburuth",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-09-07",
|
||||
"abstractNote": "A general debate without a vote in the House of Representatives has been scheduled for Wednesday for MPs to question the government on the current economic and political crises and suggest ways of solving related problems.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.bangkokpost.com",
|
||||
"publicationTitle": "Bangkok Post",
|
||||
"url": "https://www.bangkokpost.com/thailand/politics/1981267/house-general-debate-set-for-wednesday",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "cabinet ministers"
|
||||
},
|
||||
{
|
||||
"tag": "debate"
|
||||
},
|
||||
{
|
||||
"tag": "general debate"
|
||||
},
|
||||
{
|
||||
"tag": "government mps"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bangkokpost.com/life/tech/1979315/air-force-satellite-napa-1-launched",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Air force satellite Napa-1 launched",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Wassana",
|
||||
"lastName": "Nanuam",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-09-03",
|
||||
"abstractNote": "The Royal Thai Air Force’s first security satellite, Napa-1, was successfully launched on a European rocket from French Guiana on Thursday morning.",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.bangkokpost.com",
|
||||
"publicationTitle": "Bangkok Post",
|
||||
"url": "https://www.bangkokpost.com/life/tech/1979315/air-force-satellite-napa-1-launched",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "French Guiana"
|
||||
},
|
||||
{
|
||||
"tag": "Napa-1"
|
||||
},
|
||||
{
|
||||
"tag": "air force"
|
||||
},
|
||||
{
|
||||
"tag": "launched"
|
||||
},
|
||||
{
|
||||
"tag": "satellite"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.bangkokpost.com/opinion/opinion/1981587/tech-is-key-to-rebooting-tourism",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Tech is key to rebooting tourism",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Jeff",
|
||||
"lastName": "Paine",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2020-09-08",
|
||||
"abstractNote": "Southeast Asia relies heavily on tourism. In 2019, the travel and tourism industry contributed 12.1% of the region",
|
||||
"language": "en",
|
||||
"libraryCatalog": "www.bangkokpost.com",
|
||||
"publicationTitle": "Bangkok Post",
|
||||
"url": "https://www.bangkokpost.com/opinion/opinion/1981587/tech-is-key-to-rebooting-tourism",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "domestic tourism"
|
||||
},
|
||||
{
|
||||
"tag": "industry"
|
||||
},
|
||||
{
|
||||
"tag": "tourism"
|
||||
},
|
||||
{
|
||||
"tag": "tourism industry"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
175
translators/Baruch Foundation.js
Normal file
175
translators/Baruch Foundation.js
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"translatorID": "283d6b78-d3d7-48d4-8fc0-0bdabef7c4ee",
|
||||
"label": "Baruch Foundation",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https?://baruchfoundation\\.org/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-08-20 18:55:13"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.querySelector('#img-artist')) {
|
||||
return "artwork";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h4 > a[href*=".jpg.php"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
let item = new Zotero.Item('artwork');
|
||||
|
||||
item.title = text(doc, 'h1#title b');
|
||||
item.abstractNote = text(doc, '.description');
|
||||
item.artworkMedium = [...doc.querySelectorAll('.taglist a')]
|
||||
.map(a => a.innerText.trim()).join(', ');
|
||||
item.artworkSize = text(doc, '.zp_uneditable_image_location'); // not sure why this class
|
||||
item.date = text(doc, '.zp_uneditable_image_city'); // again...
|
||||
if (item.date.trim() == 'no date') item.date = '';
|
||||
item.archive = 'Baruch Foundation';
|
||||
item.url = url;
|
||||
item.rights = text(doc, '.credit');
|
||||
|
||||
item.creators.push(ZU.cleanAuthor(
|
||||
text(doc, '#img-artist em').replace(/^Dr\.?\b/, ''),
|
||||
'artist'
|
||||
));
|
||||
|
||||
item.attachments.push({
|
||||
title: 'Image',
|
||||
mimeType: 'image/jpeg',
|
||||
url: attr(doc, '#img-full', 'href')
|
||||
});
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://baruchfoundation.org/banka/banka_portrait-with-coiled-wire.jpg.php",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Portrait with Coiled Wire",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Pavel",
|
||||
"lastName": "Baňka",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"date": "1986",
|
||||
"archive": "Baruch Foundation",
|
||||
"artworkMedium": "Gelatin Silver Print, Toned Photograph",
|
||||
"artworkSize": "12 1/4 x 15 5/16 in.",
|
||||
"libraryCatalog": "Baruch Foundation",
|
||||
"url": "http://baruchfoundation.org/banka/banka_portrait-with-coiled-wire.jpg.php",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://baruchfoundation.org/j_feyfar/j_feyfar_untitled-stream-in-woods.jpg.php",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Untitled (Wooded Landscape with Stream)",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Jaroslav",
|
||||
"lastName": "Feyfar",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"abstractNote": "on blue mount",
|
||||
"archive": "Baruch Foundation",
|
||||
"artworkMedium": "Black And White Photograph, Gelatin Silver Print",
|
||||
"artworkSize": "4 3/4 x 3 1/2 in.",
|
||||
"libraryCatalog": "Baruch Foundation",
|
||||
"url": "http://baruchfoundation.org/j_feyfar/j_feyfar_untitled-stream-in-woods.jpg.php",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Image",
|
||||
"mimeType": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://baruchfoundation.org/balcar",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
175
translators/Beobachter.js
Normal file
175
translators/Beobachter.js
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"translatorID": "a571680e-6338-46c2-a740-3cd9eb80fc7f",
|
||||
"label": "Beobachter",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://((www\\.)?beobachter\\.ch/.)",
|
||||
"minVersion": "2.1.9",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2022-02-05 20:11:36"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2022 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
function detectWeb(doc, _url) {
|
||||
if (doc.getElementsByClassName('article-header').length > 0) {
|
||||
return "magazineArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
|
||||
var rows = doc.querySelectorAll('a[class*="teaser"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = text(row, 'span');
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var authors = doc.querySelectorAll('meta[name="parsely-author"]');
|
||||
var date = attr(doc, 'meta[name="published_at"]', 'content');
|
||||
var translator = Zotero.loadTranslator('web');
|
||||
// Embedded Metadata
|
||||
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
|
||||
// translator.setDocument(doc);
|
||||
|
||||
translator.setHandler('itemDone', function (obj, item) {
|
||||
for (let author of authors) {
|
||||
item.creators.push(ZU.cleanAuthor(author.content, "author"));
|
||||
}
|
||||
item.title = item.title.replace(/\s*\|\s*Beobachter/, "");
|
||||
item.date = date;
|
||||
item.ISSN = "1661-7444";
|
||||
item.complete();
|
||||
});
|
||||
|
||||
translator.getTranslatorObject(function (trans) {
|
||||
trans.itemType = "magazineArticle";
|
||||
trans.doWeb(doc, url);
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.beobachter.ch/natur/forschung-wissen/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.beobachter.ch/umwelt/blitze-suche-nicht-die-buche",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "Blitze: Suche nicht die Buche!",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Tanja",
|
||||
"lastName": "Polli",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2013-08-16T16:28:50+02:00",
|
||||
"ISSN": "1661-7444",
|
||||
"abstractNote": "Acht Tipps, was man tun und lassen soll, wenn man von Blitz und Donner überrascht wird.",
|
||||
"language": "de-CH",
|
||||
"libraryCatalog": "www.beobachter.ch",
|
||||
"shortTitle": "Blitze",
|
||||
"url": "https://www.beobachter.ch/umwelt/blitze-suche-nicht-die-buche",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.beobachter.ch/gesundheit/medizin-krankheit/immer-schlapp-wieso-fuhlen-wir-uns-standig-mude",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"title": "Immer schlapp: Wieso fühlen wir uns ständig müde?",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Andreas",
|
||||
"lastName": "Grote",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2022-01-11T09:30:00+01:00",
|
||||
"ISSN": "1661-7444",
|
||||
"abstractNote": "Wer andauernd schläfrig und erschöpft ist, leidet – und nervt andere. Ein kurzer Selbsttest zeigt, ob Ihre Müdigkeit normal ist und was dagegen helfen kann.",
|
||||
"language": "de-CH",
|
||||
"libraryCatalog": "www.beobachter.ch",
|
||||
"shortTitle": "Immer schlapp",
|
||||
"url": "https://www.beobachter.ch/gesundheit/medizin-krankheit/immer-schlapp-wieso-fuhlen-wir-uns-standig-mude",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
92
translators/Bezneng Gajit.js
Normal file
92
translators/Bezneng Gajit.js
Normal file
File diff suppressed because one or more lines are too long
888
translators/BibLaTeX.js
Normal file
888
translators/BibLaTeX.js
Normal file
@@ -0,0 +1,888 @@
|
||||
{
|
||||
"translatorID": "b6e39b57-8942-4d11-8259-342c46ce395f",
|
||||
"label": "BibLaTeX",
|
||||
"creator": "Simon Kornblith, Richard Karnesky and Anders Johansson",
|
||||
"target": "bib",
|
||||
"minVersion": "2.1.9",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"configOptions": {
|
||||
"getCollections": true
|
||||
},
|
||||
"displayOptions": {
|
||||
"exportCharset": "UTF-8",
|
||||
"exportNotes": false,
|
||||
"exportFileData": false,
|
||||
"useJournalAbbreviation": false
|
||||
},
|
||||
"inRepository": true,
|
||||
"translatorType": 2,
|
||||
"lastUpdated": "2024-03-25 14:49:42"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2019 Simon Kornblith, Richard Karnesky and Anders Johansson
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
// %a = first listed creator surname
|
||||
// %y = year
|
||||
// %t = first word of title
|
||||
var citeKeyFormat = "%a_%t_%y";
|
||||
|
||||
|
||||
var fieldMap = {
|
||||
location: "place",
|
||||
chapter: "chapter",
|
||||
edition: "edition",
|
||||
title: "title",
|
||||
volume: "volume",
|
||||
rights: "rights", // it's rights in zotero nowadays
|
||||
isbn: "ISBN",
|
||||
issn: "ISSN",
|
||||
url: "url",
|
||||
doi: "DOI",
|
||||
series: "series",
|
||||
shorttitle: "shortTitle",
|
||||
holder: "assignee",
|
||||
abstract: "abstractNote",
|
||||
volumes: "numberOfVolumes",
|
||||
version: "version",
|
||||
eventtitle: "conferenceName",
|
||||
pages: "pages",
|
||||
pagetotal: "numPages"
|
||||
};
|
||||
// more conversions done below with special rules
|
||||
|
||||
/**
|
||||
* Identifiers from item.extra
|
||||
* Copied from BibTeX
|
||||
*/
|
||||
// Exported in BibTeX and BibLaTeX
|
||||
var revExtraIds = {
|
||||
LCCN: 'lccn',
|
||||
MR: 'mrnumber',
|
||||
Zbl: 'zmnumber',
|
||||
PMCID: 'pmcid',
|
||||
PMID: 'pmid',
|
||||
DOI: 'doi'
|
||||
};
|
||||
|
||||
// Imported by BibTeX. Exported by BibLaTeX only
|
||||
var revEprintIds = {
|
||||
// eprinttype: Zotero label
|
||||
|
||||
// From BibLaTeX manual
|
||||
arXiv: 'arxiv', // Sorry, but no support for eprintclass yet
|
||||
JSTOR: 'jstor',
|
||||
// PMID: 'pubmed', // Not sure if we should do this instead
|
||||
HDL: 'hdl',
|
||||
GoogleBooksID: 'googlebooks'
|
||||
};
|
||||
|
||||
function parseExtraFields(extra) {
|
||||
var lines = extra.split(/[\r\n]+/);
|
||||
var fields = [];
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var rec = { raw: lines[i] };
|
||||
var line = lines[i].trim();
|
||||
var splitAt = line.indexOf(':');
|
||||
if (splitAt > 1) {
|
||||
rec.field = line.substr(0, splitAt).trim();
|
||||
rec.value = line.substr(splitAt + 1).trim();
|
||||
}
|
||||
fields.push(rec);
|
||||
}
|
||||
return fields;
|
||||
}
|
||||
|
||||
function extraFieldsToString(extra) {
|
||||
var str = '';
|
||||
for (var i = 0; i < extra.length; i++) {
|
||||
if (!extra[i].raw) {
|
||||
str += '\n' + extra[i].field + ': ' + extra[i].value;
|
||||
}
|
||||
else {
|
||||
str += '\n' + extra[i].raw;
|
||||
}
|
||||
}
|
||||
|
||||
return str.substr(1);
|
||||
}
|
||||
|
||||
// POTENTIAL ISSUES
|
||||
// accessDate:"accessDate", //only written on attached webpage snapshots by zotero
|
||||
|
||||
|
||||
var zotero2biblatexTypeMap = {
|
||||
book: "book",
|
||||
bookSection: "incollection",
|
||||
journalArticle: "article",
|
||||
magazineArticle: "article",
|
||||
newspaperArticle: "article",
|
||||
thesis: "thesis",
|
||||
letter: "letter",
|
||||
manuscript: "unpublished",
|
||||
interview: "misc",
|
||||
film: "movie",
|
||||
artwork: "artwork",
|
||||
webpage: "online",
|
||||
conferencePaper: "inproceedings",
|
||||
report: "report",
|
||||
bill: "legislation",
|
||||
case: "jurisdiction",
|
||||
hearing: "jurisdiction",
|
||||
patent: "patent",
|
||||
statute: "legislation",
|
||||
email: "letter",
|
||||
map: "misc",
|
||||
blogPost: "online",
|
||||
instantMessage: "misc",
|
||||
forumPost: "online",
|
||||
audioRecording: "audio",
|
||||
presentation: "unpublished",
|
||||
videoRecording: "video",
|
||||
tvBroadcast: "misc",
|
||||
radioBroadcast: "misc",
|
||||
podcast: "audio",
|
||||
computerProgram: "software",
|
||||
document: "misc",
|
||||
encyclopediaArticle: "inreference",
|
||||
dictionaryEntry: "inreference"
|
||||
};
|
||||
|
||||
|
||||
var alwaysMap = {
|
||||
"|": "{\\textbar}",
|
||||
"<": "{\\textless}",
|
||||
">": "{\\textgreater}",
|
||||
"~": "{\\textasciitilde}",
|
||||
"^": "{\\textasciicircum}",
|
||||
"\\": "{\\textbackslash}",
|
||||
"{": "\\{",
|
||||
"}": "\\}"
|
||||
};
|
||||
|
||||
|
||||
// to map ISO language codes (tries to follow IETF RFC5646) to babel
|
||||
// language codes used in biblatex. Taken from Babel manual 3.9h.
|
||||
var babelLanguageMap = {
|
||||
af: "afrikaans",
|
||||
ar: "arabic",
|
||||
// bahasa (see malay and indonesian)
|
||||
eu: "basque",
|
||||
br: "breton",
|
||||
bg: "bulgarian",
|
||||
ca: "catalan",
|
||||
hr: "croatian",
|
||||
cz: "czech",
|
||||
da: "danish",
|
||||
nl: "dutch",
|
||||
en: {
|
||||
"": "english", // same as american
|
||||
US: "american",
|
||||
GB: "british",
|
||||
CA: "canadian",
|
||||
AU: "australian",
|
||||
NZ: "newzealand"
|
||||
},
|
||||
eo: "esperanto",
|
||||
et: "estonian",
|
||||
// ethiop (package for many languages)
|
||||
fa: "farsi",
|
||||
fi: "finnish",
|
||||
fr: {
|
||||
"": "french",
|
||||
CA: "canadien"
|
||||
// frenchle (a special package)
|
||||
},
|
||||
fur: "friulan",
|
||||
gl: "galician",
|
||||
de: {
|
||||
"": "german",
|
||||
AT: "austrian",
|
||||
"DE-1996": "ngerman", // these are valid IETF language codes
|
||||
"AT-1996": "naustrian",
|
||||
1996: "ngerman"
|
||||
},
|
||||
el: {
|
||||
"": "greek",
|
||||
polyton: "polutonikogreek"
|
||||
},
|
||||
he: "hebrew",
|
||||
hi: "hindi",
|
||||
is: "icelandic",
|
||||
id: "indonesian", // aliases: bahasai, indon
|
||||
ia: "interlingua",
|
||||
ga: "irish",
|
||||
it: "italian",
|
||||
ja: "japanese",
|
||||
la: "latin",
|
||||
lv: "latvian",
|
||||
lt: "lithuanian",
|
||||
dsb: "lowersorbian",
|
||||
hu: "magyar",
|
||||
zlm: "malay", // aliases: bahasam, melayu (currently, there's no
|
||||
// real difference between bahasam and bahasai in babel)
|
||||
mn: "mongolian",
|
||||
se: "samin",
|
||||
nn: "nynorsk", // nynorsk
|
||||
nb: "norsk", // bokmål
|
||||
no: "norwegian", // "no" could be used, norwegian is an alias for "norsk" in babel
|
||||
zh: {
|
||||
"": "pinyin", // only supported chinese in babel is the romanization pinyin?
|
||||
Latn: "pinyin"
|
||||
},
|
||||
pl: "polish",
|
||||
pt: {
|
||||
"": "portuguese",
|
||||
PT: "portuguese",
|
||||
BR: "brazil"
|
||||
},
|
||||
ro: "romanian",
|
||||
rm: "romansh",
|
||||
ru: "russian",
|
||||
gd: "scottish",
|
||||
sr: {
|
||||
"": "serbian", // latin script as default?
|
||||
Cyrl: "serbianc",
|
||||
Latn: "serbian",
|
||||
},
|
||||
sk: "slovak",
|
||||
sl: "slovene",
|
||||
// spanglish (pseudo language)
|
||||
es: "spanish",
|
||||
sv: "swedish",
|
||||
th: "thaicjk", // thaicjk preferred?
|
||||
tr: "turkish",
|
||||
tk: "turkmen",
|
||||
uk: "ukrainian",
|
||||
hsb: "uppersorbian",
|
||||
vi: "vietnamese",
|
||||
cy: "welsh",
|
||||
};
|
||||
|
||||
|
||||
// some fields are, in fact, macros. If that is the case then we should not put the
|
||||
// data in the braces as it will cause the macros to not expand properly
|
||||
function writeField(field, value, isMacro, noEscape) {
|
||||
if (!value && typeof value != "number") return;
|
||||
value += ""; // convert integers to strings
|
||||
Zotero.write(",\n\t" + field + " = ");
|
||||
if (!isMacro) Zotero.write("{");
|
||||
// url field is preserved, for use with \href and \url
|
||||
// Other fields (DOI?) may need similar treatment
|
||||
if (!noEscape && !isMacro && !(field == "url" || field == "doi" || field == "file" || field == "lccn")) {
|
||||
// var titleCase = isTitleCase(value); //figure this out before escaping all the characters
|
||||
// I hope these are all the escape characters! (except for < > which are handled later)
|
||||
value = value.replace(/[|~^\\{}]/g, mapEscape).replace(/[#$%&_]/g, "\\$&");
|
||||
// convert the HTML markup allowed in Zotero for rich text to TeX
|
||||
value = mapHTMLmarkup(value);
|
||||
// escape < > if mapHTMLmarkup did not convert some
|
||||
value = value.replace(/[<>]/g, mapEscape);
|
||||
|
||||
|
||||
// Case of words with uppercase characters in non-initial positions is preserved with braces.
|
||||
// we're looking at all unicode letters
|
||||
var protectCaps = new ZU.XRegExp("\\b\\p{Letter}+\\p{Uppercase_Letter}\\p{Letter}*", 'g');
|
||||
if (field != "pages") {
|
||||
value = ZU.XRegExp.replace(value, protectCaps, "{$0}");
|
||||
}
|
||||
|
||||
// Page ranges should use double dash
|
||||
if (field == "pages") {
|
||||
value = value.replace(/[-\u2012-\u2015\u2053]+/g, "--");
|
||||
}
|
||||
}
|
||||
// we write utf8
|
||||
// convert the HTML markup allowed in Zotero for rich text to TeX; excluding doi/url/file shouldn't be necessary, but better to be safe;
|
||||
if (!((field == "url") || (field == "doi") || (field == "file"))) value = mapHTMLmarkup(value);
|
||||
Zotero.write(value);
|
||||
if (!isMacro) Zotero.write("}");
|
||||
}
|
||||
|
||||
function mapHTMLmarkup(characters) {
|
||||
// converts the HTML markup allowed in Zotero for rich text to TeX
|
||||
// since < and > have already been escaped, we need this rather hideous code - I couldn't see a way around it though.
|
||||
// italics and bold
|
||||
characters = characters.replace(/\{\\textless\}i\{\\textgreater\}(((?!\{\\textless\}\/i{\\textgreater\}).)+)\{\\textless\}\/i{\\textgreater\}/g, "\\textit{$1}").replace(/\{\\textless\}b\{\\textgreater\}(((?!\{\\textless\}\/b{\\textgreater\}).)+)\{\\textless\}\/b{\\textgreater\}/g, "\\textbf{$1}");
|
||||
// sub and superscript
|
||||
characters = characters.replace(/\{\\textless\}sup\{\\textgreater\}(((?!\{\\textless\}\/sup\{\\textgreater\}).)+)\{\\textless\}\/sup{\\textgreater\}/g, "$^{\\textrm{$1}}$").replace(/\{\\textless\}sub\{\\textgreater\}(((?!\{\\textless\}\/sub\{\\textgreater\}).)+)\{\\textless\}\/sub\{\\textgreater\}/g, "$_{\\textrm{$1}}$");
|
||||
// two variants of small caps
|
||||
characters = characters.replace(/\{\\textless\}span\sstyle="small-caps"\{\\textgreater\}(((?!\{\\textless\}\/span\{\\textgreater\}).)+)\{\\textless\}\/span{\\textgreater\}/g, "\\textsc{$1}").replace(/\{\\textless\}sc\{\\textgreater\}(((?!\{\\textless\}\/sc\{\\textgreater\}).)+)\{\\textless\}\/sc\{\\textgreater\}/g, "\\textsc{$1}");
|
||||
return characters;
|
||||
}
|
||||
|
||||
function mapEscape(character) {
|
||||
return alwaysMap[character];
|
||||
}
|
||||
|
||||
// a little substitution function for BibTeX keys, where we don't want LaTeX
|
||||
// escaping, but we do want to preserve the base characters
|
||||
|
||||
function tidyAccents(s) {
|
||||
var r = s.toLowerCase();
|
||||
|
||||
// XXX Remove conditional when we drop Zotero 2.1.x support
|
||||
// This is supported in Zotero 3.0 and higher
|
||||
if (ZU.removeDiacritics !== undefined) {
|
||||
r = ZU.removeDiacritics(r, true);
|
||||
}
|
||||
else {
|
||||
// We fall back on the replacement list we used previously
|
||||
r = r.replace(new RegExp("[ä]", 'g'), "ae");
|
||||
r = r.replace(new RegExp("[ö]", 'g'), "oe");
|
||||
r = r.replace(new RegExp("[ü]", 'g'), "ue");
|
||||
r = r.replace(new RegExp("[àáâãå]", 'g'), "a");
|
||||
r = r.replace(new RegExp("æ", 'g'), "ae");
|
||||
r = r.replace(new RegExp("ç", 'g'), "c");
|
||||
r = r.replace(new RegExp("[èéêë]", 'g'), "e");
|
||||
r = r.replace(new RegExp("[ìíîï]", 'g'), "i");
|
||||
r = r.replace(new RegExp("ñ", 'g'), "n");
|
||||
r = r.replace(new RegExp("[òóôõ]", 'g'), "o");
|
||||
r = r.replace(new RegExp("œ", 'g'), "oe");
|
||||
r = r.replace(new RegExp("[ùúû]", 'g'), "u");
|
||||
r = r.replace(new RegExp("[ýÿ]", 'g'), "y");
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
var numberRe = /^[0-9]+/;
|
||||
// Below is a list of words that should not appear as part of the citation key
|
||||
// it includes the indefinite articles of English, German, French and Spanish, as well as a small set of English prepositions whose
|
||||
// force is more grammatical than lexical, i.e. which are likely to strike many as 'insignificant'.
|
||||
// The assumption is that most who want a title word in their key would prefer the first word of significance.
|
||||
var citeKeyTitleBannedRe = /\b(a|an|the|some|from|on|in|to|of|do|with|der|die|das|ein|eine|einer|eines|einem|einen|un|une|la|le|l'|les|el|las|los|al|uno|una|unos|unas|de|des|del|d')(\s+|\b)|(<\/?(i|b|sup|sub|sc|span style="small-caps"|span)>)/g;
|
||||
var citeKeyConversionsRe = /%([a-zA-Z])/;
|
||||
|
||||
var citeKeyConversions = {
|
||||
a: function (flags, item) {
|
||||
if (item.creators && item.creators[0] && item.creators[0].lastName) {
|
||||
return item.creators[0].lastName.toLowerCase().replace(/ /g, "_").replace(/,/g, "");
|
||||
}
|
||||
return "noauthor";
|
||||
},
|
||||
t: function (flags, item) {
|
||||
if (item.title) {
|
||||
return item.title.toLowerCase().replace(citeKeyTitleBannedRe, "").split(/\s+/g)[0];
|
||||
}
|
||||
return "notitle";
|
||||
},
|
||||
y: function (flags, item) {
|
||||
if (item.date) {
|
||||
var date = Zotero.Utilities.strToDate(item.date);
|
||||
if (date.year && numberRe.test(date.year)) {
|
||||
return date.year;
|
||||
}
|
||||
}
|
||||
return "nodate";
|
||||
}
|
||||
};
|
||||
|
||||
// checks whether an item contains any creator of type ctype
|
||||
function creatorCheck(item, ctype) {
|
||||
if (item.creators && item.creators.length) {
|
||||
for (var i = 0; i < item.creators.length; i++) {
|
||||
if (item.creators[i].creatorType == ctype) {
|
||||
return true; // found a ctype creator
|
||||
}
|
||||
}
|
||||
}
|
||||
// didn't find any ctype creator (or no creators at all)
|
||||
return false;
|
||||
}
|
||||
|
||||
function buildCiteKey(item, extraFields, citekeys) {
|
||||
if (extraFields) {
|
||||
const citationKey = extraFields.findIndex(field => field.field && field.value && field.field.toLowerCase() === 'citation key');
|
||||
if (citationKey >= 0) return extraFields.splice(citationKey, 1)[0].value;
|
||||
}
|
||||
|
||||
if (item.citationKey) return item.citationKey;
|
||||
|
||||
var basekey = "";
|
||||
var counter = 0;
|
||||
var citeKeyFormatRemaining = citeKeyFormat;
|
||||
while (citeKeyConversionsRe.test(citeKeyFormatRemaining)) {
|
||||
if (counter > 100) {
|
||||
Zotero.debug("Pathological BibTeX format: " + citeKeyFormat);
|
||||
break;
|
||||
}
|
||||
var m = citeKeyFormatRemaining.match(citeKeyConversionsRe);
|
||||
if (m.index > 0) {
|
||||
// add data before the conversion match to basekey
|
||||
basekey += citeKeyFormatRemaining.substr(0, m.index);
|
||||
}
|
||||
var flags = ""; // for now
|
||||
var f = citeKeyConversions[m[1]];
|
||||
if (typeof (f) == "function") {
|
||||
var value = f(flags, item);
|
||||
Zotero.debug("Got value " + value + " for %" + m[1]);
|
||||
// add conversion to basekey
|
||||
basekey += value;
|
||||
}
|
||||
citeKeyFormatRemaining = citeKeyFormatRemaining.substr(m.index + m.length);
|
||||
counter++;
|
||||
}
|
||||
if (citeKeyFormatRemaining.length > 0) {
|
||||
basekey += citeKeyFormatRemaining;
|
||||
}
|
||||
|
||||
// for now, remove any characters not explicitly known to be allowed;
|
||||
// we might want to allow UTF-8 citation keys in the future, depending
|
||||
// on implementation support.
|
||||
//
|
||||
// no matter what, we want to make sure we exclude
|
||||
// " # % ' ( ) , = { } ~ and backslash
|
||||
// however, we want to keep the base characters
|
||||
|
||||
basekey = tidyAccents(basekey);
|
||||
// use legacy pattern for all old items to not break existing usages
|
||||
var citeKeyCleanRe = /[^a-z0-9!$&*+\-./:;<>?[\]^_`|]+/g;
|
||||
// but use the simple pattern for all newly added items
|
||||
// or always if the hiddenPref is set
|
||||
// extensions.zotero.translators.BibLaTeX.export.simpleCitekey
|
||||
if ((Zotero.getHiddenPref && Zotero.getHiddenPref('BibLaTeX.export.simpleCitekey'))
|
||||
|| (item.dateAdded && parseInt(item.dateAdded.substr(0, 4)) >= 2020)) {
|
||||
citeKeyCleanRe = /[^a-z0-9_-]/g;
|
||||
}
|
||||
basekey = basekey.replace(citeKeyCleanRe, "");
|
||||
var citekey = basekey;
|
||||
var i = 0;
|
||||
while (citekeys[citekey]) {
|
||||
i++;
|
||||
citekey = basekey + "-" + i;
|
||||
}
|
||||
citekeys[citekey] = true;
|
||||
return citekey;
|
||||
}
|
||||
|
||||
var filePathSpecialChars = '\\\\:;{}$'; // $ for Mendeley
|
||||
var encodeFilePathRE = new RegExp('[' + filePathSpecialChars + ']', 'g');
|
||||
|
||||
function encodeFilePathComponent(value) {
|
||||
if (!value) return '';
|
||||
return value.replace(encodeFilePathRE, "\\$&");
|
||||
}
|
||||
|
||||
// We strip out {} in general, because \{ and \} break BibLaTeX
|
||||
function cleanFilePath(str) {
|
||||
if (!str) return '';
|
||||
return str.replace(/(?:\s*[{}]+)+\s*/g, ' ');
|
||||
}
|
||||
|
||||
function doExport() {
|
||||
// Zotero.write("% biblatex export generated by Zotero "+Zotero.Utilities.getVersion());
|
||||
// to make sure the BOM gets ignored
|
||||
Zotero.write("\n");
|
||||
|
||||
var first = true;
|
||||
var citekeys = {};
|
||||
var item;
|
||||
// eslint-disable-next-line no-cond-assign
|
||||
while (item = Zotero.nextItem()) {
|
||||
// don't export standalone notes and attachments
|
||||
if (item.itemType == "note" || item.itemType == "attachment") continue;
|
||||
|
||||
var noteused = false; // a switch for keeping track whether the
|
||||
// field "note" has been written to
|
||||
// determine type
|
||||
var type = zotero2biblatexTypeMap[item.itemType];
|
||||
if (typeof (type) == "function") {
|
||||
type = type(item);
|
||||
}
|
||||
|
||||
// inbook is reasonable at times, using a bookauthor should
|
||||
// indicate this
|
||||
if (item.itemType == "bookSection"
|
||||
&& creatorCheck(item, "bookAuthor")) type = "inbook";
|
||||
|
||||
// a book without author but with editors is a collection
|
||||
if (item.itemType == "book" && !creatorCheck(item, "author")
|
||||
&& creatorCheck(item, "editor")) type = "collection";
|
||||
|
||||
// biblatex recommends us to use mvbook for multi-volume book
|
||||
// i.e. a book with "# of vols" filled
|
||||
if (type == "book" && item.numberOfVolumes) type = "mvbook";
|
||||
|
||||
if (!type) type = "misc";
|
||||
|
||||
var extraFields = item.extra ? parseExtraFields(item.extra) : null;
|
||||
var citekey = buildCiteKey(item, extraFields, citekeys);
|
||||
|
||||
// write citation key (removed the comma)
|
||||
Zotero.write((first ? "" : "\n\n") + "@" + type + "{" + citekey);
|
||||
first = false;
|
||||
|
||||
for (var field in fieldMap) {
|
||||
if (item[fieldMap[field]]) {
|
||||
writeField(field, item[fieldMap[field]]);
|
||||
}
|
||||
}
|
||||
|
||||
// Fields needing special treatment and not easily translatable via fieldMap
|
||||
// e.g. where fieldname translation is dependent upon type, or special transformations
|
||||
// has to be made
|
||||
|
||||
// all kinds of numbers except patents, which need post-processing
|
||||
if (item.reportNumber || item.seriesNumber || item.billNumber || item.episodeNumber || item.number && !item.patentNumber) {
|
||||
writeField("number", item.reportNumber || item.seriesNumber || item.billNumber || item.episodeNumber || item.number);
|
||||
}
|
||||
|
||||
// split numeric and nonnumeric issue specifications (for journals) into "number" and "issue"
|
||||
if (item.issue) { // issue
|
||||
var jnumber = parseInt(item.issue);
|
||||
if (!isNaN(jnumber)) {
|
||||
writeField("number", jnumber);
|
||||
}
|
||||
else {
|
||||
writeField("issue", item.issue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// publicationTitles and special titles
|
||||
if (item.publicationTitle) {
|
||||
if (item.itemType == "bookSection" || item.itemType == "conferencePaper" || item.itemType == "dictionaryEntry" || item.itemType == "encyclopediaArticle") {
|
||||
writeField("booktitle", item.publicationTitle);
|
||||
}
|
||||
else if (item.itemType == "magazineArticle" || item.itemType == "newspaperArticle") {
|
||||
writeField("journaltitle", item.publicationTitle);
|
||||
}
|
||||
else if (item.itemType == "journalArticle") {
|
||||
if (Zotero.getOption("useJournalAbbreviation") && item.journalAbbreviation) {
|
||||
writeField("journaltitle", item.journalAbbreviation);
|
||||
}
|
||||
else {
|
||||
writeField("journaltitle", item.publicationTitle);
|
||||
writeField("shortjournal", item.journalAbbreviation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.websiteTitle || item.forumTitle || item.blogTitle || item.programTitle) {
|
||||
writeField("titleaddon", item.websiteTitle || item.forumTitle || item.blogTitle || item.programTitle);
|
||||
}
|
||||
|
||||
|
||||
// publishers
|
||||
if (item.publisher) {
|
||||
if (item.itemType == "thesis" || item.itemType == "report") {
|
||||
writeField("institution", item.publisher);
|
||||
}
|
||||
else {
|
||||
writeField("publisher", item.publisher);
|
||||
}
|
||||
}
|
||||
|
||||
// things concerning "type"
|
||||
if (item.itemType == "letter") {
|
||||
if (item.letterType) {
|
||||
writeField("type", item.letterType);
|
||||
}
|
||||
else {
|
||||
writeField("type", "Letter"); // this isn't optimal, perhaps later versions of biblatex will add some suitable localization key
|
||||
}
|
||||
}
|
||||
else if (item.itemType == "email") {
|
||||
writeField("type", "E-mail");
|
||||
}
|
||||
else if (item.itemType == "thesis"
|
||||
&& (!item.thesisType || item.thesisType.search(/ph\.?d/i) != -1)) {
|
||||
writeField("type", "phdthesis");
|
||||
}
|
||||
else if (item.manuscriptType || item.thesisType || item.websiteType || item.presentationType || item.reportType || item.mapType) {
|
||||
writeField("type", item.manuscriptType || item.thesisType || item.websiteType || item.presentationType || item.reportType || item.mapType);
|
||||
}
|
||||
else if (item.itemType == "patent") {
|
||||
// see https://tex.stackexchange.com/questions/447383/biblatex-biber-patent-citation-support-based-on-zoterobbl-output/447508
|
||||
if (!item.patentNumber) {
|
||||
writeField("type", "patent");
|
||||
}
|
||||
else if (item.patentNumber.startsWith("US")) {
|
||||
writeField("type", "patentus");
|
||||
writeField("number", item.patentNumber.replace(/^US/, ""));
|
||||
}
|
||||
else if (item.patentNumber.startsWith("EP")) {
|
||||
writeField("type", "patenteu");
|
||||
writeField("number", item.patentNumber.replace(/^EP/, ""));
|
||||
}
|
||||
else if (item.patentNumber.startsWith("GB")) {
|
||||
writeField("type", "patentuk");
|
||||
writeField("number", item.patentNumber.replace(/^GB/, ""));
|
||||
}
|
||||
else if (item.patentNumber.startsWith("DE")) {
|
||||
writeField("type", "patentde");
|
||||
writeField("number", item.patentNumber.replace(/^DE/, ""));
|
||||
}
|
||||
else if (item.patentNumber.startsWith("FR")) {
|
||||
writeField("type", "patentfr");
|
||||
writeField("number", item.patentNumber.replace(/^FR/, ""));
|
||||
}
|
||||
else {
|
||||
writeField("type", "patent");
|
||||
writeField("number", item.patentNumber);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.presentationType || item.manuscriptType) {
|
||||
writeField("howpublished", item.presentationType || item.manuscriptType);
|
||||
}
|
||||
|
||||
// case of specific eprint-archives in archive-fields
|
||||
if (item.archive && item.archiveLocation) {
|
||||
if (item.archive == "arXiv" || item.archive == "arxiv") {
|
||||
writeField("eprinttype", "arxiv");
|
||||
writeField("eprint", item.archiveLocation);
|
||||
if (item.callNumber) { // assume call number is used for arxiv class
|
||||
writeField("eprintclass", item.callNumber);
|
||||
}
|
||||
}
|
||||
else if (item.archive == "JSTOR" || item.archive == "jstor") {
|
||||
writeField("eprinttype", "jstor");
|
||||
writeField("eprint", item.archiveLocation);
|
||||
}
|
||||
else if (item.archive == "PubMed" || item.archive == "pubmed") {
|
||||
writeField("eprinttype", "pubmed");
|
||||
writeField("eprint", item.archiveLocation);
|
||||
}
|
||||
else if (item.archive == "HDL" || item.archive == "hdl") {
|
||||
writeField("eprinttype", "hdl");
|
||||
writeField("eprint", item.archiveLocation);
|
||||
}
|
||||
else if (item.archive == "googlebooks" || item.archive == "Google Books") {
|
||||
writeField("eprinttype", "googlebooks");
|
||||
writeField("eprint", item.archiveLocation);
|
||||
}
|
||||
}
|
||||
|
||||
// presentations have a meetingName field which we want to
|
||||
// map to note
|
||||
if (item.meetingName) {
|
||||
writeField("note", item.meetingName);
|
||||
noteused = true;
|
||||
}
|
||||
|
||||
if (item.creators && item.creators.length) {
|
||||
// split creators into subcategories
|
||||
var author = "";
|
||||
var bookauthor = "";
|
||||
var commentator = "";
|
||||
var editor = "";
|
||||
var editora = "";
|
||||
var editorb = "";
|
||||
var holder = "";
|
||||
var translator = "";
|
||||
var noEscape = false;
|
||||
|
||||
for (let i = 0; i < item.creators.length; i++) {
|
||||
var creator = item.creators[i];
|
||||
var creatorString;
|
||||
|
||||
if (creator.firstName) {
|
||||
var fname = creator.firstName.split(/\s*,!?\s*/);
|
||||
fname.push(fname.shift()); // If we have a Jr. part(s), it should precede first name
|
||||
creatorString = creator.lastName + ", " + fname.join(', ');
|
||||
}
|
||||
else {
|
||||
creatorString = creator.lastName;
|
||||
}
|
||||
|
||||
creatorString = creatorString.replace(/[|<>~^\\{}]/g, mapEscape)
|
||||
.replace(/([#$%&_])/g, "\\$1");
|
||||
|
||||
if (creator.fieldMode == true) { // fieldMode true, assume corporate author
|
||||
creatorString = "{" + creatorString + "}";
|
||||
noEscape = true;
|
||||
}
|
||||
else {
|
||||
creatorString = creatorString.replace(/ (and) /gi, ' {$1} ');
|
||||
}
|
||||
|
||||
if (creator.creatorType == "author" || creator.creatorType == "interviewer" || creator.creatorType == "inventor" || creator.creatorType == "director" || creator.creatorType == "programmer" || creator.creatorType == "artist" || creator.creatorType == "podcaster" || creator.creatorType == "presenter") {
|
||||
author += " and " + creatorString;
|
||||
}
|
||||
else if (creator.creatorType == "bookAuthor") {
|
||||
bookauthor += " and " + creatorString;
|
||||
}
|
||||
else if (creator.creatorType == "commenter") {
|
||||
commentator += " and " + creatorString;
|
||||
}
|
||||
else if (creator.creatorType == "editor") {
|
||||
editor += " and " + creatorString;
|
||||
}
|
||||
else if (creator.creatorType == "translator") {
|
||||
translator += " and " + creatorString;
|
||||
}
|
||||
else if (creator.creatorType == "seriesEditor") { // let's call them redacors
|
||||
editorb += " and " + creatorString;
|
||||
}
|
||||
else { // the rest into editora with editoratype = collaborator
|
||||
editora += " and " + creatorString;
|
||||
}
|
||||
}
|
||||
|
||||
// remove first " and " string
|
||||
if (author) {
|
||||
writeField("author", author.substr(5), false, noEscape);
|
||||
}
|
||||
if (bookauthor) {
|
||||
writeField("bookauthor", bookauthor.substr(5), false, noEscape);
|
||||
}
|
||||
if (commentator) {
|
||||
writeField("commentator", commentator.substr(5), false, noEscape);
|
||||
}
|
||||
if (editor) {
|
||||
writeField("editor", editor.substr(5), false, noEscape);
|
||||
}
|
||||
if (editora) {
|
||||
writeField("editora", editora.substr(5), false, noEscape);
|
||||
writeField("editoratype", "collaborator");
|
||||
}
|
||||
if (editorb) {
|
||||
writeField("editorb", editorb.substr(5), false, noEscape);
|
||||
writeField("editorbtype", "redactor");
|
||||
}
|
||||
if (holder) {
|
||||
writeField("holder", holder.substr(5), false, noEscape);
|
||||
}
|
||||
if (translator) {
|
||||
writeField("translator", translator.substr(5), false, noEscape);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.accessDate) {
|
||||
writeField("urldate", Zotero.Utilities.strToISO(item.accessDate));
|
||||
}
|
||||
|
||||
// TODO enable handling of date ranges when that's added to zotero
|
||||
if (item.date) {
|
||||
writeField("date", Zotero.Utilities.strToISO(item.date));
|
||||
}
|
||||
|
||||
// Map Languages to biblatex-field "langid" (used for
|
||||
// hyphenation with a correct setting of the "autolang" option)
|
||||
// if possible. See babelLanguageMap above for languagecodes to use
|
||||
if (item.language) {
|
||||
var langcode = item.language.match(/^([a-z]{2,3})(?:[^a-z](.+))?$/i); // not too strict
|
||||
if (langcode) {
|
||||
var lang = babelLanguageMap[langcode[1]];
|
||||
if (typeof lang == 'string') {
|
||||
// if there are no variants for this language
|
||||
writeField("langid", lang);
|
||||
}
|
||||
else if (typeof lang == 'object') {
|
||||
var variant = lang[langcode[2]];
|
||||
if (variant) {
|
||||
writeField("langid", variant);
|
||||
}
|
||||
else {
|
||||
writeField("langid", lang[""]); // use default variant
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (extraFields) {
|
||||
// Export identifiers
|
||||
// Dedicated fields
|
||||
for (let i = 0; i < extraFields.length; i++) {
|
||||
var rec = extraFields[i];
|
||||
if (!rec.field) continue;
|
||||
|
||||
if (!revExtraIds[rec.field] && !revEprintIds[rec.field]) continue;
|
||||
|
||||
var value = rec.value.trim();
|
||||
if (!value) continue;
|
||||
|
||||
var label = revExtraIds[rec.field];
|
||||
if (label) {
|
||||
writeField(label, '{' + value + '}', true);
|
||||
}
|
||||
else {
|
||||
label = revEprintIds[rec.field];
|
||||
if (label) {
|
||||
writeField('eprinttype', label);
|
||||
writeField('eprint', '{' + value + '}', true);
|
||||
}
|
||||
}
|
||||
extraFields.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
|
||||
var extra = extraFieldsToString(extraFields);
|
||||
if (extra && !noteused) writeField("note", extra);
|
||||
}
|
||||
|
||||
if (item.tags && item.tags.length) {
|
||||
var tagString = "";
|
||||
for (let i = 0; i < item.tags.length; i++) {
|
||||
tagString += ", " + item.tags[i].tag;
|
||||
}
|
||||
writeField("keywords", tagString.substr(2));
|
||||
}
|
||||
|
||||
|
||||
if (item.notes && Zotero.getOption("exportNotes")) {
|
||||
for (let i = 0; i < item.notes.length; i++) {
|
||||
var note = item.notes[i];
|
||||
writeField("annotation", Zotero.Utilities.unescapeHTML(note.note));
|
||||
}
|
||||
}
|
||||
|
||||
if (item.attachments) {
|
||||
var attachmentString = "";
|
||||
|
||||
for (let i = 0; i < item.attachments.length; i++) {
|
||||
var attachment = item.attachments[i];
|
||||
var title = cleanFilePath(attachment.title),
|
||||
path = null;
|
||||
|
||||
if (Zotero.getOption("exportFileData") && attachment.saveFile) {
|
||||
path = cleanFilePath(attachment.defaultPath);
|
||||
attachment.saveFile(path, true);
|
||||
}
|
||||
else if (attachment.localPath) {
|
||||
path = cleanFilePath(attachment.localPath);
|
||||
}
|
||||
|
||||
if (path) {
|
||||
attachmentString += ";" + encodeFilePathComponent(title)
|
||||
+ ":" + encodeFilePathComponent(path)
|
||||
+ ":" + encodeFilePathComponent(attachment.mimeType);
|
||||
}
|
||||
}
|
||||
|
||||
if (attachmentString) {
|
||||
writeField("file", attachmentString.substr(1));
|
||||
}
|
||||
}
|
||||
|
||||
Zotero.write(",\n}");
|
||||
}
|
||||
|
||||
Zotero.write("\n");
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
4236
translators/BibTeX.js
Normal file
4236
translators/BibTeX.js
Normal file
File diff suppressed because it is too large
Load Diff
216
translators/Biblio.com.js
Normal file
216
translators/Biblio.com.js
Normal file
@@ -0,0 +1,216 @@
|
||||
{
|
||||
"translatorID": "9932d1a7-cc6d-4d83-8462-8f6658b13dc0",
|
||||
"label": "Biblio.com",
|
||||
"creator": "Adam Crymble, Michael Berkowitz, Sebastian Karcher, and Abe Jellinek",
|
||||
"target": "^https?://www\\.biblio\\.com/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-07-14 21:52:42"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2021 Abe Jellinek
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/book/')) {
|
||||
return "book";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('h2.title > a[href*="/book/"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, _url) {
|
||||
let item = new Zotero.Item('book');
|
||||
|
||||
for (let keyElem of doc.querySelectorAll('#d-book-details dt')) {
|
||||
let key = ZU.trimInternal(keyElem.textContent);
|
||||
let value = keyElem.nextElementSibling.textContent;
|
||||
|
||||
switch (key) {
|
||||
case 'Title':
|
||||
item.title = value.replace(/\.\s*$/, '');
|
||||
break;
|
||||
case 'Author':
|
||||
for (let name of value.split(';')) {
|
||||
item.creators.push(ZU.cleanAuthor(name, 'author', true));
|
||||
}
|
||||
break;
|
||||
case 'Edition':
|
||||
item.edition = value;
|
||||
break;
|
||||
case 'Publisher':
|
||||
item.publisher = value;
|
||||
break;
|
||||
case 'Place of Publication':
|
||||
item.place = value;
|
||||
break;
|
||||
case 'Date published':
|
||||
case 'First published':
|
||||
case 'This edition first published':
|
||||
item.date = ZU.strToISO(value);
|
||||
break;
|
||||
case 'ISBN 10':
|
||||
case 'ISBN 13':
|
||||
item.ISBN = ZU.cleanISBN(value);
|
||||
break;
|
||||
default:
|
||||
if (!item.date && /\bpublished\b/i.test(key)) {
|
||||
// handle odd date labels, just in case
|
||||
item.date = ZU.strToISO(value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
item.url = attr(doc, 'link[rel="canonical"]', 'href');
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.biblio.com/search.php?keyisbn=dickens&stage=1",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.biblio.com/book/through-year-dickens-compiled-his-eldest/d/29965287",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Through The Year With Dickens. Compiled by his Eldest Daughter",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Charles",
|
||||
"lastName": "Dickens",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1909",
|
||||
"edition": "First American",
|
||||
"libraryCatalog": "Biblio.com",
|
||||
"place": "Boston, USA",
|
||||
"publisher": "DeWolfe, Fiske & Co",
|
||||
"url": "https://www.biblio.com/book/through-year-dickens-compiled-his-eldest/d/29965287",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.biblio.com/book/charming-children-dickens-stories-dickens-charles/d/1397028696",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Charming Children of Dickens' Stories",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Charles",
|
||||
"lastName": "Dickens",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Angela",
|
||||
"lastName": "Dickens",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1906",
|
||||
"libraryCatalog": "Biblio.com",
|
||||
"place": "Chicago",
|
||||
"publisher": "John A. Hertel Company",
|
||||
"url": "https://www.biblio.com/book/charming-children-dickens-stories-dickens-charles/d/1397028696",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.biblio.com/book/birds-without-wings-bernieres-louis/d/920369973",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Birds Without Wings",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "LOUIS",
|
||||
"lastName": "DE BERNIERES",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2005-06-28",
|
||||
"ISBN": "9781400079322",
|
||||
"libraryCatalog": "Biblio.com",
|
||||
"place": "New York",
|
||||
"publisher": "Vintage",
|
||||
"url": "https://www.biblio.com/book/birds-without-wings-bernieres-louis/d/920369973",
|
||||
"attachments": [],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
1166
translators/Bibliontology RDF.js
Normal file
1166
translators/Bibliontology RDF.js
Normal file
File diff suppressed because it is too large
Load Diff
213
translators/Biblioteca Nacional de Maestros.js
Normal file
213
translators/Biblioteca Nacional de Maestros.js
Normal file
@@ -0,0 +1,213 @@
|
||||
{
|
||||
"translatorID": "b383df35-15e7-43ee-acd9-88fd62669083",
|
||||
"label": "Biblioteca Nacional de Maestros",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://www\\.bnm\\.me\\.gov\\.ar/catalogo",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2020-06-22 00:23:44"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2020 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
// We'll go with Book throughout for simplicity's sake
|
||||
if (/\/Record\/\d+/.test(url)) {
|
||||
return "book";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('.result div[class*="resultItemLine"]>a.title[href*="/Record/"]');
|
||||
for (let row of rows) {
|
||||
let href = row.href;
|
||||
let title = ZU.trimInternal(row.textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (items) scrape(Object.keys(items));
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape([url]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function constructMARCurls(urls) {
|
||||
let MARCurls = [];
|
||||
for (let url of urls) {
|
||||
url = url.replace(/\/(Details|Holdings)([#?].*)?/, ""); // remove panels
|
||||
MARCurls.push(url + "/Export?style=MARCXML");
|
||||
}
|
||||
return MARCurls;
|
||||
}
|
||||
|
||||
|
||||
function scrape(urls) {
|
||||
let MARCurls = constructMARCurls(urls);
|
||||
// Z.debug(MARCurls);
|
||||
ZU.doGet(MARCurls, function(text) {
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
// Z.debug(text);
|
||||
// MARC XML
|
||||
translator.setTranslator("edd87d07-9194-42f8-b2ad-997c4c7deefd");
|
||||
translator.setString(text);
|
||||
translator.translate();
|
||||
});
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bnm.me.gov.ar/catalogo/Record/000042859/Details",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Los tests: manual de pruebas psicométricas de inteligencia y de aptitudes",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Béla",
|
||||
"lastName": "Szekely",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Alfredo D.",
|
||||
"lastName": "Calcagno",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1950",
|
||||
"callNumber": "37.048",
|
||||
"edition": "2ª ed., con corr. y ampl",
|
||||
"libraryCatalog": "Biblioteca Nacional de Maestros",
|
||||
"numPages": "2",
|
||||
"place": "Buenos Aires",
|
||||
"publisher": "Editorial Kapelusz",
|
||||
"series": "Biblioteca de Ciencias de la Educación",
|
||||
"seriesNumber": "v. 3",
|
||||
"shortTitle": "Los tests",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "EVALUACION DEL ALUMNO"
|
||||
},
|
||||
{
|
||||
"tag": "PSICOMETRIA"
|
||||
},
|
||||
{
|
||||
"tag": "PSICOMETRIA"
|
||||
},
|
||||
{
|
||||
"tag": "TESTS DE INTELIGENCIA"
|
||||
},
|
||||
{
|
||||
"tag": "TESTS DE INTELIGENCIA"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bnm.me.gov.ar/catalogo/Search/Results?join=AND&bool0%5B%5D=AND&lookfor0%5B%5D=borges&type0%5B%5D=AllFields&lookfor0%5B%5D=&type0%5B%5D=AllFields&lookfor0%5B%5D=&type0%5B%5D=AllFields&limit%5B%5D=&illustration=-1&daterange%5B%5D=publishDate&publishDatefrom=&publishDateto=&submit=Buscar",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bnm.me.gov.ar/catalogo/Record/000074329",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "Borges: cuentos",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Jorge Luis",
|
||||
"lastName": "Borges",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "María Adela",
|
||||
"lastName": "Renard",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1998",
|
||||
"ISBN": "9789501323016",
|
||||
"callNumber": "860(82)-3",
|
||||
"libraryCatalog": "Biblioteca Nacional de Maestros",
|
||||
"numPages": "200",
|
||||
"place": "Buenos Aires",
|
||||
"publisher": "Kapelusz",
|
||||
"series": "Grandes obras de la literatura universal",
|
||||
"shortTitle": "Borges",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "ANTOLOGIAS"
|
||||
},
|
||||
{
|
||||
"tag": "CRIOLLISMO"
|
||||
},
|
||||
{
|
||||
"tag": "CUENTOS FANTASTICOS"
|
||||
},
|
||||
{
|
||||
"tag": "CUENTOS POLICIALES"
|
||||
},
|
||||
{
|
||||
"tag": "LITERATURA DE ARGENTINA"
|
||||
}
|
||||
],
|
||||
"notes": [
|
||||
{
|
||||
"note": "Contiene referencias bibliográficas en p. 195"
|
||||
}
|
||||
],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"translatorID": "1eb5eb03-26ab-4015-bd0d-65487734744a",
|
||||
"translatorType": 4,
|
||||
"label": "Bibliotheque et Archives Nationale du Quebec (Pistard)",
|
||||
"creator": "Adam Crymble",
|
||||
"target": "^https?://pistard\\.banq\\.qc\\.ca",
|
||||
"minVersion": "1.0.0b4.r5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"lastUpdated": "2008-08-06 17:00:00"
|
||||
}
|
||||
|
||||
function detectWeb (doc, url) {
|
||||
|
||||
if (doc.title.match("Liste détaillée des fonds")) {
|
||||
return "multiple";
|
||||
} else if (doc.title.match("Description fonds")) {
|
||||
return "book";
|
||||
}
|
||||
}
|
||||
|
||||
//Bibliotheque et Archives National du Quebec. Code by Adam Crymble
|
||||
|
||||
function associateData (newItem, dataTags, field, zoteroField) {
|
||||
if (dataTags[field]) {
|
||||
newItem[zoteroField] = dataTags[field];
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var namespace = doc.documentElement.namespaceURI;
|
||||
var nsResolver = namespace ? function(prefix) {
|
||||
if (prefix == 'x') return namespace; else return null;
|
||||
} : null;
|
||||
|
||||
var dataTags = new Object();
|
||||
var fieldTitle;
|
||||
var tagsContent= new Array();
|
||||
|
||||
var newItem = new Zotero.Item("book");
|
||||
|
||||
var headers = doc.evaluate('//strong', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var xPathCount = doc.evaluate('count (//strong)', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var contents = doc.evaluate('//div[@id="Content"]/div/table', doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
|
||||
var headersArray = new Array();
|
||||
var oneHeader = '';
|
||||
|
||||
if (xPathCount.numberValue > 1) {
|
||||
for (var i = 0; i < xPathCount.numberValue; i++) {
|
||||
fieldTitle = headers.iterateNext().textContent;
|
||||
headersArray.push(fieldTitle);
|
||||
}
|
||||
} else {
|
||||
oneHeader = (headers.iterateNext().textContent);
|
||||
}
|
||||
|
||||
var contentsArray = new Array();
|
||||
var j = 0;
|
||||
|
||||
if (oneHeader.length<1) {
|
||||
|
||||
for (var i = headersArray.length-1; i> -1; i--) {
|
||||
|
||||
var fieldIndex = contents.indexOf(headersArray[i]);
|
||||
var removeHeader = headersArray[i].length;
|
||||
|
||||
contentsArray.push(contents.substr(fieldIndex));
|
||||
contents = contents.substr(0, fieldIndex);
|
||||
fieldTitle = headersArray[i].replace(/\s+/g, '');
|
||||
|
||||
dataTags[fieldTitle] = contentsArray[j].substr(removeHeader).replace(/^\s*|\s+$/g, '');
|
||||
j++;
|
||||
}
|
||||
}
|
||||
Zotero.debug(dataTags);
|
||||
|
||||
if (dataTags["Titre,Dates,Quantité"]) {
|
||||
if (dataTags["Titre,Dates,Quantité"].match(/\n/)) {
|
||||
var splitTitle = dataTags["Titre,Dates,Quantité"].split(/\n/);
|
||||
if (splitTitle[0].match(/\w/)) {
|
||||
newItem.title = splitTitle[0].replace(/^\s*|\s+$/g, '');
|
||||
}
|
||||
for (var i = 0; i < splitTitle.length; i++) {
|
||||
if (splitTitle[i].match("/ ")) {
|
||||
var author = splitTitle[i].replace(/^\s*|\s+$/g, '').substr(2);
|
||||
newItem.creators.push({lastName: author, creatorType: "creator"});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newItem.title = doc.title;
|
||||
}
|
||||
|
||||
|
||||
var k = 0;
|
||||
if (dataTags["Termesrattachés"]) {
|
||||
|
||||
if (dataTags["Termesrattachés"].match(/\n/)) {
|
||||
tagsContent = dataTags["Termesrattachés"].split(/\n/);
|
||||
for (var i in tagsContent) {
|
||||
if (tagsContent[i].match(/\w/)) {
|
||||
newItem.tags[k] = tagsContent[i].replace(/^\s+|\s*$/g, '');
|
||||
k++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newItem.tags[0] = dataTags["Termesrattachés"];
|
||||
}
|
||||
}
|
||||
|
||||
associateData (newItem, dataTags, "Languedesdocuments", "language");
|
||||
associateData (newItem, dataTags, "Cote:", "callNumber");
|
||||
associateData (newItem, dataTags, "Collation", "pages");
|
||||
associateData (newItem, dataTags, "Centre:", "place");
|
||||
associateData (newItem, dataTags, "Portéeetcontenu", "abstractNote");
|
||||
|
||||
newItem.url = doc.location.href;
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var namespace = doc.documentElement.namespaceURI;
|
||||
var nsResolver = namespace ? function(prefix) {
|
||||
if (prefix == 'x') return namespace; else return null;
|
||||
} : null;
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
|
||||
var titles = doc.evaluate('//td[2]/a', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
|
||||
var next_title;
|
||||
while (next_title = titles.iterateNext()) {
|
||||
if (next_title.href.match("description_fonds")) {
|
||||
items[next_title.href] = next_title.textContent;
|
||||
}
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
ZU.processDocuments(Object.keys(items), scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
266
translators/Bibliotheque et Archives Nationales du Quebec.js
Normal file
266
translators/Bibliotheque et Archives Nationales du Quebec.js
Normal file
@@ -0,0 +1,266 @@
|
||||
{
|
||||
"translatorID": "59cce211-9d77-4cdd-876d-6229ea20367f",
|
||||
"translatorType": 4,
|
||||
"label": "Bibliothèque et Archives Nationales du Québec",
|
||||
"creator": "Adam Crymble",
|
||||
"target": "^https?://catalogue\\.banq\\.qc\\.ca/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"browserSupport": "gcsibv",
|
||||
"inRepository": true,
|
||||
"lastUpdated": "2015-06-29 17:02:02"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.title.match("Search")) {
|
||||
return "multiple";
|
||||
} else if (doc.title.match("Recherche")) {
|
||||
return "multiple";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("book")) {
|
||||
return "book";
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mmusic")) {
|
||||
return "book";
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("manalytic")) {
|
||||
return "book";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("msdisc")) {
|
||||
return "audioRecording";
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("msound")) {
|
||||
return "audioRecording";
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mscas")) {
|
||||
return "audioRecording";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mvdisc")) {
|
||||
return "videoRecording";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mpaint")) {
|
||||
return "artwork";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mserial")) {
|
||||
return "report";
|
||||
|
||||
} else if (doc.evaluate('//td[2]/a/img', doc, null, XPathResult.ANY_TYPE, null).iterateNext().src.match("mcomponent")) {
|
||||
return "newspaperArticle";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Bibliotheque et Archives National du Quebec. Code by Adam Crymble
|
||||
|
||||
function associateData (newItem, dataTags, field, zoteroField) {
|
||||
if (dataTags[field]) {
|
||||
newItem[zoteroField] = dataTags[field];
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var namespace = doc.documentElement.namespaceURI;
|
||||
var nsResolver = namespace ? function(prefix) {
|
||||
if (prefix == 'x') return namespace; else return null;
|
||||
} : null;
|
||||
|
||||
var dataTags = new Object();
|
||||
var fieldTitle;
|
||||
var contents;
|
||||
var descriptionField;
|
||||
var tagsContent= new Array();
|
||||
var inField = 0;
|
||||
|
||||
//determines media type
|
||||
if (detectWeb(doc, url) == "book") {
|
||||
var newItem = new Zotero.Item("book");
|
||||
descriptionField = "pages";
|
||||
} else if (detectWeb(doc, url) == "audioRecording") {
|
||||
var newItem = new Zotero.Item("audioRecording");
|
||||
descriptionField = "runningTime";
|
||||
} else if (detectWeb(doc, url) == "videoRecording") {
|
||||
var newItem = new Zotero.Item("videoRecording");
|
||||
descriptionField = "runningTime";
|
||||
} else if (detectWeb(doc, url) == "artwork") {
|
||||
var newItem = new Zotero.Item("artwork");
|
||||
descriptionField = "artworkSize";
|
||||
} else if (detectWeb(doc, url) == "report") {
|
||||
var newItem = new Zotero.Item("report");
|
||||
descriptionField = "pages";
|
||||
} else if (detectWeb(doc, url) == "newspaperArticle") {
|
||||
var newItem = new Zotero.Item("newspaperArticle");
|
||||
descriptionField = "pages"
|
||||
}
|
||||
|
||||
//determines language
|
||||
var lang = doc.evaluate('//td[2]/a/img', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var langCount = doc.evaluate('count (//td[2]/a/img)', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var lang1 = lang.iterateNext().src;
|
||||
|
||||
if (langCount.numberValue > 1) {
|
||||
lang1 = lang.iterateNext().src;
|
||||
|
||||
if (lang1.match("lfre")) {
|
||||
newItem.language = "French";
|
||||
} else if (lang1.match("leng")) {
|
||||
newItem.language = "English";
|
||||
}
|
||||
}
|
||||
|
||||
//scraping XPaths
|
||||
var xPathHeadings = doc.evaluate('//td/table/tbody/tr/td[2]/b', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var xPathContents = doc.evaluate('//td[2]/table/tbody/tr/td/table/tbody/tr/td[4]', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var xPathCount = doc.evaluate('count (//td/table/tbody/tr/td[2]/b)', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
|
||||
if (doc.evaluate('//td/table/tbody/tr/td[2]/b', doc, nsResolver, XPathResult.ANY_TYPE, null)) {
|
||||
|
||||
for (i=0; i<xPathCount.numberValue; i++) {
|
||||
|
||||
fieldTitle = xPathHeadings.iterateNext().textContent.replace(/\s+/g, '');
|
||||
contents = xPathContents.iterateNext().textContent;
|
||||
|
||||
if (contents.match("[*]") && fieldTitle!= "Publisher" && fieldTitle!= "Éditeur") {
|
||||
var removeTagExcess = contents.indexOf("[");
|
||||
contents = contents.substr(0, removeTagExcess);
|
||||
}
|
||||
|
||||
if (fieldTitle == "Author" | fieldTitle == "Auteur") {
|
||||
fieldTitle = "Author";
|
||||
dataTags[fieldTitle] = (contents);
|
||||
var authorName = dataTags["Author"].split(",");
|
||||
authorName[0] = authorName[0].replace(/\s+/g, '');
|
||||
|
||||
dataTags["Author"] = (authorName[1] + (" ") + authorName[0]);
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(dataTags["Author"], "author"));
|
||||
|
||||
//publishing info
|
||||
} else if (fieldTitle == "Publisher" | fieldTitle == "Éditeur") {
|
||||
fieldTitle = "Publisher";
|
||||
|
||||
dataTags["Publisher"] = (contents);
|
||||
|
||||
if (dataTags["Publisher"].match(":")) {
|
||||
|
||||
var place1 = dataTags["Publisher"].split(":");
|
||||
dataTags["Place"] = place1[0].replace(/^\s*|\[|\]/g,'');
|
||||
|
||||
var publish = place1[1].split(",");
|
||||
dataTags["Publish"] = (publish[0].replace(/^\s*|\[|\]/g,''));
|
||||
|
||||
place1[1] = place1[1].replace(/^\s*|\s*$|\[|\]/g, '');
|
||||
if (place1[1].match("/?")) {
|
||||
var dateLength = place1[1].length-5;
|
||||
} else {
|
||||
var dateLength = place1[1].length-4;
|
||||
}
|
||||
dataTags["Date"] = place1[1].substr(dateLength);
|
||||
} else {
|
||||
dataTags["Date"] = (contents);
|
||||
}
|
||||
|
||||
//tags
|
||||
} else if (fieldTitle == "Subjects" | fieldTitle == "Sujets") {
|
||||
fieldTitle = "Subjects";
|
||||
tagsContent = contents.split("\n");
|
||||
|
||||
//source
|
||||
} else if (fieldTitle == "Source") {
|
||||
dataTags[fieldTitle] = (contents.replace(/^\s*|\s*$/g, ''));
|
||||
dataTags["Source"] = ("Source: " + dataTags["Source"]);
|
||||
Zotero.debug(doc.title);
|
||||
//normal
|
||||
} else {
|
||||
dataTags[fieldTitle] = (contents.replace(/^\s*|\s*$/g, ''));
|
||||
}
|
||||
}
|
||||
|
||||
//series
|
||||
if (fieldTitle == "Series" | fieldTitle == "Collection") {
|
||||
fieldTitle = "Series";
|
||||
dataTags[fieldTitle] = (contents.replace(/\s\s\s*/g, ''));
|
||||
}
|
||||
|
||||
//makes tags
|
||||
for (i = 0; i < tagsContent.length; i++) {
|
||||
if (tagsContent[i] != ("") && tagsContent[i] !=(" ")) {
|
||||
newItem.tags[i] = tagsContent[i];
|
||||
}
|
||||
}
|
||||
|
||||
associateData (newItem, dataTags, "Description", descriptionField);
|
||||
|
||||
associateData (newItem, dataTags, "Title", "title");
|
||||
associateData (newItem, dataTags, "Place", "place");
|
||||
associateData (newItem, dataTags, "Publish", "publisher");
|
||||
associateData (newItem, dataTags, "Date", "date");
|
||||
associateData (newItem, dataTags, "Source", "extra");
|
||||
associateData (newItem, dataTags, "ISBN", "ISBN");
|
||||
associateData (newItem, dataTags, "Localinf.", "rights");
|
||||
associateData (newItem, dataTags, "Series", "series");
|
||||
associateData (newItem, dataTags, "Notes", "abstractNote");
|
||||
associateData (newItem, dataTags, "Numbering", "reportNumber");
|
||||
|
||||
associateData (newItem, dataTags, "Titre", "title");
|
||||
associateData (newItem, dataTags, "Numérotation", "reportNumber");
|
||||
|
||||
}
|
||||
|
||||
newItem.url = doc.location.href;
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var namespace = doc.documentElement.namespaceURI;
|
||||
var nsResolver = namespace ? function(prefix) {
|
||||
if (prefix == 'x') return namespace; else return null;
|
||||
} : null;
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
var next_title = new Array();
|
||||
var links1 = new Array();
|
||||
var y = 0;
|
||||
var next_title1 = new Array();
|
||||
|
||||
var titlesCount = doc.evaluate('count (//p/table/tbody/tr/td/b)', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var numAndTitle= doc.evaluate('//p/table/tbody/tr/td/b', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var links = doc.evaluate('//p/table/tbody/tr/td/a[img]', doc, nsResolver, XPathResult.ANY_TYPE, null);
|
||||
var multipleTest = 0;
|
||||
|
||||
for (j=0; j < titlesCount.numberValue; j++) {
|
||||
|
||||
next_title[j] = numAndTitle.iterateNext().textContent;
|
||||
next_title[j] = next_title[j].substr(0, next_title[j].length-1);
|
||||
|
||||
if (/^\d*$/.test(next_title[j])) {
|
||||
multipleTest = 0;
|
||||
} else if (multipleTest < 1) {
|
||||
multipleTest++;
|
||||
next_title1[y] = next_title[j];
|
||||
y++;
|
||||
Zotero.debug(next_title1[0]);
|
||||
|
||||
} else if (multipleTest > 1) {
|
||||
multipleTest = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < 10; j++) {
|
||||
links1[j] = links.iterateNext().href;
|
||||
//Zotero.debug(links1[0]);
|
||||
items[links1] = next_title1[j];
|
||||
}
|
||||
|
||||
|
||||
Zotero.selectItems(items, function(items) {
|
||||
if (!items) return true;
|
||||
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
ZU.processDocuments([url], scrape);
|
||||
}
|
||||
}
|
||||
872
translators/Bibliotheque nationale de France.js
Normal file
872
translators/Bibliotheque nationale de France.js
Normal file
@@ -0,0 +1,872 @@
|
||||
{
|
||||
"translatorID": "47533cd7-ccaa-47a7-81bb-71c45e68a74d",
|
||||
"label": "Bibliothèque nationale de France",
|
||||
"creator": "Florian Ziche, Sylvain Machefert",
|
||||
"target": "^https?://[^/]*catalogue\\.bnf\\.fr",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-01-09 03:40:58"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2010-2024 Florian Ziche, Sylvain Machefert
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
/* Bnf namespace. */
|
||||
var BnfClass = function () {
|
||||
// Private members
|
||||
|
||||
/* Map MARC responsibility roles to Zotero creator types.
|
||||
See http://archive.ifla.org/VI/3/p1996-1/appx-c.htm.
|
||||
*/
|
||||
|
||||
function getCreatorType(aut) {
|
||||
// To avoid an error on certain pages where the item is not well catalogued
|
||||
if (aut['4'] === undefined) return undefined;
|
||||
var typeAut = aut['4'].trim();
|
||||
switch (typeAut) {
|
||||
case "005":
|
||||
case "250":
|
||||
case "275":
|
||||
case "590": // performer
|
||||
case "755": // vocalist
|
||||
return "performer";
|
||||
case "040":
|
||||
case "130": // book designer
|
||||
case "740": // type designer
|
||||
case "750": // typographer
|
||||
case "350": // engraver
|
||||
case "360": // etcher
|
||||
case "430": // illuminator
|
||||
case "440": // illustrator
|
||||
case "510": // lithographer
|
||||
case "530": // metal engraver
|
||||
case "600": // photographer
|
||||
case "705": // sculptor
|
||||
case "760": // wood engraver
|
||||
return "artist";
|
||||
case "070":
|
||||
case "305":
|
||||
case "330":
|
||||
case undefined:
|
||||
return "author";
|
||||
case "020":
|
||||
case "210":
|
||||
case "212":
|
||||
return "commenter";
|
||||
case "180":
|
||||
return "cartographer";
|
||||
case "220":
|
||||
case "340":
|
||||
return "editor";
|
||||
case "230":
|
||||
return "composer";
|
||||
case "245":
|
||||
return "inventor";
|
||||
case "255":
|
||||
case "695": // scientific advisor
|
||||
case "727": // thesis advisor
|
||||
return "counsel";
|
||||
case "300":
|
||||
return "director";
|
||||
case "400": // funder
|
||||
case "723": // sponsor
|
||||
return "sponsor";
|
||||
case "460":
|
||||
return "interviewee";
|
||||
case "470":
|
||||
return "interviewer";
|
||||
case "480": // librettist
|
||||
case "520": // lyricist
|
||||
return "wordsBy";
|
||||
case "605":
|
||||
return "presenter";
|
||||
case "630":
|
||||
return "producer";
|
||||
case "635":
|
||||
return "programmer";
|
||||
case "660":
|
||||
return "recipient";
|
||||
case "090": // author of dialog
|
||||
case "690": // scenarist
|
||||
return "scriptwriter";
|
||||
case "730":
|
||||
return "translator";
|
||||
// Ignore (no matching Zotero creatorType):
|
||||
case "320": // donor
|
||||
case "610": // printer
|
||||
case "650": // publisher
|
||||
return undefined;
|
||||
// Default
|
||||
case "205":
|
||||
default:
|
||||
return "contributor";
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix creators (MARC translator is not perfect). */
|
||||
function getCreators(record, item) {
|
||||
// Clear creators
|
||||
item.creators = [];
|
||||
// Extract creators (700, 701 & 702)
|
||||
for (let i = 700; i < 703; i++) {
|
||||
let authorTag = record.getFieldSubfields(i);
|
||||
for (let j in authorTag) {
|
||||
let aut = authorTag[j];
|
||||
let authorText = "";
|
||||
if (aut.b) {
|
||||
authorText = aut.a + ", " + aut.b;
|
||||
}
|
||||
else {
|
||||
authorText = aut.a;
|
||||
}
|
||||
let type = getCreatorType(aut);
|
||||
if (type) {
|
||||
item.creators.push(Zotero.Utilities.cleanAuthor(authorText, type, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Extract corporate creators (710, 711 & 712)
|
||||
for (let i = 710; i < 713; i++) {
|
||||
let authorTag = record.getFieldSubfields(i);
|
||||
for (let j in authorTag) {
|
||||
if (authorTag[j].a) {
|
||||
let type = getCreatorType(authorTag[j]);
|
||||
if (type) {
|
||||
item.creators.push({
|
||||
lastName: authorTag[j].a,
|
||||
creatorType: type,
|
||||
fieldMode: true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add tag, if not present yet
|
||||
function addTag(item, tag) {
|
||||
for (var t in item.tags) {
|
||||
if (item.tags[t] == tag) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
item.tags.push(tag);
|
||||
}
|
||||
|
||||
// Tagging
|
||||
function getTags(record, item) {
|
||||
var pTag = record.getFieldSubfields("600");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
if (person.b) {
|
||||
tagText += ", " + person.b;
|
||||
}
|
||||
if (person.c) {
|
||||
tagText += ", " + person.c;
|
||||
}
|
||||
if (person.f) {
|
||||
tagText += " (" + person.f + ")";
|
||||
}
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("601");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("605");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("606");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("607");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("602");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
if (person.f) {
|
||||
tagText += " (" + person.f + ")";
|
||||
}
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
pTag = record.getFieldSubfields("604");
|
||||
if (pTag) {
|
||||
for (let j in pTag) {
|
||||
let tagText = false;
|
||||
let person = pTag[j];
|
||||
tagText = person.a;
|
||||
if (person.b) {
|
||||
tagText += ", " + person.b;
|
||||
}
|
||||
if (person.f) {
|
||||
tagText += " (" + person.f + ")";
|
||||
}
|
||||
if (person.t) {
|
||||
tagText += ", " + person.t;
|
||||
}
|
||||
addTag(item, tagText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get series (repeatable)
|
||||
function getSeries(record, item) {
|
||||
var seriesText = false;
|
||||
var seriesTag = record.getFieldSubfields("225");
|
||||
if (seriesTag && seriesTag.length > 1) {
|
||||
for (let j in seriesTag) {
|
||||
let series = seriesTag[j];
|
||||
if (seriesText) {
|
||||
seriesText += "; ";
|
||||
}
|
||||
else {
|
||||
seriesText = "";
|
||||
}
|
||||
seriesText += series.a;
|
||||
if (series.v) {
|
||||
seriesText += ", " + series.v;
|
||||
}
|
||||
}
|
||||
if (seriesText) {
|
||||
delete item.seriesNumber;
|
||||
item.series = seriesText;
|
||||
}
|
||||
}
|
||||
// Try 461
|
||||
if (!item.series) {
|
||||
seriesTag = record.getFieldSubfields("461");
|
||||
if (seriesTag) {
|
||||
for (let j in seriesTag) {
|
||||
let series = seriesTag[j];
|
||||
if (seriesText) {
|
||||
seriesText += "; ";
|
||||
}
|
||||
else {
|
||||
seriesText = "";
|
||||
}
|
||||
seriesText += series.t;
|
||||
}
|
||||
}
|
||||
if (seriesText) {
|
||||
delete item.seriesNumber;
|
||||
item.series = seriesText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add extra text
|
||||
function addExtra(noteText, extra) {
|
||||
if (extra) {
|
||||
if (noteText) {
|
||||
if (!/\.$/.exec(noteText)) {
|
||||
noteText += ". ";
|
||||
}
|
||||
else {
|
||||
noteText += " ";
|
||||
}
|
||||
}
|
||||
else {
|
||||
noteText = "";
|
||||
}
|
||||
noteText += Zotero.Utilities.trim(extra);
|
||||
}
|
||||
return noteText;
|
||||
}
|
||||
|
||||
// Assemble extra information
|
||||
function getExtra(record, item) {
|
||||
var noteText = false;
|
||||
// Material description
|
||||
var noteTag = record.getFieldSubfields("215");
|
||||
if (noteTag) {
|
||||
for (let j in noteTag) {
|
||||
let note = noteTag[j];
|
||||
noteText = addExtra(noteText, note.c);
|
||||
noteText = addExtra(noteText, note.d);
|
||||
noteText = addExtra(noteText, note.e);
|
||||
}
|
||||
}
|
||||
// Note
|
||||
noteTag = record.getFieldSubfields("300");
|
||||
if (noteTag) {
|
||||
for (let j in noteTag) {
|
||||
let note = noteTag[j];
|
||||
noteText = addExtra(noteText, note.a);
|
||||
}
|
||||
}
|
||||
// Edition history notes
|
||||
noteTag = record.getFieldSubfields("305");
|
||||
if (noteTag) {
|
||||
for (let j in noteTag) {
|
||||
let note = noteTag[j];
|
||||
noteText = addExtra(noteText, note.a);
|
||||
}
|
||||
}
|
||||
if (noteText) {
|
||||
if (!/\.$/.exec(noteText)) {
|
||||
noteText += ".";
|
||||
}
|
||||
item.extra = noteText;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get title from 200
|
||||
function getTitle(record, item) {
|
||||
var titleTag = record.getFieldSubfields("200");
|
||||
if (titleTag) {
|
||||
titleTag = titleTag[0];
|
||||
var titleText = titleTag.a;
|
||||
if (titleTag.e) {
|
||||
if (!/^[,.:;-]/.exec(titleTag.e)) {
|
||||
titleText += ": ";
|
||||
}
|
||||
titleText += titleTag.e;
|
||||
}
|
||||
if (titleTag.h) {
|
||||
titleText += ", " + titleTag.h;
|
||||
if (titleTag.i) {
|
||||
titleText += ": " + titleTag.i;
|
||||
}
|
||||
}
|
||||
else if (titleTag.i) {
|
||||
titleText += ", " + titleTag.i;
|
||||
}
|
||||
item.title = titleText;
|
||||
}
|
||||
}
|
||||
|
||||
function getCote(record, item) {
|
||||
item.callNumber = "";
|
||||
var coteTag = record.getFieldSubfields("930");
|
||||
|
||||
if (coteTag.length) {
|
||||
item.callNumber += coteTag[0].c + "-" + coteTag[0].a;
|
||||
}
|
||||
}
|
||||
|
||||
// Do BnF specific Unimarc postprocessing
|
||||
function postprocessMarc(record, newItem) {
|
||||
// Title
|
||||
getTitle(record, newItem);
|
||||
// Fix creators
|
||||
getCreators(record, newItem);
|
||||
// Fix callNumber
|
||||
getCote(record, newItem);
|
||||
// Store perennial url from 003 as attachment and accession number
|
||||
var url = record.getField("003");
|
||||
if (url && url.length > 0 && url[0][1]) {
|
||||
newItem.attachments.push({
|
||||
title: 'Lien vers la notice du catalogue',
|
||||
url: url[0][1],
|
||||
mimeType: 'text/html',
|
||||
snapshot: false
|
||||
});
|
||||
}
|
||||
// Country (102a)
|
||||
record._associateDBField(newItem, "102", "a", "country");
|
||||
// Try to retrieve volumes/pages from 215d
|
||||
if (!newItem.pages) {
|
||||
var dimTag = record.getFieldSubfields("215");
|
||||
for (let j in dimTag) {
|
||||
var dim = dimTag[j];
|
||||
if (dim.a) {
|
||||
var pages = /[^\d]*(\d+)\s+p\..*/.exec(dim.a);
|
||||
if (pages) {
|
||||
newItem.numPages = pages[1];
|
||||
}
|
||||
var vols = /[^\d]*(\d+)\s+vol\..*/.exec(dim.a);
|
||||
if (vols) {
|
||||
newItem.numberOfVolumes = vols[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Series
|
||||
getSeries(record, newItem);
|
||||
// Extra
|
||||
getExtra(record, newItem);
|
||||
// Tagging
|
||||
getTags(record, newItem);
|
||||
// Repository
|
||||
newItem.libraryCatalog = "BnF Catalogue général (http:// catalogue.bnf.fr)";
|
||||
}
|
||||
|
||||
// Public members
|
||||
// Get the UNIMARC URL for a given single result page.
|
||||
this.reformURL = function (url) {
|
||||
url = url.replace(/(^.*\/ark:\/12148\/cb[0-9]+[a-z]*)(.*$)/, "$1.unimarc");
|
||||
// Zotero.debug("URL1 "+ url);
|
||||
return url;
|
||||
};
|
||||
// Get the results table from a list page, if any. Looks for // table[@class="ListeNotice"].
|
||||
this.getResultsTable = function (doc) {
|
||||
try {
|
||||
var xPathObject = ZU.xpath(doc, '// div[@class="liste-notices"]');
|
||||
return xPathObject;
|
||||
}
|
||||
catch (x) {
|
||||
Zotero.debug(x.lineNumber + " " + x.message);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
// Get selectable search items from a list page.
|
||||
// Loops through //td[@class="mn_partienoticesynthetique"], extracting the single items URLs from
|
||||
// their onclick attribute, thier titles by assembling the spans for each cell.
|
||||
this.getSelectedItems = function (doc) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//div[@class="liste-notices"]/div[@class="notice-item"]/div[@class="notice-contenu"]');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var title = "";
|
||||
var href = attr(rows[i], 'div[class="notice-synthese"] a', "href");
|
||||
title = ZU.trim(text(rows[i], 'div[class="notice-synthese"] a'));
|
||||
|
||||
var documentYear = text(rows[i], 'span[class="notice-ordre"]');
|
||||
if (documentYear.length == 6) {
|
||||
title += " / " + documentYear;
|
||||
}
|
||||
if (!href || !title) continue;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
};
|
||||
|
||||
// Check for Gallica URL (digital version available), if found, set item.url
|
||||
function checkGallica(record, item) {
|
||||
var url = record.getFieldSubfields("856");
|
||||
if (url && url.length > 0 && url[0].u) {
|
||||
item.url = url[0].u;
|
||||
}
|
||||
}
|
||||
|
||||
// Process UNIMARC URL.
|
||||
this.processMarcUrl = function (newDoc, _url) {
|
||||
// Init MARC record.
|
||||
// Load MARC
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("a6ee60df-1ddc-4aae-bb25-45e0537be973");
|
||||
translator.getTranslatorObject(function (obj) {
|
||||
var record = new obj.record();
|
||||
// Get table cell containing MARC code.
|
||||
var elmts = ZU.xpath(newDoc, '//div[@class="notice-detail"]/div/div[@class="zone"]');
|
||||
// Line loop.
|
||||
var elmt, tag, content;
|
||||
var ind = "";
|
||||
for (var i = 0; i < elmts.length; i++) {
|
||||
elmt = elmts[i];
|
||||
var line = Zotero.Utilities.superCleanString(elmt.textContent);
|
||||
if (line.length == 0) {
|
||||
continue;
|
||||
}
|
||||
if (line.substring(0, 6) == " ") {
|
||||
content += " " + line.substring(6);
|
||||
continue;
|
||||
}
|
||||
else if (tag) {
|
||||
record.addField(tag, ind, content);
|
||||
}
|
||||
line = line.replace(/[_\t\xA0]/g, " "); // nbsp
|
||||
tag = line.substr(0, 3);
|
||||
if (tag[0] != "0" || tag[1] != "0") {
|
||||
ind = line.substr(3, 2);
|
||||
content = line.substr(5).replace(/\$([a-z]|[0-9])/g, obj.subfieldDelimiter + "$1");
|
||||
content = content.replace(/ˆ([^‰]+)‰/g, "$1");
|
||||
}
|
||||
else if (tag == "000") {
|
||||
tag = undefined;
|
||||
record.leader = "0000" + line.substr(8);
|
||||
}
|
||||
else {
|
||||
content = line.substr(3);
|
||||
}
|
||||
}
|
||||
// case last zone
|
||||
if (tag) {
|
||||
record.addField(tag, ind, content);
|
||||
}
|
||||
// Create item
|
||||
var newItem = new Zotero.Item();
|
||||
record.translate(newItem);
|
||||
// Do specific Unimarc postprocessing
|
||||
postprocessMarc(record, newItem);
|
||||
// Check for Gallica URL
|
||||
checkGallica(record, newItem);
|
||||
newItem.complete();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* Global BnfClass object. */
|
||||
var Bnf = new BnfClass();
|
||||
|
||||
/* Translator API implementation. */
|
||||
var typeMapping = {
|
||||
"moving image": "film",
|
||||
text: "book",
|
||||
"printed text": "book",
|
||||
"electronic resource": "book",
|
||||
score: "book",
|
||||
sound: "audioRecording",
|
||||
"sound recording": "audioRecording",
|
||||
"cartographic resource": "map",
|
||||
"still image": "artwork",
|
||||
kit: "document",
|
||||
"modern manuscript or archive": "manuscript",
|
||||
"coin or medal": "document",
|
||||
"physical object": "document",
|
||||
"three dimensional object": "document"
|
||||
};
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
var resultRegexp = /ark:\/12148\/cb[0-9]+/i;
|
||||
// Single result ?
|
||||
if (resultRegexp.test(url)) {
|
||||
var itemType = attr(doc, 'meta[name="DC.type"][lang="eng"]', "content");
|
||||
if (typeMapping[itemType]) {
|
||||
return typeMapping[itemType];
|
||||
}
|
||||
else {
|
||||
return "document";
|
||||
}
|
||||
}
|
||||
// Muliple result ?
|
||||
else if (Bnf.getResultsTable(doc)) {
|
||||
return "multiple";
|
||||
}
|
||||
// No items
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
// Check type.
|
||||
var type = detectWeb(doc, url);
|
||||
Zotero.debug("type " + type);
|
||||
if (!type) {
|
||||
return;
|
||||
}
|
||||
// Build array of MARC URLs.
|
||||
var urls = [];
|
||||
switch (type) {
|
||||
case "multiple":
|
||||
var items = Bnf.getSelectedItems(doc);
|
||||
if (items) {
|
||||
// Let user select items
|
||||
Zotero.selectItems(items, function (items) {
|
||||
for (var i in items) {
|
||||
urls.push(Bnf.reformURL(i));
|
||||
}
|
||||
if (urls.length > 0) {
|
||||
// Z.debug(urls)
|
||||
Zotero.Utilities.processDocuments(urls, function (doc) {
|
||||
Bnf.processMarcUrl(doc, urls[0]);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
urls = [Bnf.reformURL(url)];
|
||||
Zotero.Utilities.processDocuments(urls, function (doc) {
|
||||
Bnf.processMarcUrl(doc, url);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb40636779s",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "map",
|
||||
"title": "Scotia Regnum divisum in Partem Septentrionalem et Meridionalem Subdivisas in Comitatus, Vicecomitatus, Provincias, Praefecturas, Dominia et Insulas",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Frederick",
|
||||
"lastName": "De Wit ",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "1680",
|
||||
"extra": "510 x 570. Le titre est en bas et à gauche dans un cartouche monumental décoré d'un Amour. En haut de la carte, deux Amours portent un écu aux armes de l'Ecosse. Vers 1680.",
|
||||
"language": "lat",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"place": "S.l.",
|
||||
"publisher": "s.n.",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": " Écosse, Royaume d' (843-1707) "
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb43664161m",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "book",
|
||||
"title": "La déesse des petites victoires",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Yannick",
|
||||
"lastName": "Grannec ",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2012",
|
||||
"ISBN": "9782286093051",
|
||||
"callNumber": "Tolbiac - Rez de Jardin - Littérature et art - Magasin - 2013-334011",
|
||||
"extra": "couv. ill. 21 cm. Bibliogr., 3 p.",
|
||||
"language": "fre",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"numPages": "468",
|
||||
"numberOfVolumes": "1",
|
||||
"place": "Paris",
|
||||
"publisher": "le Grand livre du mois",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb39209609w",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "film",
|
||||
"title": "Problèmes et pratiques : sciences de la vie et de la terre",
|
||||
"creators": [],
|
||||
"date": "199",
|
||||
"distributor": "Centre national de documentation pédagogique",
|
||||
"extra": "coul. (SECAM), son. Titre de dos : \"Sciences de la vie et de la terre, problèmes et pratiques. Notice réd. d'après un document produit en 1996.",
|
||||
"language": "fre",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"shortTitle": "Problèmes et pratiques",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb40494299f",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "[Recueil. Vues stéréoscopiques de Louis] : [photographie",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Louis",
|
||||
"creatorType": "artist"
|
||||
}
|
||||
],
|
||||
"extra": "formats divers. Comprend deux séries : \"Le Petit Chaperon rouge\" et \"La Belle au Bois Dormant.",
|
||||
"language": "fre",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"shortTitle": "[Recueil. Vues stéréoscopiques de Louis]",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": " Figurines "
|
||||
},
|
||||
{
|
||||
"tag": " Perrault , Charles ( 1628-1703 ), La Belle au bois dormant "
|
||||
},
|
||||
{
|
||||
"tag": " Perrault , Charles ( 1628-1703 ), Le Petit Chaperon rouge "
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb39755519v",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "manuscript",
|
||||
"title": "[3 lettres et 1 carte de visite d'Adolphe Aderer à Adolphe Jullien]",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Adolphe",
|
||||
"lastName": "Aderer ",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"firstName": "Adolphe",
|
||||
"lastName": "Jullien ",
|
||||
"creatorType": "recipient"
|
||||
}
|
||||
],
|
||||
"language": "fre",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"place": "1895-1922",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb40025449j",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "audioRecording",
|
||||
"title": "The complete D singles collection : the sounds of Houston, Texas",
|
||||
"creators": [],
|
||||
"extra": "6 brochures.",
|
||||
"label": "Bear family records",
|
||||
"language": "eng",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"place": "Hambergen (Allemagne)",
|
||||
"shortTitle": "The complete D singles collection",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/rechercher.do?motRecherche=test&critereRecherche=0&depart=0&facetteModifiee=ok",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://catalogue.bnf.fr/ark:/12148/cb410374690.public",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "artwork",
|
||||
"title": "Les sorcières envahissent la forêt Lespinasse : [affiche",
|
||||
"creators": [],
|
||||
"date": "2007",
|
||||
"extra": "60 x 40 cm.",
|
||||
"language": "fre",
|
||||
"libraryCatalog": "BnF Catalogue général (http:// catalogue.bnf.fr)",
|
||||
"shortTitle": "Les sorcières envahissent la forêt Lespinasse",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Lien vers la notice du catalogue",
|
||||
"mimeType": "text/html",
|
||||
"snapshot": false
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
585
translators/BioMed Central.js
Normal file
585
translators/BioMed Central.js
Normal file
@@ -0,0 +1,585 @@
|
||||
{
|
||||
"translatorID": "75ccea3c-fdb8-4473-8203-ceb27f3395f8",
|
||||
"label": "BioMed Central",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://[^\\.]+\\.(biomedcentral|springeropen)\\.com/(articles|search)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2020-12-01 16:45:33"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2015 Philipp Zumstein
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
// This translator covers BioMedCentral but also SpringerOpen.
|
||||
|
||||
// attr()/text() v2
|
||||
// eslint-disable-next-line
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('.com/articles/10.1186/')) {
|
||||
return "journalArticle";
|
||||
}
|
||||
else if (getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('div[data-test="search-content"] article h3.c-listing__title>a');
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
function scrape(doc, url) {
|
||||
var DOI = url.match(/\/(10\.[^#?]+)/)[1];
|
||||
var risURL = "http://citation-needed.services.springer.com/v2/references/" + DOI + "?format=refman&flavour=citation";
|
||||
var pdfURL = attr(doc, 'meta[name="citation_pdf_url"]', 'content');
|
||||
ZU.doGet(risURL, function (text) {
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function (obj, item) {
|
||||
// We have to fix issue and pages because these informations are
|
||||
// wrong in the RIS data.
|
||||
var citation = ZU.xpath(doc, '//span[@class="ArticleCitation_Volume"]');
|
||||
if (citation.length > 0) {
|
||||
fixCitation(item, citation[0].innerHTML);
|
||||
}
|
||||
|
||||
var keywordsNodes = doc.getElementsByClassName("c-article-subject-list__subject");
|
||||
for (var i = 0; i < keywordsNodes.length; i++) {
|
||||
item.tags.push(keywordsNodes[i].textContent);
|
||||
}
|
||||
|
||||
if (pdfURL) {
|
||||
item.attachments.push({
|
||||
url: pdfURL,
|
||||
title: "Full Text PDF",
|
||||
mimeType: "application/pdf"
|
||||
});
|
||||
}
|
||||
item.attachments.push({
|
||||
title: "Snapshot",
|
||||
document: doc
|
||||
});
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
}
|
||||
|
||||
function fixCitation(item, citation) {
|
||||
// This function fixes the information for issue and pages
|
||||
// depending on the information in the citation string.
|
||||
// e.g. citation = <strong>8</strong>:212
|
||||
// or citation = <strong>2</strong>(1):S1
|
||||
var re = /<strong>(\d+)<\/strong>([\w()]*):(\w+)/;
|
||||
var m = citation.match(re);
|
||||
if (m) {
|
||||
if (item.pages) {
|
||||
// save the pages (PDF) first
|
||||
item.notes.push({ note: "Pages " + item.pages + " in PDF" });
|
||||
}
|
||||
if (item.volume != m[1]) { // This should actually be the same as in RIS.
|
||||
Z.debug("Volume number differs in RIS and citation text: " + item.volume + "!=" + m[1]);
|
||||
item.volume = m[1];
|
||||
}
|
||||
// Most of the journal articles at BMC do not have issue numbers;
|
||||
// however this value seem to be filled by default with 1 in the RIS.
|
||||
// Therefore, we have to delete it here or replace it by the correct
|
||||
// value.
|
||||
item.issue = m[2].replace(/[()]/g, "");
|
||||
// The article ids should be treated similar to pages.
|
||||
item.pages = m[3];
|
||||
}
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://biotechnologyforbiofuels.biomedcentral.com/articles/10.1186/s13068-015-0395-8",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Biomass accessibility analysis using electron tomography",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Hinkle",
|
||||
"firstName": "Jacob D.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Ciesielski",
|
||||
"firstName": "Peter N.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Gruchalla",
|
||||
"firstName": "Kenny",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Munch",
|
||||
"firstName": "Kristin R.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Donohoe",
|
||||
"firstName": "Bryon S.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "December 25, 2015",
|
||||
"DOI": "10.1186/s13068-015-0395-8",
|
||||
"ISSN": "1754-6834",
|
||||
"abstractNote": "Substrate accessibility to catalysts has been a dominant theme in theories of biomass deconstruction. However, current methods of quantifying accessibility do not elucidate mechanisms for increased accessibility due to changes in microstructure following pretreatment.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Biotechnology for Biofuels",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "212",
|
||||
"publicationTitle": "Biotechnology for Biofuels",
|
||||
"url": "https://doi.org/10.1186/s13068-015-0395-8",
|
||||
"volume": "8",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Accessibility"
|
||||
},
|
||||
{
|
||||
"tag": "Biomass"
|
||||
},
|
||||
{
|
||||
"tag": "Cellulose"
|
||||
},
|
||||
{
|
||||
"tag": "Porosimetry"
|
||||
},
|
||||
{
|
||||
"tag": "Pretreatment"
|
||||
},
|
||||
{
|
||||
"tag": "Tomography"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://parasitesandvectors.biomedcentral.com/articles/10.1186/1756-3305-2-S1-S1",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Canine leishmaniosis in South America",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Dantas-Torres",
|
||||
"firstName": "Filipe",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "March 26, 2009",
|
||||
"DOI": "10.1186/1756-3305-2-S1-S1",
|
||||
"ISSN": "1756-3305",
|
||||
"abstractNote": "Canine leishmaniosis is widespread in South America, where a number of Leishmania species have been isolated or molecularly characterised from dogs. Most cases of canine leishmaniosis are caused by Leishmania infantum (syn. Leishmania chagasi) and Leishmania braziliensis. The only well-established vector of Leishmania parasites to dogs in South America is Lutzomyia longipalpis, the main vector of L. infantum, but many other phlebotomine sandfly species might be involved. For quite some time, canine leishmaniosis has been regarded as a rural disease, but nowadays it is well-established in large urbanised areas. Serological investigations reveal that the prevalence of anti-Leishmania antibodies in dogs might reach more than 50%, being as high as 75% in highly endemic foci. Many aspects related to the epidemiology of canine leishmaniosis (e.g., factors increasing the risk disease development) in some South American countries other than Brazil are poorly understood and should be further studied. A better understanding of the epidemiology of canine leishmaniosis in South America would be helpful to design sustainable control and prevention strategies against Leishmania infection in both dogs and humans.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Parasites & Vectors",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "S1",
|
||||
"publicationTitle": "Parasites & Vectors",
|
||||
"url": "https://doi.org/10.1186/1756-3305-2-S1-S1",
|
||||
"volume": "2",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Atlantic Rainforest"
|
||||
},
|
||||
{
|
||||
"tag": "Imidacloprid"
|
||||
},
|
||||
{
|
||||
"tag": "Leishmania Infection"
|
||||
},
|
||||
{
|
||||
"tag": "Leishmania Parasite"
|
||||
},
|
||||
{
|
||||
"tag": "Leishmania Species"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.biomedcentral.com/search?query=zelle&searchType=publisherSearch",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bmcevolbiol.biomedcentral.com/articles/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://jfootankleres.biomedcentral.com/articles/10.1186/1757-1146-1-S1-O4",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Plantar fascia thickness and first metatarsal mobility in patients with diabetes and neuropathy",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Rao",
|
||||
"firstName": "Smita",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Saltzman",
|
||||
"firstName": "Charles L.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Yack",
|
||||
"firstName": "H. John",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September 26, 2008",
|
||||
"DOI": "10.1186/1757-1146-1-S1-O4",
|
||||
"ISSN": "1757-1146",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Journal of Foot and Ankle Research",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "O4",
|
||||
"publicationTitle": "Journal of Foot and Ankle Research",
|
||||
"url": "https://doi.org/10.1186/1757-1146-1-S1-O4",
|
||||
"volume": "1",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Iowa Hospital"
|
||||
},
|
||||
{
|
||||
"tag": "Kinematic Data"
|
||||
},
|
||||
{
|
||||
"tag": "Order Butterworth Filter"
|
||||
},
|
||||
{
|
||||
"tag": "Stance Phase"
|
||||
},
|
||||
{
|
||||
"tag": "Ulcer Development"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://journalofinequalitiesandapplications.springeropen.com/articles/10.1186/1029-242X-2011-53",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Approximately cubic functional equations and cubic multipliers",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Bodaghi",
|
||||
"firstName": "Abasalt",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Alias",
|
||||
"firstName": "Idham Arif",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Ghahramani",
|
||||
"firstName": "Mohammad Hossein",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September 13, 2011",
|
||||
"DOI": "10.1186/1029-242X-2011-53",
|
||||
"ISSN": "1029-242X",
|
||||
"abstractNote": "In this paper, we prove the Hyers-Ulam stability and the superstability for cubic functional equation by using the fixed point alternative theorem. As a consequence, we show that the cubic multipliers are superstable under some conditions.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Journal of Inequalities and Applications",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "53",
|
||||
"publicationTitle": "Journal of Inequalities and Applications",
|
||||
"url": "https://doi.org/10.1186/1029-242X-2011-53",
|
||||
"volume": "2011",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Hyers-Ulam stability"
|
||||
},
|
||||
{
|
||||
"tag": "Superstability"
|
||||
},
|
||||
{
|
||||
"tag": "cubic functional equation"
|
||||
},
|
||||
{
|
||||
"tag": "multiplier"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://nanoscalereslett.springeropen.com/articles/10.1186/1556-276X-6-530",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Nanoscale potassium niobate crystal structure and phase transition",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Chen",
|
||||
"firstName": "Haiyan",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Zhang",
|
||||
"firstName": "Yixuan",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Lu",
|
||||
"firstName": "Yanling",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "September 23, 2011",
|
||||
"DOI": "10.1186/1556-276X-6-530",
|
||||
"ISSN": "1556-276X",
|
||||
"abstractNote": "Nanoscale potassium niobate (KNbO3) powders of orthorhombic structure were synthesized using the sol-gel method. The heat-treatment temperature of the gels had a pronounced effect on KNbO3 particle size and morphology. Field emission scanning electron microscopy and transmission electron microscopy were used to determine particle size and morphology. The average KNbO3 grain size was estimated to be less than 100 nm, and transmission electron microscopy images indicated that KNbO3 particles had a brick-like morphology. Synchrotron X-ray diffraction was used to identify the room-temperature structures using Rietveld refinement. The ferroelectric orthorhombic phase was retained even for particles smaller than 50 nm. The orthorhombic to tetragonal and tetragonal to cubic phase transitions of nanocrystalline KNbO3 were investigated using temperature-dependent powder X-ray diffraction. Differential scanning calorimetry was used to examine the temperature dependence of KNbO3 phase transition. The Curie temperature and phase transition were independent of particle size, and Rietveld analyses showed increasing distortions with decreasing particle size.",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Nanoscale Research Letters",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "530",
|
||||
"publicationTitle": "Nanoscale Research Letters",
|
||||
"url": "https://doi.org/10.1186/1556-276X-6-530",
|
||||
"volume": "6",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "crystal structure"
|
||||
},
|
||||
{
|
||||
"tag": "nanoscale powder."
|
||||
},
|
||||
{
|
||||
"tag": "phase transition"
|
||||
},
|
||||
{
|
||||
"tag": "potassium niobate"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bmcchem.biomedcentral.com/articles/10.1186/1752-153X-5-5",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"title": "Cacao seeds are a \"Super Fruit\": A comparative analysis of various fruit powders and products",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Crozier",
|
||||
"firstName": "Stephen J.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Preston",
|
||||
"firstName": "Amy G.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hurst",
|
||||
"firstName": "Jeffrey W.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Payne",
|
||||
"firstName": "Mark J.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Mann",
|
||||
"firstName": "Julie",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hainly",
|
||||
"firstName": "Larry",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Miller",
|
||||
"firstName": "Debra L.",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "February 7, 2011",
|
||||
"DOI": "10.1186/1752-153X-5-5",
|
||||
"ISSN": "1752-153X",
|
||||
"abstractNote": "Numerous popular media sources have developed lists of \"Super Foods\" and, more recently, \"Super Fruits\". Such distinctions often are based on the antioxidant capacity and content of naturally occurring compounds such as polyphenols within those whole fruits or juices of the fruit which may be linked to potential health benefits. Cocoa powder and chocolate are made from an extract of the seeds of the fruit of the Theobroma cacao tree. In this study, we compared cocoa powder and cocoa products to powders and juices derived from fruits commonly considered \"Super Fruits\".",
|
||||
"issue": "1",
|
||||
"journalAbbreviation": "Chemistry Central Journal",
|
||||
"libraryCatalog": "BioMed Central",
|
||||
"pages": "5",
|
||||
"publicationTitle": "Chemistry Central Journal",
|
||||
"shortTitle": "Cacao seeds are a \"Super Fruit\"",
|
||||
"url": "https://doi.org/10.1186/1752-153X-5-5",
|
||||
"volume": "5",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Full Text PDF",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Cocoa Butter"
|
||||
},
|
||||
{
|
||||
"tag": "Fruit Juice"
|
||||
},
|
||||
{
|
||||
"tag": "Oxygen Radical Absorbance Capacity"
|
||||
},
|
||||
{
|
||||
"tag": "Total Polyphenol"
|
||||
},
|
||||
{
|
||||
"tag": "Total Polyphenol Content"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
233
translators/BioOne.js
Normal file
233
translators/BioOne.js
Normal file
@@ -0,0 +1,233 @@
|
||||
{
|
||||
"translatorID": "7cb0089b-9551-44b2-abca-eb03cbf586d9",
|
||||
"label": "BioOne",
|
||||
"creator": "Michael Berkowitz",
|
||||
"target": "^https?://[^/]*www\\.bioone\\.org[^/]*/s",
|
||||
"minVersion": "1.0.0b4.r5",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2014-04-03 16:38:14"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
BioOne Translator
|
||||
Copyright © 2011 Sebastian Karcher
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.match(/\/doi\/abs\/10\.|\/doi\/full\/10\./)) return "journalArticle";
|
||||
else if (url.match(/\/action\/doSearch|\/toc\//)) return "multiple";
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var namespace = doc.documentElement.namespaceURI;
|
||||
var nsResolver = namespace ? function(prefix) {
|
||||
if (prefix == 'x') return namespace; else return null;
|
||||
} : null;
|
||||
var arts = new Array();
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
var rows = ZU.xpath(doc, '//div[@class="searchEntry"]');
|
||||
for (var i in rows) {
|
||||
var title = ZU.xpathText(rows[i], './/h4[@class="searchTitle"]');
|
||||
var id = ZU.xpath(rows[i], './/p[@class="searchEntryTools"]/a')[0].href;
|
||||
items[id] = title;
|
||||
}
|
||||
Zotero.selectItems(items, function(items){
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
citationurls = new Array();
|
||||
for (var itemurl in items) {
|
||||
//Z.debug(itemurl)
|
||||
//some search results have some "baggage" at the end - remove
|
||||
citationurls.push(itemurl.replace(/\?prev.+/, "").replace(/\/doi\/abs\//, "/action/showCitFormats?doi="));
|
||||
}
|
||||
getpages(citationurls);
|
||||
});
|
||||
|
||||
} else {
|
||||
var citationurl = url.replace(/\?.+/, "").replace(/\/doi\/abs\/|\/doi\/full\//, "/action/showCitFormats?doi=");
|
||||
//Z.debug(citationurl)
|
||||
getpages(citationurl);
|
||||
}
|
||||
}
|
||||
|
||||
function getpages(citationurl) {
|
||||
//we work entirely from the citations page
|
||||
Zotero.Utilities.processDocuments(citationurl, scrape);
|
||||
}
|
||||
|
||||
function scrape (doc) {
|
||||
var newurl = doc.location.href;
|
||||
var pdfurl = newurl.replace(/\/action\/showCitFormats\?doi=/, "/doi/pdf/");
|
||||
var absurl = newurl.replace(/\/action\/showCitFormats\?doi=/, "/doi/abs/");
|
||||
var doi = ZU.xpathText(doc, '//form/input[@name="doi"]/@value')
|
||||
var filename = ZU.xpathText(doc, '//form/input[@name="downloadFileName"]');
|
||||
var get = 'http://www.bioone.org/action/downloadCitation';
|
||||
var post = 'doi=' + doi + '&downloadFileName=' + filename + '&format=ris&direct=true&include=cit';
|
||||
Zotero.Utilities.HTTP.doPost(get, post, function(text) {
|
||||
//Z.debug(text)
|
||||
var translator = Zotero.loadTranslator("import");
|
||||
// Calling the RIS translator
|
||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
item.url = absurl;
|
||||
item.notes = [];
|
||||
item.attachments = [
|
||||
{url:pdfurl, title:"BioOne PDF fulltext", mimeType:"application/pdf"},
|
||||
{url:absurl, title:"BioOne Snapshot", mimeType:"text/html"}
|
||||
];
|
||||
item.complete();
|
||||
});
|
||||
translator.translate();
|
||||
});
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bioone.org/doi/full/10.4202/app.2010.0005",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Figueirido",
|
||||
"firstName": "Borja",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Pérez-Claros",
|
||||
"firstName": "Juan A.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Hunt",
|
||||
"firstName": "Robert M.",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Palmqvist",
|
||||
"firstName": "Paul",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "BioOne PDF fulltext",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "BioOne Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"title": "Body Mass Estimation in Amphicyonid Carnivoran Mammals: A Multiple Regression Approach from the Skull and Skeleton",
|
||||
"date": "June 1, 2011",
|
||||
"DOI": "10.4202/app.2010.0005",
|
||||
"publicationTitle": "Acta Palaeontologica Polonica",
|
||||
"journalAbbreviation": "Acta Palaeontologica Polonica",
|
||||
"pages": "225-246",
|
||||
"volume": "56",
|
||||
"issue": "2",
|
||||
"publisher": "Institute of Paleobiology, Polish Academy of Sciences",
|
||||
"ISSN": "0567-7920",
|
||||
"url": "http://www.bioone.org/doi/abs/10.4202/app.2010.0005",
|
||||
"accessDate": "September 4, 2012",
|
||||
"libraryCatalog": "BioOne",
|
||||
"shortTitle": "Body Mass Estimation in Amphicyonid Carnivoran Mammals"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bioone.org/doi/abs/10.1896/020.011.0101",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
"creators": [
|
||||
{
|
||||
"lastName": "Antonio Araújo Xavier",
|
||||
"firstName": "Gileno",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Borstelmann de Oliveira",
|
||||
"firstName": "Maria Adélia",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Alves Quirino",
|
||||
"firstName": "Adriana",
|
||||
"creatorType": "author"
|
||||
},
|
||||
{
|
||||
"lastName": "Aparecido Mota",
|
||||
"firstName": "Rinaldo",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "BioOne PDF fulltext",
|
||||
"mimeType": "application/pdf"
|
||||
},
|
||||
{
|
||||
"title": "BioOne Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"title": "Albinismo Total em Preguiças-de-Garganta-Marrom Bradypus variegatus (Schinz, 1825) no Estado de Pernambuco, Brasil",
|
||||
"date": "November 1, 2010",
|
||||
"DOI": "10.1896/020.011.0101",
|
||||
"publicationTitle": "Edentata",
|
||||
"journalAbbreviation": "Edentata",
|
||||
"pages": "1-3",
|
||||
"publisher": "IUCN/SSC Anteater, Sloth and Armadillo Specialist Group",
|
||||
"ISSN": "1413-4411",
|
||||
"url": "http://www.bioone.org/doi/abs/10.1896/020.011.0101",
|
||||
"accessDate": "September 4, 2012",
|
||||
"libraryCatalog": "BioOne"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.bioone.org/toc/eden//11",
|
||||
"items": "multiple"
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
343
translators/Bioconductor.js
Normal file
343
translators/Bioconductor.js
Normal file
@@ -0,0 +1,343 @@
|
||||
{
|
||||
"translatorID": "21f62926-4343-4518-b6f2-a284e650e64a",
|
||||
"label": "Bioconductor",
|
||||
"creator": "Qiang Hu",
|
||||
"target": "https?://(www\\.)?bioconductor\\.org/(packages/.*/bioc/html|help/search)/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2019-09-17 16:47:07"
|
||||
}
|
||||
|
||||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Bioconductor Packages Translator
|
||||
Copyright © 2019 Qiang Hu
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
// attr()/text() v2
|
||||
// eslint-disable-next-line
|
||||
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;}
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (url.includes('/bioc/html/')) {
|
||||
return "computerProgram";
|
||||
}
|
||||
else if (url.includes('/search/index.html') && getSearchResults(doc, true)) {
|
||||
return "multiple";
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = doc.querySelectorAll('dl>dt>a[href*="/bioc/html/"]');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
let href = rows[i].href;
|
||||
let title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function (items) {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
}
|
||||
else if (detectWeb(doc, url) == "computerProgram") {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var item = new Zotero.Item('computerProgram');
|
||||
item.title = text(doc, '#PageContent > h1');
|
||||
var subtitle = text(doc, '#PageContent > div.do_not_rebase > h2');
|
||||
if (subtitle) {
|
||||
item.title += ": " + subtitle;
|
||||
}
|
||||
var doi = ZU.xpathText(doc, '//*[@id="PageContent"]/div[2]/a[contains(@href, "https://doi.org/")]');
|
||||
if (doi !== null) {
|
||||
item.extra = 'DOI: ' + doi;
|
||||
}
|
||||
var rows = doc.querySelectorAll('#PageContent > div.do_not_rebase > p');
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (ZU.trimInternal(rows[i].textContent).startsWith('Bioconductor version:')) {
|
||||
item.company = ZU.trimInternal(rows[i].textContent);
|
||||
item.abstractNote = ZU.trimInternal(rows[i + 1].textContent);
|
||||
}
|
||||
if (ZU.trimInternal(rows[i].textContent).startsWith('Author')) {
|
||||
var authorString = ZU.trimInternal(rows[i].textContent);
|
||||
var creators = authorString.replace(/Author:\s*/, '').replace(/\[.+?\]/g, '').replace(/\(.+?\)/g, '');
|
||||
creators = creators.split(/,|and\s*/);
|
||||
for (let i = 0; i < creators.length; i++) {
|
||||
item.creators.push(ZU.cleanAuthor(creators[i], 'programmer'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item.versionNumber = ZU.xpathText(doc, '//table/tbody/tr/td[contains(text(), "Version")]/following-sibling::td');
|
||||
item.rights = ZU.xpathText(doc, '//table/tbody/tr/td[contains(text(), "License")]/following-sibling::td');
|
||||
item.url = ZU.xpathText(doc, '//table/tbody/tr/td[contains(text(), "Package Short Url")]/following-sibling::td') || url;
|
||||
var year = ZU.xpathText(doc, '//*[@id="SiteGlobalFooter"]/div/p[contains(text(), "Copyright")]');
|
||||
if (year) {
|
||||
item.date = year.match(/\d+/g)[1];
|
||||
}
|
||||
|
||||
var tags = ZU.xpath(doc, '//td[contains(text(), "biocViews")]/following-sibling::td/a');
|
||||
for (let i = 0; i < tags.length; i++) {
|
||||
item.tags.push(tags[i].textContent);
|
||||
}
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bioconductor.org/help/search/index.html?q=SummarizedExperiment/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bioconductor.org/packages/release/bioc/html/SummarizedExperiment.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "computerProgram",
|
||||
"title": "SummarizedExperiment: SummarizedExperiment container",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Martin",
|
||||
"lastName": "Morgan",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Valerie",
|
||||
"lastName": "Obenchain",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Jim",
|
||||
"lastName": "Hester",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Hervé",
|
||||
"lastName": "Pagès",
|
||||
"creatorType": "programmer"
|
||||
}
|
||||
],
|
||||
"date": "2019",
|
||||
"abstractNote": "The SummarizedExperiment container contains one or more assays, each represented by a matrix-like object of numeric or other mode. The rows typically represent genomic ranges of interest and the columns represent samples.",
|
||||
"company": "Bioconductor version: Release (3.9)",
|
||||
"extra": "DOI: 10.18129/B9.bioc.SummarizedExperiment",
|
||||
"libraryCatalog": "Bioconductor",
|
||||
"rights": "Artistic-2.0",
|
||||
"shortTitle": "SummarizedExperiment",
|
||||
"url": "http://bioconductor.org/packages/SummarizedExperiment/",
|
||||
"versionNumber": "1.14.1",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Annotation"
|
||||
},
|
||||
{
|
||||
"tag": "Coverage"
|
||||
},
|
||||
{
|
||||
"tag": "Genetics"
|
||||
},
|
||||
{
|
||||
"tag": "GenomeAnnotation"
|
||||
},
|
||||
{
|
||||
"tag": "Infrastructure"
|
||||
},
|
||||
{
|
||||
"tag": "Sequencing"
|
||||
},
|
||||
{
|
||||
"tag": "Software"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bioconductor.org/packages/devel/bioc/html/SummarizedExperiment.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "computerProgram",
|
||||
"title": "SummarizedExperiment: SummarizedExperiment container",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Martin",
|
||||
"lastName": "Morgan",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Valerie",
|
||||
"lastName": "Obenchain",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Jim",
|
||||
"lastName": "Hester",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Hervé",
|
||||
"lastName": "Pagès",
|
||||
"creatorType": "programmer"
|
||||
}
|
||||
],
|
||||
"date": "2019",
|
||||
"abstractNote": "The SummarizedExperiment container contains one or more assays, each represented by a matrix-like object of numeric or other mode. The rows typically represent genomic ranges of interest and the columns represent samples.",
|
||||
"company": "Bioconductor version: Development (3.10)",
|
||||
"extra": "DOI: 10.18129/B9.bioc.SummarizedExperiment",
|
||||
"libraryCatalog": "Bioconductor",
|
||||
"rights": "Artistic-2.0",
|
||||
"shortTitle": "SummarizedExperiment",
|
||||
"url": "http://bioconductor.org/packages/SummarizedExperiment/",
|
||||
"versionNumber": "1.15.9",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Annotation"
|
||||
},
|
||||
{
|
||||
"tag": "Coverage"
|
||||
},
|
||||
{
|
||||
"tag": "Genetics"
|
||||
},
|
||||
{
|
||||
"tag": "GenomeAnnotation"
|
||||
},
|
||||
{
|
||||
"tag": "Infrastructure"
|
||||
},
|
||||
{
|
||||
"tag": "Sequencing"
|
||||
},
|
||||
{
|
||||
"tag": "Software"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://bioconductor.org/packages/3.2/bioc/html/SummarizedExperiment.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "computerProgram",
|
||||
"title": "SummarizedExperiment: SummarizedExperiment container",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Martin",
|
||||
"lastName": "Morgan",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Valerie",
|
||||
"lastName": "Obenchain",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Jim",
|
||||
"lastName": "Hester",
|
||||
"creatorType": "programmer"
|
||||
},
|
||||
{
|
||||
"firstName": "Hervé",
|
||||
"lastName": "Pagès",
|
||||
"creatorType": "programmer"
|
||||
}
|
||||
],
|
||||
"date": "2016",
|
||||
"abstractNote": "The SummarizedExperiment container contains one or more assays, each represented by a matrix-like object of numeric or other mode. The rows typically represent genomic ranges of interest and the columns represent samples.",
|
||||
"company": "Bioconductor version: 3.2",
|
||||
"libraryCatalog": "Bioconductor",
|
||||
"rights": "Artistic-2.0",
|
||||
"shortTitle": "SummarizedExperiment",
|
||||
"url": "http://bioconductor.org/packages/SummarizedExperiment/",
|
||||
"versionNumber": "1.0.2",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Annotation"
|
||||
},
|
||||
{
|
||||
"tag": "Coverage"
|
||||
},
|
||||
{
|
||||
"tag": "Genetics"
|
||||
},
|
||||
{
|
||||
"tag": "GenomeAnnotation"
|
||||
},
|
||||
{
|
||||
"tag": "Infrastructure"
|
||||
},
|
||||
{
|
||||
"tag": "Sequencing"
|
||||
},
|
||||
{
|
||||
"tag": "Software"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
192
translators/Blaetter.js
Normal file
192
translators/Blaetter.js
Normal file
@@ -0,0 +1,192 @@
|
||||
{
|
||||
"translatorID": "e8e10bd4-fd6f-4297-a060-a8e0a479043f",
|
||||
"label": "Blaetter fuer deutsche und internationale Politik",
|
||||
"creator": "Martin Meyerhoff",
|
||||
"target": "^https?://www\\.blaetter\\.de",
|
||||
"minVersion": "1.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2014-04-03 16:42:18"
|
||||
}
|
||||
|
||||
/*
|
||||
Blätter für deutsche und internationale Politik
|
||||
Copyright (C) 2011 Martin Meyerhoff
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
|
||||
// I use XPaths. Therefore, I need the following block.
|
||||
var Blaetter_ArticleTools_XPath = ".//div[contains(@id, 'node')]/h2";
|
||||
var Blaetter_Multiple_XPath = ".//div[contains(@class, 'teaser') and not(contains(@class, 'dossier'))]/h3[@class='headline']/a";
|
||||
|
||||
if (doc.evaluate(Blaetter_ArticleTools_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext() ){
|
||||
Zotero.debug("magazineArticle");
|
||||
return "magazineArticle";
|
||||
} else if (doc.evaluate(Blaetter_Multiple_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext() ){
|
||||
Zotero.debug("multiple");
|
||||
return "multiple";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scrape(doc, url) {
|
||||
var newItem = new Zotero.Item("magazineArticle");
|
||||
newItem.url = doc.location.href;
|
||||
|
||||
|
||||
// This is for the title
|
||||
|
||||
var title_XPath =".//h2[@class='headline']";
|
||||
var title = doc.evaluate(title_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
newItem.title = title;
|
||||
|
||||
// Author
|
||||
var author_XPath = ".//h4[@class='author']/a";
|
||||
if (doc.evaluate(author_XPath, doc, null, XPathResult.ANY_TYPE, null)){
|
||||
var author_obj = doc.evaluate(author_XPath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var next_author;
|
||||
while (next_author= author_obj.iterateNext()) {
|
||||
Zotero.debug(next_author.textContent);
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(next_author.textContent, "author"));
|
||||
}
|
||||
}
|
||||
|
||||
// Tags
|
||||
var tags_XPath = ".//p[@class='credit']/a[@class='rb']";
|
||||
if (doc.evaluate(author_XPath, doc, null, XPathResult.ANY_TYPE, null)){
|
||||
var tags_obj = doc.evaluate(tags_XPath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
var next_tag;
|
||||
while (next_tag= tags_obj.iterateNext()) {
|
||||
newItem.tags.push(next_tag.textContent);
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment. If there's a PDF available, grab it, otherwise just take the HTML site.
|
||||
var pdfurl_XPath = "//ul/li[contains(@class, 'download')]/a";
|
||||
if (doc.evaluate(pdfurl_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext()){
|
||||
var pdfurl = doc.evaluate(pdfurl_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().href;
|
||||
newItem.attachments.push({url:pdfurl, title:doc.title, mimeType:"application/pdf"});
|
||||
|
||||
} else {
|
||||
newItem.attachments.push({url:doc.location.href, title:doc.title, mimeType:"text/html"});
|
||||
|
||||
}
|
||||
|
||||
// Publication Title
|
||||
newItem.publicationTitle = "Blätter für deutsche und internationale Politik";
|
||||
// Issue, Year and Date
|
||||
var credit_XPath = ".//p[@class='credit']";
|
||||
if (doc.evaluate(credit_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext()) {
|
||||
var credit= doc.evaluate(credit_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
newItem.date = credit.replace(/.*(\d+)\/(\d\d\d\d?).*\n.*/g, '$2-$1-00'); // Standard Date Format
|
||||
newItem.date = newItem.date.replace(/-(\d)-/, '-0$1-'); // If Month is single-digit, add a zero before it.
|
||||
newItem.pages= credit.replace(/.*,\sSeite\s(\d+-\d+).*\n.*/g, '$1');
|
||||
} else if (doc.location.href.match("/dokumente/") ){
|
||||
var title2_XPath =".//h3[@class='subtitle']";
|
||||
// Zotero doesn't have a field for subtitle, so just add a colon and then the subtitle.
|
||||
var title2 = doc.evaluate(title2_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
|
||||
newItem.title = newItem.title + ": " + title2.replace(/(.*)(,\s\d+\.\d+\.\d\d\d\d)$/, '$1');
|
||||
// And the date is in there as well...
|
||||
newItem.date = title2.replace(/(.*,\s)(\d+\.\d+\.\d\d\d\d)$/, '$2');
|
||||
}
|
||||
|
||||
var summary_XPath = ".//meta[@name='description']";
|
||||
var summary = doc.evaluate(summary_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().content;
|
||||
newItem.abstractNote = Zotero.Utilities.unescapeHTML(summary);
|
||||
|
||||
newItem.complete();
|
||||
}
|
||||
function doWeb(doc, url) {
|
||||
|
||||
var articles = new Array();
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
|
||||
var Blaetter_Multiple_XPath = ".//div[contains(@class, 'teaser') and not(contains(@class, 'dossier'))]/h3[@class='headline']/a";
|
||||
if (doc.evaluate(Blaetter_Multiple_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext() ){
|
||||
var titles = doc.evaluate(Blaetter_Multiple_XPath, doc, null, XPathResult.ANY_TYPE, null);
|
||||
}
|
||||
var next_title;
|
||||
|
||||
while (next_title = titles.iterateNext()) {
|
||||
Zotero.debug(next_title.textContent);
|
||||
items[next_title.href] = next_title.textContent;
|
||||
}
|
||||
Zotero.selectItems(items, function (items) {
|
||||
if (!items) {
|
||||
Zotero.done();
|
||||
}
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.blaetter.de/archiv/themen/antisemitismus",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://www.blaetter.de/archiv/jahrgaenge/2011/august/die-linkspartei-ideologie-oder-politik",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "magazineArticle",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "André",
|
||||
"lastName": "Brie",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"tags": [
|
||||
"Antisemitismus",
|
||||
"Demokratie",
|
||||
"Parteien"
|
||||
],
|
||||
"seeAlso": [],
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Die Linkspartei: Ideologie oder Politik | Blätter für deutsche und internationale Politik",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"url": "https://www.blaetter.de/archiv/jahrgaenge/2011/august/die-linkspartei-ideologie-oder-politik",
|
||||
"title": "Die Linkspartei: Ideologie oder Politik",
|
||||
"publicationTitle": "Blätter für deutsche und internationale Politik",
|
||||
"date": "2011-08-00",
|
||||
"pages": "16-22",
|
||||
"abstractNote": "„Eine Partei zerfleischt sich“, hieß es am 1. Juli in den „heute“-Nachrichten des ZDF über die Linkspartei. Es ist erst gut zwei Monate her, dass die Parteiführung ihre heftigen Differenzen für beendet erklärt hatte und zu gemeinsamer politischer Sacharbeit zurückkehren wollte.",
|
||||
"libraryCatalog": "Blaetter fuer deutsche und internationale Politik",
|
||||
"shortTitle": "Die Linkspartei"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
244
translators/Blogger.js
Normal file
244
translators/Blogger.js
Normal file
@@ -0,0 +1,244 @@
|
||||
{
|
||||
"translatorID": "6f9aa90d-6631-4459-81ef-a0758d2e3921",
|
||||
"label": "Blogger",
|
||||
"creator": "Adam Crymble",
|
||||
"target": "\\.blogspot\\.com",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2016-09-05 23:14:05"
|
||||
}
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
var result = doc.evaluate('//h3[contains(@class,"post-title") and contains(@class,"entry-title")]', doc, null, XPathResult.ANY_TYPE, null);
|
||||
var entry = result.iterateNext();
|
||||
if (entry && result.iterateNext()) {
|
||||
return "multiple";
|
||||
} else if (entry) {
|
||||
return "blogPost";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
var items = {};
|
||||
var found = false;
|
||||
var rows = ZU.xpath(doc, '//h3[@class="post-title entry-title"]/a|//li[@class="archivedate expanded"]/ul[@class="posts"]/li/a');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var href = rows[i].href;
|
||||
var title = ZU.trimInternal(rows[i].textContent);
|
||||
if (!href || !title) continue;
|
||||
if (checkOnly) return true;
|
||||
found = true;
|
||||
items[href] = title;
|
||||
}
|
||||
return found ? items : false;
|
||||
}
|
||||
//Blogger translator. Code by Adam Crymble
|
||||
|
||||
function scrape(doc, url) {
|
||||
var tagsContent = new Array();
|
||||
var newItem = new Zotero.Item("blogPost");
|
||||
|
||||
//title
|
||||
if (ZU.xpathText(doc, '//h3[@class="post-title entry-title"]/a')) {
|
||||
newItem.title = ZU.xpathText(doc, '//h3[@class="post-title entry-title"]/a');
|
||||
} else {
|
||||
newItem.title = doc.title;
|
||||
}
|
||||
|
||||
//author, if available
|
||||
if (ZU.xpathText(doc, '//span[@class="post-author vcard"]//span[@class="fn"]')) {
|
||||
var author = ZU.xpathText(doc, '//span[@class="post-author vcard"]//span[@class="fn"]').trim();
|
||||
var author = author.toLowerCase();
|
||||
if (author.match(/\sby\s/)) {
|
||||
var shortenAuthor = author.indexOf(" by");
|
||||
author = author.substr(shortenAuthor + 3).replace(/^\s*|\s$/g, '');
|
||||
}
|
||||
var words = author.split(/\s/);
|
||||
for (var i in words) {
|
||||
words[i] = words[i].substr(0, 1).toUpperCase() + words[i].substr(1).toLowerCase();
|
||||
}
|
||||
author = words.join(" ");
|
||||
newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author"));
|
||||
}
|
||||
|
||||
//date, if available
|
||||
newItem.date = ZU.xpathText(doc, '//h2[@class="date-header"]');
|
||||
|
||||
|
||||
//tags, if available
|
||||
var tags = ZU.xpath(doc, '//span[@class="post-labels"]/a');
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
newItem.tags.push(tags[i].textContent);
|
||||
}
|
||||
|
||||
var blogTitle1 = doc.title.split(":");
|
||||
var cleanurl = url.replace(/[\?#].+/, "");
|
||||
newItem.blogTitle = blogTitle1[0];
|
||||
newItem.url=cleanurl;
|
||||
newItem.attachments = [{url:cleanurl, title:"Blogspot Snapshot", mimeType: "text/html"}];
|
||||
|
||||
newItem.complete();
|
||||
}
|
||||
|
||||
|
||||
function doWeb(doc, url) {
|
||||
var articles = new Array();
|
||||
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
Zotero.selectItems(getSearchResults(doc, false), function(items) {
|
||||
if (!items) {
|
||||
return true;
|
||||
}
|
||||
var articles = [];
|
||||
for (var i in items) {
|
||||
articles.push(i);
|
||||
}
|
||||
ZU.processDocuments(articles, scrape);
|
||||
});
|
||||
} else {
|
||||
scrape(doc, url);
|
||||
}
|
||||
}/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://observationalepidemiology.blogspot.com/2011/10/tweet-from-matt-yglesias.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "A tweet from Matt Yglesias",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "",
|
||||
"lastName": "Joseph",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "Monday, October 24, 2011",
|
||||
"accessDate": "CURRENT_TIMESTAMP",
|
||||
"blogTitle": "West Coast Stat Views (on Observational Epidemiology and more)",
|
||||
"libraryCatalog": "Blogger",
|
||||
"url": "http://observationalepidemiology.blogspot.com/2011/10/tweet-from-matt-yglesias.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Blogspot Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Mark",
|
||||
"Matthew Yglesias"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://observationalepidemiology.blogspot.com/",
|
||||
"items": "multiple"
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://argentina-politica.blogspot.com/2012/03/perciben-una-caida-en-la-imagen-de-la.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Politica Argentina - Blog de Psicología Política de Federico González: Perciben una caída en la imagen de la Presidenta",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Federico",
|
||||
"lastName": "Gonzalez",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "domingo, 11 de marzo de 2012",
|
||||
"blogTitle": "Politica Argentina - Blog de Psicología Política de Federico González",
|
||||
"shortTitle": "Politica Argentina - Blog de Psicología Política de Federico González",
|
||||
"url": "http://argentina-politica.blogspot.com/2012/03/perciben-una-caida-en-la-imagen-de-la.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Blogspot Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Cristina Kirchner",
|
||||
"imagen"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "http://utotherescue.blogspot.com/2013/11/the-heart-of-matter-humanities-do-more.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "National Humanities Report Reinforces Stereotypes about the Humanities ~ Remaking the University",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Michael",
|
||||
"lastName": "Meranze",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "Monday, November 25, 2013",
|
||||
"blogTitle": "National Humanities Report Reinforces Stereotypes about the Humanities ~ Remaking the University",
|
||||
"url": "http://utotherescue.blogspot.com/2013/11/the-heart-of-matter-humanities-do-more.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Blogspot Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Cuts",
|
||||
"Development",
|
||||
"Humanities",
|
||||
"Liberal Arts",
|
||||
"guest post"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://jamsubuntu.blogspot.com/2009/01/unmount-command-not-found.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "blogPost",
|
||||
"title": "Jam's Ubuntu Linux Blog: unmount: command not found",
|
||||
"creators": [],
|
||||
"date": "Wednesday, 7 January 2009",
|
||||
"blogTitle": "Jam's Ubuntu Linux Blog",
|
||||
"shortTitle": "Jam's Ubuntu Linux Blog",
|
||||
"url": "https://jamsubuntu.blogspot.com/2009/01/unmount-command-not-found.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Blogspot Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Command Line"
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user