Lifestream:
-
Strejken mot strejken
http://tackforingenting.blogspot.com/2010/03/strejken-mor-strejken.html
1 Hour, 9 Minutes ago | Permalink
-
Den antifeministiska alliansen
http://www.alliansfrittsverige.nu/2010/03/mars-8-2010-den-antifeministiska.html
19 Hours, 2 Minutes ago | Permalink
-
How to Teach Yourself Programming
- Tags:
- programmering
- serier
- humor
19 Hours, 36 Minutes ago | Permalink
-
Handbook of hardware pinouts, cables schemes and connectors layouts @ pinouts.ru
- Tags:
- hårdvara
- hack
- DIY
- dokumentation
March 8 2010, 7:15am | Permalink
-
Flickan och hämnden
http://www.dagenskonflikt.se/jesper/flickan-och-hamnden/
March 8 2010, 5:08am | Permalink
-
Ifrågasätt hushållen, inte bara tjänsterna
http://copyriot.se/2010/03/08/ifragasatt-hushallen-inte-bara-tjansterna/
- Tags:
- pigavdrag
- kärnfamiljen
- hushåll
March 8 2010, 4:51am | Permalink
-
Spotifår
http://copyriot.se/2010/03/07/spotifar/
March 8 2010, 4:39am | Permalink
-
Smala Sussie - 4
http://www.filmtipset.se/film/smala-sussie/13836.html
Film: Smala Sussie (Smala Sussie). Betyg: 4
March 5 2010, 8:10pm | Permalink
-
Managing your music library and digital audio player with musync
http://eval.nu/blog/2010/03/05/managing-your-music-library-and-digital-audio-player-with-musync/
One of my few (or rather: my only) successful programming projects is musync. It began as a weekend hack to solve the growing problem of how to selectively synchronize music to my portable digital audio player into a somewhat coherent file/directory structure. Shortly after musync became practically usable, however, udoprog started hacking on it, and the current version is only loosely related to my old code (that was, for all I know, lost — for the better I believe). My current role in musync’s development is more or less reduced to finding bugs and hammering udo on IRC until he fixes them. So, what musync does is it takes a number of music files (or folders if running in recursive mode) runs a specified command to add them to the file/folder structure according to a given rule, optionally filtering and/or replacing non-wanted characters in the process. The file-folder structure may for example be »artist/album/NN-title.ext«, and the add command could be simply copying the files. But starting with recent musync versions, commands are Python lambda expressions, and can thus mean running several commands in sequence per file; I, for example, have my add command set to both copying the files to their calculated targets and then telling xmms2, my music player, to add them to its database. Here’s a code snippet for the relevant parts of musync.conf:
[site] root: "/var/storage/Musik" xmms2_sync_lib: lambda file: m.execute("/usr/bin/nyxmms2", "server", "import", file) add: lambda src, dest: (sh.copy(src, dest), xmms2_sync_lib(dest)) The rest of the file is, more or less, the sample configuration file; sh and m are imported in the [import] section as explained there, among other things, and they provide musync’s helper functions and the Python shutil library respectively. To add newly ripped or downloaded music to my collection with musync, all I now need to do is running musync -c site add <files or directories>. Other uses would include transferring music files (or directories) to a music player, optionally transcoding them to a format of choice in the process (I keep my collection mostly in FLAC but transcode it to vorbis to save space when I put it on my DAP), maintaining multiple different directory structures of the same music files using (symbolic-) links or making a »shadow root« with sorted symbolic links to unsorted originals still left in the downloads/incoming directory.
- Tags:
- in English
- Python
- programming
- unix
- music
- musync
March 5 2010, 4:56am | Permalink