=> 馃懡 bacardi55

Saving gemini pages (via lagrange) to wallabag (via wallabag-cli) with 2 lines of bash:

gemini://gmi.bacardi55.io/gemlog/2021/08/08/gemini-to-wallabag/

3 years ago 路 馃憤 mc, skyjake

Links

=> gemini://gmi.bacardi55.io/gemlog/2021/08/08/gemini-to-wallabag/

Actions

=> 馃憢 Join Station

4 Replies

=> 馃懡 isoraqathedh

Here's my take. I tend to not like to use temporary variables in shells, substituting them with piplines whenever possible.

lagrange --tab-url |

sed 's|^gemini://|https://proxy.vulpes.one/gemini/|' |

xargs wallabag add 路 3 years ago

=> https://proxy.vulpes.one/gemini/

=> 馃懡 bacardi55

@skyjake : Good to know! Thanks :)

@isoraqathedh : I'm not a bash expert but I'm happy to put an example your way if you give me the exact command you would have in mind :) 路 3 years ago

=> 馃懡 isoraqathedh

Very cool. I would have written it as a pipeline, with the proxy URL rolled into the substitution (and swapping s/// with s||| - you can do that!) and then an xargs to throw the argument into the wallabag command. To me that's a bit clearer what you're doing. 路 3 years ago

=> 馃懡 skyjake

Nifty! One thing to note about Lagrange's --tab-url option, though: since it uses IPC, at the moment it doesn't work in Flatpak builds due to sandbox restrictions. Flatpak requires all IPC to use D-Bus and that has not been implemented yet. 路 3 years ago

Proxy Information
Original URL
gemini://station.martinrue.com/bacardi55/93167109194b4f999e9f7e177630cc2d
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
165.27623 milliseconds
Gemini-to-HTML Time
1.058826 milliseconds

This content has been proxied by September (ba2dc).