I was thinking about this for a couple of weeks now. After a lot of people around me were joking about my two Smartphones I was carrying around all the time (iPhone 3G and Motorola Milestone). After nearly 2 years of use, I decided to retire my personal iPhone in favor of my Android based Milestone. The dicision wasn't easy, but I think that Android has a lot of potential and I want to spent more time with this OS.
This doesn't mean that I give up the iPhone completely: I still have my company iPhone. Only for the case that I really need that specific App, which is not yet available for my Milestone.
random thoughts about computer tech, web technologies, javascript, nodejs, groovy, java, webdev, process automation, jenkins, eclipse, android and stuff that worked for me
Monday, May 24, 2010
Saturday, May 1, 2010
Create ProGit epub from source
A couple a days ago, I discovered that the Book Pro Git (Expert's Voice in Software Development) is available in source form on GitHub. Browsing through the repository, I found out that there is a folder called "epub" which contains a groovy script to create an epub Version of this book. Wow, that is really great! Using groovy and some other tools to create the epub. I started to clone the repository to create my own epub version of the book.
The first run of the script didn't work well on my Mac. To be honest it failed because of the missing dependencies (markdown and the path to calibre). I didn't want to download markdown and install it for this one time use. I decided to have a look into the script and find a different solution.
The creation of the epub is basically running in three steps:
The first run of the script didn't work well on my Mac. To be honest it failed because of the missing dependencies (markdown and the path to calibre). I didn't want to download markdown and install it for this one time use. I decided to have a look into the script and find a different solution.
The creation of the epub is basically running in three steps:
- Convert all Files from the given language directory and fix the links to the figures. Convert the files afterwards into HTML by using markdown. Write the file to the target directory
- Merge all files from the target directory into one big HTML file
- Call calibre's
ebook-convert
and create the epub out of it
- Use of markdownj instead the perl markdown implementation. I'm using groovy's
@Grab
annotation here to download the library on the first run of the script.
- Make use of groovy's great Regex support and do a one-line search and replace on the whole file content
- Added a custom CSS for the epub, to improve the layout of lists in the epub
- Reduced the overall LOC by removing unnecessary code
Subscribe to:
Posts (Atom)