[git] gnupg-doc - branch, master, updated. 2f320018cc0c255a11e15609632b7e1b4d381d2f

by Werner Koch cvs at cvs.gnupg.org
Tue Jan 2 11:20:28 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, master has been updated
       via  2f320018cc0c255a11e15609632b7e1b4d381d2f (commit)
      from  4e3196a2172dc037fe8889bd21d50115e5a02663 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2f320018cc0c255a11e15609632b7e1b4d381d2f
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jan 2 11:15:36 2018 +0100

    build: Also render the gnupg.org as plain text.
    
    * web/share/gpgweb.el (gpgweb-faq-to-txt): New.
    * tools/build-website.sh: Call new function.
    --
    
    We had to do this in the past manually and it was oftne forgooten
    which led to some confusion.

diff --git a/tools/build-website.sh b/tools/build-website.sh
index 2f8ceb9..6e2842d 100755
--- a/tools/build-website.sh
+++ b/tools/build-website.sh
@@ -163,7 +163,8 @@ else
   --eval "(gpgweb-setup-project)" \
   --eval "(org-publish-initialize-cache \"gpgweb\")" \
   --eval "(message \"root=(%s)\" gpgweb-root-dir)" \
-  --eval "(org-publish \"gpgweb\" t nil)"
+  --eval "(org-publish \"gpgweb\" t nil)" \
+  --eval "(gpgweb-faq-to-txt \"gnupg-faq.org\")"
 
   echo "$rev" > ${revlastfile}
   sync_web=${stage_dir}/${subdir}
diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
index 6539206..2651c35 100644
--- a/web/share/gpgweb.el
+++ b/web/share/gpgweb.el
@@ -478,6 +478,23 @@ to create the previous and Next links for an entry."
                            nil))
 
 
+(defun gpgweb-faq-to-txt (faqfile)
+  "Render FAQFILE as text.  FAQFILE is assumed to be in web/faq.
+Note that the HTML rendering is done as part of the gpgweb-org-to-html"
+  (interactive "sFAQ orgfile: ")
+  (let* ((file (concat gpgweb-root-dir "faq/" faqfile))
+         (visitingp (find-buffer-visiting file))
+         (work-buffer (or visitingp (find-file-noselect file))))
+    (with-current-buffer work-buffer
+      (setq default-directory (concat gpgweb-stage-dir "faq"))
+      (make-directory default-directory t)
+      (toggle-read-only 0)
+      (org-ascii-export-to-ascii nil nil nil nil '(:ascii-charset utf-8))
+      (basic-save-buffer))
+    (unless visitingp
+          (kill-buffer work-buffer))))
+
+
 (defun gpgweb-render-blog (&optional filelist)
   "Turn the current buffer which has an org-mode blog entry into its
 rendered form and save it with the suffix .html."
@@ -508,7 +525,6 @@ rendered form and save it with the suffix .html."
         (unless visitingp
           (kill-buffer work-buffer))))))
 
-
 (defun gpgweb-upload ()
   "We don't do an upload directly.  Instead we only print the
 commands to do that.  In reality a cron jobs syncs the stage dir."

-----------------------------------------------------------------------

Summary of changes:
 tools/build-website.sh |  3 ++-
 web/share/gpgweb.el    | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list