TODO
-functional
-- prev/next links accessable from View object
-- generate publish cache
-
+- pagination (View)
+- prev/next (View)
+- static cache generation (wget? curl?)
+- update content.sh to give back help if used incorrectly
nice things
- highlight categories from index
\ No newline at end of file
-template = archive
+template = index
title = delhi 2011
\ No newline at end of file
+++ /dev/null
-date = Sept 22 2011, 22:50
---
- Bkng Meals/ Seat/
- Day Date Flight Status Class City Time Other Cabin
- --- ----- --------------- ------ ----- ---------------- ------ ------ -------
- Thu 22SEP KLM ROYAL OK T LV SAN FRANCISCO 200P M **
- DUTCH AIRLINES 606 AR AMSTERDAM 915A#
-
- Fri 23SEP KLM ROYAL OK T LV AMSTERDAM 1120A M **
- DUTCH AIRLINES 871 AR DELHI 1050P
+++ /dev/null
-date = oct 1 2011
---
-
-Hi Mom.
-
-The surreality of being here is something else. Even tho I am somewhat
-adjusted time-wise, it's so surreal that it feels like a waking dream
-state. Life takes so many forms here -- it's complete and utter
-chaos, but on the other hand, it's elegant and fluid. For example,
-just walking through the streets, I'll come across a pack of feral
-dogs that include me in their pack for blocks, growling and barking at
-anyone who comes close to us. Then, they'll move on to somewhere else.
-There's pigs that eat trash on the side of the road with their little
-piglets. Cows seriously don't have any concern for anything. They walk
-through the streets, through highway traffic (50 mph traffic), not
-giving a care, and the cars swerve around them. I haven't seen an
-accident yet. People drive CRAZY. Shit. Lanes are painted on the
-street, but they might as well be decoration. Motorcyclists drive with
-their lady-friends on the back, sometimes holding one or two small
-children. And monkeys.
-
-There's so much trash. Smells like shit most of the time. Piled up on
-the side of the roads. You'll see cows and pigs just laying in it.
-Dogs everywhere -- sleeping under cars, wherever there's a cool spot.
-
-The beggar kids are ruthless. They'll come up to you in their
-scraggly-ass clothes and tug on my bracelets, but their grubby hands
-in my pockets, and try to get something - anything - to bring back to
-their parents. Historically, the worker class just sends their kids
-out to collect anything they can. They are so dirty it's astonishing.
-One thing I noticed is that there aren't that many homeless kids in
-SF. They're every age here. Granted, they are super cute, but very
-pushy.
-
-Been reading about certain cities where any destruction of any from of
-life, including insects, is not acceptable, and everyone is
-vegetarian. They drink tons of milk and cheese, tho. It's yummy. Gift
-from the cows. Really interesting history about how some of the first
-animal hospitals of the world started in India and enforced the first
-city-wide laws against animal cruelty. It's ancient practice. The laws
-say the greatest thing we can do is protect all living things. The
-concept is if you're cruel to animals, you are cruel to all life,
-since animals are powerless it shows you true nature -- ie, they can't
-do anything back to you and since you don't have to be worried about
-that, you are showing your true self. I just find it amazing that
-these concepts are pre-history (300 BC) and embedded in the culture.
-Ancient text make these teachings not only the core of personal
-morality, but of politics, including preservation of ecology. The
-troubles of the city in the form of poverty, pollution, corruption,
-are considered to pass. "All things must past, even Buddhism itself".
-
-Most of these rules became embedded in politics by [Ashoka](http://en.wikipedia.org/wiki/Ashoka). The guy was rutheless.
-After The Kalinga War where he killed 100,000's of non-violent people,
-he was moved by all the death
-that he completely embraced Bhuddism and completely did a 180. He
-become adevotee of ahimsa (nonviolence), love, truth, tolerance and
-vegetarianism. The Ashoka Chakra, "the wheel of Righteousness" is the
-wheel that's on the India flag and was considered one of the most
-peaceful rulers in history and introduced a secular state ethic of
-non-violence. It's such a vibrant history.
-
-I really want to travel to the south of India -- when Steph gets here,
-I'm planning a 12-day train trip down to the southern tip.
-
-I'm still figuring out the best place to upload pictures. Vishal and I
-are planning to create a book of the entire collaboration, so I might
-send you snapshots here and there, but at the end, I'll have a proper
-documentation.
-
-I've been sending individual people updates as they come -- Stephanie
-and I have been chatting, and Dad's been sending me little emails too.
-I heard there was some worry about Daniel arriving in Geneva, but
-hopefully that's all good. I know it's sometimes hard to find
-internet, and it's so exhausting to travel. It took me about 5 days to
-really adjust.
-
-Life in the house is good. Very low key compared to the outside world
-which is hot, dusty, and sticky. The entire family eats meals together
-which is nice. It's been hard to cook for myself, as the house staff
-and the mom takes that very seriously as their job. They're all
-vegetarian so it hasn't been an adjustment to the food, it's been
-pretty basic and good. Daal, rice, bread, etc. Most of my time is
-spent in Vishal's studio at this point, working on our project. It's
-coming together.
\ No newline at end of file
+++ /dev/null
-title = dreams
-date = Tue, Oct 4 2011, 12:46:34; IST
---
-My dreams have been incredibly vivid. probably due to the heat. sleeping at odd hours. been working in the studio most of the day at Vishal's house, so I haven't been going out as much as I would like. It's also incredibly hot outside, averaging about 36 degrees C, which is about 95 F.
\ No newline at end of file
body {
- padding:50px;
+ padding:0;
+ margin:0;
font-size: 0.8em;
font-family: sans-serif;
line-height:1.5em;
list-style-type:decimal;
}
blockquote {
+ font-family:serif;
font-style:italic;
+ font-size:1.2em;
+ line-height:1.3em;
+ margin:0;
+ padding:0;
}
pre {
line-height:1.3em;
}
-#content {
- margin-top:30px;
+#content {
+ padding:50px;
+}
+#nav {
+ padding:30px 50px;
+ border-top:1px dotted #aaa;
}
.archive li {
}
$entries = array();
foreach ($dir_iterator as $file => $info) {
- if ( !$info->isDir() && !in_array( $info->getFilename(), $_FILE_IGNORES )) {
+
+ // $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ // $ftype = finfo_file($finfo, join(array($info->getPath(), $info->getFilename()), DIRECTORY_SEPARATOR));
+ // finfo_close($finfo);
+
+ if (
+// $ftype == 'text/plain' &&
+ !$info->isDir() &&
+ !in_array( $info->getFilename(), $_FILE_IGNORES )) {
$entries[] = parse_entry( $info );
}
}
define ('ENTRY_DATE_FORMAT', 'M d Y, h:i:s A T');
$_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store');
-
+
# includes
require_once 'data.php';
require_once 'output.php';
+++ /dev/null
-title = about
---
-
-
-ABOUT
------
-
-`plog` is a CMS written to codify process and resources, written in PHP
-by **gabriel dunne** ([www](http://gabrieldunne.com), [email](mailto:gdunne@quilime.com)) for [quilime.com](quilime.com)
-
-find me on:
-[github](http://github.com/quilime/),
-[twitter](http://twitter.com/quilime/)
-site source code: <a href="http://git.quilime.com/?p=plog.git;a=summary">plog</a>
-
-
-INSTALL
--------
-extract plog to the subdirectory of your choice, and modify `lib/init.php`
+++ /dev/null
-DATE=$(date +%Y"-"%m"-"%d) # 2011-10-04
-VDATE=$(date +%a", "%b" "%d" "%Y", "%r"; "%Z) # Tue, Oct 4 2011, 12:46:34; IST
-CONTENT='content'
-FOLDER=$1
-TITLE=$2
-FILE=''
-
-# create filename
-read -p "prepend filename with current date? (y/n) "
-if [ "$REPLY" == "y" ]; then
- FILE=${DATE}_$2
-else
- FILE=$2
-fi
-
-# does file exist?
-if [ -e "$CONTENT/$FOLDER/$FILE" ]; then
- echo "file exists"
- exit
-fi
-
-# create folder if doesn't exist
-if [ ! -d "$CONTENT/$FOLDER" ]; then
- mkdir "$CONTENT/$FOLDER"
-fi
-
-# populate initial variables
-cat > "$CONTENT/$FOLDER/$FILE" << XXX
-title = $TITLE
-date = $VDATE
-draft = true
---
-XXX
-
-echo "$CONTENT/$FOLDER/$FILE"
</head>
<body>
- <? $this->include_template('nav.html.tpl') ?>
-
<div id="content">
- oops <br /><br />
404
</div>
+ <? $this->include_template('nav.html.tpl') ?>
+
+
<? $this->include_template('footer.html.tpl') ?>
</body>
+++ /dev/null
-<html>
-<head>
-
- <? $this->include_template('head-inc.html.tpl') ?>
-
- <title><?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?></title>
-
-</head>
-<body>
-
- <? $this->include_template('nav.html.tpl') ?>
-
-<div id="content">
-
- <ul class="archive">
- <? foreach($entries as $entry): ?>
- <li>
- <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
- </li>
- <? endforeach; ?>
- </ul>
-
-</div>
-
- <? $this->include_template('footer.html.tpl') ?>
-
-</body>
-</html>
<div class="entry">
- <h2>
- <a href="<?=$entry['url']?>"><?=$entry['title']?></a>
- </h2>
-
<div class="content">
<?=$entry['content']?>
</div>
<div class="metadata">
+ "<a href="<?=$entry['url']?>"><?=$entry['title']?></a>",
<span title="<?=get_relative_time($entry['timestamp']);?>"><?=date(ENTRY_DATE_FORMAT, $entry['timestamp'])?></span>
<? if (!empty($entry['cat']['name'])): ?>
in <a href="<?=$entry['cat']['url'];?>"><?=$entry['cat']['name'];?></a>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="alternate" type="application/rss+xml" title="RSS" href="<?= get_base_dir(); ?>/.rss" />
-
-<link rel="stylesheet" href="<?= get_base_dir(); ?>/css/style.css" type="text/css">
-
-<link href="<?= get_base_dir(); ?>/js/prettify/prettify.css" type="text/css" rel="stylesheet" />
-<script type="text/javascript" src="<?= get_base_dir(); ?>/js/jquery-1.3.2.min.js"></script>
-<script type="text/javascript" src="<?= get_base_dir(); ?>/js/prettify/prettify.js"></script>
-<script>
-
-$(document).ready(function() {
- prettyPrint();
-});
-
-</script>
-
-<script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-351774-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
-</script>
\ No newline at end of file
+<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=get_base_dir();?>/.rss" />
+<link rel="stylesheet" href="<?=get_base_dir();?>/css/style.css" type="text/css">
-<div class="nav">
+<div id="nav">
- <h1 style="margin:0;"><a href="<?=WEB_ROOT?>">INDIA 2011</a></h1>
- Gabriel Dunne
+ <ul class="archive">
+ <? foreach(get_entries() as $entry): ?>
+ <li>
+ <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
+ </li>
+ <? endforeach; ?>
+ </ul>
+
+ <br />
+
+ <a href="<?=WEB_ROOT?>?p=info">info</a>
</div>
</head>
<body>
- <? $this->include_template('nav.html.tpl') ?>
+
<div id="content">
</div>
+ <? $this->include_template('nav.html.tpl') ?>
+
<? $this->include_template('footer.html.tpl') ?>
</body>
<? $this->include_template('head-inc.html.tpl') ?>
- <title><?=SITE_TITLE?><?=TITLE_DELIMITER?> <?=$entry['title'];?></title>
+ <title><?=$entry['title'];?></title>
</head>
<body>
- <? $this->include_template('nav.html.tpl') ?>
<div id="content">
<? $this->include_template('entry.html.tpl'); ?>
</div>
+ <? $this->include_template('nav.html.tpl') ?>
+
<? $this->include_template('footer.html.tpl') ?>
</body>