Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2010, 12:21 PM   #1
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 252
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Which IDE do the developers use?

I want to familiarise myself with the Calibre source in order to see if I can implement a few snippets to scratch an itch (word count). A longer term goal is to try my luck on larger problems like annotations for Sony.

To start with I'd prefer something free as in beer, I have no idea if I'll use it enough to warrant buying a licence. Cross-platform would be best, but I have Windows and Linux available otherwise.

I'm not a developer by trade, but I do have a CS background, and am reasonably familiar with various languages, for instance perl and php in addition to Java and C++. Very little Python as of yet, though

I guess that I can do what I want by modifying the python files only. I've worked on a large Java project, and Eclipse worked very well for that. I liked the intelligent code functionality, and its ability to "understand" the whole project, not just individual files. Pydev seems to be a bit lacking in this respect.

Wing IDE Personal seems nice, but I don't really want to pay for it before I've gotten my feet wet.

I'm trying my way through a few free ones now, but any suggestions from more experienced developers would be welcome
Man Eating Duck is offline   Reply With Quote
Old 11-23-2010, 12:34 PM   #2
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: 25,809
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I started out using vim, switched to pydev and then went back to vim (albeit a heavily customized vim with various niceties for python development).
kovidgoyal is online now   Reply With Quote
 
Enthusiast
Old 11-23-2010, 02:08 PM   #3
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,497
Karma: 424627
Join Date: Mar 2009
Device: iPad
BBEdit under OSX.

G
GRiker is offline   Reply With Quote
Old 11-23-2010, 05:57 PM   #4
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,433
Karma: 950001
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Netbeans for the longest time but I've switched to PyDev a few months ago.
user_none is offline   Reply With Quote
Old 11-23-2010, 07:31 PM   #5
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
How do you want to do the word count? Funnily enough I'm adding that this week for some other reasons, but I wasn't planning to do anything that was exposed to an end user.

My implementation is relatively simplistic for html - I'm just deleting the everything in the <head> section and then removing all the other tags with a regex. It's probably not always perfect but it's fast. Once that's done I'm using this code to do the actual count:
http://ginstrom.com/scribbles/2007/1...s-with-python/

The thing to do which could potentially be more accurate is to use this extra code which uses a proper parser to extract all translatable words (which was the original goal of this author):
http://ginstrom.com/scribbles/2008/0...e-with-python/

Anyway I could put the word count into the debug log so you could see it in the job details.

Last edited by ldolse; 11-23-2010 at 07:34 PM.
ldolse is offline   Reply With Quote
Old 11-24-2010, 07:35 AM   #6
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 252
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by ldolse View Post
How do you want to do the word count? Funnily enough I'm adding that this week for some other reasons, but I wasn't planning to do anything that was exposed to an end user.
Out of curiosity: What will you use it for?
I do this now by converting all books to text, run them through wc and inserting the values in a custom column with sql. It works well enough to give me an estimate of the book length, any fully automated approach will be slightly inflated anyway due to extra content. Word count is an informative number to me, and it's just about the only metric that make sense and is somewhat consistent for ebooks. Character count is another, but that's not something that's immediately meaningful to readers.
Quote:
My implementation is relatively simplistic for html - I'm just deleting the everything in the <head> section and then removing all the other tags with a regex. It's probably not always perfect but it's fast. Once that's done I'm using this code to do the actual count:
http://ginstrom.com/scribbles/2007/1...s-with-python/

The thing to do which could potentially be more accurate is to use this extra code which uses a proper parser to extract all translatable words (which was the original goal of this author):
http://ginstrom.com/scribbles/2008/0...e-with-python/
I think that the first approach gives a more intuitive result for books, as the second seems to include alt tag text among other things. It is more complex as well.

Quote:
Anyway I could put the word count into the debug log so you could see it in the job details.
Sure, couldn't hurt

Word count is not my motivation for starting this thread, it's just something I might do to become familiar with Python and Calibre. I like tinkering with code, but I'm certainly not capable of writing production quality code right now, and don't know if I ever will be.
Man Eating Duck is offline   Reply With Quote
Old 11-24-2010, 09:01 AM   #7
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by Man Eating Duck View Post
Out of curiosity: What will you use it for?
I do this now by converting all books to text, run them through wc and inserting the values in a custom column with sql.
I'm doing it for the optional preprocessing code under structure detection, there is code there that searches for common chapter headings and and marks them up, either for books that weren't properly marked, or for users who can't figure out xpath. Problem is I can't measure whether the markup search was successful without having an idea how long the book is, so I'm using the word count to tune the aggressiveness/when to stop.

The actual count I'm providing should do the trick for what you want, I'll let you look into auto-populating DB records or accessing it in some alternate fashion if you want to go for that, but the function will be there.


Quote:
Originally Posted by Man Eating Duck View Post
Word count is not my motivation for starting this thread, it's just something I might do to become familiar with Python and Calibre. I like tinkering with code, but I'm certainly not capable of writing production quality code right now, and don't know if I ever will be.
I realized that, just thought I'd chime in as that's what I was working on. I don't have anything constructive to add to the IDE discussion. I'm more of a tinkerer myself, you shouldn't let that stop you from contributing.
ldolse is offline   Reply With Quote
Old 11-24-2010, 11:18 AM   #8
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by ldolse View Post
I'm more of a tinkerer myself, you shouldn't let that stop you from contributing.
I'm also a tinkerer. Kovid is very good about taking your non-production quality code, and making it finished quality. He can quickly spot and fix problems in your code relating to how to handle differences in the OS (Linux and OSX vs. Windows) or language issues, etc.
Starson17 is offline   Reply With Quote
Old 11-24-2010, 07:48 PM   #9
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,433
Karma: 950001
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Man Eating Duck View Post
I like tinkering with code, but I'm certainly not capable of writing production quality code right now, and don't know if I ever will be.
Practice and you will improve. calibre is a large code base with a lot of quality code. It will get you up to speed with best practices and writing good code very quickly. However, you would be surprised what passes for production quality code in most businesses...
user_none is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle [Developers] Conference? Hrant Amazon Kindle 0 08-31-2010 11:45 AM
BeBook looking for developers! Slite BeBook 4 10-09-2008 12:36 PM
iLiad irex developers program ?! thetechnobear iRex Developer's Corner 4 04-13-2008 10:32 AM
iRex looking for talented developers Adam B. iRex 0 08-03-2007 06:37 AM


All times are GMT -4. The time now is 04:09 AM.


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