11-08-2014, 08:28 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2014
Device: Galaxy Tab
|
Please help with collecting news with a Calibre task
Hi,
I am using Calibre to collect BBC news using the "collecting news" option to send them in a Kindle format to my tablet. To do this I am using a Windows task which starts calibre-portable every morning - I have a planned task within Calibre to collect the news and send them. It works very well, except that once the Windows task has started it remains active and prevents opening any new standard instance of Calibre, with a curse from Python. I cannot do anything like converting e-books. I must first kill the task before being able to run Calibre. If somebody has a clue, thank you in advance for your help. :-) |
11-08-2014, 11:00 AM | #2 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2014
Device: Galaxy Tab
|
Thanks to the suggestions from this Forum software I have discovered option --shutdown-running-calibre. I think this should solve my problem.
Almost happy Waiting to see tomorrow morning if everything is OK. |
11-08-2014, 01:59 PM | #3 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
As an alternative to launching calibre, you can also retrieve News via the command line.
As a test I made the following batch file: Code:
@Echo Off setlocal rem ====== rem Customization can be done here rem news_file output name for the ebook to be written too; if you might be running multiple retrivals at the same time rem ensure unique names are used rem news_recipe Recipe being retrieved. This can either be the name of a built-in calibre recipe (ie "The Toronto Star.recipe") rem or an actually recipe file. Custom recipes made by calibre are stored in the custom_recipes directory of the calibre preferences rem for instance C:\Users\Peter\AppData\Roaming\calibre\custom_recipes\Pocket_1000.recipe rem Remember, if either the recipe name or the custom recipe name contain spaces, enclose them in quotation marks rem news_username if the recipe needs a userid specify it here rem news_password if the recipe needs a password specify it here set news_file=__thestar__.epub set news_recipe="The Toronto Star.recipe" set news_username= set news_password= rem If we need either a userid or password then add them to the command line if not "%news_username%" == "" set news_userpwd=--username %news_username% if not "%news_password%" == "" set news_userpwd=%news_userpwd% --password %news_password% Rem Ensure we're in the Windows temp directory cd /d %temp% Rem remove the existing news we might have downloaded if exist %news_file% del %news_file% Rem retrieve the news feed ebook-convert %news_recipe% %news_file% %news_userpwd% if not exist %news_file% goto :eof Rem add the retrieved news to calibre calibredb add %news_file% If you want to use a custom recipe for the news to retrieve, they are stored in the custom_recipes directory within the calibre preferences directory. In my case this would be C:\Users\Peter\AppData\Roaming\calibre\custom_reci pes and have names like Pocket_1000.recipe I've included a range of variables to let you specify things like the output name, the recipe, and username / password |
11-09-2014, 12:32 AM | #4 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If the task runs only when the user is logged in, it should display the calibre GUI.
Tasks that run "whether the user is logged in or not" don't show the GUI. If you want it to run even when you aren't logged in, then you can use a script for the task, which launches calibre, then does "timeout /t 900" or however many seconds you figure the job may take, then kills calibre with the --shutdown-running-calibre option automatically. Make sure you choose a time long enough for the job to complete! I would start calibre say 3 hours before I wake up, then let it run for 3 hours, then quit, so: Code:
:: these are 2 comment lines (windows kludge) :: "start" is used so we don't wait for calibre to close before continuing start calibre.exe timeout /t 10800 calibre --shutdown-running-calibre Last edited by eschwartz; 11-09-2014 at 12:35 AM. |
11-09-2014, 07:57 AM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2014
Device: Galaxy Tab
|
Thank you both for your advice.
I am using a standard recipe which suits my needs. I am also relying on the sending mechanism offered by Calibre. I used to be a geek at a time when the word did not exist. Now I tend to keep things easy By the way, my problem has been solved by running an other task with option shutdown :-) Last edited by marcepa; 11-09-2014 at 08:01 AM. |
11-09-2014, 09:55 AM | #6 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
|
|
11-09-2014, 01:05 PM | #7 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Heck or my approach with one task which works whether calibre is running or not.
|
11-09-2014, 01:37 PM | #8 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre and Windows 7 Task Schedule problem. | JayKindle | Calibre | 51 | 05-25-2014 03:02 AM |
Collecting information? | kindleBunny | Amazon Kindle | 2 | 12-18-2012 02:14 AM |
Collecting device stats | nickredding | Calibre | 9 | 12-12-2011 10:25 PM |
Run Calibre as Task in Windows 7 | nchall114 | Calibre | 10 | 04-22-2010 10:29 AM |
Standalone Server(linux) version just for collecting news? | bigreat | Calibre | 8 | 02-25-2010 01:03 PM |