]> git.quilime.com - plog.git/commitdiff
updated content
authorGabriel Dunne <gdunne@quilime.com>
Fri, 8 Jun 2012 19:36:59 +0000 (12:36 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Fri, 8 Jun 2012 19:36:59 +0000 (12:36 -0700)
32 files changed:
README
TODO
content/code/archlinux_install
content/code/bootable_iso
content/code/config [deleted file]
content/code/mel/notepad
content/code/osx_command_line_audio
content/code/osx_hidden_files
content/code/terminal_emulator_on_win
content/code/windows_copy
content/config
content/log/2009-12-13_mandala
content/log/2010-01-22_cone
content/log/2011-10-23_water_is_life
content/projects/.rattle [moved from content/projects/rattle with 100% similarity]
content/projects/boat
content/projects/dots
content/projects/jelly [moved from content/projects/jellyfish with 95% similarity]
content/projects/rattles
content/projects/swimtank
css/style.css
index.php
lib/config.ini [new file with mode: 0644]
lib/data.php
lib/init.php
lib/model.php
lib/view.php
pages/about
templates/default.rss.tpl
templates/head-inc.html.tpl
templates/index.html.tpl
templates/nav.html.tpl

diff --git a/README b/README
index 72e0e41303e63f391e6fdab913b8397567962240..368620667a5269a671aab2cb59a65e21e51bd0aa 100644 (file)
--- a/README
+++ b/README
@@ -4,3 +4,19 @@ Gabriel Dunne <gdunne@quilime.com>
 Description: 
 PLOG is an CMS engine written for quick and minimal publishing.
 
+Use:
+Put markdown files in the content/ folder.
+At the top of each file, you can specify variables in ini format.
+
+i.e;
+
+`
+title = Post Title
+date = 2012 may 12, 7:33pm
+--
+
+## header
+Your post markdown content here. 
+
+<span>HTML is enabled, <strong>too</strong></span>.
+`
diff --git a/TODO b/TODO
index a38a7866bd43d837e50f38f7ea293fa4afcfdea3..5f990d56eb29567588dea5deac7ec09472ecd481 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,14 +1,14 @@
 TODO
+- work on README documentation
 - pagination (View)
 - canvas icons for list/thumb/tile views (js)
 - static cache generation (wget? curl?)
-  static rss, json, html
-- commenting system from india branch
+    static rss, json, html
 
 
 - update content.sh to give back help if used incorrectly
 
 
 
-done
-- prev/next (View)
+command line usage (for generating static site)
+http://php.net/manual/en/features.commandline.php
\ No newline at end of file
index 36592e8eeb25bd0059bc3d8b1587334f2d433f9a..1a3b4aeb7ffd10257549896ed18721baf8d8db8e 100644 (file)
@@ -1,9 +1,9 @@
-title = DualBoot Archlinux/Windows7 Installation
+title = "DualBoot Archlinux/Windows7 Installation"
 date = 2012-01-02
 tags = arch linux windows installation tutorial
 --
 
-Documentation of the process of installing [archlinux](http://www.archlinux.org/) and Windows 7 in a dual-boot configuration. 
+Documentation of the process of installing [archlinux](http://www.archlinux.org/) and Windows 7 in a dual-boot configuration.
 
 ## System Specs
 
@@ -18,7 +18,7 @@ Documentation of the process of installing [archlinux](http://www.archlinux.org/
 
 
 ## Installing Windows
-Windows was installed from a USB stick using Microsoft's [Windows 7 USB/DVD tool](http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool). It's required to create this key from a Windows 7 system. Boot with the USB drive, then install Windows on the drive in a single partition. Windows also creates a System Reserved partition for itself. Once installed, via Start Menu > Administrative Tools > Computer Management > Disk Manamagent, select 'Shrink Partition' on the main Windows parition to create another partition for Arch. The default value for the shrink is 50%, so for my setup the value for the new disk size was ~50GB, which was ideal. 
+Windows was installed from a USB stick using Microsoft's [Windows 7 USB/DVD tool](http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool). It's required to create this key from a Windows 7 system. Boot with the USB drive, then install Windows on the drive in a single partition. Windows also creates a System Reserved partition for itself. Once installed, via Start Menu > Administrative Tools > Computer Management > Disk Manamagent, select 'Shrink Partition' on the main Windows parition to create another partition for Arch. The default value for the shrink is 50%, so for my setup the value for the new disk size was ~50GB, which was ideal.
 
 Note about this install. I have an old Linksys (Cysco) WMP54G Wireless PCI Card. Drivers from Linksys/Cysco's website didn't work, but following this [blog post](http://www.phishthis.com/2009/01/16/how-to-install-wmp54g-drivers-on-windows-7-beta-64-bit-or-vista-64-bit/), the generic RALink drivers worked great.
 
@@ -42,11 +42,11 @@ The [installation](https://wiki.archlinux.org/index.php/Official_Arch_Linux_Inst
 It's pretty straight forward until the drive partitions. My 100GB drive can only support 4 logical partitions, so the rest have to be Logical. Note: The numbers are out of order, because I used Logical partitions for everything except for the Windows partitions and /home. Logical partitions end up being counted last in the partition table, but I made my /home folder LAST so I could use the up the remaining space on the drive. You'll also need to set the       /boot partition's 'bootable' flag to `true`.
 
 <pre>
-&bull; sda1  
+&bull; sda1
        Windows 7 System Reserved
-&bull; sda2  
-       Windows 7  
-&bull; sda5  
+&bull; sda2
+       Windows 7
+&bull; sda5
        /boot - 100MB is enough
 &bull; sda6
        / - about 25GB is appropriate
index 640561d52c7dcb2c09b4896b9ad1592b8a3f92ac..d22b2c0e62ce8a288e0227551e48775def329afb 100644 (file)
@@ -1,4 +1,4 @@
-title = create bootable iso from unix/osx terminal
+title = "create bootable iso from unix/osx terminal"
 date = july 7 2011
 --
 
diff --git a/content/code/config b/content/code/config
deleted file mode 100644 (file)
index b76bddf..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
---
index 4a4b8c5e3c174cf0595d5d91ab64afaed04fbc8e..85898ccdf87e8438b448a9bb77a8cad08be95cc1 100644 (file)
@@ -1,5 +1,5 @@
 date = 2007-12-12
-title = "MEL Notepad"
+title = MEL Notepad
 tags = mel maya
 --
 
index 6733842f4c38869aa88e84706d9ccef27c956fac..53fa7a545980c4047f5e237b22b9ea4c79595b24 100644 (file)
@@ -1,13 +1,13 @@
-title = command line audio on OSX
-date = Wed, Nov  9  2011 18:40:26,  IST 
+title = "command line audio on OSX"
+date = "Wed, Nov  9  2011 18:40:26,  IST"
 tags = audio osx cli
 --
 
 Since there is no equivilent to /dev/dsp or /dev/audio on OSX, you need to install an alternative like <a href="http://sox.sourceforge.net/">sox</a>.
 
-Install sox by either downloading the OSX binary from <a href="http://sox.sourceforge.net/">http://sox.sourceforge.net/</a>    
-or    
-install <a href="http://mxcl.github.com/homebrew/">homebrew</a>, and then install sox with <code class="prettyprint">brew install sox</code>    
+Install sox by either downloading the OSX binary from <a href="http://sox.sourceforge.net/">http://sox.sourceforge.net/</a>
+or
+install <a href="http://mxcl.github.com/homebrew/">homebrew</a>, and then install sox with <code class="prettyprint">brew install sox</code>
 
 ##Examples
 
index 3520ee3d0054c719be2f56231a39dd1fabce2e2e..f4a440d4442d8ba589fb88f6c186fb4892faf1fd 100644 (file)
@@ -1,6 +1,6 @@
-title = show hidden files (OSX Finder)
+title = "show hidden files (OSX Finder)"
 date = Tue May 10 21:03:45 PDT 2011
-tags = osx 
+tags = osx
 --
 
 via Terminal
@@ -15,4 +15,4 @@ hide hidden files:
 <pre class="prettyprint">
 defaults write com.apple.finder AppleShowAllFiles FALSE
 killall Finder
-</pre>
\ No newline at end of file
+</pre>
index cd51b25f413a1675e6714ed951000656bdb27e9f..7a33ed056f79b41cd4d1bb11deeed9b234ad3ef6 100644 (file)
@@ -1,4 +1,4 @@
-title = Terminal Emulator on Windows via Cygwin
+title = "Terminal Emulator on Windows via Cygwin"
 date = august 11 2011
 --
 How to install cygwin on windows:
@@ -11,7 +11,7 @@ How to install cygwin on windows:
     - xinit (required, scripts for starting the X server: xinit, startx, startwin (and a shortcut on the Start Menu to run it), startxdmcp.bat )
     - xorg-docs (optional, man pages)
     - X-start-menu-icons (optional, adds shortcuts to X Clients and Server to the Start menu)
-    - mintty (windows-feel terminal)  
+    - mintty (windows-feel terminal)
   <br />
 
 3. **Optional Packages**
@@ -27,7 +27,7 @@ How to install cygwin on windows:
 <!--more-->
 
 
-3. **~/.XDefaults**  
+3. **~/.XDefaults**
 dark theme:
 <pre class="prettyprint">
 ! terminal colors ------------------------------------------------------------
@@ -59,17 +59,17 @@ dark theme:
 *color7:  #cccccc
 *color15: #ffffff
 </pre>
-Some more themes on the <a href="https://bbs.archlinux.org/viewtopic.php?pid=653473">Arch forums</a>.  
+Some more themes on the <a href="https://bbs.archlinux.org/viewtopic.php?pid=653473">Arch forums</a>.
 <br />
 
 
 
-4. **~/.bashrc**  
+4. **~/.bashrc**
 To enable color `ls` and human readable size format, add:
 <pre class="prettyprint">
 alias ls='ls -h --color=tty'
 </pre>
-By default, the .bashrc in CygwinX has many options you can uncomment.  
+By default, the .bashrc in CygwinX has many options you can uncomment.
 <br />
 
 5. **~/.emacs**
@@ -81,7 +81,7 @@ Disable emacs temp (~) file pooping
 
 
 
-Result:  
+Result:
 <img src="http://media.quilime.com/files/img/cygwin.PNG" />
 
 
index d11cdfb5850b1e770bdea4dda5bb4e08f0d588cb..19a0c0b323c52485428c99830d475a71460fd0f9 100644 (file)
@@ -1,4 +1,4 @@
-title = Combine Files (Windows)
+title = "Combine Files (Windows)"
 date = Wed, april 27 2011
 tags = windows cmd console
 --
index 090d7d2162d5e914ccc2410ca95debfa67b42453..a28a8786864562280fcaff79d15282ddbfa91ad8 100644 (file)
@@ -1,3 +1,2 @@
 title = quilime
-#template = index
-
+template = index
index 14255acb5d733093a5b7799eb732fd30d57c4339..9e58d0fdc937f277d846bac98b041f73f175f3fd 100644 (file)
@@ -1,6 +1,6 @@
 title = mandala
 date = 2009-12-13
-tags = art graphic&nbsp;design
+tags = art graphic design
 --
 
-![endless knot, mandala](http://media.quilime.com/files/projects/mandala/mandala2.png "endless knot, mandala" )
\ No newline at end of file
+![endless knot, mandala](http://media.quilime.com/files/projects/mandala/mandala2.png "endless knot, mandala" )
index a937eb326ad060f5cc4c06f1a89fba43e137e51b..0d5983a5e0e848ea955c70a1117f6009d61890da 100644 (file)
@@ -1,6 +1,6 @@
 title = cone
 date = 2010-01-22
-tags = installation, projection
+tags = installation projection
 --
 <a href="http://www.flickr.com/photos/quilime/4272182477/">
 <img src="http://farm3.static.flickr.com/2735/4272182477_19e3b10d8d.jpg">
@@ -8,4 +8,4 @@ tags = installation, projection
 
 <p>
 test pattern
-</p>
\ No newline at end of file
+</p>
index 035decaaf935230fe2b5e14e5fb706c67bb7980c..8249c81c059cc1fc1ef3dfb888cbea6b4591e548 100644 (file)
@@ -1,6 +1,6 @@
 title = Water Is Life
 date = Oct 23 2011 06:04:38 PM
-draft = true
+draft = 1
 --
 
 <a href="http://www.flickr.com/photos/quilime/6266458764/sizes/l/in/photostream/"><img src="http://farm7.staticflickr.com/6034/6266458764_6f71bd0a7e_z.jpg"></a>
index a691a09fa155ae1e4c353da34d823ba9a193cd7f..324bffbd5dd67db3aff10c86ed60df6d8ef40d1d 100644 (file)
@@ -1,5 +1,6 @@
 title = boat
 date = 2007-01-01
+thumb = http://portfolio.quilime.com/archive/boat/thumb.png
 --
 
 
index 1172ba24e239aef36d3eecc58187108101d3647e..e21a690f963c7bcb3f2cd229eb6452e31c6f065a 100644 (file)
@@ -1,5 +1,6 @@
 title = dots
 date = 2007-05-02
+thumb = http://media.quilime.com/files/projects/dots/thumb.png
 --
 
 <img style="width:100%;" src="http://portfolio.quilime.com/new/content/01_Dots/images/out.0033.png">
@@ -12,11 +13,11 @@ Human generated tones are rendered with lines. The software manipulates these to
 
 
 <!--
-"Dots" is an interaction between human and computational order and chaos. 
-Notes are generated in an circular ordered, repetitive pattern. Connection lines 
-represent human-played audio tones, line length representing pitch. 
-While notes are played by the human musician, the notes wander away from their original 
-places, warping and distorting the connecting lines, resulting in a more chaotic 
+"Dots" is an interaction between human and computational order and chaos.
+Notes are generated in an circular ordered, repetitive pattern. Connection lines
+represent human-played audio tones, line length representing pitch.
+While notes are played by the human musician, the notes wander away from their original
+places, warping and distorting the connecting lines, resulting in a more chaotic
 and unusual soundscape as time passes.
 -->
 </p>
similarity index 95%
rename from content/projects/jellyfish
rename to content/projects/jelly
index 5188b5bdcc87870f634ed5f6ca6a2fb11c28b8c0..d98a7268989cb4157a0afe349f704d1d617b4d53 100644 (file)
@@ -1,12 +1,13 @@
 title = Jellyfish
 date = 2008-05-01
+thumb = http://media.quilime.com/files/projects/jelly/thumb.png
 --
 
 <img style="width:100%;" src="http://portfolio.quilime.com/new/content/02_Jellyfish/images/jellies.0237.png">
 
 Organic forms react to the user and each other. Their motions and position in space create and/or affect audio. A tenticles depth in space is correlated to volume, while its color is linked to a tone in the audio spectrum. Interaction with the tentacle instrument is smooth, undulating, jellyfish-like.
 
-<!--"Jellyfish" is an interactive soundscape that explores the interaction between 
+<!--"Jellyfish" is an interactive soundscape that explores the interaction between
 a life-like programmed intelligence, and a human user. Tentacles respond and modify audio or controller inputs, affecting the audio tones that each tenticle eminates. A tenticles depth in space is correlated to volume, while color is related to tone in the audio spectrum.-->
 
 
index bc9b1aa25380297a51562144c8c0f10c330c5823..96faa4355adec87d319d11c04ae8a38a7f2f626b 100644 (file)
@@ -6,18 +6,18 @@ thumb = http://portfolio.quilime.com/2008/rattle/thumb.png
 Particles are jostled and shaken as in a rattle. The sonic possibilities of their collisions and movement are given freedom and sonic depth via software.
 Rattles and shakers can be embedded into one another, allowing for more sensitivity, sonic subtlety, and layers when making music. Interaction with the digital rattle is as intuitive as its physical counterpart.
 
-<img style="width:100%;" src="http://portfolio.quilime.com/new/content/03_Rattles/images/rattleFlowers.0077.png">
+<iframe src="http://player.vimeo.com/video/978557?title=0&amp;byline=0&amp;portrait=0" width="500" height="377" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
 
 <!--more-->
 
 
 
 The interaction with "Rattles" is identicle to the traditional percussive instrument.
-The visual shape, texture, or size of each interior rattler represents a unique audio 
-tone, either percussive or melodic. The resulting soundscape of the rattle instrument is 
-therefore unique and rich with sonic subtlety and variation, transforming the traditional 
-"rattle" into an instrument with a necesarry visual component. 
-Rattles can be embedded into one another, allowing for more 
+The visual shape, texture, or size of each interior rattler represents a unique audio
+tone, either percussive or melodic. The resulting soundscape of the rattle instrument is
+therefore unique and rich with sonic subtlety and variation, transforming the traditional
+"rattle" into an instrument with a necesarry visual component.
+Rattles can be embedded into one another, allowing for more
 sensitivity, sonic subtlety, and layers.
 
 
index 68bac0599212bda60b8eb55cd33f71c3ae715942..73111f1524757a021e3726bd2054974d8fdd557d 100644 (file)
@@ -1,10 +1,11 @@
 title = Swimtank
 date = 2007-05-01
+thumb = http://media.quilime.com/files/projects/swimtank/thumb.png
 --
 
 <img style="width:100%;" src="http://portfolio.quilime.com/new/content/05_Swim_Tank/images/fish_close.0261.png">
 
-A form follows an infinite path drawn by you, 
+A form follows an infinite path drawn by you,
 and then reacts to its own trail. You can control the form on two axis, while the depth of the path follows a sinusoidal rhythm that is affected by paths previously drawn.
 
 <!--Exploratory, infinitely looping game.
index 726e4e09ec4b46af03f9b09ecfd6b9a647c24f25..06e7ef6636f5ed54cb769e49afc2aac0b6d62ec4 100644 (file)
@@ -1,6 +1,7 @@
 body, table {
     font-family: arial, monaco, monospace;
     line-height:1.4em;
+    font-size:14px;
 }
 
 body {
@@ -75,7 +76,7 @@ pre, code {
     color:#4fa;
     line-height:1.4em;
     font-size:14px;
-    font-family:menlo, monaco, "Lucida Console", monospace; 
+    font-family:menlo, monaco, "Lucida Console", monospace;
     padding:1px 5px 2px;
     background:#303030;
     border-radius:4px;
@@ -110,10 +111,9 @@ table, td, tr {
 
 #nav {
   position:fixed;
-    top:0;
-    left:0;
+  top:0;
+  left:0;
   padding:20px;
-background:rgba(25,25,25,0.3);
 }
 #nav a {
 }
index e90338283a015402364f6081fa80b7fbdf979da9..0d62417a0bae06f308555af8722d81e51b2f1b93 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,16 +3,9 @@
 require 'lib/init.php';
 
 
-
-
-
 $request = get_request();
-$v = new View  ($request);
 $m = new Model ($request);
-
-
-
-
+$v = new View();
 
 
 if ($m->is_single())
@@ -24,11 +17,7 @@ else if ($m->is_page())
 else if ($m->is_multiple())
        $v->assign('entries', $m->entries);
 
-
-
-
-
 header("Content-Type: {$m->response_mime_type}; charset=UTF-8");
-$v->render( $m->template );
+$v->render( $m->template, $m->response_format );
 
 exit;
diff --git a/lib/config.ini b/lib/config.ini
new file mode 100644 (file)
index 0000000..cc7d500
--- /dev/null
@@ -0,0 +1,45 @@
+[settings]
+; general settings
+site_title  = quilime
+clean_urls  = 1
+limit       = 15
+; http://php.net/manual/en/function.date.php
+date_format = M d Y, h:i:s A T
+
+[local]
+; server locations and file names
+web_root    = "/"
+content     = "content/"
+comments    = "comments/"
+templates   = "templates/"
+pages       = "pages/"
+config_file = "config"
+
+[delimiters]
+; various delimiters
+config_delim = --
+more_delim = "<!--more-->"
+title_delim = " &mdash; "
+
+[ignores]
+; file ignore patterns
+file_ignores[] = config
+file_ignores[] = .DS_Store
+
+
+
+; define ('SITE_TITLE',        'quilime');
+
+; define ('LOCAL_ROOT',        '/home/quilime/quilime.com/');
+; define ('WEB_ROOT',          '/');
+; define ('CONTENT_DIR',       'content/');
+; define ('COMMENTS_DIR',      'comments/');
+; define ('TEMPLATE_DIR',      'templates/');
+; define ('PAGE_DIR',          'pages/');
+; define ('CONFIG_DELIMITER',  '--');
+; define ('CONFIG_FILE',       'config');
+; define ('MORE_DELIM',        '<!--more-->');
+; define ('TITLE_DELIMITER',   ' &mdash; ');
+; define ('ENTRY_DATE_FORMAT', 'M d Y, h:i:s A T');
+
+; $_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store');
index 08e03169f3d8cb479fe5019beffbd13650324117..90de17cab0bf4274741d61f3053235f2089ae7ce 100644 (file)
@@ -15,13 +15,21 @@ function get_entries( $path = "", $args = array())
 
        $path = join(array( LOCAL_ROOT, CONTENT_DIR, $path ), DIRECTORY_SEPARATOR);
 
-       if ($recursive) {
-               $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME);
-               $dir_iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST);
-       }
-       else {
-               $dir_iterator = new DirectoryIterator($path);
+       try {
+               if (!is_dir($path)) {
+                       throw new Exception("no such file or directory", 1);
+               }
+               if ($recursive) {
+                       $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME);
+                       $dir_iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST);
+               }
+               else {
+                       $dir_iterator = new DirectoryIterator($path);
+               }
+       } catch (Exception $e) {
+               echo 'Caught exception: ',  $e->getMessage(), "\n";
        }
+
        $entries = array();
        foreach ($dir_iterator as $file => $info) {
 
@@ -63,15 +71,25 @@ function get_dirs( $path = "", $args = array())
 {
        $recursive = isset($args['recursive']) ? $args['recursive'] : 1;
 
-       $local_content = LOCAL_ROOT . CONTENT_DIR;
+       $local_content = join(array(LOCAL_ROOT, CONTENT_DIR), DIRECTORY_SEPARATOR);
+
        $path = $local_content . $path;
+       $path = str_replace("//", "/", $path);
 
-       if ($recursive) {
-               $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME);
-               $dir_iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST);
-       }
-       else {
-               $dir_iterator = new DirectoryIterator($path);
+
+       try {
+               if (!is_dir($path)) {
+                       throw new Exception("no such file or directory: $path", 1);
+               }
+               if ($recursive) {
+                       $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME);
+                       $dir_iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST);
+               }
+               else {
+                       $dir_iterator = new DirectoryIterator($path);
+               }
+       } catch (Exception $e) {
+               echo 'Caught exception: ',  $e->getMessage(), "\n";
        }
        $dirs = array();
        foreach ($dir_iterator as $dir => $info) {
@@ -138,7 +156,18 @@ function parse_entry($fileInfo, $page = false)
        }
 
        $f = array();
-       $f['config'] = parse_ini_string($config);
+       try {
+               $f['config'] = parse_ini_string($config);
+               if (!parse_ini_string($config)) {
+                       echo $config;
+                       throw new Exception('bad ini format');
+               }
+       }
+       catch (Exception $e) {
+               echo 'Caught exception: ',  $e->getMessage(), "\n";
+               exit;
+       }
+
        $f['title'] = isset($f['config']['title']) ? $f['config']['title'] : $fileInfo->getFilename() ;
        $f['config']['date'] = isset($f['config']['date']) ? $f['config']['date'] : null;
        $f['timestamp'] = $f['config']['date'] ? date('U', strtotime( $f['config']['date'])) : $fileInfo->getCTime();
@@ -146,7 +175,7 @@ function parse_entry($fileInfo, $page = false)
        $f['content'] = Markdown($content);
 
        $f['comments_enabled'] = isset($f['config']['comments']) && $f['config']['comments'];
-       $f['comments'] = new Comments($fileInfo);       
+       $f['comments'] = new Comments($fileInfo);
 
     if ($passed_more)
       $f['content_short'] = Markdown($content_short);
@@ -156,7 +185,7 @@ function parse_entry($fileInfo, $page = false)
 
        $f['cat'] = $page ? null : array('name' => $clean_path, 'url' => $clean_path );
        $f['path'] = $fileInfo->getRealPath();
-       $f['url'] = ($page ? '' : $f['cat']['url'] . '/') . $fileInfo->getFilename();
+       $f['url'] = ($page ? '' : $f['cat']['url'] . '/' ) . $fileInfo->getFilename();
 
     if (!CLEAN_URLS) {
        $f['cat']['url'] = WEB_ROOT . '?p=' . $f['cat']['url'];
index c7292b6407697e37677c17102c59d4db949938bc..12c20dec44bb71cd2bcf7c11848333723d34cae6 100644 (file)
@@ -18,28 +18,51 @@ putenv('TZ=America/Los Angeles');
 # include path
 ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(realpath(__FILE__)));
 
-
-
-
-
-
 # settings
-define ('CLEAN_URLS',           true);
-define ('LIMIT',             15);
-define ('SITE_TITLE',           'quilime');
-define ('LOCAL_ROOT',           '/home/quilime/quilime.com/');
-define ('WEB_ROOT',             '/');
-define ('CONTENT_DIR',                  'content/');
-define ('COMMENTS_DIR',      'comments/');
-define ('TEMPLATE_DIR',         'templates/');
-define ('PAGE_DIR',             'pages/');
-define ('CONFIG_DELIMITER',  '--');
-define ('CONFIG_FILE',                  'config');
-define ('MORE_DELIM',           '<!--more-->');
-define ('TITLE_DELIMITER',      ' &mdash; ');
-define ('ENTRY_DATE_FORMAT', 'M d Y, h:i:s A T');
-
-$_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store');
+define ('LOCAL_ROOT', '/home/quilime/quilime.com/');
+define ('WEB_ROOT', '/');
+
+
+
+/*
+
+Array
+(
+    [site_title] => quilime
+    [clean_urls] => 1
+    [limit] => 15
+    [date_format] => M d Y, h:i:s A T
+    [web_root] => /
+    [content] => content/
+    [comments] => comments/
+    [template] => templates/
+    [pages] => pages/
+    [config_file] => config
+    [config_delim] => --
+    [more_delim] =>
+    [title_delim] =>  —
+    [file_ignores] => Array
+        (
+            [0] => config
+            [1] => .DS_Store
+        )
+)
+*/
+$_cfg = parse_ini_file('lib/config.ini');
+define ('CLEAN_URLS', $_cfg['clean_urls']);
+define ('LIMIT', $_cfg['limit']);
+define ('SITE_TITLE', $_cfg['site_title']);
+define ('CONTENT_DIR', $_cfg['content']);
+define ('COMMENTS_DIR', $_cfg['comments']);
+define ('TEMPLATE_DIR', $_cfg['templates']);
+define ('PAGE_DIR', $_cfg['pages']);
+define ('CONFIG_DELIMITER', $_cfg['config_delim']);
+define ('CONFIG_FILE', $_cfg['config_file']);
+define ('MORE_DELIM', $_cfg['more_delim']);
+define ('TITLE_DELIMITER', $_cfg['title_delim']);
+define ('ENTRY_DATE_FORMAT', $_cfg['date_format']);
+$_FILE_IGNORES = $_cfg['file_ignores'];
+
 
 
 
index d4db65fa75da765f946c98e1b70f4197b07760e0..926276081cdc42fc00fd9fa011ce93072a62cf45 100644 (file)
@@ -36,8 +36,9 @@ class Model
                        # check if config file exists in dir
                    if ($this->has_config()) {
                        $this->config = parse_config( $this->content_request );
-                       if (isset($this->config['config']['template']))
+                       if (isset($this->config['config']['template'])) {
                                $this->template = $this->config['config']['template'] . '.' . $this->response_format . '.tpl' ;
+                       }
                    }
                $this->entries = get_entries( $this->content_request );
                $this->page_title = preg_replace('{^/|/$}', '', $this->request['path']);
index a6c8d015b62a3f84eb3c4ba9283247449cde85a6..98d20ac37df53d4dad38e846100a0aa55d10fd72 100644 (file)
@@ -4,7 +4,7 @@
  *     template object (view)
  */
 class View
-{      
+{
        var $template_dir = 'templates';
        // var $template_cache_dir = 'cache';
     var $default_template = 'default';
@@ -16,10 +16,10 @@ class View
        function __construct()
        {
        $this->template_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', TEMPLATE_DIR));
-       $this->template_cache_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', TEMPLATE_DIR, 'cache'));           
+       $this->template_cache_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', TEMPLATE_DIR, 'cache'));
        }
-       
-       
+
+
     function assign($tpl_var, $value = null)
     {
         if (is_array($tpl_var)) {
@@ -38,17 +38,17 @@ class View
                $this->_tpl_vars = array_merge($this->_tpl_vars, $vars);
                $this->render( $template );
        }
-       
 
-       public function render( $template ) 
+
+       public function render( $template, $response_format = 'html' )
        {
                extract( $this->_tpl_vars );
         if (!is_file($this->template_dir . DIRECTORY_SEPARATOR . $template))
-            $template = $default_template . '.' . $response_format . '.tpl';
+            $template = $this->default_template . '.' . $response_format . '.tpl';
                include( $this->template_dir . DIRECTORY_SEPARATOR . $template );
        }
-       
-       
+
+
        public function page_title($delim)
        {
                return isset($this->_tpl_vars['page_title']) ? $delim . $this->_tpl_vars['page_title'] : "";
index a5dbc1b797bcd79bdac2543994cbd25752edeb25..f821528cd2d7f54d649059073cbc9bf8bda7eb1f 100644 (file)
@@ -3,28 +3,31 @@ title = about
 
 #about
 
-quilime.com is a place for my experiments, process. My web portfolio.
+quilime is an archive of my experiments and process
 
 this site is built with <a href="http://git.quilime.com/?p=plog.git;a=summary">plog</a>, a static-file `p`roject`log` engine written in PHP.
 
-
-<br />
 <!--add <a href="http://quilime.com/.rss" class="rss">.rss</a>-->
 
-## contact
-gabriel dunne  
-[www](http://gabrieldunne.com), [email](&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#x67;&#x64;&#x75;&#x6e;&#110;&#x65;&#x40;&#x71;&#117;&#105;&#x6c;&#x69;&#x6d;&#101;&#x2e;&#x63;&#111;&#x6d;)
+@ 1999&mdash;2012 gabriel dunne  
+[www](http://gabrieldunne.com), [email](&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#x67;&#x64;&#x75;&#x6e;&#110;&#x65;&#x40;&#x71;&#117;&#105;&#x6c;&#x69;&#x6d;&#101;&#x2e;&#x63;&#111;&#x6d;)  
 
 <br />
 
-## related
-[aggregate](http://media.quilime.com/aggregate/) images  
-[clmpr](http://clmpr.com/quilime/)  links  
+## also
+[aggregate](http://media.quilime.com/aggregate/)  
+[clmpr](http://clmpr.com/quilime/)  
 
 <br />
 
 ## elsewhere
-[twitter (@quilime)](http://twitter.com/quilime/)  
+[@quilime](http://twitter.com/quilime/)  
 [vimeo](http://vimeo.com/quilime/)  
 [github](http://github.com/quilime/)  
 [flickr](http://flickr.com/photos/quilime/)  
+
+<br />
+
+## feeds
+[rss](http://quilime.com/.rss)  
+[feedburner](http://feeds.feedburner.com/quilime)  
index 2c8cd1a1e49b1d5f58aa3fb89f954ce154aa16a5..7acef0b48c76690f4136c5fe4269d46abb9b712f 100644 (file)
@@ -1,8 +1,8 @@
 <? echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
 <rss version="2.0">
-       
+
        <channel>
-               
+
        <atom:link rel="hub" href="<?=WEB_ROOT?>" xmlns:atom="http://www.w3.org/2005/Atom"/>
 
        <title><?=SITE_TITLE?></title>
                <description><?=htmlentities($entry['content']);?></description>
                <link>http://<?=get_domain_name() . '/' . $entry['url']?></link>
                <guid>http://<?=get_domain_name() . '/' . $entry['url']?></guid>
-               <pubDate><?=date('r', $entry['timestamp'])?></pubDate>          
+               <pubDate><?=date('r', $entry['timestamp'])?></pubDate>
        </item>
-       <? endforeach; ?>               
+       <? endforeach; ?>
 
        </channel>
-       
-</rss>
+
+</rss>
\ No newline at end of file
index 8a61884848c6ca0bf8dda70fec8503fd05c76f10..d25ffb13114377710ffc4acf8a9f844295387bc2 100644 (file)
@@ -34,7 +34,7 @@ $(document).ready(function() {
 </script>
 ======= -->
 */ ?>
-<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=get_base_dir();?>/.rss" />
+<link rel="alternate" type="application/rss+xml" title="official quilime RSS Feed" href="<?=get_base_dir();?>/.rss" />
 <link rel="stylesheet" href="<?=get_base_dir();?>/css/style.css" type="text/css">
 <link rel="stylesheet" href="<?=get_base_dir();?>/css/comments.css" type="text/css">
 
index a09fc6cb25153c38b0d5e87da4692aa85b8f3dec..649e8055ee840330e226ff95dcac69a0ee7b1533 100644 (file)
@@ -1,13 +1,13 @@
 <html>
 <head>
-    
+
     <? $this->include_template('head-inc.html.tpl') ?>
-    
+
     <title><?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?></title>
-    
+
 </head>
 <body>
-    
+
 <div id="content">
 
        <table cellspacing="0" cellpadding="0">
@@ -19,7 +19,7 @@
         <ul class="projects">
         <? $c = 0;  ?>
         <? foreach(get_entries('projects/') as $entry): $c++; ?>
-        <li class="project">
+        <li class="project" title="<?=$entry['title']?>">
             <a href="<?=$entry['url']?>">
                 <div class="thumb">
             <? if (isset($entry['config']['thumb'])): ?>
@@ -38,7 +38,7 @@
                         ctx.moveTo(10, 10);
                         ctx.lineTo(90, 90);
                         ctx.moveTo(90, 10);
-                        ctx.lineTo(10, 90);                        
+                        ctx.lineTo(10, 90);
                         ctx.closePath();
                         ctx.stroke();
                         ctx.fill();
                 </script>
 
             <? endif; ?>
-                </div>
-            <?=$entry['title']?></a>
+                </div>&nbsp;</a>
         </li>
-        <? endforeach; ?>   
+        <? endforeach; ?>
+        <a href="http://portfolio.quilime.com/">more...</a>
         </ul>
-    </td>        
+    </td>
 
        <td  style="padding-right:100px;"  valign="top">
                <h1><a href="/log/">log</a></h1>
                <ul class="archive">
                <? $c=15; foreach(get_entries('log/') as $entry): if ($c--==0) break; ?>
                <li>
-               <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
+               <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=date("Y m d ", $entry['timestamp'])?><?=$entry['title']?></a>
                </li>
-               <? endforeach; ?>       
-               </ul>   
+               <? endforeach; ?>
+               </ul>
        </td>
-       
+
        <td  style="padding-right:100px;"  valign="top">
                <h1><a class="more" href="/code/">code</a></h1>
                <ul class="archive">
                <li>
                <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
                </li>
-               <? endforeach; ?>       
+               <? endforeach; ?>
                </ul>
        </td>
 
        </tr>
-       </table>        
+       </table>
 
 
 
@@ -89,4 +89,4 @@
 
 </body>
 </html>
-       
+
index f2e1f6c70671a3fbf365a0828d212115550744ae..59812dde8cb792cbc08713fec7ec6ab0027fb3b1 100644 (file)
@@ -1,7 +1,6 @@
 <ul id="nav">
 
     <li><a href="/">home</a></li>
-    <li><a href="/index">index</a></li>  
 
     <br />
 
@@ -18,7 +17,7 @@
 
        <br />
        <li><a href="/about">about</a></li>
-
+       <li><a href="/.rss">feed</a></li>
        <br />
        <br />