![]() |
#31 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
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.
|
![]() |
![]() |
![]() |
#32 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. ![]() 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 ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
![]() |
#34 |
MacOS 10.6.x, iPhone 3G
![]() 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 |
![]() |
![]() |
![]() |
#35 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#36 |
MacOS 10.6.x, iPhone 3G
![]() 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.
|
![]() |
![]() |
![]() |
#37 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
Tags |
author sort |
|
![]() |
||||
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 |