diff --git a/2015/demot/tim/d#_docker.org b/2015/demot/tim/d#_docker.org index 02daf5d33190cef4b593f51b2b0e2d276ba1c61a..9ee048326b9df0a23cebd7c7bc4d687c1c283ce5 100644 --- a/2015/demot/tim/d#_docker.org +++ b/2015/demot/tim/d#_docker.org @@ -1,4 +1,9 @@ +# -*- mode:org; coding:utf-8; -*- + #+title: Demo 📦 +#+language: fi +#+HTML_HEAD: <link rel="stylesheet" href="itka203_demo_custom.css" type="text/css" /> + Docker esimerkkinä, eli pienen kuvatiedoston luominen ja kontin käynnistys. @@ -318,3 +323,127 @@ add procps~ [fn:1] Hyvä idea, mutta ei, sinun ei kannata käyttää tätä terminaalia normaaliin käyttöön, vain ylläpitäjän toimiin! + + +* COMMENT Aputyökalut :noexport: +# (setq org-confirm-babel-evaluate nil) + +#+BEGIN_SRC elisp + (defun my-push-zip-scp-pop (pplist) + (shell-command "pushd /tmp && zip -v -r itka203-org.zip itka203/* && scp itka203-org.zip itka203.it.jyu.fi:itka203-org-2025.zip && popd")) + + (defun rsync-html (pplist) + (let ((bdir (plist-get pplist :publishing-directory))) + (shell-command + (concat "rsync -aq -- " bdir "*.html " ; -e 'ssh -J nazrat.it.jyu.fi' + "itka203.it.jyu.fi:/var/www/html/demovedokset/p/")))) + + + ;;; tehdään sitten joskus fiksummin + (defun rsync-img (pplist) + (let ((bdir (plist-get pplist :base-directory))) + (shell-command + (concat "rsync -aq -- " bdir "*.png " + "itka203.it.jyu.fi:/var/www/html/demovedokset/p/")))) + ; *.jpg " + + + (setq org-confirm-babel-evaluate nil) + ;; (setq org-latex-packages-alist '(("" "tikz"))) + (setq org-publish-project-alist + (list + `("itka203-org" + :language "fi" + :base-directory ,default-directory + :base-extension "org" + :publishing-directory "/tmp/itka203/" ;;; ,(concat default-directory "pub/") ;; "/ssh:user@host:~/html/notebook/" + :publishing-function org-html-publish-to-html; (org-html-publish-to-tufte-html + + ;;; org-latex-publish-to-pdf + ;;; org-org-publish-to-org + ;) + :exclude "*" ;;; <- KLUDGE "itka203-[ihl].*\.org" ;; regexp + :include "d#_docker.html" ;;; <- KLUDGE + :html-html5-fancy t + :html-doctype "html5" + :html-validation-link nil + :with-timestamp t + :with-toc t + :with-author nil + :with-creator nil + :with-email nil + :html-head "<link rel=\"stylesheet\" href=\"itka203_demo_custom.css\" type=\"text/css\" />" + :headline-levels 3 + :section-numbers nil + :auto-sitemap nil + :sitemap-title "Sivuston sivut" + :sitemap-ignore-case t + ;; :style "<link rel=\"stylesheet\" + ;; href=\"../other/mystyle.css\" type=\"text/css\"/>" + :html-preamble nil + ;; :completion-function my-push-zip-scp-pop + :completion-function rsync-html + ) + + `("itka203-images" + :base-directory ,default-directory + :base-extension "jpg\\|png" + :publishing-directory "/tmp/itka203/" ;; ,(concat default-directory "pub/") ;; "/ssh:user@host:~/html/images/" + :publishing-function org-publish-attachment + :completion-function rsync-img + ;; :completion-function (lambda () (shell-command + ;; (concat "rsync -av /tmp/itka203/*.png /tmp/itka203/*.jpg " + ;; "halava.cc.jyu.fi:www/opetus/itka203/" + ;; ;; "itka203.it.jyu.fi:kurssit/itka203/html/" + ;; ;; "/tmp/www-itka203/" + ;; ))) + ) + + `("itka203-html" + :language "fi" + :base-directory ,default-directory + :publishing-directory "/tmp/itka203-html/" + :publishing-function org-html-publish-to-html ; ox-slimhtml-publish-to-html + :exclude "*" ;;; KLUDGE "itka203-[ihl].*\.org" ;; regexp + :include "d#_docker.html" ;;; KLUDGE + :html-html5-fancy t + :html-doctype "html5" + :html-validation-link nil + :with-timestamp t + :with-toc t + :with-author nil + :with-creator nil + :with-email nil + :html-head-include-default-style nil + :html-head "<link id=\"hed\" rel=\"stylesheet\" href=\"itka203_demo_custom.css\" type=\"text/css\" />" + #:style "<link id=\"sty\" rel=\"stylesheet\" href=\"css/tufte.css\" type=\"text/css\" />" + :headline-levels 3 + :section-numbers nil + :auto-sitemap nil + :sitemap-title "Sivuston sivut" + :sitemap-ignore-case t) + ;; (list "itka203-esimerkki" + ;; :base-directory (concat default-directory "itka203-esimerkki/") + ;; :recursive t + ;; :base-extension "html\\|jpg\\|png\\|wmf\\|txt\\|xml\\|htaccess" + ;; :publishing-directory "/tmp/itka203/itka203-esimerkki/" ;; (concat default-directory "pub/itka203-esimerkki/") + ;; :publishing-function 'org-publish-attachment + ;; ;; :completion-function #'(lambda () (shell-command + ;; ;; (concat "rsync -av /tmp/itka203/itka203-esimerkki/* " + ;; ;; "halava.cc.jyu.fi:www/opetus/itka203/itka203-esimerkki" + ;; ;; ;; "/tmp/www-itka203/itka203-esimerkki/" + ;; )))) + ;; ("other" + ;; :base-directory "~/other/" + ;; :base-extension "css\\|el" + ;; :publishing-directory "/ssh:user@host:~/html/other/" + ;; :publishing-function org-publish-attachment) + '("itka203" :components ("itka203-org" "itka203-images")) ; "itka203-esimerkki" )) + )) +#+END_SRC + +#+RESULTS: +| itka203-org | :language | fi | :base-directory | /Users/ji/Documents/opetus/itka203-kurssimateriaali-avoin/2015/demot/tim/ | :base-extension | org | :publishing-directory | /tmp/itka203/ | :publishing-function | org-html-publish-to-html | :exclude | * | :include | d#_docker.html | :html-html5-fancy | t | :html-doctype | html5 | :html-validation-link | nil | :with-timestamp | t | :with-toc | t | :with-author | nil | :with-creator | nil | :with-email | nil | :html-head | <link rel="stylesheet" href="itka203_demo_custom.css" type="text/css" /> | :headline-levels | 3 | :section-numbers | nil | :auto-sitemap | nil | :sitemap-title | Sivuston sivut | :sitemap-ignore-case | t | :html-preamble | nil | :completion-function | rsync-html | +| itka203-images | :base-directory | /Users/ji/Documents/opetus/itka203-kurssimateriaali-avoin/2015/demot/tim/ | :base-extension | jpg\ | png | :publishing-directory | /tmp/itka203/ | :publishing-function | org-publish-attachment | :completion-function | rsync-img | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +| itka203-html | :language | fi | :base-directory | /Users/ji/Documents/opetus/itka203-kurssimateriaali-avoin/2015/demot/tim/ | :publishing-directory | /tmp/itka203-html/ | :publishing-function | org-html-publish-to-html | :exclude | * | :include | d#_docker.html | :html-html5-fancy | t | :html-doctype | html5 | :html-validation-link | nil | :with-timestamp | t | :with-toc | t | :with-author | nil | :with-creator | nil | :with-email | nil | :html-head-include-default-style | nil | :html-head | <link id="hed" rel="stylesheet" href="itka203_demo_custom.css" type="text/css" /> | style | <link id="sty" rel="stylesheet" href="css/tufte.css" type="text/css" /> | :headline-levels | 3 | :section-numbers | nil | :auto-sitemap | nil | :sitemap-title | Sivuston sivut | :sitemap-ignore-case | t | | | +| itka203 | :components | (itka203-org itka203-images) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diff --git a/tools_for_authors/julkaise_vedokset.sh b/tools_for_authors/julkaise_vedokset.sh index 9a89801c11724e7bde1942ed09d6182773f30abd..31afb8f92114d92d282adf64dc8817edbe99efa6 100644 --- a/tools_for_authors/julkaise_vedokset.sh +++ b/tools_for_authors/julkaise_vedokset.sh @@ -40,4 +40,10 @@ do rst2html --language=fi --stylesheet=html4css1.css,tools_for_authors/itka203_demo_custom.css $f > $DESTDIR/$destname echo "<a href=\"$destname\"> $destname </a> <br />" >> $DESTDIR/index.html done + +# KLUDGE +emacs --batch --eval "(require 'org)" d\#_docker.org --funcall org-html-export-to-html +mv d\#_docker.html > $DESTDIR/ +echo "<a href=\"d#_docker.html\"> d#_docker.html </a> <br />" >> $DESTDIR/index.html + echo "</p></body></html>" >> $DESTDIR/index.html