titaniumbunker.com

Evil geniuses and world domination are 2 of our goals... we also like Dr Who

Archive for the ‘ Content Packaging ’ Category

Giving a Ubuntu-ebook a voice

no comment

I have been experimenting with the functionality of the Ubuntu ebook template.  The idea is that if you are writing your book using the template, that the same content can be published to an ebook and an audio book.  The new command to accomplish this is :quickly read.


Read more..

quickly ubuntu-ebook project registered on Launchpad

no comment

Want to help?

Want to try Ubuntu Quickly for ebooks?  then pop over to https://launchpad.net/quickly-ubuntu-ebook and get involved.

 

Quickly Ubuntu Ebook

no comment

Quickly Ubuntu-ebook template

no comment

Here’s a first video demonstating the ubuntu-ebook template for quickly.

Quickly templates – update

no comment

I emailed Didier Roche, the main developer of quickly. He offered some advice regarding how quickly works, and using that information I was able to build an ebook last evening. I’d made a bit of a school boy error, but the great thing was that I was able to see all the code that runs quickly.

Quickly templating.

no comment

I have been experimenting with quickly recently – My plan was to develop an ebook packaging tool that would allow users to package ebooks for software centre.  I’ve been side tracked from that development as I had an idea – could I use quickly to create an ebook template?

The theory goes that yes – it should be possible to create an ebook template for quickly that authors should be able to use to test, and then upload their source books to launchpad.  This ties into my idea that content should be as revered as code.

Here’s where I’ve got to so far…

A new ebook can be created using the command :

quickly create ubuntu-ebook testbook

This creates a structure to store the ebook content.

I have been working on the quickly run command – which currently errors – but I have written a packaging script.

 

 

Anyway I had a go at trying to follow Didier Roche’s blog post instructions but I think it’s somewhat out of date.

I’ll keep plugging away at it, and update when I can.

 

 

Python, Python packaging and why I still dislike macs

no comment

Python Logo

I have been developing a little application in python.

“oooh!” I hear you cry, “Get you using free and open source development languages to develop a cross platform application. Was it a liberating, life changing experience?”

Well yes. Yes it was. And no as well

Here’s the yes, the pros of development. The plan was to develop a small application to run on the Mac Mini we use here in the bunker as a DVD player.  Having spent some time reading up on Cocoa and straining my eyes trying to read the display ( its connected to the TV via a scart composite cable so the desktop display isn’t great)  I decided to develop the application on my Windows Desktop using python. The rational being that it is cross platform, if I can write it to work in a windows environment, it should work in a Mac environment right?

I installed a portable python and Boa constructor onto my trusty USB Key based development studio ( more on this another time) and in an afternoon I had managed to write my first ever python WX app !

booting up the Linux laptop I installed python and wx in a short period of time (Ubuntu software centre is the gift that keeps on giving! ) and yup, the application ran fine

So far,  so good, I have developed in one platform and deployed to another. now the next step. compile it into a stand alone exe that can run in Mac OS. And this is where we come to the cons

Mac Software centre

Mac OS has a software centre for getting software.  I wanted to be certain that I had the latest version of python. so I typed it in the search field. After sifting through downloads of Monty Python’s flying circus shows and films I found it. all for the princely sum of £1.99

really? £1.99 for software that’s free and easily download-able from pythons own website after a cursory search on google? Why anyone would think that Apple where a money grubbing organisation trying to fleece owners by charging for free content?

Installing WX

next up was installing wx. A relatively painless experience. The was an installer on their website that allowed the installation of the package and I was finally able to test the application in the Mac OS and it worked! Kind of.  Because of font differences. one of the buttons needed to be enlarged and moved – cue 20 minutes of putting values in, running the module , stopping the module, changing values etc just to more-or-less replicate what showed up first time on windows and Linux.

Installing py2app

In order to convert the python script into a stand alone app  was going to use py2app which makes creating app files easy. This is the point where I lost the best part of a day struggling with  a number of issues, chief among them is the fact that as a Windows/Linux user I am used to right clicking a link in my web browser and saving links. to right click on mac you hold down ctr (yeah its so intuitive to me too) Apparently Mighty mouse which are 4 button mice do actually have a right click functionality,  but it needs to be set up from the finder by assigning the secondary click function to the right button- don’t panic, its not as scary as it sounds, but you got to question why such simple design paradigms have to be defined. When i plug a new mouse into my windows or Linux box, I don’t have then tell the OS what buttons do what It works out of the box.

installing easyinstall

To install Py2app I was going to have to install another python package called easyinstall. This is the point where I lost a lot of time on the documentation. which , while it showed me what to type in terms of setting it up. I was typing the commands into a python shell window and trying to run it as a python module with no luck until Mike told me that it was terminal prompts. Just a  line explaining that this was to be run from a terminal would have saved me 4 hours of frustration trying to get easy install er… installed

installing app2exe (again)

However, once I had installed easy install, installing py2app was a dream.  its a lot easier to use terminal commands when you actually know they are terminal commands!

making the application

I then started setting up the solution to create the app. Py2app basically takes a number of arguments, the first is the location of the main.py file, followed by resources. in this case the application icon. The problem here was my USB Key. On Mac OS it appears with the title “NO NAME” and while py2app could parse the space in the location of the initial .py file, apparently for the icon file it didn’t recognise it. Cue renaming of drive to replace spaces with underscores

This time I wan the py2app applet and SUCCESS!!!! a program appeared in my Release folder in my user profile. After 2 evenings of frustration, weeping and much gnashing of teeth, I had built my first Python  Mac OS application!

Lets run it to see how it works.

And it crashed. Something to do with different versions of WX!!!! AGGGGGGGHHHHH!!!!

 

ho hum back to the drawing board.

 

 

Publish and be Damned?

no comment

Today, I listened with interest to FLOSS Weekly episode 207Aaron Newcomb and Dan Lynch were interviewing Denis Defreyne about his product nanoc.  I started thinking – about 2 things actually (which for me is quite good).

  1. Compiling static HTML from markup?  That sounds a lot like dexy – I wonder if the 2 could be used together to document  – for example an API, and include the results (via dexy), automatically uploading that data through file sync to a webhost?
  2. I wonder if you could use that to compile things other than websites?

Aaron also seemed to have the same idea, and Denis mentioned that he had used nanoc to compile some C programs, and had heard of some example where files were being compiled to PDF.

But that only stirred more questions.  I meandered to the coffee machine, and ordered a plastic cup of fresh brew coffee.  I had been wondering if it could be used to package a manuscripts into a Epub file, and I believe it might be possible – the question became one of whether it would add any benefit.

I’m going to put nanoc to one side for the moment, and introduce something new to this blog post – the “novel publishing process”.

Regular readers may notice the the tag cloud for this website shows quite a large preoccupation towards content packaging – I’ll admit it – I’m passionate about content packaging, and have been working on (for a little while now) a pipeline or process to assist the publishers of ebooks.   This pipeline basically describes tools that can be used to fulfill some of the requirements of authors, and at the end I’ll examine if there is a possible place for Nanoc within this process.

  1. Version Management

    Goes without saying – when it comes to being creative on a computer, you’re going to need some form of version control.  During the 2011 NaNoWriMo event, Fab (of linux outlaws fame) used gitorious to store his manuscript as he was working on it.

    Git, BZR, SVN – I’m not going to pick a favourite – all I would suggest is that you play with the version systems available out there, and get used to them, and then pick one and use it.  Equally important is backups.  The internet is full of cloudy backup stores – from Dropbox to Ubuntu One – think about how you would recover your novel in the event of an emergency.

  2. Novel Management

    Here’s where the pipeline gets interesting. You could just start writing a document using gedit – or emacs or whatever your favourite text editor of choice is – however I would suggest that something that allows you to keep track of your chapters, characters etc should be something of importance to the aspiring author, and I think I’ve found one.

    Storybook is an open source Java based development environment for managing your novel. You can write up all your character bios, add research notes, google map locations, images, whatever supports you as a writer. It has a timeline, so that you can plot your character states on a timeline, and even allows you the ability to track which characters are dead, and which are alive. The data is stored in a database file based on SQLLite, and therefore your data is never trapped there.

  3. Layout and design

    Once you have finished your masterpiece you need to take the text, and any other assets and put them into sigil.

  4. Testing

    Publishing will produce an epub file – This can now be tested on an ereader of your choice. Ubuntu offers the ereader product (other e-reader products are available)

    Amazon do make a Kindle Previewer application available for Windows and Macintosh users – I have managed to get it working under Wine – the following hints should help :

    1. Download the Amazon Windows installer from here
    2. Run the installer under wine
    3. Set the default windows version to be Windows XP
    4. It may complain that SWT has caused an issue – potentially install VC2008 runtime, using the terminal line : wintricks vcrun2008
    5. it may crash when loading an epub file – potentially delete ~/.wine/drive_c/windows/winsxs/manifests/*.vc90.*_deadbeef.manifest files (based on a post on wineHQ forum) – this may be because my wine session was set to Windows7

 

Play time

no comment

Today Google launched their re-branded Android Market place to Google play.  This is interesting for me as I have an android phone and had wondered what this new play malarky was all about.  According to the register this new store puts applications 4th on the list, below music, books and movies.

Back when I did the oggcamp content packaging presentation I tried to highlight the advantages that packaging your content would provide to both consumers and producers, and it looks like Google have started to embrace it.  What is equally interesting is the dropping of android from the store name.  Could we see a generic Google store selling content soon? After all applications are only java applications, and it doesn’t seem beyond the realms of possibility that the virtual machine could be made to work on Linux…

Given Ubuntu on android, Ubuntu TV, I think we seriously need to look again at packaging content in addition to applications if Ubuntu wants to compete with Google here.

The demise of megaupload.

no comment

Back at oggcamp, I gave a brief presentation about what I saw as the dangers of storing content with cloud providers.  My arguments were based on the fact that your provider may go put of business, putting your content at risk.

And now we have the Megaupload case. If you used cyberlocker services such as Megaupload, how safe should you be feeling right now?

The absolutely safest way to host your content somewhere that you control right? I would suggest that if you wanted to be more sure of safely storing your content somewhere, that you consider the possibility if storing it in more than one place. What I would like to investigate is some publishing mechanism that automatically pushes updates to sites.

Imagine you have written a cool book – you host your content in launchpad and an ubuntu package is built whenever you update. But perhaps you also want to make if available on an ftp site. What if launchpad could push your content to an ftp address once complete? I plan to investigate this possibility.

 

When Launchpad successfully builds a binary deb file is created.  What I want to do is to write something that will allow the server to pull a specific file from a DEB file.

 

I have a PPA which I have used to store the content of the Linux Reality podcast – you can find it here.

 

So – let’s take episode 100 as an example:

You can find the Deb file here.

 

What I am working on is a plugin which allows the user to add a link to a page or post like so :

Download something from a debian file file = something...deb = something else