![]() |
#16 |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
I guess I'm unclear what is wrong with this script or why its kicking out a "/home/calibre/CalibreAdd/*" not found message.
if [ "$(ls -A /home/calibre/CalibreAdd)" ]; then calibredb add -r "/home/calibre/CalibreAdd" --library-path="/home/calibre/$ rm "/home/calibre/CalibreAdd/*" fi Similarly: " */10 * * * * calibredb add -r --with-library "/home/calibre/Calibre-Library" --username user --password pwd "/home/calibre/CalibreAdd/*" I suspect trying to get either the crontab or script to work at the same time isn't helping. But the script seems to run and then gives the message that it wont add titles that are already in the library. But I can't find them in the GUI. I see the folder and the book in the /home/calibre/Library/Author folder. Last edited by ckronengold; 01-26-2018 at 04:17 PM. |
![]() |
![]() |
![]() |
#17 |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
For example, my crontab:
*/10 * * * * calibredb add -r --with-library "/home/calibre/Calibre-Library" --username user --password pwd "/home/calibre/CalibreAdd/*" looks like its working, but the titles aren't being added on the front end. I can't find them in the webpage GUI (localhost:8080) but I see the folder and the book in the /home/calibre/Library/Author folder. The following books were not added as they already exist in the database (see --duplicates option): Title : Horse Soldiers Author(s) : Doug Stanton Publisher : Simon and Schuster Languages : eng Published : 2009-01-15T05:00:00+00:00 Rights : Copyright © 2009 by Reed City Productions, LLC Comments : From the New York Times-bestselling author of In Harm's Way comes a true-life story of American soldiers overcoming great$ Title : Half of a Yellow Sun Author(s) : Chimamanda Ngozi Adichie Publisher : Anchor Book Producer : calibre (0.8.27) [http://calibre-ebook.com] Tags : Political, General, Fiction, Nigeria, Literary, Historical Languages : eng Published : 2006-01-02T08:00:00+00:00 Identifiers : isbn:9781400095209, mobi-asin:a3e07eac-65ba-440b-8ab1-696eaf7d9e45 Title : Astrophysics for People in a Hurry Author(s) : Neil DeGrasse Tyson Publisher : W. W. Norton & Company Languages : eng Published : 2017-01-15T05:00:00+00:00 Rights : Copyright © 2017 by Neil deGrasse Tyson Comments : <p>The essential universe, from our most celebrated and beloved astrophysicist.</p><p>What is the nature of space and tim$ /home/calibre/CalibreAdd/_New York Times Best Sellers 2018-01-21 (non fiction)/Astrophysics for People in a Hurry by Neil deGrasse Tyson.ep$ Title : Let Trump Be Trump Author(s) : Corey R. Lewandowski [LEWANDOWSKI, COREY R. / BOSSIE, DAVID N.] Publisher : Center Street Tags : Political Science / General Languages : eng Published : 2017-12-05T00:00:00+00:00 Comments : <p><b>LET TRUMP BE TRUMP: THE INSIDE STORY OF HIS PRESIDENCY is the ultimate behind-the-scenes account of how he became P$ /home/calibre/CalibreAdd/_New York Times Best Sellers 2018-01-21 (non fiction)/Let Trump Be Trump by Corey R. Lewandowski, Dave N. Bossie.e$ Added book ids: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont follow the tutorial at digital ocean, it is out of date. Since calibre 3.0 multiple calibre programs cannot access the same library at the same time.
Once again, use calibredb --with-library with the server URL and in the server either setup a username or password or use the --enable-local-write option. |
![]() |
![]() |
![]() |
#19 | |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
Quote:
So I'm almost there. I've got the CalibreServer.service starting Calibre on reboot and the "CalibreAdd" folder being monitored. But now its not adding the books. My Cron is kicking out "Another calibre program such as calibre-server or the main calibre program is running. Having multiple programs that can make changes to a calibre library running at the same time is a bad idea. calibredb can connect directly to a running calibre content server, to make changes through it, instead. See the documentation of the --with-library option for details." This is after a fresh restart, so I'm not sure which other instance could be running. I haven't opened Calibre. When I stop the server in the CLI (systemctl stop calibreserver.service) and then launch the actual program, it loads up. If I don't stop it first, the program gives me the error warning about another service running that accesses the database. So I'm confused about where the other instance is coming from. Crontab -e: */2 * * * * calibredb add -r /mnt/mediastore/CalibreAdd/* --username user --password password --library-path ~/mnt/mediastore/CalibreLibrary/ Getting the same error with */1 * * * * calibredb add --with-library "192.168.1.25:8080/#CalibreLibrary" as well. CalibreServer.service: [Unit] Description=calibre content server After=network.target [Service] Type=simple User=user Group=group ExecStart=/opt/calibre/calibre-server "/mnt/mediastore/CalibreLibrary" [Install] WantedBy=multi-user.target calibreserver.service - calibre content server Loaded: loaded (/etc/systemd/system/calibreserver.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2018-01-27 00:35:31 EST; 3min 56s ago Main PID: 1130 (calibre-server) Tasks: 14 (limit: 4915) CGroup: /system.slice/calibreserver.service └─1130 /opt/calibre/bin/calibre-server /mnt/mediastore/CalibreLibrary Jan 27 00:35:31 corbuntu systemd[1]: Started calibre content server. Jan 27 00:35:33 corbuntu calibre-server[1130]: calibre server listening on 0.0.0.0:8080 Jan 27 00:35:35 corbuntu calibre-server[1130]: OPDS feeds advertised via BonJour at: 127.0.1.1 port: 8080 Last edited by ckronengold; 01-27-2018 at 01:15 AM. |
|
![]() |
![]() |
![]() |
#20 |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your syntax for server URLs is wrong, look at the examples DivingDuck posted earlier in this thread
|
![]() |
![]() |
![]() |
#22 | |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
Quote:
With: */1 * * * * calibredb add --with-library "http://localhost:8080/#CalibreLibrary" --username user --password password --library-path "/mnt/mediastore/CalibreAdd/" I get: Message-Id: <20180127135901.9B96460186@corbuntu.fios-router.home> Date: Sat, 27 Jan 2018 08:59:01 -0500 (EST) Another calibre program such as calibre-server or the main calibre program is running. Having multiple programs that can make changes to a cal$ And when I remove the "--library-path" */1 * * * * calibredb add --with-library "http://localhost:8080/#CalibreLibrary" --username user --password password "/mnt/mediastore/CalibreAdd/" I get: Message-Id: <20180127140601.6F8BB60186@corbuntu.fios-router.home> Date: Sat, 27 Jan 2018 09:06:01 -0500 (EST) Forbidden When I change to: add --with-library "http://localhost:8080/#CalibreLibrary" --username user --password password "~/mnt/mediastore/CalibreAdd/" I get: Message-Id: <20180127141801.C6F3E60186@corbuntu.fios-router.home> Date: Sat, 27 Jan 2018 09:18:01 -0500 (EST) /home/corey/~/mnt/mediastore/CalibreAdd not found. This, I understand, is b/c the "~" is inserting the /home/corey in front of my folder address. Removing the "~" and putting back the "--library-path" modifier brings me back to the "another calibre program is running." I'm the only user on the machine. So I don't see how it could be a user/password error. Last edited by ckronengold; 01-27-2018 at 09:28 AM. |
|
![]() |
![]() |
![]() |
#23 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#24 | |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
Quote:
When I remove the "--library-path" */1 * * * * calibredb add --with-library "http://localhost:8080/#CalibreLibrary" --username user --password password "/mnt/mediastore/CalibreAdd/" I get: Message-Id: <20180127140601.6F8BB60186@corbuntu.fios-router.home> Date: Sat, 27 Jan 2018 09:06:01 -0500 (EST) Forbidden If I remove --with-library and use --library path, I get: calibredb add "http://localhost:8080/#CalibreLibrary" --username user --password password --library-path "/mnt/mediastore$ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/home/corey> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=corey> Message-Id: <20180127174201.A861F6016B@corbuntu.fios-router.home> Date: Sat, 27 Jan 2018 12:42:01 -0500 (EST) Another calibre program such as calibre-server or the main calibre program is running. Last edited by ckronengold; 01-27-2018 at 12:43 PM. |
|
![]() |
![]() |
![]() |
#25 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) use --with-library
2) Run the server with --enable-local-write |
![]() |
![]() |
![]() |
#26 | |
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2018
Device: kindle basic
|
Quote:
Thank you so much for your help. As a CLI noob, its a bit of a challenge to learn the context of the commands in general, plus the specific requirements of a new program as well. I appreciate your patience. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
installing Calibre content server 3 on ubuntu server 16_04 | khyox | Calibre | 22 | 01-06-2018 11:34 PM |
Content server on ubuntu 12.04 headless server ImageMagick: libltdl.so.7 | Cool Javelin | Calibre | 5 | 04-08-2015 02:20 AM |
[How To] Running Calibre server as a news server | sws | Related Tools | 0 | 04-09-2013 08:27 AM |
Running Calibre content server as a service | mathia | Related Tools | 31 | 07-04-2011 09:34 AM |
Calibre-Server - Ubuntu 10.10 - Running but not serving | dcmarquardt | Calibre | 10 | 04-05-2011 07:33 PM |