View Single Post
Old 07-07-2010, 03:15 AM   #14
JvdW
Zealot
JvdW doesn't litterJvdW doesn't litter
 
Posts: 115
Karma: 150
Join Date: Jul 2008
Location: Netherlands Veenendaal
Device: Palm T5, Sony PRS-505, Nook Color
Quote:
Originally Posted by karunaji View Post
For me it still doesn't work but for another reason. Windows XP command line batch processing stops after setting the code page to unicode (chcp 65001). No idea why it is so but it looks that it is a documented feature.
Sorry for not posting it but I also found out that it doesn't work yet on XP. It does work now on Win7

This is what I came up with to circumvent the problem on XP. Its not elegant and it might not work for you depending on what you want accomplished.
The following is part of a script which I use to download the latest NRC epub
Code:
REM Add News as tag, and date as comment
start /wait ebook-meta -c %TODAY% --tags=News %TEMP%\nrc-%TODAY%.epub

REM Add to Calibre database
start /wait calibredb add %TEMP%\nrc-%TODAY%.epub

REM Find database ID by looking for comment
REM for /f "tokens=1,2" %%a in ('calibredb list -s comments:%TODAY%') do if %%b==NRC set id=%%a
start /wait c1.bat
for /f %%a in ('type %TEMP%\test.env') do set id=%%a

REM Mark ePaper to be auto-uploaded to reader
start /wait calibre-debug -c "from calibre.gui2 import dynamic; ids = dynamic.get('news_to_be_synced', set([])); ids.add(%id%); dynamic.set('news_to_be_synced', ids)"
As you can see I use 'start /wait ...' to launch the Calibre programs. In that way they don't mess up the original command prompt.

Hope this helps you with your problem

Regards,

Joop
JvdW is offline   Reply With Quote