init yay
[pb.git] / pb
1 #!/bin/sh
2
3 # pinosaur's blog script
4
5 blog_index_file="blogindex.html"
6 rolling_file="rolling.html"
7 blog_template_file="template.html"
8 data_dir="blog"
9
10 [ ! -z "$EDITOR" ] && EDITOR="vim"
11
12
13 init() {
14     echo 1
15 }
16
17 purge() {
18     echo 1
19 }
20
21 new() {
22     echo 1
23 }
24
25 publish() {
26     echo 1
27 }
28
29 delete() {
30     echo 1
31 }
32
33 # check to see if all required files are present
34 [ -f $blog_index_file ] || echo "missing $blog_index_file"
35 [ -f $rolling_file ] || echo "missing $rolling_file"
36 [ -f $blog_template_file ] || echo "missing $blog_template_file"
37
38 # possibly also check to see if index and rolling have the proper headers
39
40
41 # check if blog dir exists
42 [ ! -d $data_dir ] && echo "initing blog" && mkdir -p "$data_dir/drafts" \
43     && touch "$data_dir/database" 
44
45 case $1 in
46     i|init) echo "init";;
47     n|new) echo "new";;
48     p|publish) echo "publish";;
49     d|delete) echo "delete";;
50     D|purge) echo "purge";;
51     *) echo "helper";;
52 esac
53