binarynonsense / comic-book-reader

ACBR - A comic book reader and converter for CBZ, CBR, CB7, EPUB and PDF files (Windows & Linux)
BSD 2-Clause "Simplified" License
184 stars 8 forks source link

Command Line Parameters For Converting From CMD and/or Drag'n'Drop Onto a Shortcut With Parameters Added #81

Closed LegzRwheelz closed 1 year ago

LegzRwheelz commented 1 year ago

Hi, I love this tool, I have been using an older version for a while (1.24) and use it to convert game strategy guides from PDF↔️CBZ and vice versa for editing purposes. I then add it to my LaunchBox frontend as a game manual for viewing in-game. The old version had a batch convert feature that I had actually asked you to include(which you did and have saved me soooo much time, so thank you again) sadly, that seems to have been removed.

So I am here asking that you please reimplement the batch convert feature in addition to adding command line parameters to run from CMD and Drag'n'Drop CBZ and PDF files for quick conversion. If this is added, I would add 2 separate shortcuts to my right-click>Sent To... context menu (CBZ↔️PDF and PDF↔️CBZ) which is something I do with a lot of my most used utilities.

binarynonsense commented 1 year ago

The current version has the same features as the old ones, and more, including batch conversion. In the conversion tool (Tools>Convert>Comic Books) you can add as many files as you want as before (click the ADD button).

To make conversions from the command line you may find ACBT useful: https://github.com/binarynonsense/comic-book-tools

binarynonsense commented 1 year ago

I forgot, about the drag and drop: right now if you drag a file into the program's icon it opens it in the reader (if it's a valid comic book file), or if you drag it into the already open reader it closes whatever is open and opens the dragged one.

While keeping that, I could try adding that dragging multiple files should directly open them in the conversion tool (problem is there are multiple tools that use the same type of files as input, but could make the convert one the default as it's probably the most used), adding them directly to the list, or if you drag them into the already open conversion tool they should be added to the list.

binarynonsense commented 1 year ago

Also, if I manage to do the above I could also try adding parameters so for example if you use the, lets call it, -cc parameter and drag into an icon using it or provide multiple file paths via the command line it will directly open the convert comic books tool with the list filled with the paths provided (you'd still need to start the conversion manually), if the -cr one is used it opens the create tool... something like that. Is that more or less what you wanted?

LegzRwheelz commented 1 year ago

Hi, thanks for the quick reply! So I am aware of drag'n dropping onto the exe and shortcut for opening the file for viewing. This is what made me think of asking for you to add in parameters for converting. I understand that I would need to manually start it but might I suggest that if running from cmd or a custom/edited shortcut, we can add in an output directory? This way if I were to send to the cbz to pdf shortcut I mentioned earlier, it would output to the directory I define in the custom shortcut. Example: C:\path\to\acbr\comic-book-reader.exe -p D:\output\directory (-p would be the flag to convert to pdf, -cbr to cbr, -cbz to cbz, and -e to epub)

EDIT: Somehow I missed the first comment you made linking me to the command line tool. I will be checking this out. I do like the gui you have created for this tool and the output window though so I still would like to ask that the CLI options be added to the GUI tool. I hope I am not being too needy. Thank you.

binarynonsense commented 1 year ago

Not at all, don't worry about it, I appreciate all the suggestions.

Didn't mention it so I assume you found how to make a batch conversion from the menu entry I referred you to.

I like the idea of expanding the command line options a little so I'll probably try to add some of it and see how well things fit together and how much time it will take. The more options I add to the command line the more I'll have to implement a full command line parser :) (right now that part is pretty bare-bones/straight forward) and change a bit how the program is initialized (I designed this as a GUI focused tool and made ACBT for pure CLI users). I may just allow including multiple files, maybe also choose the tool, and having to choose the other options manually... or keep adding flags/options, we'll see.

I'll add these things to my TODO list to at least think about the possibilities and try things out.

Can't make any promises time-wise, the last few weeks I had some free time to work on the big redesign for version 3 (now available) that I'd been wanting to make for a long time but that's gone. I also have a bunch of other things in the TODO list I want to add in future releases, so I don't know if/when I'll make a new one, much less one including any of these, but I'll try to let you know here when a release including some of these things is available.

LegzRwheelz commented 1 year ago

I truly appreciate your work and kindness. I have been around the scene for a long time now and know that asking ETAs is just downright rude, esp for free programs. The sheer fact that you are giving this away and effectively, small chunks of your life without and kind of reciprocation is incredibly selfless and very much appreciated. Oh and yes, I did find the batch convert feature (sorry I am tired and have ADD so it is like I doubly can't focus lol), I like the batch convert feature and its verbosity. Plus the GUI is so damn pleasant and now being able to use my gamepad with it makes my Gaming HTPC with LaunchBox even more perfect. SOOOOO...I must say with the utmost sincerity, thank you for this great tool!

binarynonsense commented 1 year ago

No problem! Thank you for your kind words and understanding.

Among the things in my TODO list is a simple menu/modal window for the reader you will bring up with the gamepad (probably pressing start) and with a few buttons to be able to at least open files (I also need to make a simple gamepad controlled file browser for this) and quit (maybe also open the history to choose a file in there). So the program is usable for basic reading just with the gamepad (it will require some work but I have a Steam Deck and like using it on it so that's my main motivation to implement this :))

binarynonsense commented 1 year ago

I had some time last night and ended up being able to add some command line arguments without much trouble, so I've made a beta that I think will let you do the things you wanted (haven't thoroughly tested it, hence it being a beta, but seems to work fine). There's more info on the wiki.

Let me know what you think.

LegzRwheelz commented 1 year ago

AWESOME! Thank you so much! I am not at home right now so I can't test and will be gone for about 3 more days. When I get home, I will test and report back. Once again, thank you sooooo much!

binarynonsense commented 1 year ago

I'm closing the issue as solved but let me know if something doesn't work or you have more suggestions.