I spent a few hours writing this article today. I wanted to further expand on my e-reader experience, and my personal journey of getting capsules saved as epubs. If you have some time, please check it out! gemini://sdf.org/smokey/ereader.gmi
A big thank you to @kelbot who is mentioned heavily in it, for their work on the subject at hand. You're awesome!
2 years ago 路 馃憤 lykso
gemini://sdf.org/smokey/ereader.gmi
Glad to hear you figured it out! 路 2 years ago
@smokey "improved" as in fixed a silly bug X-). There is also a third option for pulling the gmi docs in the script. ew0k's gemcall! 路 2 years ago
@smokey my xmpp is "kel" @ cyberbot.space 路 2 years ago
@kelbot Thank you for the kind response! I am down to talk with you on email or xmpp, whatever is fine with you. A new and improved script? Thats awesome! 路 路 2 years ago
@lykso Thank you very much for informing me! I did have it pointing to the wrong directory. my own computer points its bash to /usr/bin/bash which i fixed in the scripts. However, this did not fix the problem. I failed to describe what exactly went wrong, Its not that the script fails to execute without running bash, but that something goes wrong in the operations which either crash the terminal prematurely, or fails to generate the epub output right. Which is wiieeerd, and seems to imply a problem with ebook-convert? Its certainly executes, but something goes wrong after. Again, running it with bash seems to fix the issue, even though i fixed the compiler directory. 路 2 years ago
PS. It looks like station is eating the plus symbol. There should be a plus symbol directly in from of the x in the chmod command. 路 2 years ago
@lykso is right. It is very likely that you just need to make your script executable with chmod x. Also, I usually use #!/bin/sh for my shell scripts. /bin/sh should invoke whatever your default shell is. As long as your script is POSIX compliant and doesn't require anything bash specific this is the preferred way I believe. 路 2 years ago
Regarding having to type "bash script.sh," I'd guess that your problem may be either that the script isn't set to be executable *or* that your interpreter line isn't pointing to bash's actual location.
Probably you know how to resolve both these issues, but just in case:
You'd confirm the latter by checking what "which bash" returns. I've seen "#!/usr/bin/env bash" used as the interpreter line in order to avoid this problem and improve portability.
You'd fix the former by running "chmod x script.sh"
LMK if either of these fix the problem! 路 2 years ago
Very nice! I've been meaning to do an update post as I've made a couple tweaks to my script. I should get on that. If you want to exchange emails or XMPP I'd be happy to try and help figure out why my script was failing for you. 路 2 years ago