Skeptiker in Hamburg Homepage

In den letzten Wochen haben wir die Homepage der hamburgischen Skeptiker überarbeitet. Nun findet man dort einen Veranstaltungskalender, der auf “The Events Calendar“, basiert. Ich habe schon aus der alten Version (auch GPL2) von The Events Calendar das Feature Google Kalender wieder hinzugefügt (Listen Sicht).

Die Patch Datei kann hier gefunden werden. Zusätzlich zeigt es auch die Kategorie in der Listenansicht an. Der Patch funktioniert auch mit Version 3.5.1 des Kalenders.

RSS feed from a directory full of MP3s

I use BeyondPod to listen to a lot of Podcasts, but I also have a bunch of audiobooks I have converted from CD to MP3s. I could manually upload them to a directory on my phone, but who has the patience for that?

First step: Fix the tags in your MP3s. I use easyTAG. I can change the filenames based on clean tags. Well formated filenames are very important when automating the RSS feed creation. You want your audiobooks to be in perfect order every time. I have settled for this mask:

%b-%n-%t-%a

Second step: Get fapg! This little tool creates the rss feed we later need.

Third step: Make a directory on your apache server, where you will either place the MP3s or symlinks to the files. I have chosen to call the directory “audiobooks”. Clever!

Fourth step: If you want security, you can use apache to do it for you.

<directory "/var/www/audiobooks">
AuthType Basic
AuthName "Audiobooks"
AuthUserFile /etc/apache2/httpd-passwords
require user yourusername
</directory>

Fifth step: Run fapg in the audiobooks directory.

fapg -f rss -n -o ./rss -p "http://yourdomain.org/audiobooks/" *

The “-f rss -o ./rss” makes it create a file called rss in the directory. “-p” adds your domain to the filename because not all Podcatchers understand that your MP3s are in the same directory as the feed file.

Now you have a working feed in that directory. Rerun fapg after adding new or removing old MP3s.

Piwik create export from Google Analytics and import without shell

I came accross the tool Google2Piwik and wanted to use it to import from Google Analytics to Piwik, but I don’t have shell access to the site I run. This is my solution:

  • After installing Piwik via FTP I got myself a server API key for Google Analytics.
  • I created a dump of the database (phpmyadmin) from Piwik and imported it into my local mysql server.
  • I git cloned the Google2Piwik github project to my local linux client and edited the config file to include the Analytics server token and the database data from the client.
  • After running the Google2Piwik tool I had all the data in the local database. I exported _log_action, _link_visit_action and _log_visit.
  • I imported the export into the original site.

To then force Piwik to create the required archives I used this command

http://yoursite.com/piwik/index.php?module=API&amp;method=CoreAdminHome.invalidateArchivedReports&amp;idSites=2&amp;dates=2014-02-01&amp;token_auth=XYZ

You need to change:

  • Sites= to the actual number of your site
  • dates= to the earlyest date of your Analytics export
  • token_auth= to the piwik auth token