summaryrefslogtreecommitdiff
path: root/Makefile
blob: b5b2756d9372efd9d888fcbce93e5b460cfb2cfa (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-%) pad-export-code-gantt
  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-code-gantt: code/_gantt.qmd
  38. hedgedoc export --md mJnfBHZ7Qr2W1Hu-QppL8A $<~
  39. bin/hedgedoc2quarto.sh < $<~ > $<
  40. rm -f $<~
  41. pad-export-use: use/index.qmd
  42. hedgedoc export --md aFt_nNkYTQibl0CQrBJhtQ $<
  43. perl -g -e 's/\s*\z/\n/' $<
  44. $(ARTICLES:%=pad-import-%): pad-import-%:
  45. hedgedoc import $*/index.qmd
  46. pad-import-ref:
  47. hedgedoc import ref.bib
  48. tidy:
  49. bibclean -max-width 0 ref.bib > ref.bib~
  50. mv ref.bib~ ref.bib
  51. $(ARTICLES:%=screening-of-%): screening-of-%:
  52. QUARTO_LOG_LEVEL=quiet \
  53. quarto render $*/index.qmd --to man --output - | man -l -
  54. $(ARTICLES:%=wordcount-of-%): wordcount-of-%:
  55. QUARTO_LOG_LEVEL=quiet \
  56. quarto render $*/index.qmd --to plain --columns=9999 --output - \
  57. | perl -nE 'next if /^-*$$/; $$bilag += $$_ eq "Bilag 1\n"; $$chars += length unless $$bilag; END { say $$chars }'
  58. $(ARTICLES:%=turtle-from-%): turtle-from-%: _site/%/index.pdf
  59. @bin/xmp2rdfxml _site/$*/index.pdf \
  60. | rapper -i rdfxml -o turtle - $(BASE_IRI)$*/
  61. $(ARTICLES:%=dotgraph-from-%): dotgraph-from-%: _site/%/index.pdf
  62. @bin/xmp2rdfxml _site/$*/index.pdf \
  63. | rapper -i rdfxml -o dot - $(BASE_IRI)$*/