04-16-2008, 12:18 PM | #196 |
Wizzard
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
|
Try a "make" or "make gui" at the top level?
|
04-16-2008, 08:41 PM | #197 |
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
That worked. I thought I could run it within Eclispe and see the changes. Is that true only for the UI files? I thought since Python was an interpreted language I could just change the text files.
|
Advert | |
|
04-17-2008, 01:59 PM | #198 |
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
Well it works so I am not complaining. One thing that is weird is that I cannot save the preferences in the config dialog and I'm not getting any errors. If I make a change in the config GUI, hit OK, and go back. It's there. But when I close the app and re-open, the preferences are not saved. This happens from within PyDev and from the command line.
|
04-18-2008, 06:01 AM | #199 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You just need to run "make test" in the gui2 directory. You can setup a run profile in eclipse to run it automatically. The GUI is stored in XML files, which is why they need to be compiled. Not sure why you cant store settings in pydev though.
|
04-18-2008, 02:20 PM | #200 |
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
I've implemented the dialog to accept a standard set of default tags, but there are a couple of glitches. I've also added code to take the value from preferences when importing a new book.
1. I can't save the preference for some reason. 2. The tag editor expects a row index for the book being edited so it can preload the existing tags but obviously in this case there is no real 'book' since we're talking about the defaults. Do you think I should make a version of the TagEditor that doesn't need the row parameter and instead receives the existing string from the dialog? 3. Even though I specify the value when adding a book, they don't get stored. I'll have to play with it some more. I'm having fun learning the Python code. The white space thing keeps getting me |
Advert | |
|
04-19-2008, 12:21 AM | #201 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1. Don't really know. Perhaps you should try the eclipse forums?
2. A cleaner solution would be to store the default tags in a Settings object (since they're user settings and the database is not really designed to handle that. You could just subclass the TagEditor class and override the API. Use the get and set methods on the Settings object to read/store default tags. 3. Not sure what you mean, can you elaborate? |
04-22-2008, 03:21 PM | #202 | ||
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
Kovid,
I've created a new class called DefaultTagEditor and I think I have the right code to implement TagEditor so that I can override the _init_ to change the way it reads the existing tags. I'm getting an error, though. Here's the code: Quote:
Quote:
|
||
04-22-2008, 03:50 PM | #203 |
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
OK, ignore the last post. I figured that out. I think I'm almost there.
|
04-22-2008, 09:22 PM | #204 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's great.
|
04-23-2008, 10:00 AM | #205 | |||
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
One thing that's interesting. In trying to use my new DefaultTagEditor, I get an error when the accept runs. Here's what happens:
Quote:
Quote:
Here's the new editor code: Quote:
|
|||
04-23-2008, 12:32 PM | #206 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use
Code:
tags = [qstring_to_unicode(t) for t in d.tags] |
04-24-2008, 11:22 AM | #207 | |
Guru
Posts: 962
Karma: 568242
Join Date: Dec 2007
Device: Kindle Oasis 3, Kindle Paperwhite 1, iPad, iPhone
|
Thanks! I've modified database.py to get the default tags from Settings and then to call set_tags, but here's what's stored:
default tag is test,test2 stored tag: ., 0, 4, 6, <, >, c, l, q, p, s, a, b, e, d, g, i, j, o, n, r, t, y, x, 5, 9 here's the code (i know I need to add a check to make sure we actually have default tags, but I'll do that as soon as I know this works) Quote:
|
|
04-25-2008, 12:17 PM | #208 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the get and set methods on the Settings object (much more python friendly), that should automatically fix this problem. Also as a stylisic note use descriptive phrases for settings, something like "default tags" rather than defaultTags
|
05-07-2008, 11:00 AM | #209 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2007
Device: sony reader
|
I downloaded the newest version of libprs500 -0.4.51 ie calibre and it worked-I could fetch the news from built-in recipes as well as my own. But when I started the program next day it failed to fetch any of the news. It shows the following traceback:
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8c in position 113: ordinal not in range(128) Failed to perform job: Fetch news from FAZ NET Detailed traceback: Traceback (most recent call last): File "parallel.py", line 139, in run_job File "calibre\ebooks\lrf\feeds\convert_from.pyo", line 40, in main File "calibre\web\feeds\main.pyo", line 128, in run_recipe File "calibre\web\feeds\news.pyo", line 810, in __init__ File "calibre\ebooks\lrf\web\profiles\__init__.pyo" , line 174, in __init__ File "calibre\ebooks\lrf\web\profiles\__init__.pyo" , line 225, in build_index UnicodeDecodeError: 'ascii' codec can't decode byte 0x8c in position 113: ordinal not in range(128) Log: Fetching feeds... I think I had similar problem with few previous versions(however I do not have any confirmation it is exactly the same-the problem as I recall was with ASCII as well)-as far as I remember from 0.4.46. Does anybody know how to remove the error? |
05-07-2008, 12:12 PM | #210 |
Connoisseur
Posts: 53
Karma: 92
Join Date: Apr 2008
Location: Uruguay
Device: SONY PRS-300
|
Hi Ligos!
I have the same problem as you do, but I could not get it to work since day one. As I try to get a rss feed (any of the included ones in calibre), it takes a lot of time just to report an error like yours stating the ascii thingy. Nevertheless, if I use the command line, I can get the feed. Regards, sigmaX |
Tags |
libprs500, prs-505 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
libprs500 | tommy still | Calibre | 2 | 02-09-2008 10:55 AM |
Using libprs500 | jerryleejr | Calibre | 2 | 01-28-2008 12:29 AM |
Using Libprs500 for 505 | JeffASonyReader | Calibre | 17 | 01-21-2008 09:34 AM |
Help!!! libprs500 | MountainMan | Calibre | 11 | 11-13-2007 11:25 PM |
libprs500 and 505 | carchase | Sony Reader | 6 | 10-28-2007 03:06 PM |