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

Zotero translators handout

361 views

Published on

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

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
361
On SlideShare
0
From Embeds
0
Number of Embeds
71
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
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

×