Category Archives: linux

WordPress – Fixing Things

Well, it took me a while to comlete the final post about the  migration from plone to wordpress. But here it is, where I outline the finishing touches to get a fully working site. For background information, please read the previous posts about the intermediate data export from plone to the file system. and the automated import into wordpress.

Content Listings

For folderish objects plone can automatically create content listings in various styles. These listings show the content of the folder or the result of some query definition. WordPress – in contrast – is not aware of a strict folder hierarchy and content and therefore is not able to generate these listings.

What to do?

For a website of moderate size like incunabulum.de I resorted to manually creating these content listings after import into Wordpres. For this purpose the export automatically detects objects with content listings and sets the content to some predefined statement (“Directory listing missing”. After import a quick search for this statement quickly gives all pages where a manually created listings needs to be defined.

The folder listings are directly copied from the plone instance which during migration was running in parallel. There is hence no specific need to manually recreate these listings.

Trouble with Plone Aquistion

Generally defined, Plone’s aqusition is a functionality where objects can aquire any property from any parent. What this means is that e.g. if a link references an image by name, but the image is located in one of the parent folders than plone automatically subsequently searches all parent folders for said image.

Under plone the majority of posts where written manually using the restructured text syntax. Here, I used aquisition for many links to reduce link lengths and to avoid excessive typing.

Again – What to do?

There probably are some plone commands to automatically check all links and to convert aquisitioned links to directly link to the real object. But this would mean at least an additional export step and some handling around with the plone code base.

For incunabulum.de I – once again – resorted to keeping the links as is upon export and import. After import broken links are detected using the excellent Broken Link Checker Plugin in WordPress and are fixed manually by deleting the additional sub folder items in the link.

All in all this required about 2 hours for my site (and therefore was probably more efficient than mucking around with plone python code)

Handling Files, Images and Image Sizes

For all images uploaded to  plone website, various sizes are available by adding e.g. <link>/image_thumb to a link. In wordpress things are handled differently via media elements.

As I did not want to manually change all links to specific images sizes and to other files etc. I created a static mirror of the plone website via wget and copied the downloaded version to a separate subdomain.

A set of rewrite rules takes care of the rest, see below. All links to images are transparently redirected to the archive version of plone.

 # BEGIN WordPress
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 
 # Plone images are served from static mirror (mz, 2014.07)
 RedirectMatch (.*)image_(.*)         http://plone-archive.incunabulum.de$1image_$2
 RedirectMatch (.*)/view         http://plone-archive.incunabulum.de$1/image_preview

 # Plone - Map all jpg images in content directories to default plone variant image_preview
 RedirectMatch /projects/(.*).jpg     http://plone-archive.incunabulum.de/projects/$1.jpg/image_preview
 RedirectMatch /restricted/(.*).jpg     http://plone-archive.incunabulum.de/restricted/$1.jpg/image_preview
 RedirectMatch /travel/(.*).jpg         http://plone-archive.incunabulum.de/travel/$1.jpg/image_preview
 RedirectMatch /work/(.*).jpg         http://plone-archive.incunabulum.de/work/$1.jpg/image_preview

Duplicate Virtual Folders in Thunderbird

Personal note: If you encounter magically duplicating virtual folders in thunderbird check whether you there are any blanks or other Non-ASCII characters in your folder name. If this is the case switch the name to standard ASCIII characters and no blanks.

Explanation: In case of blanks or other Non-ASCII characters upon restart thunderbird escapes these characters in various ways leading to said duplicate entries. You can find the various entries in the virtualforlders.dat file and the corresponding msf-files in your IMAP mailbox. Deleting these entries solves the problem for a moment. Yet, unfortunately only up to the next restart of thunderbird.

Against the Cloud – Flickr Dowloads

Well, in the new days there came clouds. Lot’s of clouds. And they started to swallow lots and lots… images, documents, you name it. Everything… But I like sunshine and not clouds. So, out they must come. From the cloud on my own personal machine and under my control.

In this case, it was a picture set on Flickr for which I got access as public guest. And yes, as it is the usual case with clouds, this thing makes no difference. Upload is easy, downloads not. Neither as single impage nor – preferably – as complete set.

So what to do?

As described here Firefox, Greasemonkey and DownThemAll can be used togehter and form perfect match. The Flickr Image Script for greasemonkeys adds links to the largest available size for each image. DownThemAll can be set to really only download the images linked from the images. Additional Link here.

Done. Perfect. And yes, this is a personal note, too.

Mp3 Tools for Tag Management and Such

Ever got angry about crappy mp3 tags or no tags at all? Ever wondered what your tracks named track01, track02, track03 … actually are?

Well, two smart tools might be there to help you:

  • mp3diags – Diagnose mp3 tags, correct character encoding issues and fix some of the more common errors found in mp3 files like incorrect lengths etc.
  • Musicbrainz Picard – Automatically identify and correctly tag unknown mp3 sources using audio fingerprints, add missing mp3 tag informations and much more. All together under a very convenient and comfortable UI.

PS: Personal note, of course 🙂

Ubuntu 11.10 and a missing Headphone Jack-Sense Flag

While the upgrade to Ubuntu 11.10 – or Kubuntu or Xubuntu, whatever – went quite smoothly, I ended up with the situation where the internal speakers of my laptop are not muted when jacking in some headphones. Quite annoying, to be honest.

A Resolution?

In my case, the solution of this issue was quite simple, see this thread (beware: German). Open a terminal, start alsamixer, then navigate to the Auto-Mute entry via the right arrow key and then set it to enabled (key up). Done. At least for me. Other issues might exist, though.

If you want to make this permament then edit /etc/modprobe.d/alsa-base.conf and add the following

options snd-hda-intel model=auto

You might have to change the kernel module.

PS: And this is a personal note. Of course 🙂

YouTube und das Urheberrecht

Man mag zu YouTube stehen wie man will, es nervt einfach wenn ein Video aus urheberrechtlichen Gründen nicht abgespielt wird weil mal wieder die VG Wort oder Gema oder UMG oder wer auch immer sich nicht einigen konnten.

Gut, man kann mittels Hidemyass oder einem der anderen Dienste dies umgehen. Aber komfortabel ist anders. Oder man verwendet Ultrasurf wie hier beschrieben. Dazu einen “Amerikanischen Proxy” eintragen, fertig. Und für Linux klappt es auch mittels Wine.

Tired of being tracked?

Today, many sites use external services like Google Analytics, Google AdSense, WordPress Stats or a plethora of others for statistics or the analysis of user behaviors. Also, each facebook or twitter button shown on a web page leads to a subsequent entry on facebook’s or twitter’s log with your ip, time of access and – if logged in – user credentials.

As a result, you become traceable, fully traceable. Anyone having access to such logs can now recreate and evaluate your complete browsing history over time. As a result, creating your personal user profile becomes a piece of cake. Knowing what you like is a given. Knowing what you may buy in the future is known. Knowing who your friends are can be determined.

Scary?

For me, yes. I don’t want others to collect such an amount of information about me and my personal behavior. Information, which will be there indefinitely and which I have no right and no possibility to delete.

Enter Ghostery

Ghostery is a nifty Firefox Add-on which shows you a list of known external services like the Facebook button mentioned above which a website uses and which is used for logging your own personal behavior. Each of these, let’s call them trackers can be blocked making you a bit more anonymous within the interwebs.

img

PS: And I guarantee you will be surprised about the number of logging services each website uses.

QDL 0.5.0 is out!

This week, as boerse-online revamped the website, my quote downloader for Quicken QDL stopped working and got me busy.

As a result, I am pleased to announce QDL 0.5.0, a slightly larger updated with changes as follows:

  • The webpage retrieval is now done by wget so that onvista can be supported 🙂
  • None of the old data sources are working any more.
  • The current data sources for the kmm backend are: xetra, onvista, vwdsym. See the KmmSources.py for usage information.est)