diff --git a/docs/newsletter/2024_10.md b/docs/newsletter/2024_10.md new file mode 100644 index 00000000000..f57ab1f72b4 --- /dev/null +++ b/docs/newsletter/2024_10.md @@ -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) \ No newline at end of file diff --git a/pdm.lock b/pdm.lock index 25a7c4715bf..6c45b8b82b4 100644 --- a/pdm.lock +++ b/pdm.lock @@ -568,7 +568,7 @@ files = [ [[package]] name = "mkdocs-material" -version = "9.5.42" +version = "9.5.43" requires_python = ">=3.8" summary = "Documentation that simply works" dependencies = [ @@ -585,8 +585,8 @@ dependencies = [ "requests~=2.26", ] files = [ - {file = "mkdocs_material-9.5.42-py3-none-any.whl", hash = "sha256:452a7c5d21284b373f36b981a2cbebfff59263feebeede1bc28652e9c5bbe316"}, - {file = "mkdocs_material-9.5.42.tar.gz", hash = "sha256:92779b5e9b5934540c574c11647131d217dc540dce72b05feeda088c8eb1b8f2"}, + {file = "mkdocs_material-9.5.43-py3-none-any.whl", hash = "sha256:4aae0664c456fd12837a3192e0225c17960ba8bf55d7f0a7daef7e4b0b914a34"}, + {file = "mkdocs_material-9.5.43.tar.gz", hash = "sha256:83be7ff30b65a1e4930dfa4ab911e75780a3afc9583d162692e434581cb46979"}, ] [[package]]