From 3fb37fca3a2cfd094e936635616421cc52ada97d Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Mon, 5 Jun 2017 16:42:48 -0700 Subject: [PATCH 1/1] Implemented sets. --- Mr.lst | 10 ---- San Elijo.lst | 10 ---- Songs/{Set 1.lst => Andrew's Songs.lst} | 2 +- Songs/KARR.lst | 46 +++++++++++++++ Songs/New Songs.lst | 29 ++++++++++ Wed.lst | 9 --- web/displayset.php | 75 +++++++++++++++++++++++++ web/index.php | 9 ++- web/songbook.php | 44 +++++++++++---- 9 files changed, 188 insertions(+), 46 deletions(-) delete mode 100644 Mr.lst delete mode 100644 San Elijo.lst rename Songs/{Set 1.lst => Andrew's Songs.lst} (99%) create mode 100644 Songs/KARR.lst create mode 100644 Songs/New Songs.lst delete mode 100644 Wed.lst create mode 100644 web/displayset.php diff --git a/Mr.lst b/Mr.lst deleted file mode 100644 index b2a4e4c..0000000 --- a/Mr.lst +++ /dev/null @@ -1,10 +0,0 @@ -Mr -Lyin' Eyes - Eagles -Norwegian Wood - Beatles -Peaceful, Easy Feeling - Eagles -Something - Beatles -Space Oddity - David Bowie -Dig a Pony - Beatles -I'm a Believer - Monkees -Maggie May - Rod Stewart -More Than Words - Extreme diff --git a/San Elijo.lst b/San Elijo.lst deleted file mode 100644 index dbc8842..0000000 --- a/San Elijo.lst +++ /dev/null @@ -1,10 +0,0 @@ -Ello -A Hard Day's Night - Beatles -Here Today - Paul McCartney -Love Her Madly - Doors -Lyin' Eyes - Eagles -Maggie May - Rod Stewart -Norwegian Wood - Beatles -Peaceful, Easy Feeling - Eagles -Revolution - Beatles -You Got a Friend - James Taylor diff --git a/Songs/Set 1.lst b/Songs/Andrew's Songs.lst similarity index 99% rename from Songs/Set 1.lst rename to Songs/Andrew's Songs.lst index 2b7b594..b3bf2d9 100644 --- a/Songs/Set 1.lst +++ b/Songs/Andrew's Songs.lst @@ -1,4 +1,4 @@ -Set 1 +Andrew's Songs Across the Universe - Beatles All You Need Is Love - ohn Lennon/Paul McCartney Amie - Pure Prairie League diff --git a/Songs/KARR.lst b/Songs/KARR.lst new file mode 100644 index 0000000..d3a3f9c --- /dev/null +++ b/Songs/KARR.lst @@ -0,0 +1,46 @@ +Locomotive Breath - Jethro Tull +Landslide - Fleetwood Mac +Jenny Jenny - Tommy Tutone +Norwegian Wood - Beatles +Peaceful Easy Feeling - Eagles +Angel +The Letter - Joe Cocker +Sweet Melisa - Allman Brothers +Can't find My Way Home - Steve Windwood +Wish You Were Here - Pink Floyd +From the Beginning - ELP +Drugstore Novels - Cast of Shadows +Tequila Sunrise - Eagles +Space Oddity - David Bowie +Nowhere Man - Beatles +Seven Bridges Road - Eagles +Stuck in the Middle With You - Stealers Wheel +Suite Judy Blue Eyes - Crosby, Stills and Nash +Dust in the Wind - Kansas +Badge +For What It's Worth +Ramblin' Man - Allman Brothers +Sister Golden Hair - America +Take It Easy - Eagles +Ventura Highway - America +Wild Nights - Van Morrison +All Right Now - Free +Blackbird - Beatles +Lucky Man - ELP +Casey Jones - Grateful Dead +Turn the Page - Bob Segar +Gold Dust Woman +Lying Eyes - Eagles +Panama Red +Something - Beatles +Best of My Love - Eagles +Southern Cross +The Weight +What I Like About You - Romantics +Let It Be - Beatles +Pink Houses - John Cougar +Can't You See - Marshall Tucker +Wagon Wheel - Darius Rucker +Under the Boardwalk - Drifters +Bring It on Home +Hold On/Your Move - Triumph/Yes diff --git a/Songs/New Songs.lst b/Songs/New Songs.lst new file mode 100644 index 0000000..f368d45 --- /dev/null +++ b/Songs/New Songs.lst @@ -0,0 +1,29 @@ +People Get Ready - Curtis Mayfield +I Can See Clearly Now - Johnny Nash +California Dreaming - Mama's and the Papa's +Mrs. Robinson - Simon and Garfunkel +All You Need is Love - Beatles +Dr. My Eyes - Jackson Browne +Crossroads - Cream +Our House - Crosby, Stills, Nash and Young +My Back Pages +Behind Blue Eyes - The Who +I Can't Tell You Why - Eagles +Wild World - Cat Stevens +Crazy Love - Poco +Evil Ways - Santana +Harvest Moon - Neil Young +Keep On Rockin' Me Baby - Steve Miller +One of These Nights - Eagles +Refugee - Tom Petty +Sandman - America +Seagull +You're So Vain - Carly Simon +What I've Already Heard - Mike Fraser +Under the Milky Way - The Church +Stray Cat Strut - Stray Cats +One Way Out - Allman Brothers +Dreams - Molly Hatchet +Funk 49 - Joe Walsh +Cherry, Cherry - Neil Diamond +Sweet Caroline - Neil Diamond diff --git a/Wed.lst b/Wed.lst deleted file mode 100644 index c7d00cf..0000000 --- a/Wed.lst +++ /dev/null @@ -1,9 +0,0 @@ -Wed -Drugstore Novels - Cast of Shadows -Hey Jude - Beatles -Suite Judy Blue Eyes - Crosby, Stills and Nash -Goodbye Yellow Brick Road - Elton John -The Letter - The Box Tops -Nowhere Man - Beatles -Seven Bridges Road - Eagles -What I've Already Heard - Mike Fraser diff --git a/web/displayset.php b/web/displayset.php new file mode 100644 index 0000000..111c43a --- /dev/null +++ b/web/displayset.php @@ -0,0 +1,75 @@ + + + + + + Songbook Artist + + + + + + + + + +
+Home +

Andrew DeFaria's Songbook

+ +

+
+ +
+ +"; + +$firstLine = true; + +foreach (file("$songDir/$set") as $line) { + // Skip first line which is merely the set name again + if ($firstLine) { + $firstLine = false; + continue; + } // if + + if (preg_match ("/(.*)\s+-\s+(.*)/", $line, $matches)) { + $song = trim ($matches[1]); + $artist = trim ($matches[2]); + } else { + $song = trim ($line); + $artist = ""; + } // if + + if (file_exists ("$songDir/$song.pro")) { + print "
  • "; + print basename ($song); + print ""; + } else { + print "
  • "; + print basename ($song); + } + + if ($artist <> "") { + print " - $artist"; + } // if + + print "
  • "; +} // foreach + +print ""; +?> + + + diff --git a/web/index.php b/web/index.php index 6bb6b32..536929d 100644 --- a/web/index.php +++ b/web/index.php @@ -26,8 +26,6 @@ include_once "songbook.php"; - -

    Andrew DeFaria's Songbook

    @@ -42,18 +40,19 @@ Windows. More info on this is available here. For people who must remain with paper...

    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 +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 +this page will automatically update so you can come back here and get your copy.

    -Search:   +Search: 
    diff --git a/web/songbook.php b/web/songbook.php index a231add..cbfe933 100644 --- a/web/songbook.php +++ b/web/songbook.php @@ -1,6 +1,6 @@ "; print "Songs:  "; @@ -39,14 +42,13 @@ function songsDropdown () { } // if } // foreach - print ""; print ""; + print " "; print ""; } // songsDropdown function artistsDropdown () { - global $songs; - + $songs = getSongs(); $artists = getArtists ($songs); print "
    "; @@ -58,11 +60,31 @@ function artistsDropdown () { print ""; } // foreach - print ""; print ""; + print " "; print "
    "; } // artistsDropdown +function setsDropdown () { + $sets = getSets(); + + print "
    "; + print "Sets:     "; + print ""; + print " "; + print "
    "; +} // setsDropdown + function getArtist ($song) { $lyrics = file_get_contents ($song); -- 2.17.1