blob: 6a2651066a666a3dcbd6686bf44feed0795f070b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# simple date to RFC date:
# date -j -f "%Y-%m-%d" -R 2020-10-29
all:
echo done.
serve:
python3.7 -m http.server 3000
resume:
echo unimplemented!
post:
@read -p "Title: " TITLE; \
read -p "Category: " CATEGORY; \
SHORT_DATE=`date +"%Y-%m-%d"`; \
LONG_DATE=`date -R`; \
mkdir -p posts/$$category; \
FILENAME=posts/$$category/`date +"%Y-%m-%d-"``echo $$title | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \
$$EDITOR $$FILENAME; \
sed -i .bak '5 a\
<item> <title>$$TITLE</title> <link>https://www.53hor.net/$$FILENAME</link> <guid>https://www.53hor.net/$$FILENAME</guid> <pubDate>$$LONG_DATE</pubDate> </item>
' rss.xml
|