Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: myr (myr@terminal.pink)
Date: Thu Feb 13 20:14:17 2025 -0300
Parent: 5e69f1b
Updated dovel hook
diff --git a/aux.sh b/aux.sh
index 9e52a8e..b9ad39b 100755
--- a/aux.sh
+++ b/aux.sh
@@ -58,8 +58,6 @@ pagesummary() {
</nav>
<p><i>$(cat description)</i></p>
</center>
- <kbd>curl -O https://dovel.email/$1.tar.gz</kbd>
- <a style="float:right" href=/$1.tar.gz filename=$1.tar.gz>tar.gz</a>
EOF
}
diff --git a/post-receive b/post-receive
index dea5297..ca3d716 100755
--- a/post-receive
+++ b/post-receive
@@ -21,6 +21,11 @@ updategit() {
mailing lists. Its hooks are in the scripts repo. Please read the next
sections before making a contribution.
+ <p>
+ To clone a repository use <kbd><b>git clone https://dovel.email/[repo]</b></kbd>,
+ changing [repo] by the name you want.
+ </p>
+
<h2>Repositories</h2>
<dl>
EOF
@@ -71,9 +76,6 @@ updategit() {
}
updateindex() {
- echo "creating archive"
- tar -C "$OUT" -cz "$TMP" --xform="s/$TMP/$REPO/" > "$OUT.tar.gz"
-
echo "creating index.html"
cat <<- EOF > "$OUT/index.html"
$(pagehead "$REPO")
@@ -302,3 +304,4 @@ do
done
rm -rf "$TMP"
+git update-server-info
diff --git a/receive-dovel.email b/receive-dovel.email
index 6d3a1db..700c140 100755
--- a/receive-dovel.email
+++ b/receive-dovel.email
@@ -6,21 +6,39 @@ echo "reading aux file"
inbox() {
cat <<- EOF
$(pagehead dovel)
- <h2>mail</h2>
+
+ <h2>Mailling list</h2>
+ This is the one and only mailling list for the Dovel project, all repos
+ use this and old mail is also here.
+
+ <h2>Instructions</h2>
+ To send contributions use <kbd>REPO@dovel.email</kbd> format,
+ i.e. to contribute to the server project send email to server
+ _AT_ dovel.email, with the subject you want, maybe git will
+ create a line for you. Please CC me as well so I can reply
+ faster: dovel _AT_ terminal.pink.
+
+ <h3>Replying</h3>
+ To send email to an ongoing conversation simply use the same
+ address and subject, do not append "Re:" to the subject.
+
+ <h3>More info</h3>
+ See <a href=git.html>our git</a> page.
+
+ <hr>
+
+ <h2>Mail</h2>
EOF
ls -ogdt --time-style long-iso "$root/mail/"* | while read -r g x s d t f
do
[ -d "$f" ] || continue
-
f="$(basename "$f")"
name="$(echo "$f" | base64 -d)"
- qty="$(ls -1 "$root/mail/$f" | wc -l)"
cat <<- EOF
<p>
<a href="mail/$f.html">$name</a>
<small>$t $d</small><br>
- <i>$qty emails</i>
</p>
EOF
done
@@ -96,15 +114,15 @@ save() {
done
eid="${eid:-$(date -Iseconds)}"
echo "email from $from to $to about $subj"
- subj="$(echo "$subj | base64)"
+ dir="$(echo "$to:$subj" | base64)"
# now the rest is a body
cat - > /dev/null
# move temp file
echo "moving mbox file"
- [ -d "$root/mail/$subj" ] || mkdir -p "$root/mail/$subj"
- mv "$tmp" "$root/mail/$subj/$eid.mbox"
+ [ -d "$root/mail/$dir" ] || mkdir -p "$root/mail/$dir"
+ mv "$tmp" "$root/mail/$dir/$eid.mbox"
# create html pages
echo "creating html pages"
@@ -112,7 +130,7 @@ save() {
emails > "$root/mail/$subj.html"
}
-root="$HOME/www/dovel.email"
+root="$HOME/dovel.email"
# copy to temp file
tmp="$(mktemp)"