The tg-add-library-document command adds documents to the TrustGraph library system with rich metadata management. The library approach provides better document lifecycle management and processing control compared to direct document loading.
Documents added to the library can later be processed using tg-start-library-processing.
Options
Required Arguments
Option
Description
files
One or more files to add to the library
Optional Arguments
Option
Default
Description
-u, --url URL
$TRUSTGRAPH_URL or http://localhost:8088/
TrustGraph API URL
-t, --token TOKEN
$TRUSTGRAPH_TOKEN
Authentication token
-U, --user USER
trustgraph
User identifier
Document Metadata
Option
Description
--name NAME
Document name/title
--description DESCRIPTION
Document description
--id ID
Custom document identifier (defaults to content hash)
--kind MIMETYPE
Document MIME type (auto-detected if not specified)
--tags TAGS
Comma-separated list of tags
--document-url URL
Original document source URL
--keyword KEYWORDS
Document keywords (space-separated)
Copyright Information
Option
Description
--copyright-notice NOTICE
Copyright notice text
--copyright-holder HOLDER
Copyright holder name
--copyright-year YEAR
Copyright year
--license LICENSE
Copyright license
Publication Information
Option
Description
--publication-organization ORG
Publishing organization name
--publication-description DESC
Publication description
--publication-date DATE
Publication date
--publication-url URL
Publication URL
Examples
Basic Document Addition
tg-add-library-document report.pdf
With Complete Metadata
tg-add-library-document \--name"Annual Research Report 2024"\--description"Comprehensive analysis of research outcomes"\--copyright-holder"Research Institute"\--copyright-year"2024"\--license"CC BY 4.0"\--tags"research,annual,analysis"\
annual-report.pdf