Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2017, 08:40 PM   #16
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Updated to version 2.0.1

I added chihchun's changes and updated the conversion libraries to the latest ones in the OpenCC project. I also created a GitHub repository for the code and the release zip file (see the main post for the link).

Here are the pertinent diffs:

Dictionary update

chihchun's change

Version change
Hopkins is offline   Reply With Quote
Old 08-22-2017, 08:49 PM   #17
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Version 2.2.1 - Support Vertical Text

Version 2.2.1 - Added support for East Asian vertical text.

Note that the Calibre book viewer does not fully support vertical text. I've verified that vertical Chinese and Japanese text is displayed properly using the Chrome Readium epub viewer and on a Kindle Paperwhite. Use the internal Calibre Kindle conversion to AZW3 format. Or use the Kindle Previewer 3 application to convert to a mobi file before loading on to a Kindle.

Caveats:
The plugin adds a "-epub-writing-mode: vertical-rl" style rule to the body tag to all CSS files. If a CSS file does not have a body tag style defined, one is added. This may not be proper in all cases.

If you are interest in how vertical works, take a look at:

https://www.w3.org/TR/css-writing-mo...ro-text-layout

The text-orientation property is set to the default "mixed" value which means whether a character tipped sideways or rotated upright depends the orientation value assigned to the Unicode code point. A value of "U" means display "Upright", a value of "R" means display "Rotated". Some characters such as Chinese punctuation marks have a value of "Tr". This means use the vertical code point if known and available, otherwise just rotate this character and hope for the best. The orientation assignment for all code points is given in:

http://unicode.org/Public/UNIDATA/Ve...rientation.txt

Last edited by Hopkins; 09-14-2017 at 11:07 PM. Reason: Noted that internal Calibre conversion to Kindle works for vertical text files.
Hopkins is offline   Reply With Quote
Advert
Old 09-17-2017, 09:56 AM   #18
suzendo
Junior Member
suzendo began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2017
Device: kindle paperwhite
Calibre: Plugin Traditional <-> Simplified Chinese Converter (2.24)
After converting the azw3 file, I cannot save the converted azw3 file. The error message is as follows:

=============================================
calibre, version 3.7.0
錯誤: 副本保存失敗: 副本保存失敗,點擊「詳細信息」顯示詳細的信息。

Traceback (most recent call last):
File "site-packages\calibre\gui2\tweak_book\job.py", line 35, in run
File "site-packages\calibre\gui2\tweak_book\boss.py", line 1124, in do_save
File "site-packages\calibre\gui2\tweak_book\save.py", line 74, in save_container
File "site-packages\calibre\utils\filenames.py", line 487, in atomic_rename
error: (123, 'MoveFileEx', '\xc0\xc9\xae\xd7\xa6W\xba\xd9\xa1B\xa5\xd8\xbf\xf d\xa6W\xba\xd9\xa9\xce\xba\xcf\xba\xd0\xb0\xcf\xbc \xd0\xc5\xd2\xbby\xaak\xbf\xf9\xbb~\xa1C')
============================================

I've tried many times and always got the same error message. Can anyone give me a hand?
suzendo is offline   Reply With Quote
Old 09-17-2017, 06:05 PM   #19
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
Quote:
I designed the plugin to work with EPUB files. I don't think it will work on AZW3 files. I always converted my EPUB files in the editor and then brought the modified files into Calibre to convert to AZW3. I don't think the vertical text option will work on a AZW3 file at the moment.
Edit: Version 2.3.0 of the plugin now supports AZW3 files

That said, the problem appears to be the file name. Try doing a "Save as" with a simple ASCII file name (i.e. test.azw3)

Edit:
A quick test shows that the Calibre Editor does not like saving some Unicode named files. For example, if I try to save a file copy on Windows as "邊城.epub", I will get the same sort of error.

Edit: Unicode file saving under some Windows versions now allowed as of Calibre 3.16.

Last edited by Hopkins; 01-30-2018 at 07:12 PM. Reason: Noted that AZW3 files are now supported & File saving fixed
Hopkins is offline   Reply With Quote
Old 11-13-2017, 04:17 AM   #20
Akira_7
Junior Member
Akira_7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2017
Device: Kindke Paperwhite3
Hi Hopkins,

Thank you for writing the plugin! I found the recommendation in a Chinese tutorial.

However, there was a little problem that I couldn't figure out.(((゚д゚)))

When I clicked the button, the "Chinese Conversation window" popped out successfully, but it was too long to show the whole of it.

No matter how hard I tried to drag it to somewhere or shrink it smaller, the window stayed firmly where it was. All I could do was close it.

Until now, the "OK button" and "Source(來源) column" have still played hide-and-seek with me...

I am a Traditional Chinese user so my reply may be too messy to read.

Here is the image shows the naughty window↓

Click image for larger version

Name:	qxvbDSU.jpg
Views:	155
Size:	109.5 KB
ID:	159986

And my information just in case:

Windows 7
Screen resolution:1366X768
Calibre 3.12
Traditional<->Simplified Chinese Convertor 2.30

Thanks for your work again! The plugin has helped lots of users!

Last edited by issybird; 11-13-2017 at 11:01 AM.
Akira_7 is offline   Reply With Quote
Advert
Old 11-13-2017, 05:20 PM   #21
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
I verified that I also have a problem when the screen vertical resolution is 768. I I'll try putting the dialog settings into a scroll area and put out a new plugin release.
Hopkins is offline   Reply With Quote
Old 11-13-2017, 07:56 PM   #22
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
I've updated the code in GitHub and created release 2.3.1. I've tagged it as a Pre-release for now. It might take a day or so to test it out. If you want to try it, you can grab it and install it manually.

Just download TradSimpChinese_2_3_1.zip

https://github.com/Hopkins1/TradSimpChinese/releases

Edit - Plugin now is (or soon will be) available via the Calibre plugin update system
Attached Thumbnails
Click image for larger version

Name:	ScrollBars.png
Views:	164
Size:	156.9 KB
ID:	159994  

Last edited by Hopkins; 11-14-2017 at 02:29 PM. Reason: Noted that testing is complete
Hopkins is offline   Reply With Quote
Old 11-14-2017, 07:50 AM   #23
Akira_7
Junior Member
Akira_7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2017
Device: Kindke Paperwhite3
Thank you for your update!
Now all the columns and buttons in the plugin are available.(*´∀`)~
Akira_7 is offline   Reply With Quote
Old 08-12-2018, 11:19 PM   #24
Steven Wong
Member
Steven Wong began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura One
Would you please advice how to do command line processing? I go through documentation, and try ebook-convert.exe a.epub b.epub -help, but cannot figure out how to call the plugin. Thank you
Steven Wong is offline   Reply With Quote
Old 08-12-2018, 11:24 PM   #25
Steven Wong
Member
Steven Wong began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura One
I have another question. In many Traditional Chinese books, they will include the name of person, and location, in English as well. When I convert the ebook to vertical text direction, those English characters will be converted, but in wrong direction. Would appreciate if you can address this. Thank you.
Steven Wong is offline   Reply With Quote
Old 08-13-2018, 09:41 AM   #26
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
What is "wrong direction". The Western text should be displayed rotated clockwise 90 degrees. See the example in the 3rd image in the first post of this thread. Is this not working?

See: https://en.wikipedia.org/wiki/Horizo...tional_Chinese

I could add an option to have Western characters appear in the same orientation as Chinese/Japanese if desired, but it would apply to the entire book. I think it's easy to do.
Hopkins is offline   Reply With Quote
Old 08-16-2018, 10:03 AM   #27
Steven Wong
Member
Steven Wong began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura One
Please refer to the 3rd lines in https://ibb.co/cWL8t9 on how English characters are displayed on Kobo Aura One. Btw, please advice how to do command line conversion from simplified chinese to traditional chinese.

Thanks,
Steven



Quote:
Originally Posted by Hopkins View Post
What is "wrong direction". The Western text should be displayed rotated clockwise 90 degrees. See the example in the 3rd image in the first post of this thread. Is this not working?

See: https://en.wikipedia.org/wiki/Horizo...tional_Chinese

I could add an option to have Western characters appear in the same orientation as Chinese/Japanese if desired, but it would apply to the entire book. I think it's easy to do.
Steven Wong is offline   Reply With Quote
Old 08-16-2018, 09:55 PM   #28
Hopkins
Member
Hopkins began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jun 2016
Location: Minnesota USA
Device: Amazon Paperwhite 3G
It looks like the Latin characters are vertical (as they should be), but each character is flipped along the horizontal plane. I don't understand why that is happening.

Please try loading the attached public domain EPUB file of 阿Q正傳 from Project Gutenberg on your Kobo and see what happens.

On the Kindle, the double-space Latin characters are vertical and the normal space Latin characters are tipped on their side. This is the correct presentation.

For the command line to recursively convert all EPUB files into vertical traditional, Taiwan EPUB file try the following command. It will walk down your file structure, convert every EPUB file, and save the converted file in the same location but with a "T" suffix (e.g. 阿Q正傳.epub -> 阿Q正傳T.epub). The original file is unchanged.

Code:
calibre-debug --run-plugin "Chinese Text Conversion" -- -ol tw -il cn -d s2t -qt e -td v -tdo r -a T **/*.epub
The first post in this thread has some usage instructions for the command line.
Attached Thumbnails
Click image for larger version

Name:	阿Q正傳VertKindle.png
Views:	19
Size:	150.9 KB
ID:	165682  
Attached Files
File Type: epub 阿Q正傳Vert.epub (52.6 KB, 9 views)
Hopkins is offline   Reply With Quote
Old 08-17-2018, 02:30 PM   #29
Steven Wong
Member
Steven Wong began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura One
Same issue in KA1. I need to follow up with Kobo instead. Thanks for your help here.
Steven Wong is offline   Reply With Quote
Old 08-17-2018, 10:13 PM   #30
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,090
Karma: 24708566
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Quote:
Originally Posted by Steven Wong View Post
Same issue in KA1. I need to follow up with Kobo instead. Thanks for your help here.
Are you using epubs or kepubs on the Aura ONE? They use different renderers, so the results will be different. I believe the kepub renderer handles Chinese better. I can't from the photo which it you are using.
davidfor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
traditional and simplified chinese character set? mzmm ePub 3 05-10-2013 07:41 AM
Best ereader with (simplified) Chinese support in Australia fallsauce Which one should I buy? 3 12-29-2011 07:59 PM
A Simplified Chinese + English font that actually looks good macroexp Sony Reader Dev Corner 5 12-24-2010 11:08 PM
iLiad Enable Simplified Chinese handwriting ericshliao iRex Developer's Corner 2 04-15-2010 01:58 AM
Looking for Contemporary Simplified Chinese Books for PRS 505 eldon Sony Reader 2 08-25-2008 05:22 AM


All times are GMT -4. The time now is 06:25 PM.


MobileRead.com is a privately owned, operated and funded community.