Skip to content
Brian Feldman edited this page Nov 28, 2018 · 3 revisions

Fetch / Download

gov.uspto.bulkdata.cli.Fetch -f="." --fetch-type="grant" --fetch-date="20181101-20181115" --outDir="./target/output"

View / Show / Look at

View Types [raw, object, json, json_flat, patft, txt]

gov.uspto.bulkdata.cli.View --input="../download/ipg180102.zip" --skip=2 --limit=1 --type="text"

View Text Values of Specific Fields
--fields=? shows the available fields: [doc_id, doc_production_date, doc_published_date, application_id, application_date, priority_id, related_id, other_id, applicant, inventor, assignee, agent, examiner, citation, classification, search_classification, title, abstract, description, claim]

gov.uspto.bulkdata.cli.View --input="../download/ipg180102.zip" --skip=0 --limit=1 --fields="doc_id,inventor"

ipg180102.zip:1 ---------------------------
DOC_ID : USD0806350S1
INVENTOR : Lecointe, Armelle (Malesherbes, FR) || Bisson, Laurent (Escrennes, FR)

Grep / Find / Search

Grep using XPATH

gov.uspto.bulkdata.cli.Grep --input="../download/ipgCPCs09603307.zip" --xpath="//description/p[contains(descendant-or-self::text(),'computer')]"

Grep using REGEX

gov.uspto.bulkdata.cli.Grep --input="../download/ipgCPCs09603307.zip" --xpath="//description/descendant::text()" --regex="computer"

Grep display matching XML nodes

gov.uspto.bulkdata.cli.Grep --input="../download/ipgCPCs09603307.zip" --skip=0 --limit=0 --xpath="//doc-number[contains(., '09603307')]" --matching-xml

ipgCPCs09603307.zip:1 : document-id/doc-number:[0] -- <doc-number>09603307</doc-number>
Records Matched: 1 of 1

Grep dump out matching values

--only-matching --no-source

Transform (with normalizations and enhancements)

Output Types [raw, object, json, json_flat, patft, txt]

gov.uspto.bulkdata.cli.Transformer --input="../download/ipg180102.zip" --skip=0 --limit=0 --type="json" --outDir="./target/output" --bulkKV=true --outputBulkFile=true

Match Before Transforming XPATH

gov.uspto.bulkdata.cli.Transformer --input="../download/ipg180102.zip" --skip=0 --limit=0 --type="json" --outDir="./target/output" --bulkKV=true --outputBulkFile=true --xpath="//invention-title[contains(text(), 'Food')]"

Match Before Transforming REGEX

gov.uspto.bulkdata.cli.Transformer --input="../download/ipg180102.zip" --skip=0 --limit=0 --type="json" --outDir="./target/output" --bulkKV=true --outputBulkFile=true --xpath="//invention-title/text()" --regex="Food"

XSLT Stylesheet

gov.uspto.bulkdata.cli.Xslt --input="../download/ipg180102.zip" --skip=0 --limit=1 --xslt="example.xslt" --prettyPrint=true

Extract Fields from XML

gov.uspto.bulkdata.cli.ExtractFields --input="../download/ipg180102.zip" -f="art_unit://examiners/primary-examiner/department" -f="examiner_name://examiners/primary-examiner/first-name|//examiners/primary-examiner/last-name"

#art_unit,examiner_name,
2915,Kirschbaum|George D,
2911,Rademaker|Garth,

Extract Fields of Matching

gov.uspto.bulkdata.cli.ExtractFields --input="../download/ipg180102.zip" --match="//examiners/primary-examiner/department[contains(., '1625')]" -f="art_unit://examiners/primary-examiner/department/." -f="examiner_name://examiners/primary-examiner/first-name|//examiners/primary-examiner/last-name"

#art_unit,examiner_name,
1625,Jarrell|Noble E,
1625,Kosar|Andrew D,