reSnap
reSnap copied to clipboard
Feature request: prepend notebook name into the filename of the screenshot
Hi There, Great tool you have here and I'm finding some solid value with it.
One quick request would be to give the option via a flag to prepend the name of the Remarkable Notebook onto the filename for easier automation down the line.
Thanks.
Hi.
Sorry but I have no idea, how I could get the information, wich notebook is currently opened.
If you find a way you could let me know or implement it and open a PR.
I couldn't find a direct call on active notebook name, but here is a repo showing where to see notebook names and last modified date. Might be worth exploring... ? https://github.com/oisinmulvihill/remarkable-friend
@ryanmccool this seems to do the trick,
FILENAME=$(ssh_cmd "basename \$(ls -t /home/root/.local/share/remarkable/xochitl | head -n 1) | cut -d '.' -f 1")
METADATA=$(ssh_cmd "cat /home/root/.local/share/remarkable/xochitl/$FILENAME.metadata")
echo "$FILENAME"
echo "$METADATA"
700a5723-8ee4-447e-9cee-e1821d1fb734
{
"createdTime": "1723586270943",
"lastModified": "1723773221422",
"lastOpened": "1723773221716",
"lastOpenedPage": 18,
"parent": "",
"pinned": false,
"type": "DocumentType",
"visibleName": "Quick sheets"
}
@cloudsftp is this still something you'd be open to a PR for? I'm not entirely sure what data people would want out of it, but the uuid and page makes sense to me
@404Wolf This is pretty cool, nice work.
I think the most relevant data for users is visibleName
. Perhaps use it for the output file name if no other file name is specified (with a timestamp appended to it).
But also I'd like to keep the jq
dependency optional, so maybe run a check first and only use the timestamp as the output file name?
Thanks for your work. I will get to your PRs soon.
PS. Please target latest with you PRs, I forgor to delete the develop branch 💀
@404Wolf This is pretty cool, nice work.
I think the most relevant data for users is
visibleName
. Perhaps use it for the output file name if no other file name is specified (with a timestamp appended to it).But also I'd like to keep the
jq
dependency optional, so maybe run a check first and only use the timestamp as the output file name?Thanks for your work. I will get to your PRs soon.
PS. Please target latest with you PRs, I forgor to delete the develop branch 💀
Oh, yeah thanks for letting me know! I will fix that. And I've eliminated the jq dependency by ls-ing with -t
or --time
(I need to play around more to get it right), which sorts by modification date (who would've known -- no questionable awk!).
I'm thinking that we default to naming the file the visible name, yeah, but have a -uuid flag to name it the uuid (one can get the visible name from the uuid trivially, but not vice versa, so the option would be good.
You can get the full path too, like /foo/bar/buzz, but that requires recursion, which is usually where I stop using bash (but could be done)
Also I've managed to get a better color curve, which is currently part of a longer python script, but I can get to bashifying it. The main issue with the current color correction is that it totally gets rid of gridlines.
Thanks for creating reSnap, it's been a very positive inspiration :)
Originally, I just wanted to prepare the argument handling - but I ended up implementing the feature.
https://github.com/cloudsftp/reSnap/pull/21 It's not perfect yet, but what do you think?
I want to keep the configuration options low, so I don't want to include the --uuid
option or the full path of the notebook.
Originally, I just wanted to prepare the argument handling - but I ended up implementing the feature.
#21 It's not perfect yet, but what do you think?
I want to keep the configuration options low, so I don't want to include the
--uuid
option or the full path of the notebook.
Could we put the uuid into stdout so that people can use it if they want, just so it's there if people want to parse it out of the output? Otherwise this seems good, I'll try it a little later!