Giter Site home page Giter Site logo

Landscape splitting about kcc HOT 15 CLOSED

ciromattia avatar ciromattia commented on July 30, 2024
Landscape splitting

from kcc.

Comments (15)

ciromattia avatar ciromattia commented on July 30, 2024

Yep, I've planned to add an option to specify the reading direction so splitting would be correctly done.
Adding options would need a GUI, but I've been quite busy ATM, I'm going with further development soon :)

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Wow fast reply! I wasn't expecting anything so soon, so no problem mate. I did try setting righttoleft=True in Image.py , however that didn't seem to have any effect on the output. Also is it your script that determines the direction of the panel view or is that on the kindle side?

Anyway fantastic bit of work, makes reading comics on the paperwhite even better! cant wait to see what you have in store for the future updates.

from kcc.

ciromattia avatar ciromattia commented on July 30, 2024

Should be fixed now, just use the new CLI option -m to have manga-style page splitting.

Tell me if it works for you :)

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Thanks! It works nicely. Is there a way of setting the droplet to do the same?

from kcc.

ciromattia avatar ciromattia commented on July 30, 2024

Yep, open it in AppleScript Editor and add -m to the options specified at the line:
set shellcommand to "python " & (quoted form of comic2ebookPath) & " -p KHD -t " & (quoted form of TheTitle) & " " & (quoted form of dirPath)
so the line becomes
set shellcommand to "python " & (quoted form of comic2ebookPath) & " -p KHD -m -t " & (quoted form of TheTitle) & " " & (quoted form of dirPath)
Then save and go :)
If you need you can change profile the same way changing the KHD string.

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Hmm has anything changed in the other scripts? As I seem to be getting errors from kidlegen now that I wasn't getting before.

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Sorry to bombard you mate, I think Kindlegen is working as normal with the same errors as usual. But after kindlegen has done its work the script stops and doesn't call kindlestrip.

from kcc.

ciromattia avatar ciromattia commented on July 30, 2024

Il giorno 10/gen/2013, alle ore 14:25, insanelysick [email protected] ha scritto:

Sorry to bombard you mate, I think Kindlegen is working as normal with the same errors as usual. But after kindlegen has done its work the script stops and doesn't call kindlestrip.

don't worry, every report helps to improve :)
I just tried the droplet and it works without flaws so I expect something in the comic, can you send me a sample of the one you're working on so I can investigate?
If it's too large please upload to e.g. Dropbox.
Thanks!

Ciro Mattia Gonano
FB: http://www.facebook.com/ciromattia
Skype: ciromattia
Tweets: http://twitter.com/ciromattia

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

I've just converted from cbz to mobi using the scripts individually and that works fine, I've also converted the same comic using the previous version droplet and that works fine too. It just seems to be the new droplet that this occurs with.
I also called kindlestrip manually on the failed content.mobi file after the droplet errors out and that works too. I'm wondering if it has something to do with the way the droplet names the files when kindlestrip is called and the fact my OS language is Japanese? Although the previous version works fine. Any thoughts? I'll try uploading the cbz file when I get back to my computer.

from kcc.

ciromattia avatar ciromattia commented on July 30, 2024

Il giorno 10/gen/2013, alle ore 15:03, insanelysick [email protected] ha scritto:

I'm wondering if it has something to do with the way the droplet names the files when kindlestrip is called and the fact my OS language is Japanese?

mmm, could be… can you send me the KindleComicConverter.log file? It should contain the error log.

Ciro Mattia Gonano
FB: http://www.facebook.com/ciromattia
Skype: ciromattia
Tweets: http://twitter.com/ciromattia

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

I had a look at it but it doesn't really seem to specify much. I'll send it when I'm back at my computer again.

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

  • Amazon.com kindlegen(MAC OSX) V2.7 build 1019-d6e4792 *
  • A command line e-book compiler *
  • Copyright Amazon.com 2012 *

Info(prcgen):I1047: Added metadata dc:Title "01"
Info(prcgen):I1047: Added metadata book-type "comic"
Info(prcgen):I1047: Added metadata fixed-layout "true"
Info(prcgen):I1047: Added metadata orientation-lock "portrait"
Info(prcgen):I1047: Added metadata original-resolution "758x1024"
Info(prcgen):I1047: Added metadata zero-gutter "true"
Info(prcgen):I1047: Added metadata zero-margin "true"
Info(prcgen):I1002: Parsing files 0000226
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1006: Resolving hyperlinks
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1049: Building table of content URL: /Users/johnnystyx/Desktop/kcc-master-1/01/content.ncx
Info(prcgen):I8002: Atleast one tag must be there in ncx file.
Warning(prcgen):W14016: Cover not specified
Info(pagemap):I8000: No Page map found in the book
Info(prcgen):I1045: Computing UNICODE ranges used in the book
Info(prcgen):I1046: Found UNICODE range: Basic Latin [20..7E]
Info(prcgen):I1017: Building PRC file, record count: 0000003
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 24.26%
Info(prcgen):I1040: The document identifier is: "01"
Info(prcgen):I1041: The file format version is V5
Info(prcgen):I1031: Saving PRC file
Info(prcgen):I1033: PRC built with WARNINGS!
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(prcgen):I1046: Found UNICODE range: /Users/johnnystyx/Desktop/kcc-master-1/01/content.ncx
Info(prcgen):I1017: Building PRC file, record count: 0000019
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 27.10%
Info(prcgen):I1040: The document identifier is: "/Users/johnnystyx/Desktop/kcc-master-1/01/content.ncx"
Info(prcgen):I1041: The file format version is V8
Info(prcgen):I1032: PRC built successfully
Info(prcgen):I15000: Approximate Standard Mobi Deliverable file size : 0032950KB
Info(prcgen):I15001: Approximate KF8 Deliverable file size : 0032983KB
Info(prcgen):I1037: Mobi file built with WARNINGS!

from kcc.

ciromattia avatar ciromattia commented on July 30, 2024

Il giorno 10/gen/2013, alle ore 16:24, insanelysick [email protected] ha scritto:

Amazon.com kindlegen(MAC OSX) V2.7 build 1019-d6e4792 *
A command line e-book compiler *
Copyright Amazon.com 2012 * *********************************************************

totally similar to mine output, there isn't any error… I wonder why the droplet complaints.
Please try to launch the ./syncDroplet.sh script (after that you'll want to re-apply edits on the script file)...

Ciro Mattia Gonano
FB: http://www.facebook.com/ciromattia
Skype: ciromattia
Tweets: http://twitter.com/ciromattia

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Right I have found the problem, Its to do with the error logging from Kindlegen. Rather than continue on the script halts progress once it encounters errors, so removing;

on error the error_message number the error_number
set shellresult to error_message
end try
if (offset of "Error" in shellresult) > 0 or (offset of "Warning" in shellresult) > 0 then
set fileRef to open for access file resultsFile with write permission
set eof fileRef to 0
write shellresult to fileRef
close access fileRef
ErrorMessage()
end if
from

on Kindlegen(dir)
set opfPath to POSIX path of dir & "/content.opf"
set resultsFile to ParentFolder & "KindleComicConverter.log"
set shellcommand to kindlegenPath & " " & (quoted form of opfPath)
try
set shellresult to do shell script shellcommand
on error the error_message number the error_number
set shellresult to error_message
end try
if (offset of "Error" in shellresult) > 0 or (offset of "Warning" in shellresult) > 0 then
set fileRef to open for access file resultsFile with write permission
set eof fileRef to 0
write shellresult to fileRef
close access fileRef
ErrorMessage()
end if
return
end Kindlegen

does the process without error logging kindlegen and completes the script nicely. Not the best method but it works for me :D

from kcc.

insanelysick avatar insanelysick commented on July 30, 2024

Maybe you can use something along these lines to make it handle the errors more gracefully https://developer.apple.com/library/mac/#documentation/applescript/Conceptual/ApplescriptLangGuide/reference/ASLR_error_xmpls.html

from kcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.