Merge branch 'ajax' into dev
authorDylan Lloyd <dylan@psu.edu>
Fri, 25 Mar 2011 00:18:17 +0000 (20:18 -0400)
committerDylan Lloyd <dylan@psu.edu>
Fri, 25 Mar 2011 00:18:17 +0000 (20:18 -0400)
index.php
projects/drawcss.html [deleted file]
projects/i_like_pandora.html [deleted file]
projects/peepshow.html [deleted file]
projects/readoo.html [deleted file]
projects/repthis.html [deleted file]
projects/youtube_backup.html [deleted file]
publish_projects.py

index 740157b..424f850 100644 (file)
--- a/index.php
+++ b/index.php
@@ -145,7 +145,6 @@ class index extends cms {
     echo "<ul id='portfolio' style='text-align:right'>";
     $this->list_projects();
     echo <<<OTHER_PROJECTS
-        <li>
           <h3>things i've done for others:</h3>
         </li>
 
diff --git a/projects/drawcss.html b/projects/drawcss.html
deleted file mode 100644 (file)
index dcabc0c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-        <div class='exhibit' id='drawcss_'>
-          <h1 id='drawcss_title'><a href=
-          'drawcss'>drawcss</a></h1><span id=
-          'drawcss_entry'>writing markup for website wireframes
-          always seemed silly.<br>
-
-          <br>
-          this is a tool to draw them (it's not done).<br>
-          <br>
-          <a href='#show' id='showdivs' name='showdivs'>check
-          out</a> the invisible elements this page is built on.<br>
-          <br>
-          then get <a href=
-          'http://github.com/nospampleasemam/drawcss'>the
-          code</a>.</span>
-
-        </div>
diff --git a/projects/i_like_pandora.html b/projects/i_like_pandora.html
deleted file mode 100644 (file)
index 597ffec..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-        <div class='exhibit' id='i_like_pandora_'>
-          <h1 id='i_like_pandora_title'><a href=
-          'https://github.com/nospampleasemam/i_like_pandora'>i_like_pandora</a></h1><span id='i_like_pandora_entry'>searches
-          <a href='http://youtube.com'>youtube</a> for what you
-          like on <a href='http://pandora.com'>pandora</a>.<br>
-
-          <br>
-          then it downloads the first video.<br>
-          <br>
-          it's working, but i'm still making it better.<br>
-          <br>
-          <br>
-          the code is free (as in freedom), <a href=
-          'http://github.com/nospampleasemam/i_like_pandora'>here</a>.<br>
-
-          </span>
-        </div>
diff --git a/projects/peepshow.html b/projects/peepshow.html
deleted file mode 100644 (file)
index a306b61..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-        <div class='exhibit' id='peepshow_'>
-          <h3 id='peepshow_title_1'><a href=
-          'foxy-addons/peepshow/peepshow.xpi'>foxy-addons/</a></h3>
-
-          <h1 id='peepshow_title_2'><a href=
-          'foxy-addons/peepshow/peepshow.xpi'>peepshow</a></h1><span id='peepshow_entry'>a
-          <a href=
-          'http://www.mozilla.com/en-US/products/download.html'>firefox</a>
-          addon, to load linked images inline (like on <a href=
-          'http://reddit.com/r/pics'>reddit</a>).<br>
-
-          <br>
-          here's the <a href=
-          'http://github.com/nospampleasemam/peepshow/'>repo</a>
-          for the source code.</span>
-        </div>
diff --git a/projects/readoo.html b/projects/readoo.html
deleted file mode 100644 (file)
index 46b32f5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-        <div class='exhibit' id='readoo_'>
-          <h1 id='readoo_title'><a href=
-          'http://github.com/nospampleasemam/readoo'>readoo</a></h1><span id='readoo_entry'>helps
-          you find search keywords to target.<br>
-          <br>
-          it reads your IIS logs, and finds successful keywords
-          worth focusing on.<br>
-          <br>
-          it's not done yet! here's the <a href=
-          'http://github.com/nospampleasemam/readoo'>source
-          code</a>.</span>
-
-        </div>
diff --git a/projects/repthis.html b/projects/repthis.html
deleted file mode 100644 (file)
index 919365f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-               <div class='exhibit' id='repthis_'>
-          <span id='reprap_entry'>3D printing is a form of additive
-          manufacturing technology where a three dimensional object
-          is created by successive layers of material. [1]:<a href=
-          'http://repthis.info/'>http://en.wikipedia.org/wiki/3D_printing</a><br>
-
-          <br>
-          <a href='http://reprap.org'>reprap</a> is a <a href=
-          'http://en.wikipedia.org/wiki/Free_software'>free</a>
-
-          desktop 3D printer capable of printing plastic
-          objects.<br>
-          <br>
-          <a href='http://repthis.info'>repthis.info</a> is the
-          account of a friend and I learning to build our own.<br>
-          <br></span>
-        </div>
diff --git a/projects/youtube_backup.html b/projects/youtube_backup.html
deleted file mode 100644 (file)
index 9526722..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-        <div class='exhibit' id='youtube_backup_'>
-
-          <h1 id='youtube_backup_title'><a href=
-          'https://github.com/nospampleasemam/youtube_backup'>youtube_backup</a></h1><span id='youtube_backup_entry'>backs
-          up all the <a href='http://youtube.com'>youtube</a>
-          videos in a users favorites list.<br>
-          <br>
-          this is my fork of the <a href=
-          'https://github.com/hagnas/youtube_backup'>original
-          youtube_backup</a> which adds asynchronous alerts after
-          successful downloads.<br>
-          <br>
-
-          it's written in <a href=
-          'http://www.python.org/'>python</a>.</span>
-        </div>
index da77e39..6e538d9 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/python
 
+PROJECTS_DIRECTORY = '/home/dylan/docs/projects'
+
 import os
 import time
 import MySQLdb as db
@@ -13,7 +15,7 @@ password = config.get('database', 'password').replace('"', '')
 database = config.get('database', 'database')
 cursor = db.connect(domain, user, password, database).cursor()
 
-notes = os.listdir('projects')
+notes = os.listdir(PROJECTS_DIRECTORY)
 
 sql = "SELECT title FROM projects"
 cursor.execute(sql)
@@ -24,7 +26,7 @@ for row in results:
 
 for note in notes:
     title = note[:note.index('.')]
-    f = open(os.path.join('projects', note))
+    f = open(os.path.join(PROJECTS_DIRECTORY, note))
     if title in existing_titles: continue
     text = f.read()
     cursor.execute("INSERT INTO projects (title, text)\