Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2008, 10:07 PM   #16
Zen-Diego
Member
Zen-Diego is on a distinguished road
 
Zen-Diego's Avatar
 
Posts: 10
Karma: 54
Join Date: Nov 2008
Location: Earth
Device: various Sonys then Kindles; currently Kindle Oasis
Help for another nOOb, please? I've followed instructions elsewhere, am using WinVista, Pyth25, and have appropriate script in tools/script directory. So I take it that the argument in Python Win Editor s/b

bookname.pdb outdir "My Name" 12345678

All fine and well, except - where should bookname.pdb be located, and how does the script know where to find it? Where should outdir be located, and how complete does the path need to be? I've really tried to work through this one just for the challenge of it but cannot make it happen. TIA.

Last edited by Zen-Diego; 11-19-2008 at 10:10 PM.
Zen-Diego is offline   Reply With Quote
Old 11-20-2008, 07:13 AM   #17
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by Zen-Diego View Post
All fine and well, except - where should bookname.pdb be located, and how does the script know where to find it? Where should outdir be located, and how complete does the path need to be?
The short answer is: use a command window and first change to the directory where the ebook is located - then file and directory names are relative to the current directory. I suggest looking at KindleFIX Vista/XP. This is about a different python script, with different command arguments, but the basics are the same. Step 3 includes a link to more information about Command Prompt Windows.
wallcraft is offline   Reply With Quote
Advert
Old 11-20-2008, 05:08 PM   #18
Trono
Enthusiast
Trono began at the beginning.
 
Trono's Avatar
 
Posts: 39
Karma: 10
Join Date: Aug 2007
Location: Norway
Device: Hanlin V3
Quote:
Originally Posted by wallcraft View Post
In a standard terminal window (not a python editing or debugging window) try just the command with no arguments:
Code:
python ./ereader2html.py
If that works, try the full command line.

If you make ereader2html.py executable you can probably drop the python, but it should not cause problems.
Thanks so much for trying to help guys, but it's still not working for me. Probably I'm missing out on something so obvious that it doesn't occur to you to point it out..
Trono is offline   Reply With Quote
Old 11-20-2008, 05:46 PM   #19
badgoodDeb
Grand Sorcerer
badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.
 
badgoodDeb's Avatar
 
Posts: 8,502
Karma: 64095689
Join Date: Jan 2008
Location: Harrisburg outskirts
Device: Palms, K1-4s, iPads, iPhones, KV, KO1
In a standard terminal window (not a python editing or debugging window)
Code:
python ./ereader2html.py
What works for me is
Code:
/usr/bin/pythonw  ./ereader2html.py
If that part works, we can work on the rest of the arguments.
badgoodDeb is offline   Reply With Quote
Old 11-20-2008, 11:07 PM   #20
Zen-Diego
Member
Zen-Diego is on a distinguished road
 
Zen-Diego's Avatar
 
Posts: 10
Karma: 54
Join Date: Nov 2008
Location: Earth
Device: various Sonys then Kindles; currently Kindle Oasis
I've never used command prompts before and ActivePython has a gui front. To me it's like I have this robot that has been programmed to spoon feed me, and all I need to do is tell it where my mouth is - and you people are telling me I must to learn to feed myself!

That said... omg- it worked! Pointing to the kindle-related page on the wiki is what helped made it click in my pea brain. What I figured out was that I had to keep testing the argument's steps using >cd before running the whole argument. I still don't understand the truncated arguments given as examples - I had to key in each & every\Tools\Scripts\ subdirectory & file to poke the specific script. Is it inappropriate to be more specific?

After success I'll now admit- I have only one book that needed conversion. I could have paid for it over and over in every purchase-able format considering the couple of hours it took. But y'all helped me get 'er done, and now I know I can shift that format for personal use when needed. Thanks!
Zen-Diego is offline   Reply With Quote
Advert
Old 11-20-2008, 11:10 PM   #21
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by Zen-Diego View Post
I still don't understand the truncated arguments given as examples - I had to key in each & every\Tools\Scripts\ subdirectory & file to poke the specific script. Is it inappropriate to be more specific?
I don't know what you mean by truncated arguments?

Whatever works is fine. It sounds like you didn't get the correct path or weren't in the directory where your book was.

BOb
pilotbob is offline   Reply With Quote
Old 11-20-2008, 11:30 PM   #22
Zen-Diego
Member
Zen-Diego is on a distinguished road
 
Zen-Diego's Avatar
 
Posts: 10
Karma: 54
Join Date: Nov 2008
Location: Earth
Device: various Sonys then Kindles; currently Kindle Oasis
I needed to key the full path of c:\python25\Tools\Scripts\ereader2html.py in order to execute, and then adding scriptname bookname.pdb outdir "My Name" 12345678 fell into place. I stuck the pdb file in the python25 directory and also used that for outdir. I was not able to execute using python .\ or pythonw .\ ; seemed like shorthand for how I got to it. But I know nothing about cmd, and got the output I sought- so the directions clearly helped & I am appreciative.
Zen-Diego is offline   Reply With Quote
Old 11-21-2008, 02:23 PM   #23
badgoodDeb
Grand Sorcerer
badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.badgoodDeb ought to be getting tired of karma fortunes by now.
 
badgoodDeb's Avatar
 
Posts: 8,502
Karma: 64095689
Join Date: Jan 2008
Location: Harrisburg outskirts
Device: Palms, K1-4s, iPads, iPhones, KV, KO1
Quote:
Originally Posted by Zen-Diego View Post
I needed to key the full path of c:\python25\Tools\Scripts\ereader2html.py in order to execute, and then adding scriptname bookname.pdb outdir "My Name" 12345678 fell into place. I stuck the pdb file in the python25 directory and also used that for outdir. I was not able to execute using python .\ or pythonw .\ ; seemed like shorthand for how I got to it. But I know nothing about cmd, and got the output I sought- so the directions clearly helped & I am appreciative.
I guess we thought you already WERE in the directory where your script lived. .\ means "in this directory". So we were telling you to run python, and for it to execute .\ereader2html.py meaning "hey python, run ereader2html.py from RIGHT HERE in this same directory." The .\ is part of the scriptname, not part of the python call (which you seemed to think). Clear as mud??!

Glad you got it to work!
badgoodDeb is offline   Reply With Quote
Old 02-26-2009, 05:33 PM   #24
Grimholtt
Junior Member
Grimholtt began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2009
Device: iPhone
Quote:
Originally Posted by wallcraft View Post
In a standard terminal window (not a python editing or debugging window) try just the command with no arguments:
Code:
python ./ereader2html.py
If that works, try the full command line.

If you make ereader2html.py executable you can probably drop the python, but it should not cause problems.
Hi guys.

Late coming to the game but I have been attempting to convert a ereader downloaded DRM .pdb file to html following these steps.

I tried this:
Code:
python ./ereader2html.py
and I got this:
Code:
python ./ereader2html.py
   File "./ereader2html.py", line 296
      print "Flags: 0x%X" % self.flags

SyntaxError: invalid syntax
Is the ereader2html.py corrupt that I downloaded? I went to the site and when it downloaded, it downloaded as a .txt. I opened it and saved as a .py. Does that have any adverse effect on it?

Thanks in advance guys.
Grimholtt is offline   Reply With Quote
Old 02-26-2009, 05:36 PM   #25
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by Grimholtt View Post
I went to the site and when it downloaded, it downloaded as a .txt. I opened it and saved as a .py. Does that have any adverse effect on it?

Thanks in advance guys.
Maybe/maybe not. Did you d/l it and not cut and paste. Python is very white space aware.

BOb
pilotbob is offline   Reply With Quote
Old 02-26-2009, 05:43 PM   #26
Grimholtt
Junior Member
Grimholtt began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2009
Device: iPhone
I downloaded it from the website as a text file. Then I did a saveas and changed the name. I didn't cut and paste and I didn't even open the file.

Edit: Correction. I did open and hit saveas. That sounded retarded. My apologies.

Last edited by Grimholtt; 02-26-2009 at 05:45 PM.
Grimholtt is offline   Reply With Quote
Old 02-26-2009, 05:44 PM   #27
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by Grimholtt View Post
I downloaded it from the website as a text file. Then I did a saveas and changed the name. I didn't cut and paste and I didn't even open the file.
What version of python are you using?

BOb
pilotbob is offline   Reply With Quote
Old 02-26-2009, 05:48 PM   #28
Grimholtt
Junior Member
Grimholtt began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2009
Device: iPhone
3.0.1
Grimholtt is offline   Reply With Quote
Old 02-26-2009, 05:49 PM   #29
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by Grimholtt View Post
3.0.1
That's probably the problem. Use 2.6.x.

BOb
pilotbob is offline   Reply With Quote
Old 02-26-2009, 05:50 PM   #30
Grimholtt
Junior Member
Grimholtt began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2009
Device: iPhone
Ah. Ok. downloading now. I'll uninstall the 3.0.1 first and give it a second go. Thanks pilotbob.
Grimholtt is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with python (ereader2html) stuff? diana.stout Reading and Management 4 05-30-2010 08:48 AM
ereader2html error. GatorDeb Workshop 13 10-10-2009 08:15 AM
Error in eReader2Html - Help? rleguillow Other formats 2 07-05-2009 04:11 PM
How to change ereader2html.txt to ereader2html.py? jodier Workshop 8 01-26-2009 11:09 AM
Need help with ereader2html. GatorDeb Workshop 6 09-27-2008 11:40 AM


All times are GMT -4. The time now is 02:10 AM.


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