Open bf4648 opened 1 year ago
Hey, thanks for feedback! I'm glad you like it! 😄
Exporting a single book is a great idea, I wanted to implement that a while back but I have over a hundred read books in my library so I couldn't think of a clean way of exporting them without cluttering the terminal will tons of text that would have to be scrolled. It could possibly be done with a search term and a confirmation?
$ readstor export --title "art spirit"
-> Found 1 book(s) containing "art spirit":
The Art Spirit by Robert Henri
-> Export 1 book(s)? [y/N]: _
I'm open to ideas/feedback!
RE: sorting. That's odd because the annotations should be sorted by the location
field. It happens in the pre-processor here. And this runs for both export
and render
. There was an issue submitted a while back where the annotations weren't showing up in proper order but that was most likely the result of the parser.
Could you provide some data showing the incorrect sorting and the correct one. I have unit tests with three books where the sort order is checked and they're passing currently.
@bf4648 I took a stab at implementing something to export only a sub-set of the annotations. It's on the feat-fitler
branch if you'd like to try it out. The documentation for it can be found here. I'll probably be merging it into main
sometime soon but won't be releasing it until I implement a few other features.
First of all, I want to say, I love this open-source project! Thank you so much for making it. I do have some recommendations for some enhancements though.
This is currently the way I export my iBook highlights:
I then have to figure out a way to transform this "annotations-sorted.json" file into a markdown format. It would be nice to just add a '--sort' parameter to
readstor export
orreadstor render
. It would especially be helpful to add a--sort
parameter to thereadstor render
command since this already exports to markdown format.