-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update dependency, publish newsletters and add the not by ai b…
…adge
- Loading branch information
1 parent
936e7f3
commit a02f573
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |