From 29a0b81f92c84543fc18791d2f36d52f99c6ea22 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Sep 2021 01:18:26 +0530 Subject: README: Add a Download section using a dynamic block. In addition, we link to the GitHub repo in this new Download section rather than in the Contributing section. * README.org (download): Add dynamic block. (Contributing): Delete github-link dynamic block. * build-aux/build-home-page.el (org-dblock-write:github-link): Delete function. (org-dblock-write:download): New function. --- README.org | 6 +++--- build-aux/build-home-page.el | 28 +++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index 450553f..5afde36 100644 --- a/README.org +++ b/README.org @@ -11,6 +11,9 @@ ccwl is a compiler to generate CWL workflows from concise descriptions in ccwl. In the future, ccwl will also have a runtime whereby users can interactively execute workflows while developing them. +#+BEGIN: download +#+END: + * Documentation [[https://ccwl.systemreboot.net/manual/dev/en/][Documentation for ccwl]] is available online. If ccwl is installed on @@ -20,9 +23,6 @@ introduction to ccwl. * Contributing -#+BEGIN: github-link -#+END: - Feedback, suggestions, feature requests, bug reports and pull requests are all welcome. Unclear and unspecific error messages are considered a bug. Do report them! diff --git a/build-aux/build-home-page.el b/build-aux/build-home-page.el index caad516..f83438c 100644 --- a/build-aux/build-home-page.el +++ b/build-aux/build-home-page.el @@ -34,11 +34,33 @@ org-html-head-include-scripts nil org-html-postamble nil) -(defun org-dblock-write:github-link (params) - "Dynamically write github-link block." - (insert "ccwl is developed on [[https://github.com/arunisaac/ccwl][GitHub]].")) +(defun org-dblock-write:download (params) + "Dynamically write download block." + (insert "* Download + +Download release tarballs. + +") + (call-process "git" nil t nil + "for-each-ref" "--sort=-taggerdate" + (let ((release-file "./releases/ccwl-%(refname:short).tar.lz")) + (format "--format=- %%(taggerdate:short) [[%s][%s]] [[%s.asc][GPG Signature]]" + release-file + (file-name-nondirectory release-file) + release-file)) + "refs/tags/v*") + (insert " +Download [[https://systemreboot.net/files/misc/arunisaac.pub][public signing key]]. + +Browse the [[https://github.com/arunisaac/ccwl][development version]] of ccwl hosted on GitHub.") + ;; Fix tarball filenames. + (replace-string "ccwl-v" "ccwl-" nil nil nil t)) (defun build-website () (with-current-buffer (find-file "README.org") (org-update-all-dblocks) + ;; Unfortunately, org is unable to handle headlines inside dynamic + ;; blocks. So, dissolve the download dynamic block. + (replace-string "#+BEGIN: download" "") + (replace-string "#+END:" "") (org-export-to-file 'html "website/index.html"))) -- cgit v1.2.3