Sunday, 29 December 2013

Executing / Running a script on a web page



Firstly install a user script manager like Greasemonkey in a web browser e.g. Firefox


Then install a script from a preferred source like userscripts.org


This will then add the necessary actions to the relevant web page


notice the "import into MB" button that was added via the user script.


These type of scripts can be great for scraping or collecting info from web based applications without the need to re-type everything.

Install SVN on QNAP NAS

Installing SVN on QNAP

ssh into the QNAP NAS with the admin account.


on the QNAP then install SVN via ipkg

ipkg update
ipkg install svn

To determine the hard drive / volume you want to save the repository on:

df

will show something like:

/share/HDA_DATA

I decided to create a repository svn and then a project folder within that.

mkdir /share/HDA_DATA/svn/projectA

and then

svnadmin create /share/HDA_DATA/svn/projectA

and edit the config files to password protect write

vi /share/HDA_DATA/svn/projectA/conf/svnserve.conf

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd

and then edit the passwd file

[users]
username = password

and then start the SVN server with

svnserve -d --listen-port=3690


On Ubuntu I installed the following to enable command line and Nautilus / Gedit integration

sudo apt-get install rabbitvcs-nautilus rabbitvcs-gedit
sudo apt-get install subversion

To test the repository I used RabbitVCS SVN via Nautilus, Repository browser and then entered the url:

svn://ipaddress:3690/share/HDA_DATA/svn/projectA/

Monday, 23 December 2013

MusicBrainz Picard settings


MusicBrainz Picard

 

 

 

Options:

Cover Art

 

File naming

 

Move files to this directory when saving:
/home/user/Music

Move additional files selected with the following:

*.jpg *.png .*.mood

note the .*.mood as the .mood files are hidden files on a linux system and that was the only way I could figure out to identify them.

Name files like this:


$set(normalbumartist,$if($eq($lower($left(%albumartist%,4)),the ),$right(%albumartist%, $sub($len(%albumartist%),4))\, The,%albumartist%))
$if($eq(%albumartist%,Various Artists), $replace(VA/%album%-$left(%date%,4)$if(%discnumber%,-Disc %discnumber%,)/$num(%tracknumber%,2) - %artist% - %title%,:,), $firstalphachar($upper(%normalbumartist%))/%normalbumartist%/%album% - $left(%date%,4) - Disc %discnumber%/$num(%tracknumber%,2) - %normalbumartist% - %title%)



This is my custom script to enforce the correct rename of files.

And will create the following examples:

/home/user/Music/B/Beatles, The/Help! - 1965 - Disc 1/07 - Beatles, The - Ticket to Ride.mp3

And as per Metadata selection for "Various Artists" the following will be done for Various Artists,
/home/user/Music/VA/....

 Fingerprinting:


/chromaprint/fpcalc used.

I do find the following Plugins very handy:
Add Cluster As Release
Search Discogs for Release
Search with Google

To ensure proper mp3 tagging for iTunes I added the following to

Advanced/Scripting:
Tagger Script:
$if($and($eq(%compilation%,1),$ne(%albumartist%,Various Artists)),$set(compilation,0))