Documentation
¶
Index ¶
- type ReportFunc
- type TpixSdk
- func (t *TpixSdk) BundlePackage(srcDir string, outputFile string, excludedFiles []string) (string, error)
- func (t *TpixSdk) CreateZoteroExport(name string, namespaceID string, libraryType string, libraryID int64, ...) (string, error)
- func (t *TpixSdk) DeleteZoteroExport(exportID string) error
- func (t *TpixSdk) DownloadPackage(pkgSpec string, cacheDir string, noDeps bool) ([]deps.Dependency, error)
- func (t *TpixSdk) DownloadProjectDependencies(projectDir string, cacheDir string, dryRun bool) error
- func (t *TpixSdk) FetchZoteroExport(exportID string, writer io.Writer) error
- func (t *TpixSdk) GetPackageIndex() (string, error)
- func (t *TpixSdk) GetUserProfile() (*api.UserProfile, error)
- func (t *TpixSdk) ListZoteroLibraries() ([]api.ZoteroLibrary, error)
- func (t *TpixSdk) PushPackage(packagePath string, namespace string) error
- func (t *TpixSdk) QueryPackage(pkgSpec string) (*api.PackageResponse, error)
- func (t *TpixSdk) SearchPackages(namespace string, query string, kind string, category string, sort string, ...) (*api.SearchResponse, error)
- func (t *TpixSdk) WithReporter(reporter ReportFunc)
- type ZoteroLibrary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReportFunc ¶
type ReportFunc func(message string)
type TpixSdk ¶ added in v0.10.0
type TpixSdk struct {
// contains filtered or unexported fields
}
func NewTpixSdk ¶ added in v0.10.0
func NewTpixSdk(httpClient *api.HttpClient) *TpixSdk
func (*TpixSdk) BundlePackage ¶ added in v0.10.0
func (*TpixSdk) CreateZoteroExport ¶ added in v0.10.0
func (t *TpixSdk) CreateZoteroExport(name string, namespaceID string, libraryType string, libraryID int64, collectionKey string, format string) (string, error)
CreateZoteroExport creates an export target on the TPIX server.
func (*TpixSdk) DeleteZoteroExport ¶ added in v0.10.0
DeleteZoteroExport deletes an existing Zotero export.
func (*TpixSdk) DownloadPackage ¶ added in v0.10.0
func (t *TpixSdk) DownloadPackage(pkgSpec string, cacheDir string, noDeps bool) ([]deps.Dependency, error)
DownloadPackage download Typst packages from TPIX server and returns downloaded package spec list.
pkgSpec should follow the pattern: @namespace/name:version. Refer to deps.ParseDependency to know details. If noDeps is true, it will skip fetching transitive dependencies.
The first item of returned slice will always be the pkgSpec.
func (*TpixSdk) DownloadProjectDependencies ¶ added in v0.10.0
func (*TpixSdk) FetchZoteroExport ¶ added in v0.10.0
FetchZoteroExport fetches the content of a Zotero export.
func (*TpixSdk) GetPackageIndex ¶ added in v0.10.0
ListLLMAccesiblePackages retrieves a markdown file containing all user accessible package/template metadata. This API is dedicated for LLM use.
func (*TpixSdk) GetUserProfile ¶ added in v0.10.0
func (t *TpixSdk) GetUserProfile() (*api.UserProfile, error)
GetUserProfile queries the user profile from TPIX server.
func (*TpixSdk) ListZoteroLibraries ¶ added in v0.10.0
func (t *TpixSdk) ListZoteroLibraries() ([]api.ZoteroLibrary, error)
ListZoteroLibraries returns the list of Zotero libraries accessible to the user.
func (*TpixSdk) PushPackage ¶ added in v0.10.0
func (*TpixSdk) QueryPackage ¶ added in v0.10.0
func (t *TpixSdk) QueryPackage(pkgSpec string) (*api.PackageResponse, error)
func (*TpixSdk) SearchPackages ¶ added in v0.10.0
func (t *TpixSdk) SearchPackages(namespace string, query string, kind string, category string, sort string, limit int) (*api.SearchResponse, error)
SearchPackages searches Typst packages from TPIX server.
func (*TpixSdk) WithReporter ¶ added in v0.10.0
func (t *TpixSdk) WithReporter(reporter ReportFunc)
type ZoteroLibrary ¶
type ZoteroLibrary = api.ZoteroLibrary
ZoteroLibrary represents a Zotero library.