Site icon naschenweng.info

OS X: Delicious Library – gimme back my Amazon ID!

A few weeks ago I blogged about Delicious Library and how helpful it is to take an inventory of your movies, gadgets, books and keep track who borrowed what and when.

While the software is great, I do not agree that I have to fork out $ 40 for the application and then have to find out, that when I publish my library on the web, Delicious Library embeds their own Amazon-associate IDs to get referral business. If the application was freeware, I would agree with such a practice. I have also contacted the company and asked to have this changed as a feature or remove it from the licensed product – but no response and sheer ignorance.

So I got crafty with the following little script – just adjust your associate ID and the location of your published HTML-folder:

 #!/bin/sh replaceFileContent() { # 3 input arguments: arg1 is file pattern, arg2 is search pattern, arg3 is replace pattern if [ $# -lt 3 ]; then return "" fi cmd="find ./DOCROOT/deliciouslibrary/ -name '$1' | xargs perl -pi -e 's/$2/$3/g'" eval $cmd } YourAmazonString='naschenweng_info-20' replaceFileContent "*.html" 'deliciousmons-21' $YourAmazonString replaceFileContent "*.html" 'deliciousmons-20' $YourAmazonString replaceFileContent "*.html" 'deliciousmo0d-21' $YourAmazonString 

 

Note, that Delicious Library currently uses 3 Amazon associate-IDs: deliciousmons-21, deliciousmons-20, deliciousmo0d-21 – but I am certain there are more. You can find the extra ones by search for the string “ref=nosim/” – this should provide you with a list of additional Amazon IDs – just adjust the above script.

Exit mobile version