Google Documents to AsciiDoc

I was looking for a way to convert Google documents to AsciiDoc.

In that search I learned about AsciiDoc Processor which "kind of" works, but have two big issues: I cannot use it on my Google Apps domain that do no allow Google Add Ons and it did not handle images nor tables.

Thus I started looking for another solution.

Here I found gdocs2md which converts to MarkDown which is close enough and it was just a script I could use on Google App Domain...


Git client for iOS

Today I noticed via http://onethingwell.org that there is now a native Git client for iOS.

The client is called Working Copy and is available in the App Store.

I’m actually writing this blog post in it right now as a test.

It even supports uploading photos.

Thumbs up

Once I commit (free) and push (needs app purchase) A Travis build is triggered that should result in Awestruct rendering and publishing this nice blog.

What is great by working copy is that it integrates with iOS 8 new feature of sharing and editing services so you can use it from and with any app.

Making it very interesting for on the go blogging and quick fixes.




travis-ci with password only rsync

I finally got Travis working with my website.

The challenge I had was that one.com for some weird reason only allow rsync via passwords over ssh, not public/private keys.

This does not just work outside the box since rsync over ssh will under normal circumstances require a user to type in the password.

Luckily there is this little tool called sshpass that can help.

The following describes how to get all this to work together in Travis.

Setup travis.yml

In my .travis.yml I did the following:

language: ruby
bundler_args: "--without development --path .bundle"
- 2.2.0
  ssh_known_hosts: ssh.xam.dk  (1)
  - master
- sudo apt-get install -qq sshpass (2)
script: rake travis (3)
    secure: fpWVLgbveBCXlsXX7ef06qi7GrizwAE5MFq5pKH9G5AMFAdFL4xQxNOmeemRZ5fnMAn8LQUrA8otxwjiiq2RangRC9E11fBChEKC5V+FewBzsHONqkSTzKd6oAbmLynUizpXDofhVxIfRhtP03lfEDufzly4WaVDyoLJicvy9aM= (4)
1 Add your host to ssh_known_hosts to avoid 'Host key verification failed' error
2 Install sshpass before starting the build
3 Run rake script that does the actual rsync
4 Created secure variable by running travis encrypt XAMSSH=secretpassword --add

Travis rake task

And then in the Rakefile I added my travis task that does the actual rsync:

desc 'Task to be used on travis-ci'
task :travis do
  run_awestruct("-P production -g --force")

  puts "## Deploying website via rsync"
  success = system("sshpass -p $XAMSSH rsync -rvc --delete  --exclude coppermine --stats --exclude update _site/ xam.dk@ssh.xam.dk:/www") (1)

  fail unless success
1 The important part is sshpass -p $XAMSSH which uses the encrypted value from travis.

Voila - now my website will get automatically built with awestruct and synchronized with rsync even though one.com don’t like to provide more secure private/public keys.