06-03-2008, 03:48 PM | #61 |
Junior Member
Posts: 6
Karma: 10
Join Date: May 2008
Device: Sony PRS-505
|
I'm getting an error trying to use this:
Code:
clarson@foul mine home#mv!187caf1$ pi_format.py mine.conf Traceback (most recent call last): File "/home/clarson/Desktop/pi/pi/bin/pi_format.py", line 59, in <module> test_all(sys.argv[1]) File "/home/clarson/Desktop/pi/pi/bin/pi_format.py", line 15, in test_all doc = pi.Doc(conf) File "/home/clarson/Desktop/pi/pi/bin/pi.py", line 1091, in __init__ self.get_avg_page_stat() File "/home/clarson/Desktop/pi/pi/bin/pi.py", line 1144, in get_avg_page_stat self.avg_lh = middle(avg_lhs) File "/home/clarson/Desktop/pi/pi/bin/pi.py", line 58, in middle return sl[(len(sl) + 1) / 2] IndexError: list index out of range |
06-05-2008, 01:09 AM | #62 |
Enthusiast
Posts: 26
Karma: 161
Join Date: Feb 2008
Device: Sony PRS505
|
Yes. This is a bug.
You can fix this by changing line 58 of pi.py from return sl[(len(sl)+1)/2] to return sl[len(sl)/2] I will fix this in next version. |
Advert | |
|
06-09-2008, 08:41 PM | #63 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2008
Device: Sony PRS-505
|
has anyone had success compiling this on leopard?
|
06-09-2008, 09:40 PM | #64 |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
|
06-09-2008, 09:48 PM | #65 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2008
Device: Sony PRS-505
|
well i don't know how you'd compile it on windows, but the author provided a link to a cygwin binary for it further up:
https://www.mobileread.com/forums/sho...9&postcount=17 my issue is compiling pi.c... i get a slew of errors when i try to build it against netpbm from macports. |
Advert | |
|
06-09-2008, 10:51 PM | #66 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
I am not the author and since version 0.2 I have not been able to use this code in windows due to some strange behaviour of python using pipes to external programs. It's not the author's fault, just a defect/deficiency of my windows installation! Last edited by nrapallo; 06-09-2008 at 10:53 PM. |
|
06-09-2008, 11:08 PM | #67 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2008
Device: Sony PRS-505
|
|
06-10-2008, 07:47 AM | #68 |
Linux User
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
|
No, sorry. On Linux it works fine ...
|
07-04-2008, 05:16 PM | #69 |
eAddictd
Posts: 41
Karma: 10
Join Date: Apr 2008
Location: Italia
Device: PRS505, Iliad Book Edition
|
I want it in MacOSX!!!
why doesnt work in osX??? i want it!!!
and... what about to put the code in the software to make lrf from cbz? I will really like to convert cbz to img, render them with this program and compile a lrf, with just one click (and maybe another click to send to my prs505 from calibre ) |
07-04-2008, 05:27 PM | #70 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
07-11-2008, 12:35 AM | #71 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2008
Device: Sony PRS-505
|
|
07-22-2008, 10:34 AM | #72 |
Zealot
Posts: 112
Karma: 113786
Join Date: Jul 2008
Location: Germany
Device: Sony PRS-T3S, CoolReader on 4'' Android phone
|
Success with Linux live CD, Trouble with Crop Box
Hi,
I tried this on Windows XP SP2 and found that the Windows version cuts images in two. Then I fiddled around to get the original package running on XP without success. Depressed I started what I wanted to avoid and tried a Linux live CD, namely Puppy Linux 4.0 together with its development environment since I had to compile and install some packages missing in the distribution like the Python Image Library and others. This was not too difficult since you always get a good hint where you are currently stuck :-) In the end it worked out fine and I think this might be an alternative for Windows and MacOS users. If anybody is interested I could add the details in another post. Only one thing still itches me in the Linux Version: I couldn't get pdftoppm to not ignore my crop box inside the input pdf file. Funny enough, pdftoppm treats crop boxes right in the Windows version?? Greetings, hansl |
07-23-2008, 01:28 AM | #73 |
Zealot
Posts: 112
Karma: 113786
Join Date: Jul 2008
Location: Germany
Device: Sony PRS-T3S, CoolReader on 4'' Android phone
|
I forgot to praise caritas in my first post. pi is by far the best pdf-preparation-for-conversion-to-ebook tool I know, and the least time consuming regarding interaction and document preparation.
I only fell over this thread by chance and think this tool should be placed in a more prominent place and get a more telling name like ebookpdf (pdf2ebookpdf is probably too long). hansl |
07-23-2008, 09:05 AM | #74 | ||
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Quote:
|
||
07-28-2008, 04:05 PM | #75 | |
Zealot
Posts: 112
Karma: 113786
Join Date: Jul 2008
Location: Germany
Device: Sony PRS-T3S, CoolReader on 4'' Android phone
|
How to use pi with a Linux live-CD (Puppy-Linux 4.00)
Quote:
- Puppy Linux 4.00 "Dingo" ISO CD-ROM image from puppylinux.org (burn the CD and follow installation instructions from puppylinux.org) - devx_400.sfs from ibiblio.org - contains development environment for compiling and installation of additional source packages (no install, just save the file in the same directory as the next one below) - pup_save.2fs created on C: drive by Puppy for additional persistent packages, virtual RAM and faster bootup (you may choose the size, I recommend the maximum which is around 1.3 GB) - pup_400.sfs and zdrv_400.sfs copied to C: drive by Puppy for faster bootup - tiff-3.8.2 from www.remotesensing.org (source installation) - libpng-1.2.29 from www.libpng.org (source installation) - zlib-1.2.3 from www.zlib.net (source installation) all source installations went flawless using ./configure, make, make install - xpdf-3.0.2 from ibiblio.org (binary installation with puppy package manager) - imagemagick 6.0.6.2-2.7 from dotpups.de (binary installation, newer version available but I got "convert" only running with this version) - Python Image Library 1.1.6 from www.pythonware.com (built with python commands) and finally - pi_0.5 where I had to make a change in img_dir_to_pdf.sh: The call to tiff2pdf with arguments -z -o ... always produced a barely readable white characters on black background pdf. tiff2pdf -n -z -o ... solves the problem and produces black chars on white bg. So that's it and no, I didn't even try to produce a Windows binary. I preferred to let success shine on me . Also, I had no trouble with Puppy Linux besides finding the right Imagemagick version. BTW document exchange between Puppy and Windows is easy, you can mount the Windows filesystem in Puppy. And don't worry, the desktop environment is very newbie friendly. So, most installations and mounts are point and click. Now I can admit that I have a Solaris past and feel happy to dive a little into the Unix feeling again. hansl Edit: I forgot to mention that like all 32 bit dinosaurs I had to delete pi.o in order to get pi compiled. All files I added to the live CD have been saved in pup_save.2fs on my hard disk, i.e. I didn't really change the CD but what it loads on bootup from my HD (I have to leave for backup now ...) Last edited by hansl; 08-05-2008 at 07:30 AM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My images are disappearing on small screen devices | sbrwake | Kindle Formats | 2 | 01-10-2009 09:01 PM |
Pre-render and cache PDF pages? | nekokami | iRex | 3 | 07-02-2008 03:26 AM |
PDF Text too small! | thacursedpie | iRex | 9 | 03-18-2008 02:53 PM |
Spies can run small devices on body heat. What about eBooks? | mogui | News | 23 | 09-21-2007 01:31 PM |
over 2 mins to render PDF page | reh_reh | iRex | 6 | 11-11-2006 07:57 AM |