Fortunka Dnia

30 Sep 2008 18:30

Właśnie wymyśliłem tekst, który mógłby przyświecać każdemu w czasie jego codziennej twórczej pracy:

Dobre pomysły są najlepsze.

Dobre? Na miarę ludowych przysłów?

PS: szalenie zapracowane dni się szykują. Jutro odbieramy jakieś dyplomy albo generalnie wyrazy wyróżnienia za nasz zespołówkowy zeszłoakademickoroczny projekt platformy dyskusyjnej Aurochs.

Comments: 1

Śmiejący Się Stworek

28 Sep 2008 22:29

Zabawkowy Tickle Me Elmo

… właśnie Cię wyśmiał!

Comments: 1

Hacking pympd and Last.fm

26 Sep 2008 22:36

Hello again,

My girlfriend was very unhappy with me not having my played songs submitted to Last.fm social music revolution portal.

That was because used to use Music Player Daemon and its various clients. Most of the clients don't implement the AudioScrobbler protocol, but as a matter of fact this is not needed, because there can be a separate MPD client meant just to submit the info to last.fm, running in parallel to one actually playing music.

I used to use scmpc for this reason, but since I bought my new laptop and migrated to Ubuntu I quit it — because the application was not in their repo.

Today I decided to find some short python-based implementation of audioscrobbler and enrich one of MPD clients with the Last.fm integration. I found pympd really good — nice looking, having plugin architecture, clean and simple. So I decided it to be my new favorite MPD client. Then I quick-hacked some random plugin and created a new one including almost 100% source from python-scrobbler project. The plugin:

  • sends "now playing" info to Last.fm on each track-change and loading of plugin
  • sends "song played" info to Last.fm on track-change and plugin unload event if song was listened at least to the half of its total length and is longer than 30 seconds.

Now the Last.fm user and password are hardcoded, but I hope to create a quick-and-dirty configuration window for it.

I had some problems with time convertion. The python-scrobbler sources suggest using datetime.utcnow() method while actually using datetime.now() is giving the right results.

You can check my Last.fm records:

  • July — submitted by scmpc from Gentoo — the old computer
  • first records in October — submitted with MY PLUGIN
  • two hours gap — before fixing UTC issue, the songs were submitted as played two hours earlier (timezone difference)

So it seems working!

It's a pretty cool Python day today.

Comments: 4

Working On TagFs

26 Sep 2008 19:23

Today I spent another hour or two on working on tagfs (described in TagFs Idea). It's now pretty much usable. You can now:

  • browse files with the tag-directory mapping
    • directory tag1/tag2/tag3 is the same as tag2/tag3/tag1 or tag3/tag1/tag2
  • read/write files
    • file tag1/tag2/tag3/file is the same as tag2/tag3/tag1/file AND even tag2/tag1,tag3,file
    • tags are not only allowed as directory names, but also as comma-separated file prefix
  • create new files
    • echo Some Content > tag1/tag2/some_file
    • echo Some Other Content > tag1/tag2,some_file
  • files have all their "real" properties (owner, group, modification time — this is stored on the back-end filesystem)

Things to do yet:

  • forbid creating a file with tags rendering some directory with name of existing file
    • example: you have tag1/great file
    • then you create a tag1/tag2,great,people.txt file
    • this way, you would have a great directory showing in the tag1 directory, because there is a file having both tag1 and great
    • you also have great file there, so you end up with a file and a directory (tag) of the same name
  • scan and list files by their properties
    • file type — PDF, JPEG, HTML, …
    • EXIF tags for JPEG — date taken, camera info
    • ID3 tags for MP3 — artist, title, album
  • improve directory listing
    • include SOME files in sub-directories if the sub-directories consist of small number of files
    • as a result we get a easily-browsable repository of files
  • do some marketing
    • I would like to serve files from such a file system with FTP or Apache to let people feel the system

I think this experiment is really worth working on this.

In case you want to test the FS, drop me a note or comment.

Comments: 1

page 1 of 41234next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License