I got tired of drag/dropping the epubs onto the drop target in Windows -
so I created a .bat file for Windows that mimics the shell script behavior from page one (looks for the most recent .epub in the (default) Windows Downloads folder, moves it it to /Dropbox - puts it through kindle-hyphens, converts it to azw3 (with justification justify), removes special characters from the filename and moves the azw3 to /Dropbox/Books/ -).
You still have to install all the dependencies mentioned in the previos posting - including the rename.bat, and have them in the folders the script expects them to be - so follow the instructions in the previous posting (
https://www.mobileread.com/forums/sh...0&postcount=22) as you may have done previously and only replace the drag/drop .bat with a .bat containing the following text.
Code:
@echo off
:ask
FOR /F "delims=|" %%I IN ('DIR "%HOMEPATH%\Downloads\*.epub" /B /O:D') DO SET NewestePub=%%I
FOR %%i IN ("%NewestEpub%") DO SET EpubName=%%~ni
echo %NewestePub%
echo Is this an english epub?
set INPUT=
set /P INPUT=Type y/n: %=%
If /I "%INPUT%"=="y" goto yes
If /I "%INPUT%"=="n" goto no
:yes
goto english
:no
goto other
:english
move "%HOMEPATH%\Downloads\%NewestePub%" "%HOMEPATH%\Dropbox\%NewestePub%"
start /wait ebook-meta "%HOMEPATH%\Dropbox\%NewestePub%" --language en
start /wait calibre-debug -e "C:\kindle-hyphens\main.py" "%HOMEPATH%\Dropbox\%NewestePub%" "%HOMEPATH%\Dropbox\%ePubName%_temp.epub"
start /wait ebook-convert "%HOMEPATH%\Dropbox\%ePubName%_temp.epub" "%HOMEPATH%\Dropbox\%ePubName%.azw3" --change-justification justify
goto fin
:other
move "%HOMEPATH%\Downloads\%NewestePub%" "%HOMEPATH%\Dropbox\%NewestePub%"
start /wait calibre-debug -e "C:\kindle-hyphens\main.py" "%HOMEPATH%\Dropbox\%NewestePub%" "%HOMEPATH%\Dropbox\%ePubName%_temp.epub"
start /wait ebook-convert "%HOMEPATH%\Dropbox\%ePubName%_temp.epub" "%HOMEPATH%\Dropbox\%ePubName%.azw3" --change-justification justify
goto fin
:fin
del "%HOMEPATH%\Dropbox\%ePubName%_temp.epub"
move "%HOMEPATH%\Dropbox\%ePubName%.azw3" "C:\kindle-hyphens\out\%ePubName%.azw3"
call "C:\kindle-hyphens\rename.bat"
move "C:\kindle-hyphens\out\*.azw3" "%HOMEPATH%\Dropbox\Books\"
echo Script has finished.
echo The .azw3 should now be in the Dropbox\Books\ folder.
pause
exit
You don't have to use this, you can still use the old drag/drop target .bat, in fact you can use both - Its your choice.
edit:
And here is how you make it as easy as possible to launch that thing.

In fact lets aim for three button presses.
Once you made sure the .bat works for you as intended (you could edit folder paths for example, although you shouldnt have to), or change the meta data language that gets set and makes sure that the correct hyphenation rules are applied - you can download "bat2exe converter" (
http://www.f2ko.de/en/b2e.php) and a nice .ico icon (f.e.:
https://www.iconfinder.com/icons/274...tudy_text_icon), convert the .bat into an .exe (don't forget to include your .ico file using the option in the third rider (afair)), name the .exe however you want (f.e. epubmove.exe), right click on it and select "Attach to Start Menu".
Once you've done that pressing the Windows key followed by e and p (you are spelling out epubmove.exe), should bring the .exe into focus and allow you to run it by simply pressing enter.
Thats four button presses to launch the program - two more to define the metadata language in your .epub - and after that the .azw3 is ready in your /Dropbox/Books/ folder, waiting to be synced.
(Tested with Windows 7 and above, Windows XP had an issue relating filenames with spaces in them (at least with the older droptarget .bat), once you converted the .bat to an .exe - you'd have to test if it works with this one.)