Skip to content

2016

Free as in Freedom comeback

Free as in Freedom oggcast

I listen to podcasts daily, when cycling to and from work, and when doing otherwise uninteresting tasks. One of my favourite podcasts on my gPodder list is the Free as in Freedom 'oggcast'. I like this podcast with prominent Free Software advocates Karen Sandler and Bradley Kuhn mostly because they seem to be one of the only podcast to address the philosophical and legal side of Free Software in a welcoming but educated manner. I also like their oggcast because a new release is pretty rare. Sadly.

Comeback

Als can be seen on the back catalog of the casts, the year 2015 was already low on releases, and 2016 was even worse. Too bad for us loyal listeners. But the oggcast is making a comeback! With the producer again available for editing, and with Karen and Bradley having resolved their scheduling issues, it is time to again start producing worthwhile content.

Licensing 101

And so they do. Today I enjoyed the Licensing 101 oggcast from the to-be 'Basic FLOSS Concepts' series. I can strongly recommend everyone to listen to this oggcast. Thereby I also mean more educated community members, which can recite the summary of this oggcast to newcommers. For the newcommers important concepts are introduced:

  • What is copyright and how does it relate to software.
  • What has been the history regarding open source and free software and related licensing practices.
  • What is copyleft and how can different licenses be project on the axis of copyleft strength.
  • How business models and compliance relate to copyleft licenses.

Keeping it simple

Throughout the podcast it is quite fun to hear Karen and Bradley unintentionally fall into the details and exceptions. They do cut it short in order not to confuse or put of newcommers, but a more educated community member might catch his mind drifting towards past news covering such exceptions.

All in all great comeback. I can’t wait to listen to the next cast of this series!

Offline Android OpenStreetMap mapping

Last year I did my first mapping during my holiday. I guess any reason would be a valid reason to contribute spare time to OpenStreetMap (OSM), but in this particular case the bird zoo we were going to was hardly mapped on OSM. For OSM mappers this can only mean one thing: a great opportunity to bring value with a mapping contribution. And so I did.

Last year

Without an internet connection at the time (last year), it was hard to get a GPS fix, and even then my battery would run out of juicy pretty quickly. So I finally ended up writing some notes, taking some pictures, and do the final OSM mapping with the Bing sattelite imagery and the zoo’s map I got at the entrance. I was able to crank out the zoo roughly, but I know things could have been better. Well, a good initial step.

This year

We went to the same place, and decided to visit the same zoo. That again meant a clear opportunity to contribute to OSM. Looking at the current state of the mapping, little to nothing had changed since my mapping last year, so every improvement would be a clear win. And I already knew there was still some low-hanging fruit.

Preparation

I still lack a mobile internet connection internationally, and from experience I know my Fairphone 2 without network assistance or WIFI maps (which I assumed would be of no use at the park) would take about 15 minutes to get a proper fix. So unless I would get a hold of some powerbank solution, using GPS and mapping with OSMTracker for Android would be a no-go. I went looking for a solution in my solution provider F-Droid.

Tabulae

Most notably I came across Tabulae which should be able to download OSM map tiles locally for offline viewing, and enable some point of interest commits. I was able to get an initial preview, but downloading the tiles failed on multiple occasions. My best bet is that the shipped version of Tabulae is no longer compatible with the latest OSM tile URL’s.

OsmAnd~

Eventually I came back to my trusted OSM client OsmAnd~. Lucally my changes of last year were already included in the map version I had loaded, so I could use it as a base.

Mapping with OsmAnd~

Although OsmAnd~ offers an explicit plugin feature to take video and audio notes, my approach was much more makeshift. I created a seperate category in my favorites, dedicated for mapping notes. To add a note on a particular place on the map, I would touch the location and add it as a favorite in the mapping category. The name of the favorite, which can be quite long, would hint me to what was going on. Mapping the final outcome was also supported by pictures I took, to provide a better reference.

Steps summarized

  1. Install OsmAnd~, download the latest map of what you are about to map (as a reference).
  2. Create a seperate favorite category in OsmAnd~ to prevent interference with your normal favorites.
  3. Navigate in the app towards the location you want to put a note, select it, and add a favorite.
  4. Name the favorite to give the most useful description.
  5. Take additional pictures, notes, video, and sound recordings seperately to provide more information if desired.
  6. Use your favorites and additional notes to make your contribution to OpenStreetMap.

Static site with separate source branch

This post is dedicated to the use-case where there are 2 different branches in a project. Typically one branch is for the source files, and one is for the generated output files for publishing. This use-case matches the way in which this website is currently hosted, via GitHub pages. Then the master branch is eventually published, whereas other branches remain in the repositories only.

Typically generated websites have a dedicated distribution directory like dist in which the generated files end up. This use-case covers a different use-case where the generated .html files end up next to the .adoc source files.

Setup

Just some prepwork is needed to get this working.

Branches

We have two seperate branches, one for the source files src, and one for the generated output for publishing master. As there is little to no correlation between both branches, the --orphan option can be used during the git checkout to prevent branches from forcefully bing associated with each other.

Git branches

1
2
3
4
5
$ git branch -a
  master
* src
  remotes/origin/master
  remotes/origin/src

Gitignore

Part of the trick is not to ignore the output .html files in the src branch, to make it available for the git commands. The source .adoc files can be ignored from out of the master branch, but that is mainly to reduce the effect of those oops moments.

Doing the transfer dance

To successfully generate the output files and have them end up in the master branch we need to do a little dance. The actual transfer is being done via git stash.

From source to stash

💡 TIP If you are unexperienced with Git, just know you can always run git status to get an overview of the current state of the repository.

Checkout src branch

$ git checkout src

Generate output files

1
2
3
4
$ make html
asciidoctor index.adoc
asciidoctor posts/index.adoc
asciidoctor posts/2016-08-02-static-site-with-separate-source-branch.adoc

Put output files in stash

$ git add *.html **/*.html

From cached to stash

$ git stash

From stash to master

Checkout master branch

$ git checkout master

Remove previous generated files

$ git rm *.html **/*.html

Apply stash

$ git stash pop

The new and modified files are automatically added as staged in git, so making a commit will do.

Commit the new files

$ git commit -m "chore: site update"

If your use-case covers more or different files than the HTML files in this example, then replace the *.html **/*.html globbing patterns with different patterns that match your output files.

Batch YouTube-dl task

YouTube music

There is just so many music available to people on YouTube, it’s amazing. And with the advanced screening and copyright infringement reporting policies, as a user you can rest assured that the music on YouTube is available for you on purpose.

To utilize this music availability, I use YouTube-dl. YouTube-dl is a tool that allows you to (batch) search, select, download and convert video’s. The tool itself is not constrained to the use-case of YouTube, but that is just the provider this posts focuses on.

Commandline power

This is the command I’ve been using thus far for youtube-dl to download multiple tracks based on the tracksearch.txt file.

youtube-dl command

$ youtube-dl --default-search ytsearch2: -a tracksearch.txt --max-filesize 10M --min-views 1000 -f bestaudio -x --audio-format mp3 --audio-quality 192

tracksearch.txt

lee rosevere - earthmover
brad sucks - making me nervous

Breaking it down

Search

--default-search ytsearch2: search via YouTube, and return 2 video’s, to have 1 failover if selectors --max-filesize and --min-views fail.
-a tracksearch.txt use the lines of the tracksearch.txt as a starting point.

Selection

--max-filesize 10M Ignore found video’s with a file-size larger than 10Mb (video-file), which are likely to be full albums rather than single tracks.
--min-views 1000 Ignore found video’s with a view count under 1000, to prevent downloading bad uploads.

Download

-f bestaudio Download the video format with the best audio format, as we’re going for audio only in this case.

Conversion

-x Extract audio from the downloaded video.
--audio-format mp3 Convert to mp3 file format. I’ve chosen mp3 for playback compatibility, but the open standard ogg format can be selected as well, which has better audio quality performance as an added benefit.
--audio-quality 192 Convert to audio quality of 192kbps, good enough for this use-case.

Room for improvement

Now if multiple video’s (2 for this case) pass the viewcount and filesize selectors, all videos will be downloaded and converted. Ideally only 'the best' video will be downloaded. Likewise, appending the --get-duration option to the command will show the duration for the video, to ensure the downloaded song will not be too short or too long of a duration.

A free music alternative

Although this solution works well for several use-cases, I want to use this post to direct you to the Free Music Archive, a curated selection of free (as in freedom) music. A lot of music is actually CC-NC, so NonCommercial usage allowed, but let this not ruin your party. There are a lot of great artists on this platform, and there are several ways the platform supports discoverability of this great music.

Starting a blog in asciidoc

This year I revamped my personal blog. Part of the reason is my involvement in the Asciidoctor project, which drove me to test the limits on this great markup format.

Writing a blog or a static site in asciidoc is no longer an innovative occupation, as this has been done for many years now. In particular the Jekyll static site generator has great support for asciidoc, based on Asciidoctor. Less feature-rich is the Awestruct framework, which is most notably used for generating the Asciidoctor.org website.

In do however believe that both these great Asciidoctor oriented static site generators fail to subscribe to the great toolset that is Asciidoctor. In particular the Asciidoctor diagram and Asciidoctor Extensions projects provide great features for enriching the plain but well-defined base of Asciidoc(tor).

Taking the LaTeX ecosystem as a parallel universe, there is a large difference in the number of integrations available. Although the syntax of Asciidoctor and the Ruby code-base are easier to read and understand compared to TeX based packages, still the number of tools available for LaTeX is vast. A notable benefit of the ecosystem is the way in which all the packages seem to tie into the generic LaTeX rendering layer, resulting in an ecosystem where all packages can be mixed and matched, regardless of the output format. This is unfortunately not so much the case for Asciidoctor, which has several content add-ins and several redering back-ends, but no complete support for all possible combinations.

In order to bring such compatibility, a larger development effort is needed. And I consider this blog revamp my personal motivator in this regard. By refusing to rely on static site generation tools other than a Makefile for easy 'making', all the magic has to come from Asciidoctor itself. I assume this will result in me having to stretch the possibilities of Asciidoctor to the max, and write a number of extensions underway, but that will be for the better.

So expect this blog to be changing more frequently in the coming period, if only for the underlying Asciidoctor tooling.