浏览代码

first commit

Files for blog
Philip Wittamore 9 月之前
父节点
当前提交
513cdb6ceb
共有 5 个文件被更改,包括 80 次插入0 次删除
  1. 31 0
      blog/blogthis
  2. 13 0
      blog/bottom.html
  3. 6 0
      blog/middle.html
  4. 15 0
      blog/top.html
  5. 15 0
      blog/uph

+ 31 - 0
blog/blogthis

@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# create text, assemble html file, add to articles
+#requires package html-xml-utils for hxselext
+
+ROOT=/home/philip/src/web/wittamore.com
+
+cd $ROOT/.tmp
+TOP="top.html"
+BOTTOM="bottom.html"
+EDITFILE="middle.html"
+DATE=$(date +%Y-%m-%d)
+
+read -p "Enter title: " TITLE
+read -e -i "$DATE" -p "Enter date: " input
+
+ARTICLEDATE="${input:-$DATE}"
+YEAR=$(echo $ARTICLEDATE | cut -c 1-4)
+DEST="$ROOT/articles/$YEAR"
+
+echo "<h2>$TITLE</h2>" > $EDITFILE
+echo "<h5>$ARTICLEDATE</h5>" >> $EDITFILE
+
+micro $EDITFILE
+
+TITLE=${TITLE// /-}
+ARTICLE="$TITLE.html"
+ 
+cat $TOP $EDITFILE $BOTTOM > $ARTICLE
+mv $ARTICLE $DEST
+echo "saved as $DEST/$ARTICLE"

+ 13 - 0
blog/bottom.html

@@ -0,0 +1,13 @@
+    <!-- article end -->
+    <p>&nbsp;</p>
+    <hr>
+    <center>
+        A minimalist blog by
+        <a
+          href="mailto:%70%68%69%6C%69%70%40%77%69%74%74%61%6D%6F%72%65%2E%63%6F%6D"
+          >Philip Wittamore</a
+        >
+    </center>
+  </body>
+</html>
+

+ 6 - 0
blog/middle.html

@@ -0,0 +1,6 @@
+<h2>Marginalia search engine</h2>
+<h5>2023-12-18</h5>
+<p>Marginalia is an independent DIY search engine that focuses on non-commercial content, and attempts to show you sites you perhaps weren't aware of in favor of the sort of sites you probably already knew existed.</p>
+<p>
+<a href="https://search.marginalia.nu/">https://search.marginalia.nu</a>
+</p> 

+ 15 - 0
blog/top.html

@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <link rel="stylesheet" href="/style.css" />
+    <title>Bloggings</title>
+  </head>
+  <body>
+    <header>
+      <h1>Bloggings</h1>
+      <a href="/index.html">Home</a>
+      <hr>
+    </header>
+    <!-- article start -->

+ 15 - 0
blog/uph

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+rf=web:/var/www/wittamore.com
+mf=~/src/web/wittamore.com
+
+cd $mf
+
+files=$(find * -path .tmp -prune -o -mmin -60 -type f) 
+for file in $files 
+do
+   scp -r "$file" "$rf/$file"
+done
+
+exit 0
+