Mobileread
impfind
#11  nrapallo 09-21-2008, 09:21 AM
Swiss-army knife of the .imp world!

Great job, derrell!
Reply 

#12  nrapallo 09-26-2008, 05:51 PM
Any way to resize the columns in the GUI version? I had one really long category description (created by Lit2sb) that enlarged the column to accomodate it (but not what I wanted ). I wanted it shrunk down to the next largest (or user inputted) size.

I'm not familiar with Tk, but can this be done easily?
Reply 

#13  derrell 09-26-2008, 06:47 PM
I'm not sure but I think that an extra module has to be installed. resizebutton or something like that and I didn't use that one. So I guess the short answer is no I don't think so. I'll look at it and see if there is an option that I left out of the code that will allow that though. Most folks expect to be able to resize the columns.
Reply 

#14  nrapallo 10-17-2008, 10:49 PM
Quote derrell
I also don't know how it wil handle truly large numbers of files. I didn't test it with more than about 50.
I can confirm that the GUI works with 4000+ .imp files and takes about a minute to sort when the column header is clicked (on a P4 2.0 GHz single CPU WinXP computer-a dinosaur, but still very powerful! )

Searching, after the inital load, takes no more than 10 seconds.

BTW, a few comments/requests (if you are still developing this tool):

(1) can the viewer button be placed on the Book Shelf tab as well?
(2) can you make the Path pane sortable too like Category, Title, Author and Type?
(3) can each successive header click toggle the sort order/direction between ascending and descending.

~~~~

OK, personal favour time. How do I start adding a Tk GUI to an existing .pl script that I have; do I create the GUI part using an editor?

Any tips you may have would be helpful-linux or windows!

BTW, I found this code for Tk Tag (an MP3 ID3 tag editor) and would like to extend it to a .imp meta header editor! But where do I start...
Reply 

#15  derrell 10-17-2008, 11:36 PM
There are a couple of GUI tk interface creators like Zooz but I find it easier to just add the code by hand as I build up the interface. One of the major drawbacks of Tk is that as the application gets larger and more complicated you tend to end up with global variables all over the place. There are object oriented solutions to this but I generally end up using hashes for them. Oop and I don't get along well, one of the reasons that I still use perl for most things that I write and haven't really gotten into python where everything is an object.

Here are a couple of links for some basic Tk info. There are many around the web.
Tk tutorial
Zooz My opion though is that it easier to just code the ui.
Some more advance widgets.

Oh and I'm still tinkering with this some but I think I'll be moving to an epub like storage system for my books. Where the book is exploded into an oeb style structure with either mobi2oeb or convert lit then modify the opf file and build an imp with a short windows script that wrote that uses the BookMill com interface. From there I can store the imp file and all of the other files in a single zipped archive or possibly bzip2. That will give easy access to the created imp file so it can be copied to my bookshelf or to easily change the metadata in the opf and rebuild the imp. The impfindGUI script will most likely be the starting point with some modules added to handle manipulating the book files.

The sort for the path and the button on the shelf tab shouldn't be hard to add. I'll look at adding that to the what I have and post another version in a couple of days.
Reply 

#16  nrapallo 10-18-2008, 12:06 AM
Quote derrell
There are a couple of GUI tk interface creators like Zooz but I find it easier to just add the code by hand as I build up the interface. One of the major drawbacks of Tk is that as the application gets larger and more complicated you tend to end up with global variables all over the place. There are object oriented solutions to this but I generally end up using hashes for them.
I was hoping you weren't going to say this!

Quote
Oop and I don't get along well, one of the reasons that I still use perl for most things that I write and haven't really gotten into python where everything is an object.
I hear you loud and clear. Same with ME! When I updated PDFRead's python modules, I got brain freeze; still do. I think like perl is written, not like OOP! That's why my continued interest in writing some perl utilities.

Quote
Here are a couple of links for some basic Tk info. There are many around the web.
Tk tutorial
Zooz My opion though is that it easier to just code the ui.
Some more advance widgets.
Thanks for these tutorials!

I tried the ActivePerl Tk widget.bat demo and others and all I can say is WOW!!! I've got to learn this (in between ebooks conversions)!

Quote
Oh and I'm still tinkering with this some but I think I'll be moving to an epub like storage system for my books. Where the book is exploded into an oeb style structure with either mobi2oeb or convert lit then modify the opf file and build an imp with a short windows script that wrote that uses the BookMill com interface.
Mobi2IMP.pl and Lit2sb.pl will do this nicely for you, as a front-ends!

Quote
From there I can store the imp file and all of the other files in a single zipped archive or possibly bzip2. That will give easy access to the created imp file so it can be copied to my bookshelf or to easily change the metadata in the opf and rebuild the imp. The impfindGUI script will most likely be the starting point with some modules added to handle manipulating the book files.

The sort for the path and the button on the shelf tab shouldn't be hard to add. I'll look at adding that to the what I have and post another version in a couple of days.
Great to hear; another developer to share the "laurels" with!
Reply 

#17  derrell 10-18-2008, 12:18 AM
Quote nrapallo
Mobi2IMP.pl and Lit2sb.pl will do this nicely for you, as a front-ends!
I've never been able to get mobi2IMP to work under wine. Thats why I wrote a script that would work with the BuildFromProject method from the BookMillX api. Just feed it an opf and viola imp file. Seemed like the simplest way to avoid a lot of work arounds with wine. Calibre and convert lit work fine under linux and with perl I can chop up the opf and redo it so that eBook Publisher likes it.
Reply 

#18  nrapallo 10-18-2008, 12:24 AM
Quote derrell
I've never been able to get mobi2IMP to work under wine. Thats why I wrote a script that would work with the BuildFromProject method from the BookMillX api. Just feed it an opf and viola imp file. Seemed like the simplest way to avoid a lot of work arounds with wine. Calibre and convert lit work fine under linux and with perl I can chop up the opf and redo it so that eBook Publisher likes it.
Right, linux doesn't support native .imp creation.

What's BookMill com interface or BookMillX api? linux or Mac OS X modules?
Reply 

#19  derrell 10-18-2008, 02:43 AM
Should have said the eBook AutoPublisher from eti. The perl and VB interface that comes with eBook Publisher. The title that shows in a tab with the docs open is BookMillX - COM started thinking of it by that name. Using that I only have one call to a windows script running under wine to get an imp book from a set of files.
Reply 

#20  nrapallo 10-18-2008, 07:16 AM
Oh, I see. That's where I got started programming in perl earlier this year! See my first mobileread post or the one with working perl scripts.

So after installing eBook Publisher using wine, what do you call to create the .imp? Is it detailed in your EBookwise-1150-Linux@Wiki » wiki page?

Mobi2IMP.pl uses the .imp creation routine I "lifted" from the SBPubX.doc COM interface doucmentation that ships with eBook Publisher. It basically calls '$builder->Build($project);' to create the .imp. You use 'BuildFromProject', but how is it different than what I'm calling that doesn't make it work!

BTW, lit2imp.pl DOES use '$builder->BuildFromProject($opf_file);', so does it create a .imp from a .lit in liunx for you?

Maybe you can try tweaking Mobi2IMP.pl to work properly in linux using 'BuildFromProject' instead of just 'Build'?

Can you confirm what works for you? and what script do you use?

I'll make the change permanent in Mobi2IMP.pl, if it works for both linux and windows!
Reply 

 « First  « Prev Next »  Last »  (2/3)
Today's Posts | Search this Thread | Login | Register