summaryrefslogtreecommitdiff
path: root/Makefile
blob: e45f2200002fac1bd57cc065445c82bd634044e2 (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: pad-export-superteam $(ARTICLES:%=pad-export-%)
  28. pad-export-superteam: ref.bib
  29. hedgedoc export --md 8krqOrqnR0iAIExDTtTrxw $<
  30. perl -g -e 's/\s*\z/\n/' $<
  31. pad-export-learn: learn/index.qmd
  32. hedgedoc export --md CP1pFdg_QlGiYxtKc9IHBg $<
  33. perl -g -e 's/\s*\z/\n/' $<
  34. pad-export-code: code/index.qmd
  35. hedgedoc export --md 8QGRP0iTRwe7hFmoAX4QnA $<
  36. perl -g -e 's/\s*\z/\n/' $<
  37. pad-export-use: use/index.qmd
  38. hedgedoc export --md aFt_nNkYTQibl0CQrBJhtQ $<
  39. perl -g -e 's/\s*\z/\n/' $<
  40. $(ARTICLES:%=pad-import-%): pad-import-%:
  41. hedgedoc import $*/index.qmd
  42. pad-import-ref:
  43. hedgedoc import ref.bib
  44. tidy:
  45. bibclean -max-width 0 ref.bib > ref.bib~
  46. mv ref.bib~ ref.bib
  47. $(ARTICLES:%=screening-of-%): screening-of-%:
  48. QUARTO_LOG_LEVEL=quiet \
  49. quarto render $*/index.qmd --to man --output - | man -l -
  50. $(ARTICLES:%=wordcount-of-%): wordcount-of-%:
  51. QUARTO_LOG_LEVEL=quiet \
  52. quarto render $*/index.qmd --to plain --columns=9999 --output - \
  53. | perl -nE 'next if /^-*$$/; $$bilag += $$_ eq "Bilag 1\n"; $$chars += length unless $$bilag; END { say $$chars }'
  54. $(ARTICLES:%=turtle-from-%): turtle-from-%: _site/%/index.pdf
  55. @bin/xmp2rdfxml _site/$*/index.pdf \
  56. | rapper -i rdfxml -o turtle - $(BASE_IRI)$*/
  57. $(ARTICLES:%=dotgraph-from-%): dotgraph-from-%: _site/%/index.pdf
  58. @bin/xmp2rdfxml _site/$*/index.pdf \
  59. | rapper -i rdfxml -o dot - $(BASE_IRI)$*/