Compare commits
3 Commits
c1ccd1b465
...
2ec92d2dee
Author | SHA1 | Date | |
---|---|---|---|
|
2ec92d2dee | ||
|
dc929f199e | ||
|
82b4976efb |
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ html/
|
||||
**/.*/
|
||||
**/*.jpg/
|
||||
**/*.png/
|
||||
**/*.upload-checksum
|
||||
|
1351
html/xm.js
1351
html/xm.js
File diff suppressed because it is too large
Load Diff
@ -39,7 +39,7 @@ for title in sorted(artciles.keys(), key=lambda a: artciles[a]["metadata"].get("
|
||||
article = artciles[title]
|
||||
metadata = article["metadata"]
|
||||
page += (
|
||||
f"""[{metadata.get("Title", "No title given! What a clusterfuck!")}](/articles/{article}.html)\n\n"""
|
||||
f"""[{metadata.get("Title", "No title given! What a clusterfuck!")}](/articles/{title}.html)\n\n"""
|
||||
f""">{metadata.get("Brief", "")}\n\n"""
|
||||
)
|
||||
|
||||
|
11
upload.sh
11
upload.sh
@ -1,12 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# todo: Create local cache containing file timestamps that were previously uploaded.
|
||||
|
||||
for cur in ./html/{*,*/*,*/*/*}; do
|
||||
if [[ "$cur" == *"/tracks/"* ]]; then
|
||||
if [ -f "$cur" ] && [[ ! "$cur" == *.upload-checksum ]]; then
|
||||
if [ -f "$cur.upload-checksum" ]; then
|
||||
c=$(cat "$cur.upload-checksum" | sha256sum -c 2> /dev/null)
|
||||
if [[ "$c" == *OK ]]; then
|
||||
echo "$cur is up-to-date, skipping"
|
||||
continue
|
||||
fi
|
||||
if [ -f "$cur" ]; then
|
||||
fi
|
||||
echo $(sha256sum "$cur") > "$cur.upload-checksum"
|
||||
d=$(dirname $(realpath --relative-to="./html" "$cur"))
|
||||
if [[ "$d" == "." ]]; then
|
||||
neocities upload $cur
|
||||
|
Loading…
Reference in New Issue
Block a user