DobyTang / LazyLibrarian

This project isn't finished yet. Goal is to create a SickBeard, CouchPotato, Headphones-like application for ebooks. Headphones is used as a base, so there are still a lot of references to it.
730 stars 71 forks source link

Don't import txt file #1395

Closed dkids closed 6 years ago

dkids commented 6 years ago

Notice that the txt file is under 10k, which seems reasonable as the floor for size. Anything under 10k is probably not usable.

total 4432 drwxr-xr-x@ 5 kids staff 170 May 10 11:53 . drwxr-xr-x 13 kids staff 442 May 10 12:08 .. -rw-r--r-- 1 kids staff 979666 May 10 11:53 Death's End - Liu Cixin.epub -rw-r--r-- 1 kids staff 1271592 May 10 11:53 Death's End - Liu Cixin.mobi -rw-r--r-- 1 kids staff 56 May 10 11:53 Death's End - Liu Cixin.txt

book meta [9781784971625] [en] [Cixin Liu] [Death's End (The Three-Body Problem)] [epub] book meta [9781784971625] [en] [Cixin Liu] [Death's End (The Three-Body Problem)] [mobi] calibredb res 379[Title : Death's End Title sort : Death's End (The Three-Body Problem) Author(s) : Liu Cixin [Liu, Cixin] Publisher : Head of Zeus Languages : eng Timestamp : 2018-05-10T18:53:55.220157+00:00 Published : 2016-09-19T14:00:00+00:00 Identifiers : goodreads:25451264 Formats : EPUB,MOBI,TXT ] calibredb res 401[Title : Death's End Title sort : Death's End (The Three-Body Problem) Author(s) : Liu Cixin [Liu, Cixin] Publisher : Head of Zeus Languages : eng Timestamp : 2018-05-10T18:53:55.220157+00:00 Published : 2016-09-19T14:00:00+00:00 Identifiers : mobi-asin:B016AWGJBK, isbn:9781784971625 Formats : EPUB,MOBI,TXT ] calibredb res 426[Title : Death's End (The Three-Body Problem) Title sort : Death's End (The Three-Body Problem) Author(s) : Liu Cixin [Liu, Cixin] Publisher : Head of Zeus Languages : eng Timestamp : 2018-05-10T18:53:55.220157+00:00 Published : 2016-09-19T14:00:00+00:00 Identifiers : mobi-asin:B016AWGJBK, isbn:9781784971625 Formats : EPUB,MOBI,TXT ]

dkids commented 6 years ago

cat Death\'s\ End\ -\ Liu\ Cixin.txt Torrent downloaded from Demonoid -> http://www.dnoid.me/

philborman commented 6 years ago

Good idea. Next version will only send across files matching lazylibrarian wanted booktypes, so if you only want mobi and the download contains mobi,epub,txt we will only send mobi to calibre.

dkids commented 6 years ago

Still importing the .TXT file as of this morning. I have LL set to update version every 3 hours, so it's yesterday's release.

mobi,epub, pdf,cbz,djvu,cbr,azw3,azw are the file formats for eBooks. Blood.txt

/Users/kids/src/LazyLibrarian-master/Logs/lazylibrarian.log.12:15-May-2018 09:33:55 - DEBUG :: POSTPROCESS : calibre.py:calibredb:445 : calibredb res 1361[Title : Blood Water Paint Title sort : Blood Water Paint Author(s) : Joy McCullough [McCullough, Joy] Publisher : Penguin Young Readers Group Languages : eng Timestamp : 2018-05-15T16:33:53.734112+00:00 Published : 2018-03-06T00:00:00+00:00 Comments : "When I finished this novel, I knew I would be haunted and empowered by Artemisia Gentileschi's story for the rest of my life." —Amanda Lovelace, award-winning author of the princess saves herself in this one
Her mother died when she was twelve, and suddenly Artemisia Gentileschi had a stark choice: a life as a nun in a convent or a life grinding pigment for her father's paint.
She chose paint.
By the time she was seventeen, Artemisia did more than grind pigment. She was one of Rome's most talented painters, even if no one knew her name. But Rome in 1610 was a city where men took what they wanted from women, and in the aftermath of rape Artemisia faced another terrible choice: a life of silence or a life of truth, no matter the cost.
He will not consume
my every thought.
I am a painter.
I will paint.
Joy McCullough's bold novel in verse is a portrait of an artist as a young woman, filled with the soaring... Formats : EPUB,TXT ]

philborman commented 6 years ago

Ah ok, we weren't deleting the original txt file, just ignoring the rename code. Calibre needs all parts to have the same basename (book_name.epub, book_name.mobi, book_name.opf) or at least it used to. It would ignore anything not matching the basename, which would have been the non-renamed txt file. Added some code to delete it now so we're sure. Looks like newer versions of calibre are more tolerant.