Fix termux-api hangs with no output

I wanted to run some scripts based on the notifications I received

I track my spendings using hledger on my laptop. To automate it I decided to use Termux and get access to notifications I get from my bank application.

I then wanted to write a script to parse those notifications and add relevant ones to my hledger journal.

Termux has awesome package for this called termux-api. To get list of notifications one can use termux-notifications-list.

This command just hangs. To make it run properly you need to start the api service with termux-api-start.

In my case this command didn't work.

Proxy Information
Original URL
gemini://g.codelearn.me/2024-10-03-termux-api-hangs.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
506.639967 milliseconds
Gemini-to-HTML Time
0.219829 milliseconds

This content has been proxied by September (3851b).