Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-27-2008, 11:44 PM   #1
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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:
  1. The path to web2lrf.exe. Under Linux and Mac OS X this probably '/usr/bin/web2lrf' .
  2. The path to calibre.exe. Under Linux and Mac OS X this is probably '/usr/bin/calibre'.
  3. Your output directory. Be sure to leave a trailing path separator, e.g. e:\temp\ or /var/books/

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.
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 01:30 AM   #2
soilwork
useR!
soilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enough
 
soilwork's Avatar
 
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.
Quote:
Originally Posted by beowulf573 View Post
The Create option will let you enter options to create one lrf file, but the changes are not persisted.
I was planning to suggest this, but it is already implemented before I have a chance to suggest!
soilwork is offline   Reply With Quote
Advert
Old 05-28-2008, 12:24 PM   #3
Yarrow
Enthusiast
Yarrow began at the beginning.
 
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?
Yarrow is offline   Reply With Quote
Old 05-28-2008, 12:51 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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
kovidgoyal is online now   Reply With Quote
Old 05-28-2008, 02:20 PM   #5
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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.
beowulf573 is offline   Reply With Quote
Advert
Old 05-28-2008, 02:30 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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)
kovidgoyal is online now   Reply With Quote
Old 05-28-2008, 02:40 PM   #7
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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.
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 03:13 PM   #8
Yarrow
Enthusiast
Yarrow began at the beginning.
 
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
Yarrow is offline   Reply With Quote
Old 05-28-2008, 04:32 PM   #9
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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.
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 04:49 PM   #10
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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.
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 08:21 PM   #11
dsuden
Connoisseur
dsuden doesn't litterdsuden doesn't litter
 
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
dsuden is offline   Reply With Quote
Old 05-28-2008, 08:42 PM   #12
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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.
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 10:36 PM   #13
beowulf573
Addict
beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.beowulf573 once ate a cherry pie in a record 7 seconds.
 
beowulf573's Avatar
 
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
beowulf573 is offline   Reply With Quote
Old 05-28-2008, 11:51 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's because it's a frameset document
kovidgoyal is online now   Reply With Quote
Old 05-29-2008, 04:48 AM   #15
Peto
Legal Alien
Peto doesn't litterPeto doesn't litter
 
Peto's Avatar
 
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.
Peto is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:51 AM.


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