--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use MP3::Info;
+use Data::Dumper;
+
+my $file = $ARGV[0];
+
+die "Cannot open $file - $!" unless -r $file;
+
+my $tag = get_mp3tag ($file);
+
+for (keys %$tag) {
+ print "$_: $tag->{$_}\n";
+} # for
\ No newline at end of file
export SMTPFROM=cm@audience.com
export CLEARADM_SERVER=adefaria-lt
export P4CONFIG=.p4config
+export P4USER=adefaria
append_to_path /cygdrive/c/Program\ Files/Perforce
append_to_path /cygdrive/c/Program\ Files\ \(x86\)/MATLAB/R2013a/bin
[user]
name = Andrew DeFaria
- email = adefaria@audience.local
+ email = Andrew@DeFaria.com
[pack]
windowMemory=128m
threads=1
local=white
remote=red
[color "diff"]
- meta=white bold
- #frag=magenta bold
- old=red
- new=yellow
+ external = /usr/local/bin/git-meld
[color "status"]
added=yellow
changed=green
dump=cat-file -p
dlog=log --decorate
[push]
- default = matching
+ default = simple
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
+
+Host jira
+ HostName %h.audience.local
+ User adefaria
+++ /dev/null
-<html>
-<head>
-<title>Jam at Andrew's</title>
-<link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
-</head><body bgcolor="#FFFFFF" text="#000000">
-<h3>What</h3><blockquote><p>Jam at Andrew's House (Add to your Google Calender <a target="_blank" href="https://www.google.com/calendar/event?action=TEMPLATE&tmeid=dGtwcjQxNGttNXNtaWQxNHJvanV0MmY4Y3MgYWRlZmFyaWFAbQ&tmsrc=adefaria%40gmail.com"><img src="https://www.google.com/calendar/images/ext/gc_button1_en.gif" border="0"></a>)<br></p></blockquote><h3>Where</h3><blockquote><a href="http://goo.gl/NL29o">1676 Hope Dr #1915<br>Santa Clara, California, 95054</a><br></blockquote><h3>When<br></h3><blockquote>Sunday, 12/21/2014<br>1-4 Pm<br></blockquote><h3>Parking</h3><blockquote><p>My community is gated. If you can get in the gate you can park in any <b>uncovered</b> parking space but there are pretty limited. My apt is close to the street and there's usually some parking around there.<br></p><p>When you get here call me (408-596-4937). I can open the gate and show you in.<br></p></blockquote><p>I have room for about 4-5 people in my house for an acoustic jam. As
-this will be introductory I will suggest a few songs here. Note that you
- can go to http://defaria.com/songbook to get copies of the words and
-chords for these, and even the MP3 on some songs. Of course there are lots of other songs we can do or just straight out jamming.</p>
-<ol><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">Amie</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Pure%20Prairie%20League">Pure Prairie League</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Desperado.pro">Desperado</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Eagles">Eagles</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/I%20Saw%20Her%20Standing%20There.pro">I Saw Her Standing There</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Beatles">Beatles</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Swingtown.pro">Swingtown</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Steve%20Miller">Steve Miller</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Take%20It%20Easy.pro">Take it Easy</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Eagles">Eagles</a>)</li></ol>
-</body>
-</html>
--- /dev/null
+/web/php/songbook/20141221.html
\ No newline at end of file
+++ /dev/null
-<html>
-<head>
-<title>Jam at Andrew's</title>
-<link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
-</head><body bgcolor="#FFFFFF" text="#000000">
-<h3>What</h3><blockquote><p>Jam at Andrew's House (Add to your Google Calender <a target="_blank" href="https://www.google.com/calendar/event?action=TEMPLATE&tmeid=aTRqdmd1cWRybXNxNDBjdTN0cm5mYWNtM28gYWRlZmFyaWFAbQ&tmsrc=adefaria%40gmail.com"><img border="0" src="https://www.google.com/calendar/images/ext/gc_button1_en.gif"></a>)<br></p></blockquote><h3>Where</h3><blockquote><a href="http://goo.gl/NL29o">1676 Hope Dr #1915<br>Santa Clara, California, 95054</a><br></blockquote><h3>When<br></h3><blockquote>Sunday, 1/11/2015<br>1-4 Pm<br></blockquote><h3>Parking</h3><blockquote><p>My community is gated. If you can get in the gate you can park in any <b>uncovered</b> parking space but there are pretty limited. My apt is close to the street and there's usually some parking around there.<br></p><p>When you get here call me (408-596-4937). I can open the gate and show you in.<br></p></blockquote><p>I have room for about 4-5 people in my house for an acoustic jam. As
-this will be introductory I will suggest a few songs here. Note that you
- can go to http://defaria.com/songbook to get copies of the words and
-chords for these, and even the MP3 on some songs. Of course there are lots of other songs we can do or just straight out jamming.</p>
-<ol><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Country%20Roads.pro">Country Roads</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=John%20Denver">John Denver</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Desperado.pro">Desperado</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Eagles">Eagles</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Hotel%20California.pro">Hotel California</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Eagles">Eagles</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Imagine.pro">Imagine</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=John%20Lennon">John Lennon</a>)</li><li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Maggie%20May.pro">Maggie May</a> (<a href="http://defaria.com/songbook/displayartist.php?artist=Rod%20Stewart">Rod Stewart</a>)</li></ol>
-</body>
-</html>
--- /dev/null
+/web/php/songbook/20150111.html
\ No newline at end of file
--- /dev/null
+/web/php/songbook/background.jpg
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook" Artist</title>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
- <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
- <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
-
-<?php
-include_once "songbook.php";
-$artist = $_REQUEST ["artist"];
-?>
-
-<div class="heading">
-<a href="/songbook"><img src="/Icons/Home.png" alt="Home"></a>
- <h1 class="centered">Andrew DeFaria's Songbook</h1>
-
- <h2 class="centered"><?php echo $artist?></h2>
-</div>
-
-<div id="content">
-
-<?php
-$artistsSongs = array();
-
-foreach ($songs as $song) {
- $songArtist = getArtist ($song);
-
- if ($songArtist == $artist) {
- array_push ($artistsSongs, $song);
- } // if
-} // foreach
-
-print "<ol>";
-
-foreach ($artistsSongs as $artistSong) {
- print "<li><a href=\"webchord.cgi?chordpro=$artistSong\">";
- print basename ($artistSong, ".pro");
- print "</a></li>";
-} // foreach
-?>
-
-</body>
-</html>
--- /dev/null
+/web/php/songbook/displayartist.php
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook</title>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
- <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
- <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
-
-<?php
-include_once "songbook.php";
-?>
-
-</head>
-
-<body>
-
-<?php
- if (file_exists ("news.html")) {
- print "<a href=\"news.html\"><img src=\"/Icons/news.png\"></a>";
- }
-?>
-
-<div class="heading">
- <h1 class="centered">Andrew DeFaria's Songbook</h1>
-</div>
-
-<div id="content">
-
-<p>As a professional musician do yourself a favor and invest in a tablet or if
-you must an iPad and get either SongBook (for Android) or OnSong (for iPad) then
-send me a request to sign up for Dropbox which integrates with these apps and
-your "songbook" will be automated. Note that Songbook is also available for
-Windows. More info on this is available <a href="songbook.html">here</a>. For
-people who must remain with paper...</p>
-
-<p>The following songs are available here. Select an artist or a song and then
-Go or type in a lyric or song title into the search box. You can print the
-result if you wish to have a paper copy. If new songs are added by me or others
-this page will automatically update so you can come back here and get your
-copy.</p>
-
-<?php
-artistsDropdown();
-songsDropdown();
-?>
-
-<form method="post" action="search.php" name="search">
-Search: <input type="text" name="searchterm"><input type="submit" value="Search">
-
-</form>
-</body>
-</html>
--- /dev/null
+/web/php/songbook/index.php
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook</title>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/Plain.css">
- <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
- <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
-</head>
-
-<body>
-
-<img src="/Icons/news.png">
-
-<div class="heading">
- <h1 class="centered">Songbook News</h1>
-</div>
-
-<div id="content">
-
-<h2>Recent Changes</h2>
-
-<p>I've made some more changes:</p>
-
-<ul>
-
-<li>Removed the list of songs from the front page. There were getting to be just
-too many songs listed to be helpful. Instead I now have a drop down list of
-artists and songs as well as a search box. Select an artist or a song and then
-select go to go to an artist page or a song page. Or search for a term. The search
-will search for a word or phrase in the title, artist or in the song itself. The
-search is not that bright but works fairly well.</li>
-
-<li>There's a new artist's page which shows you all of the artists songs in one
-page. Many artists have only one or a few songs. Some artists have quite a few
-songs.</li>
-
-<li>The song pages now are on auto play. If they have music assoicated with them
-then their music will start playing automatically.</li>
-</ul>
-
-<h2>Past Changes</h2>
-
-<ul>
- <li>Changed the home icon to something much bigger. Clicking on this gets you
- back to the <a href="/songbook">Songbook home page</a>.</li>
-
- <li>Now if the song has an associated .mp3 file in the Media folder that
- <b>exactly</b> matches the song's title then a little HTML5 MP3 player will
- appear. You can play the song while you read the words and follow the
- chords! <b>Note:</b> You can right click and save the song's mp3 file to
- your computer. If the song does not have a corresponding .mp3 file then
- no .mp3 player is displayed. For example, <a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">Amie</a>.</li>
-
- <li>Again, if the song has a corresponding .mp3 file I now re-write the .pro
- file to include {musicpath:/sdcard/SongBook/Medai/<<i>title</i>>.mp3}.
- This string "links" the ChordPro file with music such that (in SongBook, the
- app I use on my Android Tablet) you can play the song's mp3 file on your
- tablet! I'm not sure if OnSong (the iPad equivalent of SongBook) does the same
- thing. If you sign up for sharing my songbook via DropBox (<a href="mailto:adefaria@gmail.com?subject=Please share your SongBook with me">send me email</a> if
- you want an invite) you should be all set.</li>
-</ul>
-
-<p><b>Note:</b> Currently my code is very picky. The file name for the .pro file
-and the .mp3 file must match <b>exactly</b> - is case sensitive, etc. If you
-have access to my songbook in DropBox and wish to add a .pro file and it's
-corresponding .mp3 file then be sure to match the names up correctly and put the
-.mp3 file in the Media folder.</p>
-
-<h2>Future Changes</h2>
-
-<p>Here are some of the things I'm thinking of implementing:</p>
-
-<ul>
- <li><strike>I'm thinking of re-vamping the main page. Instead of listing all the
- songs, which are getting to be a bit much, I would like to possibly make a
- little search facility that would scan the .pro files for text matching in the
- song titles and lyrics themselves.</strike></li>
-
- <li>Another change I'm thinking of making is making it so that when you hover
- over a chord a little popup happens that shows the chord's fingering. Sorta
- like it's done over on tabs-ulitimate-guitar.com (For example:
- <a href="http://tabs.ultimate-guitar.com/s/steve_miller/serenade_crd.htm">here</a>).
- Anybody know how to do that?</li>
-
- <li>Maybe a simple editor so people can edit songs directly.</li>
-
- <li>Maybe interfacing with Dropbox to display information about the last
- person to update the songfile...</li>
-</ul>
-
-</div>
-
-</body>
-</html>
--- /dev/null
+/web/php/songbook/news.html
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook" Artist</title>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
- <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
- <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
-
-<?php
-include_once "songbook.php";
-$searchterm = $_REQUEST ["searchterm"];
-$songmatches = array();
-
-function getSongText ($song) {
- return join ("\n", file ($song));
-} // getSongText
-
-function search ($searchterm) {
- global $songs;
- global $songmatches;
-
- $tokens = preg_split ("/\s+/", $searchterm);
- $searchfor = join (".*", $tokens);
-
- foreach ($songs as $song) {
- $text = getSongText ($song);
-
- preg_match ("/$searchfor/i", $text, $matches);
-
- if ($matches) {
- array_push ($songmatches, $song);
- } // if
- } // foreach
-
- return $songmatches;
-} // search
-
-$songmatches = search ($searchterm);
-?>
-</head>
-
-<body>
-
-<div class="heading">
-<a href="/songbook"><img src="/Icons/Home.png" alt="Home"></a>
- <h1 class="centered">Andrew DeFaria's Songbook</h1>
-
- <h2><?php
-if (count ($songmatches) == 0) {
- print "No songs matched \"$searchterm\"";
-} elseif (count ($songmatches) == 1) {
- print "One song matched \"$searchterm\"";
-} else {
- print count ($songmatches) . " songs matched \"$searchterm\"";
-} // if
-?></h2>
-</div>
-
-<div id="content">
-
-<?php
-if (count ($songmatches) > 0) {
- print "<ol>";
-} // if
-
-foreach ($songmatches as $songmatch) {
- $artist = getArtist ($songmatch);
- $title = basename ($songmatch, ".pro");
- print "<li><a href=\"webchord.cgi?chordpro=$songmatch\">$title</a>";
- print " (<a href=\"displayartist.php?artist=$artist\">$artist</a>)</li>";
-} // foreach
-
-if (count ($songmatches) > 0) {
- print "</ol>";
-} // if
-?>
-
-</div>
-</body>
-</html>
-
--- /dev/null
+/web/php/songbook/search.php
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook</title>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/Plain.css">
- <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
- <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
-</head>
-
-<body>
-
-<div class="heading">
- <h1 class="centered">Songbook/OnSong and chordpro (.pro) files</h1>
-</div>
-
-<div id="content">
-
-<p>Rather than carry around sheets of paper for everybody, fumbling
-and trying to find the right song sheet etc., you can use your
-computer to help automate this process.</p>
-
-<p>A chordpro file (signified by a .pro extension) is not a fancy file
-format, but it gets the job done and is easy to edit with any editor
-like notepad. You can google "chordpro" and read all about the format
-if you like.</p>
-
-<p>If you have a iPad or a Android tablet you can have all of your
-songs with you wherever you go. Linked
-with <a href="https://www.dropbox.com/">DropBox</a> and everybody can
-be on the same page. Worst case you have all of the music you know at
-your fingertips. There are two apps, one for iPads
-(<a href="https://itunes.apple.com/us/app/onsong/id502344938?mt=8">OnSong</a>)
-and the other for Android and PCs
-(<a href="http://linkesoft.com/songbook/windows.html">Songbook</a>)
-that will work with .pro file to render them nicely on your iPad or
-Android tablet. And Songbook also works on your Windows PC where
-you can print out copies of the songs if you inist on dealing with
-paper.</p>
-
-<p>Finally, you could go to my website and render any of the songs in
-my Songbook using the web (described below).</p>
-
-<h2>Chordpro file format</h2>
-
-<p>You can go
-to <a href="http://defaria.com/songbook/Songs">http://defaria.com/songbook/Songs</a>
-and you'll see a list of all the files in that directory, the .pro
-files of the songs I have. You can click on any of them but what you
-will get is an unrendered version of the .pro file. For example: If
-you click on Brown Eyed Girl.pro you'll see:</p>
-
-<blockquote><pre>
- {t:Brown Eyed Girl}
- {st:Van Morrison}
- {key:G}
-
- [G]Hey, where did [C]we go, da[G]ys when the ra[D]ins came
- [G]Down in the holl[C]ow, [G]playin' a ne[D]w game
- [G]Laughin' and a-s[C]ingin' hey-hey, [G]skippin' and a-j[D]umpin'
- [G]In the misty mor[C]ning fog, with o[G]ur he[D]arts thumpin and yo[C]u[D]
- My Brown-eyed gi[G]rl[Em], yo[C]u my[D] brown eyed [G]girl [D]
-
- [G]Hey whatever [C]happened, [G]Tuesday went [D]so slow
- [G]Goin down the [C]old mine with a [G]transistor [D]radio
- [G]Standin' in the [C]sunlight laughin', [G]hide behind the [D]rainbow's wall
- [G]Slippin' and a-[C]slidin', [G]all along the [D]waterfall with [G]you
- My Brown-eyed gi[G]rl[Em], yo[C]u my[D] brown eyed [G]girl [D]
-
- {soc}
- [D]Do you remember when we used to [G]sing
- Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
- [G]Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
- La-de-[G]da[D]
- {eoc}
-
- [G][Em][C][D][G][D]
-
- So hard to find my way, now that I'm all on my own
- Saw you just the other day, my how you have grown
- Cast my memory back there lord, sometimes I'm overcome, thinkin'bout
- Making love in the green grass, behind the stadium with you
- My brown eyed girl, you my brown eyed girl
-
- {soc}
- [D]Do you remember when we used to [G]sing
- Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
- [G]Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
- La-de-[G]da
- {eoc}
-</pre></blockquote>
-
-<p>You see things like {t:Brown Eyed Girl} (title) and {key:G} as well
-as embedded tags for the chords ([G], [C], etc). Doesn't look as
-pretty right? But when you include the webchord.cgi portion you are
-running a script named webchord.cgi which reads the file from the
-parameter chordpro (that's why you need the chordpro=song.pro portion)
-and then reformats stuff into HTML that looks pretty, centering the
-title of the song, putting the chords over the words and bolding the
-text between {soc} and {eoc} (start of chorus, end of chorus). So
-given the above SongTitle="Brown Eyed Girl" we can formulate the URL
-to render it thusly:</p>
-
-<blockquote><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Brown Eyed Girl.pro">http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Brown Eyed Girl.pro</a></blockquote>
-
-<p>You can do the same thing for the other songs there too.</p>
-
-<p>I should just write a quick script that gets all of the .pro files
-in the directory songbook/Songs and then formulates a page of links
-that have the webchord.cgi links to render them like:</p>
-
-<ul>
- <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Across the Universe.pro">Across the Universe</a></li>
- <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/American Pie.pro">American Pie</a></li>
- <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">Amie</a></li>
- <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Back in the USSR.pro">Back in the USSR</a></li>
- <li>...</li>
-</ul>
-
-<p>You have to fill in the <SongTitle> portion of the link. So, for
-example, you take:</p>
-
-<blockquote>
-http://defaria.com/songbook/Songs/webchord.cgi?chordpro=<SongTitle>.pro
-</blockquote>
-
-<p>pop it into the address bar of your browser then change <SongTitle>
-to the title of the song you want to render:</p>
-
-<blockquote>
-<a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro</a>
-</blockquote>
-
-<p><b>Note:</b></p>
-
-<ul>
- <li>URLs are case sensitive! ...chordpro=amie.pro is not the same as ...chordpro=Amie.pro</li>
- <li>Browsers tend to change spaces in a URL to %20. %20 is the octal representation for a space character. So if you see %20 in a URL like http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Back%20in%20the%20USSR.pro. Don't fear - they're merely spaces.</li>
-</ul>
-
-<h2>Songbook for PC</h2>
-
-<p>You can get a Windows PC version of Songbook
-at <a href="http://linkesoft.com/songbook/windows.html">http://linkesoft.com/songbook/windows.html</a>. It
-will run on your PC and render songs like:</p>
-
-<img src="songbook.jpg">
-
-<p>It's $20 and you can even print out your stuff if you still use
-paper or need paper for other people.</p>
-
-</div>
-
-</body>
-</html>
--- /dev/null
+/web/php/songbook/songbook.html
\ No newline at end of file
--- /dev/null
+/web/php/songbook/songbook.jpg
\ No newline at end of file
+++ /dev/null
-<?php
-$songs = glob ("/web/songbook/Songs/*.pro");
-
-function songsDropdown () {
- global $songs;
-
- print "<form method=\"post\" action=\"webchord.cgi\" name=\"song\">";
- print "Songs: ";
- print "<select name=\"chordpro\">";
-
- sort ($songs);
- foreach ($songs as $song) {
- $title = basename ($song, ".pro");
- $artist = getArtist ($song);
-
- if ($artist != "") {
- $title .= " ($artist)";
- } // if
-
- print "<option value=\"$song\">$title</option>";
- } // foreach
-
- print "<input type=\"submit\" value=\"Go\">";
- print "</select>";
- print "</form>";
-} // songsDropdown
-
-function artistsDropdown () {
- global $songs;
-
- $artists = getArtists ($songs);
-
- print "<form method=\"post\" action=\"displayartist.php\" name=\"artist\">";
- print "Artists: ";
- print "<select name=\"artist\">";
-
- sort ($artists);
- foreach ($artists as $artist) {
- print "<option>$artist</option>";
- } // foreach
-
- print "<input type=\"submit\" value=\"Go\">";
- print "</select>";
- print "</form>";
-} // artistsDropdown
-
-function getArtist ($song) {
- $lyrics = file_get_contents ($song);
-
- if (preg_match ("/\{(st|subtitle):(.*)\}/", $lyrics, $matches)) {
- return trim ($matches[2]);
- } else {
- return "";
- } // if
-} // getArtist
-
-function getArtists ($songs) {
- $artists = array();
-
- foreach ($songs as $song) {
- $artist = getArtist ($song);
-
- if ($artist != '') {
- $artists[$artist] = 1;
- } // if
- } // foreach
-
- return array_keys ($artists);
-} // getArtists
-
-function formatTable ($songs) {
- echo "<ol>";
-
- foreach ($songs as $song) {
- $artist = getArtist ($song);
-
- $title = basename ($song, ".pro");
-
- echo "<li><a href=\"webchord.cgi?chordpro=$song\">$title</a>";
-
- if ($artist != "") {
- echo " ($artist)";
- } // if
- } // foreach
-
- echo "</ol>";
-} // formatTable
\ No newline at end of file
--- /dev/null
+/web/php/songbook/songbook.php
\ No newline at end of file
--- /dev/null
+My resume is best viewed by going to http://clearscm.com/resume. Additionally
+you can get an MS Word copy there.
+
+Thanks
+Andrew DeFaria