Thisisexamplecodeforascrapertypetranslator.ItpullsinformaonfromawebpagetopopulateaZoteroitem’smetadata.Builtinscaffoldituse...
ResourcesforcreatingzoterotranslatorsFirefoxwww.mozilla.orgZoteroforFirefoxwww.zotero.orgScaffoldwww.zotero.org/support/dev...
Upcoming SlideShare
Loading in...5
×

Zotero translators handout

173

Published on

Handout with the basic of building a zotero translator in scaffold.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
173
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Zotero translators handout

  1. 1. Thisisexamplecodeforascrapertypetranslator.ItpullsinformaonfromawebpagetopopulateaZoteroitem’smetadata.BuiltinscaffolditusesXPathstotellZoterowhereintheHTMLinformaoncanbefound.Zoterohasmanyitemtypes,thisallowstheusertospecifywhattypeofitemZoteroshouldassign.Completelistofitemtypesavailableathp://aurimasv.github.io/z2csl/typeMap.xmlDetecttellsZoteroifthepageitiscurrentlyonisonethatcontainsapotenalitem.TitletellsZoterowheretheitem’stlecanbefound,thisisarequiredfield.Zoterocanalsoaachitemstoitsrecords.Thefirstitemissimplyasnapshotofthewebpage.Thesecondistheimagefilefoundonthewebpage,whichallowsZoterotodownloadandassociateimageswithitsrecords.YoucanassignpathsforallthemetadataelementsthataZoteroitemtypehas.Thelistofelementscanbefoundatthesamelinkfromabove.ThemulscraperiswhatallowsZoterotoaddmulpleentriesfromasearchresultspage.YouneedtoaddadetectsoZoteroknowsitisonaresultspage.Wheretofindthe tlesofeachitemtogeneratethelistofpossibleentries,andtheURLthatleadstotheindividualitempagewhereitcanscrapethemetadata.YouusewhatareknownasregularexpressionstotellZoterohowtocleanupthemetadataCreatingzoterotranslatorsusingscaffold
  2. 2. ResourcesforcreatingzoterotranslatorsFirefoxwww.mozilla.orgZoteroforFirefoxwww.zotero.orgScaffoldwww.zotero.org/support/dev/translators/scaffoldHHowtoWriteaZoteroTranslator(nowoutofdatebutslluseful)h p://niche-canada.org/member-projects/zotero-guide/chapter1.htmlUpdatestothepreviousguideh p://www.zotero.org/support/dev/how_to_write_a_zotero_translator_plusplusZoteroDocumentaonh p://www.zotero.org/support/dev/translators/codingh p://www.zotero.org/support/dev/translators/framework
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×