Skip to content

Commit

Permalink
chore: update dependency, publish newsletters and add the not by ai b…
Browse files Browse the repository at this point in the history
…adge
  • Loading branch information
actions-user committed Oct 30, 2024
1 parent 936e7f3 commit a02f573
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/newsletter/2024_10_29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Life Management

## Knowledge Management

### [Aleph](aleph.md)

* New: [Alephclient cli tool.](aleph.md#alephclient-cli-tool)

alephclient is a command-line client for Aleph. It can be used to bulk import structured data and files and more via the API, without direct access to the server.

**[Installation](https://docs.aleph.occrp.org/developers/how-to/data/install-alephclient/#how-to-install-the-alephclient-cli)**

You can now install `alephclient` using pip although I recommend to use `pipx` instead:

```bash
pipx install alephclient
```

`alephclient` needs to know the URL of the Aleph instance to connect to. For privileged operations (e.g. accessing private datasets or writing data), it also needs your API key. You can find your API key in your user profile in the Aleph UI.

Both settings can be provided by setting the environment variables `ALEPHCLIENT_HOST` and `ALEPHCLIENT_API_KEY`, respectively, or by passing them in with `--host` and `--api-key` options.

```bash
export ALEPHCLIENT_HOST=https://aleph.occrp.org/
export ALEPHCLIENT_API_KEY=YOUR_SECRET_API_KEY
```

You can now start using `alephclient` for example to upload an entire directory to Aleph.

**[Upload an entire directory to Aleph](https://docs.aleph.occrp.org/developers/how-to/data/upload-directory/)**
While you can upload multiple files and even entire directories at once via the Aleph UI, using the `alephclient` CLI allows you to upload files in bulk much quicker and more reliable.

Run the following `alephclient` command to upload an entire directory to Aleph:

```bash
alephclient crawldir --foreign-id wikileaks-cable /Users/sunu/data/cable
```

This will upload all files in the directory `/Users/sunu/data/cable` (including its subdirectories) into an investigation with the foreign ID `wikileaks-cable`. If no investigation with this foreign ID exists, a new investigation is created (in theory, but it didn't work for me, so manually create the investigation and then copy it's foreign ID).

If you’d like to import data into an existing investigation and do not know its foreign ID, you can find the foreign ID in the Aleph UI. Navigate to the investigation homepage. The foreign ID is listed in the sidebar on the right.

* New: [Other tools for the ecosystem.](aleph.md#other-tools-for-the-ecosystem)

0 comments on commit a02f573

Please sign in to comment.