1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-30 15:22:09 +00:00

Compare commits

..

No commits in common. "afcc4fd760329a08e9c4f7be46f9610540b125b2" and "59d2bddade15ef2ce498a934a359c1d493ab6d16" have entirely different histories.

5 changed files with 26 additions and 23 deletions

View file

@ -16,9 +16,8 @@ OUTPUT_DIR = public
SSHFLAGS = -o KexAlgorithms=sntrup761x25519-sha512@openssh.com SSHFLAGS = -o KexAlgorithms=sntrup761x25519-sha512@openssh.com
RSYNCFLAGS += -rlpcv --zc=zstd --zl=6 --skip-compress=gz/br/zst/png/webp/jpg/avif/jxl/mp4/mkv/webm/opus/mp3/gif/ico -e "ssh $(SSHFLAGS)" --chmod=D755,F644 RSYNCFLAGS += -rlpcv --zc=zstd --zl=6 --skip-compress=gz/br/zst/png/webp/jpg/avif/jxl/mp4/mkv/webm/opus/mp3/gif/ico -e "ssh $(SSHFLAGS)" --chmod=D755,F644
RSYNCFLAGS_EXTRA ?= RSYNCFLAGS_EXTRA ?=
# compression gets slow for extreme levels like the old "70109". # compression gets slow for extreme levels like the old "70109"
# Diminishing returns after level 6; sometimes even larger files. ECT_LEVEL=9
ECT_LEVEL=6
csv/webrings.csv: csv/webrings.csv:
sh scripts/populate-webrings.sh sh scripts/populate-webrings.sh
@ -32,14 +31,14 @@ hugo: csv/webrings.csv $(SRCFILES)
# .hintrc-local for linting local files # .hintrc-local for linting local files
# same as regular .hintrc but with a different connector. # same as regular .hintrc but with a different connector.
.hintrc-local: .hintrc .hintrc-local: .hintrc
jaq --tab '.connector .name = "local" | del(.connector .options)' <linter-configs/hintrc >.hintrc-local jq --tab '.connector .name = "local" | del(.connector .options)' <linter-configs/hintrc >.hintrc-local
.hintrc-devserver: .hintrc .hintrc-devserver: .hintrc
jaq --tab '.extends = ["development"] | .hints["http-compression","https-only","ssllabs","sri"] = "off"' <linter-configs/hintrc >.hintrc-devserver jq --tab '.extends = ["development"] | .hints["http-compression","https-only","ssllabs","sri"] = "off"' <linter-configs/hintrc >.hintrc-devserver
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports mentions.json data/webmentions.json
.PHONY: lint-css .PHONY: lint-css
lint-css: $(CSS_DIR)/*.css lint-css: $(CSS_DIR)/*.css
@ -57,8 +56,8 @@ equal-access:
.PHONY: validate-json .PHONY: validate-json
validate-json: validate-json:
jaq -re '""' $(OUTPUT_DIR)/manifest.min.*.webmanifest 1>/dev/null jq -reM '""' $(OUTPUT_DIR)/manifest.min.*.webmanifest 1>/dev/null
jaq -re '""' $(OUTPUT_DIR)/webfinger.json 1>/dev/null jq -reM '""' $(OUTPUT_DIR)/webfinger.json 1>/dev/null
.PHONY: validate-html .PHONY: validate-html
validate-html: validate-html:
@ -118,6 +117,15 @@ xhtmlize:
copy-to-xhtml: copy-to-xhtml:
find $(OUTPUT_DIR) -type f -name "*.html" -exec sh scripts/copy-file-to-xhtml.sh {} \; find $(OUTPUT_DIR) -type f -name "*.html" -exec sh scripts/copy-file-to-xhtml.sh {} \;
# save webmentions to a file, don't send yet
mentions.json: hugo
# gather old version of the site
# rsync $(RSYNCFLAGS) --exclude '*.gz' --exclude '*.br' --exclude '*.png' --exclude-from .rsyncignore $(WWW_RSYNC_DEST)/ old
static-webmentions -f mentions.json.unfiltered find
# filter the webmentions a bit; jq offers more flexibility than config.toml
jq '[ .[] | select(.Dest|test("https://(git.sr.ht/~seirdy/seirdy.one/log/master|seirdy.one|web.archive.org|archive.is|en.wikipedia.org|matrix.to|([a-z]*.)?reddit.com|github.com)") | not) ]' <mentions.json.unfiltered >mentions.json
rm mentions.json.unfiltered
.PHONY: deploy-html .PHONY: deploy-html
deploy-html: deploy-html:
rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete

View file

@ -6,11 +6,11 @@ replyTitle: "“regular” expressions"
replyType: "SocialMediaPosting" replyType: "SocialMediaPosting"
replyAuthor: "Chjara" replyAuthor: "Chjara"
replyAuthorURI: "https://tuxcrafting.online/" replyAuthorURI: "https://tuxcrafting.online/"
syndicatedCopies: #syndicatedCopies:
- title: 'The Fediverse' # - title: 'The Fediverse'
url: 'https://pleroma.envs.net/notice/AZ8TzJQpYkHFYzw0CO' # url: ''
--- ---
De-facto standard extensions for recursion and variable-length look-arounds have existed for ages; the word "regular" in most regular-expression engines is there for historical reasons. I first read about this in {{<mention-work itemtype="TechArticle">}}{{<cited-work name="Apocalypse 5: Pattern Matching" extraName="headline" url="https://raku.org/archive/doc/design/apo/A05.html">}} by {{<indieweb-person itemprop="author" first-name="Larry" last-name="Wall" url="http://www.wall.org/~larry/">}}{{</mention-work>}} (he loves his biblical terminology). De-facto standard extensions for recursion and variable-length look-arounds have existed for ages; the word "regular" in most regular-expression engines is there for historical reasons. I first read about this in {{<mention-work itemtype="TechArticle">}}{{<cited-work name="Apocalypse 5: Pattern Matching" extraName="headline" url="https://raku.org/archive/doc/design/apo/A05.html">}} by {{<indieweb-person itemprop="author" first-name="Larry" last-name="Wall" url="http://www.wall.org/~larry/">}}{{</mention-work>}} (he loves his biblical terminology).
I _would_ like to just use Raku rules for a concise way to describe more advanced grammars; I'd then just keep my regexes to the PCRE subset that's common between Google's RE2 and the Rust regex crate. I doubt they're both "regular" but both guarantee linear time matching. Part of the reason I don't do this is portability. Not everything runs Raku, but almost every platform has [a regex engine with the features I need](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines). I _would_ like to just use Raku rules for a concise way to describe more advanced grammars; I'd then just keep my regexes to the PCRE subset that's common between Google's RE2 and the Rust regex crate; I doubt they're both "regular" but both guarantee linear time matching. Part of the reason I don't do this is portability. Not everything runs Raku, but almost every platform has [a regex engine with the features I need](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines).

View file

@ -649,12 +649,6 @@ whinge.town OR whinge.house
: [Ableist misogyny](https://web.archive.org/web/20230806223813/https://whinge.town/notice/AXq0Y0n2HDzVWsmOMi). : [Ableist misogyny](https://web.archive.org/web/20230806223813/https://whinge.town/notice/AXq0Y0n2HDzVWsmOMi).
: Both instances were set up by the same user ([confirmation 1](https://web.archive.org/web/20230806224027/https://whinge.house/notice/ARzsikv2kOK3V5JaWO), [confirmation 2](https://web.archive.org/web/20230806224027/https://freespeechextremist.com/notice/ARzRYo4L2sPkJv1E2a)), who mains on the former. : Both instances were set up by the same user ([confirmation 1](https://web.archive.org/web/20230806224027/https://whinge.house/notice/ARzsikv2kOK3V5JaWO), [confirmation 2](https://web.archive.org/web/20230806224027/https://freespeechextremist.com/notice/ARzRYo4L2sPkJv1E2a)), who mains on the former.
wideboys.org
: There used to be an instance on the "social" subdomain, but it shut down. However, there is still a WriteFreely instance on the "blog" subdomain. The instance on the "social" subdomain has been mostly superseded by beefyboys.win.
: On the root domain is [a wiki describing how this domain is affiliated with beefyboys.win](https://web.archive.org/web/20230827195937/https://wideboys.org/BEEFYBOYS.WIN). The [beefyboys.win "about" page](https://web.archive.org/web/20230827200822/https://beefyboys.win/about) confirms this.
: Since beefyboys.win is on FediNuke and wideboys.org is part of the same network with staff and member overlap, and wideboys.org still federates on the "blog" subdomain, it's on the list too. But since it only federates via WriteFreely at the time of writing, it looks like a smaller harassment vector so it's demoted to my tier-0 list.
{{</ nofollow >}} {{</ nofollow >}}
</details> </details>

View file

@ -52,15 +52,16 @@ run_validator() {
} }
validate_feed() { validate_feed() {
# silence "self reference doesn't match" because i'm testing a localhost copy.
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace (rel-mentioned).
rel_mention_string="Unregistered link relationship \($rel_mention_count occurrence" rel_mention_string="Unregistered link relationship \($rel_mention_count occurrence"
if [ "$rel_mention_count" = '1' ]; then if [ "$rel_mention_count" = '1' ]; then
rel_mention_string="Unregistered link relationship" rel_mention_string="Unregistered link relationship"
fi fi
full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value for atom:updated|Validating $url" # silence "self reference doesn't match" because i'm testing a localhost copy.
# 'should not contian" has a false positive triggered by ARIA
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace.
full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value|Validating $url"
run_validator \ run_validator \
| grep -Ev "$full_regex" | grep -Ev "$full_regex"

View file

@ -3,7 +3,7 @@
set -e -u set -e -u
root_dir="$(dirname "$0")/.." root_dir="$(dirname "$0")/.."
vnu_output="$(jaq --from-file "$root_dir/linter-configs/vnu_filter.jq")" vnu_output="$(jq --from-file "$root_dir/linter-configs/vnu_filter.jq")"
if [ "$vnu_output" = '' ]; then if [ "$vnu_output" = '' ]; then
echo "All markup is valid" echo "All markup is valid"
else else