Re: Working with ePub: generate .toc and .opf files?

2012-08-17 Thread Eelco Deuling
Hello, I have done some work and made some progress with it. The following script is a test-script to generate the manifest part of the content.opf: --- #!/usr/bin/env python # call the operating system (?)

Re: Working with ePub: generate .toc and .opf files?

2012-08-17 Thread Eelco Deuling
Sorry: this part I had posted already! This is the second part: --- import os import re ## # remove OSX .DS_Store files ## for root, dirs, files in os.walk('./'): if '.DS_Store' in files:

Re: Working with ePub: generate .toc and .opf files?

2012-08-17 Thread Maarten Sneep
On 17 aug. 2012, at 15:01, Eelco Deuling deulingee...@gmail.com wrote: Sorry: this part I had posted already! This is the second part: (I'm not a python code checker ;-) # make sure you import all at the top of your file # see PEP8 import os import re

Re: Working with ePub: generate .toc and .opf files?

2012-08-17 Thread Eelco Deuling
Hello Maarten, …maybe you are not a Python code checker but I do appreciate your help. (hell… I am not a programmer and decided during my first and only lesson of Pascal that I would never get it- 20 years ago). Thank you for your patience :-) -- -- You received this message because you are

Re: Working with ePub: generate .toc and .opf files?

2012-08-10 Thread Eelco Deuling
Hello Wats Martin, I am sorry if I did sound offensive: that was not my intention. I more or less understand what Bookbind tries to do but for me it won't work, because Markdown has not enough support for classes, id's etc. I usually start with a InDesign document (a completed book for print)

Re: Working with ePub: generate .toc and .opf files?

2012-08-10 Thread Watts Martin
Don't worry, I'm not offended. You mostly just made me realize that even if Bookbind is mostly done, it needs a lot of documentation work still. :) But, your workflow sounds *close* to that of the book I wrote Bookbind to create, with the exception of the images, as I didn't have any of

Re: Working with ePub: generate .toc and .opf files?

2012-08-10 Thread Eelco Deuling
I am glad you are not offended, and maybe your solution is indeed what I need… But I agree you should add some documentation, as I cannot get it to work. Like I said: I am new to Python, and the solution I work on is my first effort. I did use parts of Bookbind to write it :-) and I am the

Re: Working with ePub: generate .toc and .opf files?

2012-08-09 Thread Eelco Deuling
Hello Maarten, Thank you for cleaning up my script, and thank you for pointing out to http://code.google.com/p/python-epub-builder/. I did find this myself before, but I staggered mentally when I read the introduction in the Wiki to create a epub in five minutes, as I hardly understand a word

Re: Working with ePub: generate .toc and .opf files?

2012-08-09 Thread Watts Martin
I'll express a *mild* objection here. :) Bookbind is designed to let you use your own stylesheet for a book and even to override individual pages if necessary. While the main reason I wrote it is because I write prose in Markdown these days, being able to do custom styling was pretty important

Re: Working with ePub: generate .toc and .opf files?

2012-08-08 Thread Eelco Deuling
Hello, I have finished part one: make a directory structure and all the necessary files for an epub. As this is my first-ever python script there should be some things wrong, but it works: #!/usr/bin/python # call the

Re: Working with ePub: generate .toc and .opf files?

2012-08-08 Thread Maarten Sneep
Hi, On 8 aug. 2012, at 14:03, Eelco Deuling deulingee...@gmail.com wrote: I have finished part one: make a directory structure and all the necessary files for an epub. As this is my first-ever python script there should be some things wrong, but it works: Let me help you out. The script

Re: Working with ePub: generate .toc and .opf files?

2012-08-06 Thread Eelco Deuling
Thank you Watts Martin and Charlie Garrison, the solutions do more than I want, but that does not mean I am not happy with them. I think I have enough hooks to copy and paste my own solution together. If it works I will post an update: will take some time though! Op zaterdag 4 augustus 2012

Re: Working with ePub: generate .toc and .opf files?

2012-08-05 Thread Charlie Garrison
Good morning, On 4/08/12 at 2:32 AM -0700, Eelco Deuling deulingee...@gmail.com wrote: I was wondering if there is a way to generate the .toc and .opf files with BBEdit: I think this could be done with a shell script or a regex text factory that wraps a list (based on file extensions or

Re: Working with ePub: generate .toc and .opf files?

2012-08-04 Thread Watts Martin
I haven't tried to integrate this directly into BBEdit, but you could try looking at Pandoc or Bookbind, which are both command-line utilities for generating EPUB books. Bookbind (which is my own tool) is really designed to process Markdown documents but can handle pre-made XHTML instead;