commit ffe7be877d8bdf2ef20e5765025ff5fe0e9717f9 Author: Neale Pickett Date: Wed Nov 10 21:54:22 2010 -0600 Welcome to the make+m4 template system diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9832c98 --- /dev/null +++ b/Makefile @@ -0,0 +1,49 @@ +DESTDIR = /srv/www/woozle.org + +TEMPLATE = template.html.m4 +MDWNTOHTML = ./mdwntohtml $(TEMPLATE) + +# HTML to be generated +HTML = + +# Things to copy +COPY = + +# Directories in which %.mdwn generates %.html +PLAIN = + +# Other targets for "make all" +TARGETS = html copy images + +all: default + +-include *.mk */*.mk + +$(DESTDIR)/%.html: %.mdwn $(TEMPLATE) + @mkdir -p $(dir $@) + $(MDWNTOHTML) < $< > $@ + +$(DESTDIR)/%: % + @mkdir -p $(dir $@) + cp $< $@ + +$(DESTDIR)/%-sm.jpg: %.jpg + jpegtopnm $< | pnmscale -xysize 400 400 | pnmtojpeg > $@ + +$(DESTDIR)/tmp: + mkdir -p $@ + +$(DESTDIR)/footer.xml: $(TEMPLATE) + awk '(/FOOT/) { a += 1; next; } (a == 1) { print; }' $< > $@ + +default: $(TARGETS) + +MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN))) +HTML += $(patsubst %.mdwn, %.html, $(MDWN)) + +html: $(addprefix $(DESTDIR)/, $(HTML)) +copy: $(addprefix $(DESTDIR)/, $(COPY)) +images: $(addprefix $(DESTDIR)/, $(IMAGES)) + +clean: + rm -rf $(wildcard $(DESTDIR)/*) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..9b2e206 Binary files /dev/null and b/icon.png differ diff --git a/index.mdwn b/index.mdwn new file mode 100644 index 0000000..9d2da75 --- /dev/null +++ b/index.mdwn @@ -0,0 +1,18 @@ +Title: Home + +
+ Username + + Password + + +
+ + +Nov 9: Web site changes +======================= + +I'm twiddling with the web site. Webmail should be fine but other things may +be up and down throughout the day. diff --git a/lists.cgi b/lists.cgi new file mode 100755 index 0000000..1bf132e --- /dev/null +++ b/lists.cgi @@ -0,0 +1,106 @@ +#! /usr/bin/python + +import cgitb; cgitb.enable() +import cgi +import os +import sys +import glob +import re +import smtplib + +f = cgi.FieldStorage() + +l = f.getfirst('l') +if not l: + l = os.environ.get('PATH_INFO', '/')[1:] + +desc_re = re.compile(r'List-Id: "?([^<]*)"? <') +def getdesc(d): + fn = '%s/control/customheaders' % d + try: + hdrs = file(fn).read() + except IOError: + return '(none)' + ret = desc_re.search(hdrs) + if ret: + return ret.group(1) + else: + return '(none)' + +listdir = '/var/spool/mlmmj/%s' % l +if l and os.path.isdir(os.path.join(listdir, 'control')): + title = '%s membership' % l + a = f.getfirst('a') + addr = f.getfirst('addr') + + if ((a == 'subscribe') or (a == 'unsubscribe')) and addr: + server = smtplib.SMTP('localhost') + faddr = addr + taddr = '%s-%s@woozle.org' % (l, a) + try: + server.sendmail(faddr, + [taddr], + 'From: %s\nTo: %s\n\n' % (faddr, taddr)) + content = '

I have sent a confirmation message to %s. ' % addr + content += 'It should be in your mailbox shortly.

' + except Exception, err: + content = "

Uh oh. That didn't work.

" + content += "
%s
" % cgi.escape(str(err)) + else: + desc = getdesc(listdir) + content = '

%s@woozle.org' % l + if desc: + content += ": %s" % cgi.escape(desc) + content += '

' + content += '

To subscribe to or unsubscribe from the %s list,' % l + content += ' just enter your email address in this handy dandy form!

' + content += '
' + content += ' ' % l + content += ' Email address: ' + content += ' ' + content += ' ' + content += '
' + if os.path.exists(os.path.join(listdir, 'control', 'archive')): + content += "

Message archive

" % l +else: + title = 'Email lists' + + content = '

Public email lists on this host

' + content += '' + content += ' ' + content += ' ' + content += ' ' + content += ' ' + content += ' ' + content += ' ' + content += ' ' + content += ' ' + + for d in glob.glob('/var/spool/mlmmj/*'): + if os.path.islink(d): + continue + if os.path.exists('%s/control/private' % d): + continue + + l = os.path.basename(d) + content += '' % (l, l) + content += '' % getdesc(d) + content += '\n' + + content += ' ' + content += '
listdescriptionactions
%s%s
' + content += ' ' + content += '
' % l + content += ' ' + content += ' ' + content += '
' + if os.path.exists('%s/control/archive' % d): + content += 'view archive' % l + content += '
' + +print 'Content-type: text/html' +print +sys.stdout.flush() +p = os.popen('m4 -DTITLE="%s" template.html.m4 -' % title, 'w') +p.write(content) +p.close() diff --git a/mdwntohtml b/mdwntohtml new file mode 100755 index 0000000..938b8af --- /dev/null +++ b/mdwntohtml @@ -0,0 +1,15 @@ +#! /bin/sh -e + +while IFS=: read field value; do + case "$field" in + "") + break + ;; + Title) + # echo strips leading and trailing whitespace + title=$(echo $value) + ;; + esac +done + +m4 -Dimage='' | markdown | m4 -DTITLE="$title" $1 - diff --git a/people.sh b/people.sh new file mode 100755 index 0000000..5d9f1aa --- /dev/null +++ b/people.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +echo 'Title: People' +echo + +ls /home/*/public_html/index.html | while read fn; do + a=${fn#/home/} + u=${a%/public_html/index.html} + + echo "* [$u](/~$u)" +done diff --git a/style.css b/style.css new file mode 100644 index 0000000..672957b --- /dev/null +++ b/style.css @@ -0,0 +1,83 @@ +html { + font-family: sans-serif; + background: #eee; +} + +body { + max-width: 700px; + margin: auto; + color: #636; + background: #fff; + padding: 1em; +} + +body h1:first-child { + font-size: 1.5em; + font-weight: bold; + color: #ccc; + margin: 0; +} +body h1:first-child:before { + font-size: 300%; + font-weight: normal; + content: "Woozle"; + padding-right: 1em; +} + +nav { + font-size: 80%; + margin: 0; + padding: 0; +} +nav ul { + background-color: #eee; + margin: 0; + padding: 0 1em; +} +nav li { + font-weight: bold; + display: inline; + padding: 0 1em; +} + +a { + text-decoration: none; + color: #e8b; +} +a:hover { + text-decoration: underline; +} + +h1 { + font-size: 150%; + border-bottom: 1px solid #ddd; +} + + +.login { + margin: 0 1em; + color: #e8b; + background: #fbfbfb; + border: 1px solid #eee; + text-align: center; +} + +.login input { + border: 1px solid #ddd; + color: #bbb; + background: #fff; + font-weight: bold; +} + +img +{ + border: 1px #e8b solid; +} +img.left { + float: left; + margin-right: 10px; +} + +pre { + background-color: #eee; +} diff --git a/template.html.m4 b/template.html.m4 new file mode 100644 index 0000000..5b75faa --- /dev/null +++ b/template.html.m4 @@ -0,0 +1,23 @@ + + + + TITLE + + + + + +

TITLE

+ +define(image, ) +divert(1) + + +divert(0) diff --git a/wishlist.cgi b/wishlist.cgi new file mode 100755 index 0000000..37db986 --- /dev/null +++ b/wishlist.cgi @@ -0,0 +1,52 @@ +#! /usr/bin/python + +import cgitb; cgitb.enable() +import cgi +import glob +import os +import sys +import markdown + +BASE = '/var/lib/wishlists' + +f = cgi.FieldStorage() + +title = 'Wishlists' +content = [] + +u = f.getfirst('u') +p = f.getfirst('p') + +if u: + if p: + if p.lower() not in ('dingo', 'jada'): + content.append("

I'm sorry but that is not the right answer.

") + else: + txt = f.getfirst('txt') + open(os.path.join(BASE, u), 'w').write(txt) + content.append('

Okay, thanks!

') + content.append('

Back to wishlists

') + else: + title = "%s's Wishlist" % cgi.escape(u) + txt = open(os.path.join(BASE, u)).read() + content.append('
') + content.append('' % u) + content.append('' % cgi.escape(txt)) + content.append('
') + content.append('What is the name of Amy and Neale\'s dog?') + content.append('') + content.append('') + content.append('
') +else: + for fn in sorted(glob.glob(os.path.join(BASE, '*'))): + u = os.path.basename(fn) + content.append("

%s

" % cgi.escape(u)) + content.append(markdown.markdown(open(fn).read())) + content.append('

edit

' % u) + +print 'Content-type: text/html' +print +sys.stdout.flush() +p = os.popen('m4 -DTITLE="%s" template.html.m4 -' % title, 'w') +p.write('\n'.join(content)) +p.close() diff --git a/woozle.mk b/woozle.mk new file mode 100644 index 0000000..8d49001 --- /dev/null +++ b/woozle.mk @@ -0,0 +1,6 @@ +PLAIN += . +COPY += icon.png style.css lists.cgi wishlist.cgi $(TEMPLATE) +HTML += people.html + +$(DESTDIR)/people.html: people.sh + sh $< | $(MDWNTOHTML) > $@ diff --git a/xmas/2009/100_1565.jpg b/xmas/2009/100_1565.jpg new file mode 100644 index 0000000..522c0a3 Binary files /dev/null and b/xmas/2009/100_1565.jpg differ diff --git a/xmas/2009/100_1572.jpg b/xmas/2009/100_1572.jpg new file mode 100644 index 0000000..d2a7dc8 Binary files /dev/null and b/xmas/2009/100_1572.jpg differ diff --git a/xmas/2009/100_1577.jpg b/xmas/2009/100_1577.jpg new file mode 100644 index 0000000..71fb4a6 Binary files /dev/null and b/xmas/2009/100_1577.jpg differ diff --git a/xmas/2009/DSC07998_edited-1.jpg b/xmas/2009/DSC07998_edited-1.jpg new file mode 100644 index 0000000..6febb7c Binary files /dev/null and b/xmas/2009/DSC07998_edited-1.jpg differ diff --git a/xmas/2009/DSC08025.jpg b/xmas/2009/DSC08025.jpg new file mode 100644 index 0000000..794ef77 Binary files /dev/null and b/xmas/2009/DSC08025.jpg differ diff --git a/xmas/2009/IMG_2513.jpg b/xmas/2009/IMG_2513.jpg new file mode 100644 index 0000000..53fc094 Binary files /dev/null and b/xmas/2009/IMG_2513.jpg differ diff --git a/xmas/2009/IMG_2608-1.jpg b/xmas/2009/IMG_2608-1.jpg new file mode 100644 index 0000000..541229b Binary files /dev/null and b/xmas/2009/IMG_2608-1.jpg differ diff --git a/xmas/2009/IMG_2610-1.jpg b/xmas/2009/IMG_2610-1.jpg new file mode 100644 index 0000000..5fd27c9 Binary files /dev/null and b/xmas/2009/IMG_2610-1.jpg differ diff --git a/xmas/2009/Image106.jpg b/xmas/2009/Image106.jpg new file mode 100644 index 0000000..7e32821 Binary files /dev/null and b/xmas/2009/Image106.jpg differ diff --git a/xmas/2009/Image190.jpg b/xmas/2009/Image190.jpg new file mode 100644 index 0000000..63e3232 Binary files /dev/null and b/xmas/2009/Image190.jpg differ diff --git a/xmas/2009/Image191.jpg b/xmas/2009/Image191.jpg new file mode 100644 index 0000000..e9e8332 Binary files /dev/null and b/xmas/2009/Image191.jpg differ diff --git a/xmas/2009/dscn1714.jpg b/xmas/2009/dscn1714.jpg new file mode 100644 index 0000000..b3b9de8 Binary files /dev/null and b/xmas/2009/dscn1714.jpg differ diff --git a/xmas/2009/fam.jpg b/xmas/2009/fam.jpg new file mode 100644 index 0000000..97f0d9b Binary files /dev/null and b/xmas/2009/fam.jpg differ diff --git a/xmas/2009/img_3531.jpg b/xmas/2009/img_3531.jpg new file mode 100644 index 0000000..739a9af Binary files /dev/null and b/xmas/2009/img_3531.jpg differ diff --git a/xmas/2009/img_3543.jpg b/xmas/2009/img_3543.jpg new file mode 100644 index 0000000..d798763 Binary files /dev/null and b/xmas/2009/img_3543.jpg differ diff --git a/xmas/2009/img_3550.jpg b/xmas/2009/img_3550.jpg new file mode 100644 index 0000000..f5715ad Binary files /dev/null and b/xmas/2009/img_3550.jpg differ diff --git a/xmas/2009/img_3561.jpg b/xmas/2009/img_3561.jpg new file mode 100644 index 0000000..4b14084 Binary files /dev/null and b/xmas/2009/img_3561.jpg differ diff --git a/xmas/2009/img_3683.jpg b/xmas/2009/img_3683.jpg new file mode 100644 index 0000000..d80bf8a Binary files /dev/null and b/xmas/2009/img_3683.jpg differ diff --git a/xmas/2009/img_3782.jpg b/xmas/2009/img_3782.jpg new file mode 100644 index 0000000..90bc62c Binary files /dev/null and b/xmas/2009/img_3782.jpg differ diff --git a/xmas/2009/img_3823.jpg b/xmas/2009/img_3823.jpg new file mode 100644 index 0000000..a94b363 Binary files /dev/null and b/xmas/2009/img_3823.jpg differ diff --git a/xmas/2009/img_3941.jpg b/xmas/2009/img_3941.jpg new file mode 100644 index 0000000..6a854e3 Binary files /dev/null and b/xmas/2009/img_3941.jpg differ diff --git a/xmas/2009/img_4047.jpg b/xmas/2009/img_4047.jpg new file mode 100644 index 0000000..297622b Binary files /dev/null and b/xmas/2009/img_4047.jpg differ diff --git a/xmas/2009/img_4062.jpg b/xmas/2009/img_4062.jpg new file mode 100644 index 0000000..1c70585 Binary files /dev/null and b/xmas/2009/img_4062.jpg differ diff --git a/xmas/2009/img_4085.jpg b/xmas/2009/img_4085.jpg new file mode 100644 index 0000000..da68b06 Binary files /dev/null and b/xmas/2009/img_4085.jpg differ diff --git a/xmas/2009/img_4178.jpg b/xmas/2009/img_4178.jpg new file mode 100644 index 0000000..519bfdc Binary files /dev/null and b/xmas/2009/img_4178.jpg differ diff --git a/xmas/2009/img_4185.jpg b/xmas/2009/img_4185.jpg new file mode 100644 index 0000000..110b7dc Binary files /dev/null and b/xmas/2009/img_4185.jpg differ diff --git a/xmas/2009/img_4276.jpg b/xmas/2009/img_4276.jpg new file mode 100644 index 0000000..7812d8e Binary files /dev/null and b/xmas/2009/img_4276.jpg differ diff --git a/xmas/2009/img_4324.jpg b/xmas/2009/img_4324.jpg new file mode 100644 index 0000000..cb8134d Binary files /dev/null and b/xmas/2009/img_4324.jpg differ diff --git a/xmas/2009/img_4336.jpg b/xmas/2009/img_4336.jpg new file mode 100644 index 0000000..661c317 Binary files /dev/null and b/xmas/2009/img_4336.jpg differ diff --git a/xmas/2009/img_4337.jpg b/xmas/2009/img_4337.jpg new file mode 100644 index 0000000..1b6d172 Binary files /dev/null and b/xmas/2009/img_4337.jpg differ diff --git a/xmas/2009/img_4346.jpg b/xmas/2009/img_4346.jpg new file mode 100644 index 0000000..e19c10c Binary files /dev/null and b/xmas/2009/img_4346.jpg differ diff --git a/xmas/2009/img_4355.jpg b/xmas/2009/img_4355.jpg new file mode 100644 index 0000000..e5fc45e Binary files /dev/null and b/xmas/2009/img_4355.jpg differ diff --git a/xmas/2009/img_4362.jpg b/xmas/2009/img_4362.jpg new file mode 100644 index 0000000..f80ff23 Binary files /dev/null and b/xmas/2009/img_4362.jpg differ diff --git a/xmas/2009/img_4398.jpg b/xmas/2009/img_4398.jpg new file mode 100644 index 0000000..0bbc167 Binary files /dev/null and b/xmas/2009/img_4398.jpg differ diff --git a/xmas/2009/img_4399.jpg b/xmas/2009/img_4399.jpg new file mode 100644 index 0000000..5a144d8 Binary files /dev/null and b/xmas/2009/img_4399.jpg differ diff --git a/xmas/2009/img_4403.jpg b/xmas/2009/img_4403.jpg new file mode 100644 index 0000000..d769317 Binary files /dev/null and b/xmas/2009/img_4403.jpg differ diff --git a/xmas/2009/img_4404.jpg b/xmas/2009/img_4404.jpg new file mode 100644 index 0000000..6662e87 Binary files /dev/null and b/xmas/2009/img_4404.jpg differ diff --git a/xmas/2009/index.mdwn b/xmas/2009/index.mdwn new file mode 100644 index 0000000..eb88962 --- /dev/null +++ b/xmas/2009/index.mdwn @@ -0,0 +1,131 @@ +Title: 2009 Christmas Letter + +image(img_4403)) + +We had lots of help decorating the Christmas tree this year, when we took these photos. From left to right: Dingo, Samantha, Neale, Claire, Fitri, Jada, Ginnie, and Amy. For those confused about the sudden explosion in family members: we got to share our Thanksgiving with Samantha and Claire, Amy's cousins; and Fitri is our exchange student from Indonesia. + +Here are some photo highlights from 2009! + +image(img_3543) + +We did a lot of home projects this year, starting with the installation of a new woodstove and roof, and also rebuilt our deck. Neale built the hearth for the woodstove, and for a little while Ginnie got to play on it: + +image(img_3550) + +image(img_4178) + +Kellie and Bill Robinson-Smith came to visit for the February birthdays, and we took them to the Jemez ruins up the road: + +image(dscn1714) + + +Ginnie graduated from the bike trailer for longer rides to a kid-back style bike that attaches to our bikes. + +image(img_3531) + +Ginnie also tried out soccer. She had fun for about three weeks, but four-year-olds don't really get the idea of having to share the ball, even with teammates. She did enjoy socializing though! And the dandelions on the field, too. + +image(img_3561) + +In May we got to see Ginnie's ballet recital. The kids in her class were "gumdrops" from Candyland. + +image(img_3683) + +Two weeks later we headed to the Pacific Northwest and got out to the beach near Astoria, and also got some good visiting in with family. We got to join in on the annual Robinson family get-together at the Great Wolf Lodge near Olympia, where Ginnie proved to be a bit of a dare-devil on waterslides. + +Ginnie and Liz, taking a breather from the slides: + +image(DSC08025) + +The whole Robinson family at dinner: + +image(DSC07998_edited-1) + +Ginnie, Amy's dad Jim and Julie Vandling: + +image(img_3823) + +In Astoria: + +image(fam) + +image(img_3782) + +Neale's sister April, her husband Dave and their daughter Ariana came to visit us for the 4th of July. The girls had a ball together, as usual, eating popsicles and getting their faces painted at the local 4th of July celebration. + +image(IMG_2513) + +image(IMG_2610-1) + +image(IMG_2608-1) + +And then came the Hailstorm from Hell. On July 6th (I know this because of all of our insurance forms) the entire town of Los Alamos put most autobody businesses, window retailers and roofers in the black for the year. Our car sustained some amazing dents, although no broken windows luckily. The brand-new roof on our house was totaled, however. + +image(img_3941) + +Ginnie and Amy spent a lot of the summer at the neighborhood pool, where Ginnie started swimming on her own this year. Here she is, waiting for her swim teacher at the Deep End: + +image(Image106) + +Neale got more and more experienced handling the bees. After they were delivered in the spring, the entire colony absconded from the hive (that's a fancy name for "The queen decided the hive was not to her liking, and took the entire colony with her"). Luckily, some friends of ours set us up with a nucleus, complete with comb, baby bees and honey. + +image(img_4047) + +In July we were asked to take in an exchange student for the year, and after some consideration decided that it would be a great experience. Three weeks later, Fitri from Indonesia arrived. She has adjusted very nicely, is involved in the Key Club and International Club at the high school, plans to run track in the spring, and amazingly took a Japanese class at the local college (imagine learning a new language from an English-speaking teacher, when English isn't your first language!). Fitri has taught us a lot about her culture, and impressed us with her ability to adapt and learn. + +We took Fitri and Ginnie to the Dixon Apple Farm in the fall: + +image(img_4085) + +We finished rebuilding the deck in September. Next year, a railing! + +image(img_4062) + +Ginnie and Fitri on Halloween: + +image(img_4185) + +Amy and Ginnie have also been exploring trails around Los Alamos with friends. The kids have a ball together on their hikes, checking out the canyons and ladders and bridges. + +Ginnie in some early snow on Pajarito Mountain: + +image(100_1565) + +At Tsankawi, which is a separate part of the Bandelier ruins: + +image(100_1572) + +The kids at Tsankawi. We got some good ladder-climbing in and had fun finding ancient arrowheads and pottery, which are still scattered around on top of the mesa there: + +image(100_1577) + +We also got Fitri out to Bandelier. Here she is on one of the series of 4 or 5 ladders going up to the Alcove House: + +image(img_4276) + +Amy's sister Kristen and her boyfriend Alex came to visit us for Thanksgiving. We took them down to Alamogordo to visit our cousins, Samantha and Claire, and took the whole gang to Carlsbad Caverns. + +image(img_4324) + +Fitri seems to be getting a little tired here... + +image(img_4336) + +Kristen and Ginnie got to bond on the hike down into the caverns: + +image(img_4337) + +Then we took everyone back to Los Alamos, where we had some great helpers putting together our Thanksgiving dinner. It was nice to visit with Kristen and Alex, and Neale's parents Christy and Steve joined us for Thanksgiving too. The girls also helped us decorate our tree, and the tree got its topper put on a total of three times. + +image(img_4346) +image(img_4355) +image(img_4362) +image(img_4398) +image(img_4399) +image(img_4404) + +As you can see, our house has been full of busy but happy changes, and we were thrilled to welcome so many visitors this year. Have a very Merry Christmas and Happy New Year! + +Love, + +The Picketts (Neale, Amy, Gwendolyn-Ginnie, Fitri, and the dogs (Jada and the Dink) diff --git a/xmas/xmas.mk b/xmas/xmas.mk new file mode 100644 index 0000000..8dcc333 --- /dev/null +++ b/xmas/xmas.mk @@ -0,0 +1,5 @@ +PLAIN += $(wildcard xmas/*) + +XMAS_IMAGES = $(wildcard xmas/*/*.jpg) +XMAS_IMAGES_SC = $(patsubst %.jpg, %-sm.jpg, $(XMAS_IMAGES)) +IMAGES += $(XMAS_IMAGES) $(XMAS_IMAGES_SC)