- Posts: 3
- Thank you received: 1
Help and support for Windows users.
YACReader Library scripting and API
- domiriel
- Topic Author
- Offline
- New Member
-
Less
More
4 years 8 months ago #6479
by domiriel
YACReader Library scripting and API was created by domiriel
Hi!
Over the years, even before I started using YACReader, I've developed a few Python scripts to help me manage my library. As I now organize my comics inside YACReaderLib, it would be nice if there is a possibility to run some scripts against selected comics. I was thinking of something as simple as a context menu option listing "registered scripts", that we would select to get them to run. This would result in the script being called (running the external program as defined in a dialogue box somewhere) with the comics' full pathnames as arguments or (even better, for large selections, perhaps as an option in the "script registering" dialogue) piped in through stdin (the script would just READ them). After the script ends, YACReaderLib would automatically refresh/update those comics.
This would open up a realm of new possibilities and would be fairly simple to implement, while keeping YACReaderLib essentially unchanged and uncomplicated (it is, after all, a power feature). It would especially make it easier to do some batch operations on several files.
The next step for this would be some kind of API to query the database. The simplest way would be to provide some REST endpoints available while the app and server are running. The lack of this is not a showstopper, as we can easily access the contents library.ydb file (sqlite), but would still make it easier to build on top of the "smart" search you have implemented, etc. and is the natural complement of the scripting feature.
I know all of these are rather niche, when compared with the overall user base, but might still be interesting
Keep on the great work!
D.
Over the years, even before I started using YACReader, I've developed a few Python scripts to help me manage my library. As I now organize my comics inside YACReaderLib, it would be nice if there is a possibility to run some scripts against selected comics. I was thinking of something as simple as a context menu option listing "registered scripts", that we would select to get them to run. This would result in the script being called (running the external program as defined in a dialogue box somewhere) with the comics' full pathnames as arguments or (even better, for large selections, perhaps as an option in the "script registering" dialogue) piped in through stdin (the script would just READ them). After the script ends, YACReaderLib would automatically refresh/update those comics.
This would open up a realm of new possibilities and would be fairly simple to implement, while keeping YACReaderLib essentially unchanged and uncomplicated (it is, after all, a power feature). It would especially make it easier to do some batch operations on several files.
The next step for this would be some kind of API to query the database. The simplest way would be to provide some REST endpoints available while the app and server are running. The lack of this is not a showstopper, as we can easily access the contents library.ydb file (sqlite), but would still make it easier to build on top of the "smart" search you have implemented, etc. and is the natural complement of the scripting feature.
I know all of these are rather niche, when compared with the overall user base, but might still be interesting
Keep on the great work!
D.
The following user(s) said Thank You: ZaibatsuRandom
Please Log in or Create an account to join the conversation.
- Luis Ángel
-
- Offline
- Administrator
-
Less
More
- Posts: 3354
- Thank you received: 692
4 years 8 months ago #6485
by Luis Ángel
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
Replied by Luis Ángel on topic YACReader Library scripting and API
I would love to have something like this in the app, it would be nice to have those scripts shared with the community too.
But I don't know when I'll find time to work on it. Hopefully someone will open a PR.
But I don't know when I'll find time to work on it. Hopefully someone will open a PR.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
Please Log in or Create an account to join the conversation.
Moderators: Luis Ángel