Documentation
¶
Index ¶
- func BundlePackage(srcDir string, outputFile string, excludedFiles []string) (string, error)
- func CreateZoteroExport(name string, namespaceID string, libraryType string, libraryID int64, ...) (string, error)
- func DeleteZoteroExport(exportID string, reporter ReportFunc) error
- func DownloadPackage(pkgSpec string, cacheDir string, noDeps bool, reporter ReportFunc) (int, error)
- func DownloadProjectDependencies(projectDir string, cacheDir string, dryRun bool, reporter ReportFunc) error
- func FetchZoteroExport(exportID string, writer io.Writer) error
- func ListZoteroLibraries() ([]api.ZoteroLibrary, error)
- func ParsePkgSpec(pkgSpec string) (namespace, name, version string)
- func PollLoginResult(deviceCode string, expiresIn int, reporter ReportFunc) (*api.TokenResponse, error)
- func PushPackage(packagePath string, namespace string, reporter ReportFunc) error
- func QueryPackage(pkgSpec string) (*api.PackageResponse, error)
- func SearchPackages(namespace string, query string, kind string, category string, sort string, ...) (*api.SearchResponse, error)
- func StartLogin() (*api.DeviceCodeResponse, error)
- type ReportFunc
- type ZoteroLibrary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BundlePackage ¶
func CreateZoteroExport ¶
func CreateZoteroExport(name string, namespaceID string, libraryType string, libraryID int64, collectionKey string, format string, reporter ReportFunc) (string, error)
CreateZoteroExport creates an export target on the TPIX server.
func DeleteZoteroExport ¶
func DeleteZoteroExport(exportID string, reporter ReportFunc) error
DeleteZoteroExport deletes an existing Zotero export.
func DownloadPackage ¶
func DownloadPackage(pkgSpec string, cacheDir string, noDeps bool, reporter ReportFunc) (int, error)
DownloadPackage download Typst packages from TPIX server. pkgSpec should follow the pattern: @namespace/name:version. Refer to [parsePkgSpec] to know details. If noDeps is true, it will skip fetching transitive dependencies.
func DownloadProjectDependencies ¶
func DownloadProjectDependencies(projectDir string, cacheDir string, dryRun bool, reporter ReportFunc) error
func FetchZoteroExport ¶
FetchZoteroExport fetches the content of a Zotero export.
func ListZoteroLibraries ¶
func ListZoteroLibraries() ([]api.ZoteroLibrary, error)
ListZoteroLibraries returns the list of Zotero libraries accessible to the user.
func ParsePkgSpec ¶
ParsePkgSpec parses a package spec in the format @namespace/name:version Returns namespace, name, and version (version may be empty)
func PollLoginResult ¶ added in v0.6.1
func PollLoginResult(deviceCode string, expiresIn int, reporter ReportFunc) (*api.TokenResponse, error)
func PushPackage ¶
func PushPackage(packagePath string, namespace string, reporter ReportFunc) error
func QueryPackage ¶
func QueryPackage(pkgSpec string) (*api.PackageResponse, error)
func SearchPackages ¶
func SearchPackages(namespace string, query string, kind string, category string, sort string, limit int) (*api.SearchResponse, error)
SearchPackages searches Typst packages from TPIX server.
func StartLogin ¶ added in v0.6.1
func StartLogin() (*api.DeviceCodeResponse, error)
Types ¶
type ReportFunc ¶
type ReportFunc func(message string)
type ZoteroLibrary ¶
type ZoteroLibrary = api.ZoteroLibrary
ZoteroLibrary represents a Zotero library.