Add installation script to facillitate installation
Hi!
Thanks for awesome tool for printing straight to reMarkable. I has benefited my workflow significantly!
Here is a small improvement that might help others to install this fine piece of software :>
Features still needed:
[✓] Basic installation script
[✓] Finding rmapi-bin -folder for user in order to template rmapi-variable for remarkable.sh-script
Possible additional features: [✓] Prompt user for test-printing (test installation success + demo's the software) [ ] Remove need for root user, or at least move the binary to root's home Cheers!
Hey @sampoz !
That looks good.
So, will you merge the script? That would be kind.
Managed to find a bit of time and serenity to improve this.
@ofosos This is (hopefully) getting closer to merging, if you happen to have some spare time, could you check this out and maybe test it with your setup? I have tested this only with my setup.
Anyways, thanks for the original work, printing straight to RM is pretty cool :tada:
I can report that the install script worked on my machine as well, running an Arch Linux installation. Thus, merging might be ok
As I do not want to start a fork of a fork to create a patch of a patch I thought we can discuss this here: The install script takes the installation burden from the user which is great. However, the user might miss the fact that the standard folder into which CUPS is going to print is set to /Printer.... If this does not exist, rmapi corresponds with a rather non-helpfull but correct error message via the cups web-service "Folder unkown". I think at that point the user is lost what to do and what folder is actually missing
I propose that the installation script a) ask for the folder to print into b) check if the folder exist on the remarkable and if not create it via rmapi mkdir.
This should make the installation script more fail-safe.
Furthermore, I would consider taking into account that rmapi has an issue about installing in the config into the standard XDG_CONFIG folder (e.g. ~/.config/rmapi). click here If this is going to happen, the installation script will fail. Maybe one can leave a note for the future self in the script pointing to the issue and the possible solution, thus it is quickly fixed.
First of all, thanks for feedback!
I propose that the installation script a) ask for the folder to print into b) check if the folder exist on the remarkable and if not create it via rmapi mkdir.
Excellent plan and a good catch on the "use before create" on the folder. I thought about this on the first pass, but forgot it when hammering down the current version :sweat_smile:
I don't know when I will have time to implement this, but if it takes long, this PR should be merged before (and new work based on master)
Furthermore, I would consider taking into account that rmapi has an issue about installing in the config into the standard XDG_CONFIG folder (e.g. ~/.config/rmapi). click here If this is going to happen, the installation script will fail. Maybe one can leave a note for the future self in the script pointing to the issue and the possible solution, thus it is quickly fixed.
Okay, good detective work! I'll add this to the todo.
New todo:
- [ ] Add folder test + creation if nonexistent :open_file_folder:
- [ ] Add warning about rmapi config creation :warning: