Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/khinsen/gt-zotero

Zotero client for the Glamorous Toolkit
https://github.com/khinsen/gt-zotero

Last synced: 23 days ago
JSON representation

Zotero client for the Glamorous Toolkit

Awesome Lists containing this project

README

        

# A Zotero client for [Glamorous Toolkit](https://gtoolkit.com/)

![screenshot](https://github.com/khinsen/GT-Zotero/raw/main/GT-Zotero.png)

## Installation

1. Launch Glamorous Toolkit and open a Playground.
2. Paste the following lines into the playground and run them
```
Metacello new
baseline: 'Zotero';
repository: 'github://khinsen/GT-Zotero:main/src';
load.
```

## Functionality

For now, GT-Zotero is a read-only client. Its main use case is exploring and searching the items in a Zotero library, using GToolkit inspectors and Pharo code snippets. For managing your library, and in particular for adding items to it, use the Zotero desktop client.

## Accessing your Zotero account

A Zotero account is defined by a username, but the Zotero Web API requires the associated userID, which is a number, plus an "API Token". You can obtain both from https://www.zotero.org/settings/keys, after logging in. The userID is displayed on that page, the API token is generated by clicking on "Create a new private key".

With these two pieces of information, execute the following lines (after substituting your username, userID, and API Token) in a Playground:

```
(ZtUser username: 'my-user-name')
userId: '1234567';
apiToken: '**********************************';
storeCredentials
```

You have to do this only once, your credentials are stored for future use in `FileLocator preferences / 'GT-Zotero' / 'credentials.v1.ston'`.

Once your credentials are stored, you can access your Zotero data by inspecting the result of

```
ZtUser username: 'my-user-name'
```

From the `ZtUser` inspector, you can access your user library and the group libraries for all the groups of which you are a member.

The first time you open a library, all items in it will be downloaded, which might take a few minutes. The data is cached (in `FileLocator home / '.cache' / 'GT-Zotero'`) and only updated (a much faster operation) when the library is accessed from a freshly created `ZtUser` instance.

## Accessing a local Zotero file storage

The Zotero desktop client keeps copies of all the file attachments, which are normally not stored in the Zotero Web account. Under Linux and macOS, the default location of the directory is `${HOME}/Zotero/storage`. GT-Zotero can access this storage, providing one-click access to the attachments, after an additional configuration step in the playground:

```
ZtLibrary configureStorage:
(ZtLocalStorage directory:
(FileLocator home / 'Zotero' / 'storage'))
```

The next time you open a library, it will use the configured storage by default.