05-27-2008, 11:44 PM | #1 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
Bookit plugin for Firefox
Version 0.2.6 of the Bookit plugin for Firefox is out. The home page for the plugin is here. It will add an icon to your status bar that will launch web2lrf on the current url with a double click.
This releases fixes the additional argument field, adds a "don't show me again" option on the create prompt, and support for launching calibre after creating the lrf file in order to add it to the database. After installing the plugin, bring up the options dialog either through the add-ons dialog or by bringing up the context menu on the icon in your status bar and selecting Options. You must configure three things:
To create a lrf file from the current document, double click on the bookit icon on the status bar. The Create option will let you enter options to create one lrf file, but the changes are not persisted. I'm looking at Firefox 3.0 support and documentation. Feel free to post any bugs or suggestions to this thread or email me. Last edited by beowulf573; 05-27-2008 at 11:56 PM. |
05-28-2008, 01:30 AM | #2 |
useR!
Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
Thank you for the great program and good to see the program has its own thread.
I was planning to suggest this, but it is already implemented before I have a chance to suggest! |
Advert | |
|
05-28-2008, 12:24 PM | #3 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Aug 2007
Location: Lancashire, UK
Device: Sony PRS500& PRS505; iPad; and Kindle
|
This would be great but I've installed and tried a number of web pages and every time I get the follow error message from Calibre: local variable 'books' referenced before assignment.
Have I done something wrong? |
05-28-2008, 12:51 PM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Actually using /usr/bin/calibre to run the GUI on OS X will mess up your calibre install, because of the way OS X handles application bundles. The correct way to do it on OS X is
Code:
open -a /path/to/calibre.app /path/to/file.lrf |
05-28-2008, 02:20 PM | #5 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
Hmm, that's annoying. Inside a plugin I can't arbitrarily execute a command line, I have to initialize a file object as the file to run and then pass it to a process object with an array of arguments.
Is 'open' a built-in command or is this a separate executable? If it's an executable, where does it typically live? I knew I should have bought a Mac last year. During lunch I got Firefox 3.0 support working and added an optional toolbar button. This evening I'll try to address the OS X issue. In the meantime just uncheck the option to add the file to calibre and manually add the file. Thanks for the heads up. I have an idea on how to suppress the console window under windows, I'll look at that later if I get the time, probably not until tomorrow. |
Advert | |
|
05-28-2008, 02:30 PM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
On windows you have to use the CREATE_NO_WINDOW flag to the function used to create the subprocess. I don't know if the mozilla API allows you to do this though.
open is a program (usually /usr/bin/open) |
05-28-2008, 02:40 PM | #7 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
No, the process object is completely platform neutral. My thought was to create a small windows executable (i.e. a non-console app) that would be the exe actually launched and then it in turn would launch web2lrf.exe with the hidden console window. The plugin can include binaries. I need to check if instead I could invoke a method on a dll.
Great, then for Darwin/OS-X I can just launch /usr/bin/open as the exe and then add the path to calibre and the lrf file as arguments. I hate putting platform specific code into the plugin but it looks like it I might have no choice. |
05-28-2008, 03:13 PM | #8 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Aug 2007
Location: Lancashire, UK
Device: Sony PRS500& PRS505; iPad; and Kindle
|
Beowolf and Kovid
Can you check out my problem above as well - running Windows XP? Thanks |
05-28-2008, 04:32 PM | #9 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
Yarrow, I don't know off the top of my head, I'll try to reproduce it tonight.
|
05-28-2008, 04:49 PM | #10 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
I just reproduced it (what can I say, I had a long build going on...).
You'll get this error message if the file wasn't created and you try to add it to the calibre database. Make sure your paths in the options are correct. Be sure there's a trailing backslash '\' on your output directory. I'll try to find a platform neutral way to do this. |
05-28-2008, 08:21 PM | #11 |
Connoisseur
Posts: 73
Karma: 120
Join Date: Apr 2008
Device: Sony Reader
|
Does This Work For You?
0.26 is awesome! So many options now...time to start experimenting!
Question...does this web site work for anyone? I've tried it with Bookit and I see a bunch of text fly by in the shell window then it disappears and no file is created: http://www.informationweek.com/share...leID=208400725 Dane |
05-28-2008, 08:42 PM | #12 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
I'll try it out in a bit, I'm about to put some salmon steaks on the grill. I need to add some debugging features for those sites that are giving trouble.
In the meantime, I just put 0.2.7 out. I had to disable adding to calibre automatically, it was causing all sorts of issues. I'll work on that next. To tide you over, 0.2.7 has a toolbar button you can add via the customize feaure of Firefox, and is supports Firefox 3.0. |
05-28-2008, 10:36 PM | #13 |
Addict
Posts: 208
Karma: 1523
Join Date: Jul 2007
Location: Houston,TX
Device: PRS-T1
|
If I try to execute web2lrf (version 0.4.62) from the command line with the above url I get the following:
Code:
F:\temp\bookit>web2lrf -u "http://www.informationweek.com/shared/printableArticle.jhtml?articleID=208400725" default Downloading . http://www.informationweek.com/shared/printableArticle.jhtml?articleID=208400725 saved to e:\docume~1\forge\locals~1\temp\calibre_jknjff_web2lrf\printableArticle.jhtml Processing printableArticle.jhtml Parsing HTML... Converting to BBeB... Traceback (most recent call last): File "convert_from.py", line 182, in <module> File "convert_from.py", line 176, in main File "convert_from.py", line 154, in process_profile File "convert_from.py", line 69, in create_lrf File "calibre\ebooks\lrf\html\convert_from.pyo", line 1826, in process_file File "calibre\ebooks\lrf\html\convert_from.pyo", line 269, in __init__ File "calibre\ebooks\lrf\html\convert_from.pyo", line 385, in add_file File "calibre\ebooks\lrf\html\convert_from.pyo", line 520, in parse_file ValueError: list.index(x): x not in list |
05-28-2008, 11:51 PM | #14 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's because it's a frameset document
|
05-29-2008, 04:48 AM | #15 |
Legal Alien
Posts: 288
Karma: 105
Join Date: Jan 2008
Device: Sony PRS-505/T1/Kindle PW2
|
Hello, there Beowulf.
Beautiful piece of job you are doing, thank you. I was going to ask for a cover addition tab and it was already there. 0.27 is not working for me. Launches web2lrf, processes the pages and closes without creating any file. I have tried several options (discarding header and cover options, different borders, different link levels) and I get the same result. I didn't try 0.26, but 25 was working perfect. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |
BookIt and 64 bit | jlbfoot | LRF | 0 | 03-09-2009 03:24 PM |
Idea for a "Bookit" Plugin -- Maybe Kovid? | dsuden | Sony Reader | 55 | 01-03-2009 11:22 AM |
Great new Idea! Bookit button | =X= | Feedback | 0 | 10-27-2008 01:49 PM |
Making MobiRead Threads BookIt Friendly | =X= | Feedback | 3 | 08-11-2008 11:24 PM |