IdThreePlugin


Page Created: 7/30/2014   Last Modified: 3/13/2016   Last Generated: 6/7/2018

Program Description

http://greatfractal.com/IdThreePlugin.html

(This page is an extremely rough draft and is full of all kinds of errors. I will try to improve the documentation over time if I release future versions.)

Foswiki↗ is, in my opinion, the best wiki ever created, but one of the least well known. I used it as the basis for my LandmarkFilmProductionSystem and OscarPartySystem. The only reason I didn't use it for this website is because its dynamic nature was too much for the tiny Raspberry Pis that I wanted to use.

When I created BashTalkRadio, I needed a place to view and play my recordings. I experimented with Ampache, Subsonic, XBMC, and MPD, all good media servers, but I already had Foswiki server running, so I didn't want to manage another server.

Foswiki could play the files well, through its javascript player, creating an experience similar to Subsonic, but it had no mechanism for reading the ID3 tags. The ID3 tags were where I stored the show title, guests, and show description obtained by my web scraper.

So I decided to create one. It was my first experience with Perl. It reads ID3 tags from mp3, ogg vorbis, and flac files.

Perl dependencies

  • MP3::Info
  • Ogg::Vorbis::Header::!PurePerl
  • Audio::FLAC::Header

The plugin itself creates 4 new Foswiki Macros:

%ID3GETTAG{}%

Parameter:Description
web="..."Web where attachment is located.
topic="..."Topic where attachment is located.
filename="..."Filename of attachment.
tagname="..."Name of tag to display (e.g. ARTIST)

%ID3PLAYER{}%

Parameter:Description
web="..."Web where attachment is located.
topic="..."Topic where attachment is located.
filename="..."Filename of attachment.

%ID3POPUP{}%

Parameter:Description
web="..."Web where attachment is located.
topic="..."Topic where attachment is located.
filename="..."Filename of attachment.
labeltag="..."Name of tag to display as label (e.g. ARTIST)
  • ID3LIST
Parameter:Description
web="..."Web where attachment is located.
topic="..."Topic where attachment is located.
label="..."
format="..."

Variables:

$popup
$tag(ARTIST)
$filesize

Example:


%TABLE{sort="on" initsort="1" initdirection="up"}%
| *Date* | *Name* | *Artist* | *Album* | *Filesize* |
%ID3LIST{web="webname" topic="topicname" label="TITLE" format="| $percntCALC{$quot$SUBSTRING($filename, 9, 10)$quot}$percnt | $popup | $tag(ARTIST) | $tag(ALBUM) | $filesize |"}%

Disclaimer

Warning, this project is experimental and not recommended for real data or production. Do not use this software (and/or schematic, if applicable) unless you read and understand the code/schematic and know what it is doing! I made it solely for myself and am only releasing the source code in the hope that it gives people insight into the program structure and is useful in some way. It might not be suitable for you, and I am not responsible for the correctness of the information and do not warrant it in any way. Hopefully you will create a much better system and not use this one.

I run this software because it makes my life simpler and gives me philosophical insights into the world. I can tinker with the system when I need to. It probably won't make your life simpler, because it's not a robust, self-contained package. It's an interrelating system, so there are a lot of pieces that have to be running in just the right way or it will crash or error out.

There are all kinds of bugs in it, but I work around them until I later find time to fix them. Sometimes I never fix them but move on to new projects. When I build things for myself, I create structures that are beautiful to me, but I rarely perfect the details. I tend to build proof-of-concept prototypes, and when I prove that they work and are useful to me, I put them into operation to make my life simpler and show me new things about the world.

I purposely choose to not add complexity to the software but keep the complexity openly exposed in the system. I don't like closed, monolithic systems, I like smaller sets of things that inter-operate. Even a Rube Goldberg machine is easy to understand since the complexities are within plain view.

Minimalism in computing is hard to explain; you walk a fine line between not adding enough and adding too much, but there is a "zone", a small window where the human mind has enough grasp of the unique situation it is in to make a difference to human understanding. When I find these zones, I feel I must act on them, which is one of my motivating factors for taking on any personal project.

Here is an analogy: you can sit on a mountaintop and see how the tiny people below build their cities, but never meet them. You can meet the people close-up in their cities, but not see the significance of what they are building. But there is a middle ground where you can sort of see what they are doing and are close enough to them to see the importance of their journey.

The individual mind is a lens, but, like a single telescope looking at the night sky, we can either see stars that are close or stars that are much farther away, but we can't see all stars at the same time. We have to pick our stars.

I like to think of it like this:

It is not within our power to do everything, but it is within our power to do anything.


Source Code

The source code can be found here

Comments