summaryrefslogtreecommitdiff
path: root/Justfile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-31 15:15:50 +0300
committerPaul Buetow <paul@buetow.org>2025-08-31 15:15:50 +0300
commit114379d591fbbf6afeb649521be0a1aab2bbd3aa (patch)
tree6a9d206b375b518c7cf6de70f0733630eafcfbcd /Justfile
parentc508f9b24be667d5d078034b4d4e7bb07b28da69 (diff)
Implement REVIEW.md suggestions:\n- Simplify gemfeed detection in Aggregator\n- Make log globs configurable for Logreader\n- Remove debug-only imports; add comments\n- Add HTML::Entities usage; document deps\n- Add tests under t/ and make script require-safe\n- Add .perltidyrc and Justfile; add dev tasks\n- Update README and REVIEW with changes
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..64c2242
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,26 @@
+set shell := ["bash", "-cu"]
+
+# Format Perl code using perltidy (uses .perltidyrc)
+format:
+ perltidy foostats.pl
+
+# Run tests via prove if available, otherwise fallback to perl runner
+test:
+ if command -v prove >/dev/null 2>&1; then \
+ prove -lr t; \
+ else \
+ for f in t/*.t; do echo "== $$f =="; PERL5LIB=. perl "$$f" || exit 1; done; \
+ fi
+
+# Syntax check
+check:
+ perl -c foostats.pl
+
+clean:
+ find . -type f \( -name "*.bak" -o -name "*~" -o -name ".#*" \) -print0 | xargs -0r rm -f
+
+# Generate Gemtext and HTML reports into local directories from local stats
+reports:
+ mkdir -p out_gmi out_html
+ perl foostats.pl --report --stats-dir stats --output-dir out_gmi --html-output-dir out_html
+ echo "Generated Gemtext in out_gmi and HTML in out_html"