Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2010, 01:06 PM   #31
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Starson17, thank you. Having relevant pointers into a code base as large as calibre's is extremely helpful. I will look it over this weekend.
Searching the code base for "overwrite" will find each change I made to add the two checkboxes, the saving of the option from session to session and the tests for the status of that flag. Files that end .ui create the widgets used in the GUI and those files are compiled on first use (or when the .ui files are changed) to create files that end _ui.py for use by the code.
Starson17 is offline   Reply With Quote
Old 02-05-2010, 11:47 AM   #32
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Starson17, thank you again. Your pointers saved me days of frustration. I have dealt with all objections that I am aware of.

I incorporated control of the option into the calibre GUI, on the main configuration page. The environment variable is dead. The option remains tri-valued, as discussed above.

A patch file is in Kovid's hands for decision whether or not to include the changes into calibre.

FYI: 4 files were changed:
- ebooks/metadata/__init__.py (to implement the option)
- gui2/dialogs/config/__init__.py (to transfer the option values to/from the GUI)
- gui2/dialogs/config/config.ui (the GUI changes)
- utils/config.py (to define the option and its default)

If you are curious (I imagine that no one will be ), the bzr patch file auth_sort_changes-GUI is available at http://charles.the-haleys.org/calibre/0.6.37/
chaley is offline   Reply With Quote
Advert
Old 02-05-2010, 11:58 AM   #33
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Starson17, thank you again. Your pointers saved me days of frustration.
You're welcome, but it was really Kovid's code. I just copied the download social metadata code he wrote and adapted it for my use.
Starson17 is offline   Reply With Quote
Old 02-07-2010, 06:39 PM   #34
DrJanet
MacOS 10.6.x, iPhone 3G
DrJanet began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2010
Device: iPhone
Author-Sort workaround problem

Charles,

I was very excited to read about your very generous attempt to deal with the LName, FName format and author_sort, but I could not get it to work. I'm using the Mac version, but I thought I found some suitable workarounds. For instance, I found a preference panel to modify the system's environment variables, which I used to set the CALIBRE_AUTHOR_SORT_METHOD to 'none', or to 'none-if-comma'. Then I updated to calibre v 0.6.37. However, when I tried to use your __init__.py file by putting it in the following directory (it was a bit different from your instructions for the Windows version, but the main thing that came close), /Applications/calibre.app/Contents/Resources/Python/site-packages/calibre/ebooks/metadata all I got was calibre refusing to launch. Deleting the existing .pyo file didn't work. Nor did putting it into other likely-sounding directories. The only difference I could see between your .py file and the pyo file was that the.py was listed as type 'text' with a Python icon, while the .pyo files was seen as just a generic document.

I also downloaded your other file to modify the GUI, auth_sort_changes-GUI.txt. Unfortunately, I have absolutely no idea what to do with it. As you can see, it downloaded as as .txt file. I tried putting into /Applications/Calibre 0.6.3.7 Modified/calibre 0.6.3.7.app/Contents/Resources/Python/site-packages/calibre/gui2 which had no effect.

Do you have any ideas or suggestions for me? If you tell me I'm in way over my head, I'll understand ;o)

Janet
DrJanet is offline   Reply With Quote
Old 02-08-2010, 06:44 AM   #35
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Janet,

I am taking this out of the forums. I doubt that everyone will be interested in the traffic. You will have a PM from me soon.

Charles
chaley is offline   Reply With Quote
Advert
Old 02-08-2010, 09:44 AM   #36
DrJanet
MacOS 10.6.x, iPhone 3G
DrJanet began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2010
Device: iPhone
Great. Perhaps, if we sort it out, we can post the result for other users of the Mac version. Thanks.
DrJanet is offline   Reply With Quote
Old 02-08-2010, 01:43 PM   #37
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Problem solved by using __init__.pyo instead of __init__.py. It could be that python on DrJanet's mac doesn't like intermixing the two formats. However, in the process of debugging I discovered some tab characters in __init_.py file which don't bother the windows interpreter but could have bothered the mac one. For completeness I have converted the tabs to the right number of spaces.

To make things easier, I also built separate .pyo files that don't use the environment variable, but instead directly implement the desired option. DrJanet is using one of these.
chaley is offline   Reply With Quote
Reply

Tags
author sort


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Author sort knyc Calibre 3 09-25-2010 05:04 AM
Author Sort thomasmorus Calibre 39 08-27-2010 04:55 PM
Author Sort wexdan Calibre 2 10-22-2009 03:21 PM
Author Sort polly Calibre 6 10-04-2009 08:22 AM
Author(s) & Author Sort BobF Calibre 11 01-02-2009 05:01 PM


All times are GMT -4. The time now is 06:22 AM.


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