aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: d3677b270be6b7e0f4b347d61b4daee4b5e7b98c (plain)
  1. SSH_HOST = www-ruc@xayide.jones.dk
  2. SSH_BASE_PATH = public_websites/thoughtroam.abcde.../
  3. BASE_SSH = $(SSH_HOST):$(SSH_BASE_PATH)
  4. BASE_IRI = https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/
  5. ARTICLES = learn code use
  6. export HEDGEDOC_COOKIES_FILE = $(CURDIR)/cookies.txt
  7. export HEDGEDOC_SERVER = https://pad.degrowth.net/
  8. all: preview
  9. preview:
  10. quarto preview
  11. render:
  12. quarto render
  13. publish:
  14. rsync -avH --delete-after _site/ $(BASE_SSH)
  15. cal-all: cal-fetch cal-render cal-publish
  16. cal-fetch:
  17. bin/cal-fetch.sh
  18. cal-render:
  19. bin/cal-publish.sh
  20. cal-publish:
  21. ssh $(SSH_HOST) mkdir -p $(SSH_BASE_PATH)events/
  22. rsync -avH --delete-after $(patsubst %,events/%,$(ARTICLES) superteam) $(BASE_SSH)events/
  23. pad-login:
  24. hedgedoc login --email
  25. pad-list:
  26. hedgedoc history
  27. pad-export-all: $(ARTICLES:%=pad-export-%)
  28. pad-export-learn:
  29. hedgedoc export --md /CP1pFdg_QlGiYxtKc9IHBg learn/index.qmd
  30. pad-export-code:
  31. hedgedoc export --md /8QGRP0iTRwe7hFmoAX4QnA code/index.qmd
  32. pad-export-use:
  33. hedgedoc export --md /aFt_nNkYTQibl0CQrBJhtQ code/index.qmd
  34. $(ARTICLES:%=pad-import-%): pad-import-%:
  35. hedgedoc import $*/index.qmd
  36. tidy:
  37. bibclean -max-width 0 ref.bib > ref.bib~
  38. mv ref.bib~ ref.bib
  39. $(ARTICLES:%=screening-of-%): screening-of-%:
  40. QUARTO_LOG_LEVEL=quiet \
  41. quarto render $*/index.qmd --to man --output - | man -l -
  42. $(ARTICLES:%=wordcount-of-%): wordcount-of-%:
  43. QUARTO_LOG_LEVEL=quiet \
  44. quarto render $*/index.qmd --to plain --columns=9999 --output - \
  45. | perl -nE 'next if /^-*$$/; $$bilag += $$_ eq "Bilag 1\n"; $$chars += length unless $$bilag; END { say $$chars }'
  46. $(ARTICLES:%=turtle-from-%): turtle-from-%: _site/%/index.pdf
  47. @bin/xmp2rdfxml _site/$*/index.pdf \
  48. | rapper -i rdfxml -o turtle - $(BASE_IRI)$*/
  49. $(ARTICLES:%=dotgraph-from-%): dotgraph-from-%: _site/%/index.pdf
  50. @bin/xmp2rdfxml _site/$*/index.pdf \
  51. | rapper -i rdfxml -o dot - $(BASE_IRI)$*/