11-23-2010, 12:21 PM | #1 |
Addict
Posts: 254
Karma: 69786
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 |
11-23-2010, 12:34 PM | #2 |
creator of calibre
Posts: 43,860
Karma: 22666666
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).
|
Advert | |
|
11-23-2010, 02:08 PM | #3 |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
BBEdit under OSX.
G |
11-23-2010, 05:57 PM | #4 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
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.
|
11-23-2010, 07:31 PM | #5 |
Wizard
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. |
Advert | |
|
11-24-2010, 07:35 AM | #6 | |||
Addict
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
|
Quote:
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:
Quote:
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. |
|||
11-24-2010, 09:01 AM | #7 | ||
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
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:
|
||
11-24-2010, 11:18 AM | #8 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
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.
|
11-24-2010, 07:48 PM | #9 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
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...
|
|
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 |