Does anyone have a working Python or Bash (curl) script that uses ETAPI? #6320
-
Hi all I know this project is out of maintenance, but maybe someone follows this. I have spent a lot of time trying to get a simple Python / bash script to perform a simple Trilium ETAPI task, and I am failing miserably. I got in a loop of "router not found" or "authorization failed". Then I deleted all my code and asked AI - to my satisfaction, AI fails, too :) So if someone has a simple working script that reads one single note using ETAPI key (or any other way to access) I'll gladly accept it as a starting point Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can try my module https://github.com/Nriver/trilium-py |
Beta Was this translation helpful? Give feedback.
-
Thank you, Nriver. |
Beta Was this translation helpful? Give feedback.
-
Hi @SomwareHR ,
I would appreciate it if you gave TriliumNext a try.
Here's a Bash script that uses #!/usr/bin/bash
# Configuration
TOKEN=z1vA4fkGxjOR_ZXLrZeqHEFOv65yV3882iFCRtNIK9k9iWrHliITNSeQ=
SERVER=http://localhost:8080
# Download a note by ID
NOTE_ID="i6ra4ZshJhgN"
curl "$SERVER/etapi/notes/$NOTE_ID/content" -H "Authorization: $TOKEN" Don't forget to update the |
Beta Was this translation helpful? Give feedback.
Hi @SomwareHR ,
I would appreciate it if you gave TriliumNext a try.
Here's a Bash script that uses
curl
to download the content of a note:Don't forget to update the
TOKEN
(in Settings -> ETAPI),SERVER
(including p…