1 # set url to upload
 2 ftp_url = ftp://user:pass@server.org/html/toju/
 3 # set titles of pages
 4 
 5 index_title = Timo, Jonas, Judith und Toni Gartmann - Cathomen's Familien Seite
 6 miar_title = ueber ues - Gartmann - Cathomen's Familia Sita
 7 wohnend_title = so wohnend mier - bi ues und Chur  - Familie Gartmann's Web Sita
 8 wohnend_de_title = so wohnen wir - bei uns in Chur - Familie Gartmanns's Web Seite
 9 feria_title = feriebildli und bericht - TJJT Gartmann 's Familia Sita
10 feria_de_title = ferienbilder und berichte - TJJT Gartmann - Cathomen's Familien Seite
11 verschiedenes_title = verschiedenes - Timo, Jonas, Judith und Toni Gartmann - Cathomen's Familien Seite
12 kontakt_title = kontakt zu ues - Timo, Jonas, Judith und Toni Gartmann - Cathomen's Familien Seite
13 
14 # basic files
15 files =
16     toju.css
17     index.htm
18     navigation.htm
19     miar.html
20     miar_de.html
21     wohnend.html
22     feria.html
23     feria_de.html
24     verschiedenes.html
25     kontakt.php
26     favicon.ico
27 
28 
29 bilder =
30 :tree bilder { skipdir = AAPDIR|zzz }  # no AAPDIR/... nor zzz/.. files
31    bilder += $name
32 
33 gaestebuch =
34 :tree gaestebuch { skipdir = AAPDIR }
35    gaestebuch += $name
36 
37 
38 cwd = `os.getcwd()`
39 :rule %.html : $cwd/htmlbegin.part
40                %.part
41                $cwd/htmlend.part
42 
43     tmpstring = _no.$(match)_title # is there a title for that page set?
44     @try:
45     @  title = eval( tmpstring )
46     @except KeyError:
47     @  title = ""
48     :cat $source | :eval string.replace(stdin,
49            '@TITLE@', title) >!  $(target)   # replace @TITLE@ with according title
50 
51 :attr { publish = $(ftp_url)%file% } $files $bilder $gaestebuch
52 
53 # move kontakt.html to kontakt.php because there is some php code inside.
54 # additionally replace the <?xml statement with an php echo one, because
55 # on my server <? gets also treated as php what won't work with <?xml..
56 
57 kontakt.php : kontakt.html
58     @import sre
59     :cat $(source) | :eval sre.sub('<\?xml.*',
60         '<?php  echo \'<?xml version="1.0" encoding="iso-8859-1" ?>\'; ?>\n',
61         stdin) >! $target
62 
63 all : $files
64     :publish $files $bilder $gaestebuch
65 
66 gall {virtual}:      #special target for publishing the gallery
67     :tree gallery { skipdir = AAPDIR|original_bilder }
68         :attr { signfile = $cwd/AAPDIR/gallery_sign } $name
69         :attr { publish = $(ftp_url)%file% } $name
70         :publish $name