Skip to content

rubiojr/tlz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timelinize Risor client and CLI

Timelinize Risor client provides a convenient way to interact with the Timelinize API using the Risor programming language. This package allows you to search, manage and import data into Timelinize repositories.

Installation

This package is designed to be used with Risor. Make sure you have Risor installed before using this client.

Basic Usage

import tlz

# Create a new Timelinize client.
# arg1: Timelinize URL
# arg2: Repository ID (the repository must exist)
#
repo := "35b953ea-5f60-4f4d-86f2-acb1c7a52644"
client := tlz.new_client("http://localhost:12002", repo)

# List open repositories.
#
client.open_repositories().json()

# List file selector roots.
#
client.file_selector_roots().json()

# Open existing or create a new repository
# path: the filesystem path where the repo lives
# create: create the repository if it doesn't exist
#
client.open_repository("/home/rubiojr/tmp/foobarstuff", false).json()

# Search items text
# repo: repo ID
# opts: search parameters (see https://github.com/timelinize/timelinize/blob/9dd00b724c1497df262be90f04229ac1b22e7f59/timeline/search.go#L40)
#
# Exact match
client.search_items(repo, { datasource: "firefox", data_text: ["guides and information"] }).json()
# Semantic search
client.search_items(repo, { datasource: "firefox", semantic_text: "guides" }).json()

API documentation

See api.md.

Examples

You can find more examples in the examples directory.

CLI Usage

Building the CLI

You'll need rsx installed, then:

./script/build

The Timelinize CLI provides command-line access to Timelinize functionality. Run with --help for usage information.

$ tlz --help

Searching items

Search for items in the timeline using text search:

$ tlz search --text "your search query"

Or use semantic search:

$ tlz search --semantic "your search query"

Searching entities

Search for entities (people, contacts, etc.) by name, phone, or email:

$ tlz search-entities --name "John Doe"
$ tlz search-entities --phone "555-1234"
$ tlz search-entities --email "john@example.com"

Importing files

$ tlz import --file <path-to-file>

This would import contacts from a VCARD file for example:

$ tlz import --data-source vcard --file /home/rubiojr/tmp/contacts.vcf

About

Timelinize Risor client and CLI

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages