Created
June 8, 2011 19:05
-
-
Save iani/1015105 to your computer and use it in GitHub Desktop.
ORGMODE_PUBLISH_PROJECT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;======== Publish setup ========== | |
;; Shortcuts | |
;; 1) Open index.org file | |
(defun open-index-org () | |
"Open index.org file for website rsync" | |
(interactive) | |
(find-file "~/Dropbox/sites/orgFiles/index.org")) | |
(global-set-key (kbd "C-x M-w") 'open-index-org) | |
;; 2) Open configuration file | |
(defun open-configuration-file () | |
"Open configuration file" | |
(interactive) | |
(find-file "~/Dropbox/notes/config/html-publish-config.el")) | |
(global-set-key (kbd "M-W") 'open-configuration-file) | |
;; 3) Publish project locally for off-line viewing | |
(global-set-key [C-S-f6] 'org-publish-project-org-files-local) | |
(global-set-key [C-S-M-f6] 'org-publish-project-attachments-files-local) | |
;; 4) Publish project with paths for online site | |
(global-set-key [C-S-f7] 'org-publish-project-org-files-remote) | |
(global-set-key [C-S-M-f7] 'org-publish-project-attachments-files-remote) | |
;; 5) Upload site via rsync | |
(global-set-key [C-S-M-f8] 'upload-site-with-rsync) | |
(defun upload-site-with-rsync () | |
"send html files to bluehost with rsync" | |
(interactive) | |
(shell) | |
(insert-string "rsync -avz -e ssh ~/Dropbox/sites/htmlFiles/ [email protected]:~/public_html/tests") | |
) | |
(defun org-publish-project-org-files-local () | |
"publish project customize forcing export of all files" | |
(interactive) | |
(org-publish-project "org-files-publish-local" t)) | |
(defun org-publish-project-attachments-files-local () | |
"publish project customize forcing export of all files" | |
(interactive) | |
(org-publish-project "org-files-publish-local" t) | |
(org-publish-project "attachments-publish-local" t)) | |
(defun org-publish-project-org-files-remote () | |
"publish project customize forcing export of all files" | |
(interactive) | |
(org-publish-project "org-files-publish-remote" t)) | |
(defun org-publish-project-attachments-files-remote () | |
"publish project customize forcing export of all files" | |
(interactive) | |
(org-publish-project "org-files-publish-remote" t) | |
(org-publish-project "attachments-publish-remote" t)) | |
(require 'org-publish) | |
(setq org-publish-project-alist | |
'( | |
("org-files-publish-local" | |
:org-publish-use-timestamps-flag nil | |
:base-directory "/Users/iani/Dropbox/sites/orgFiles/" | |
:base-extension "org" | |
:publishing-directory "/Users/iani/Dropbox/sites/htmlFilesLocal" | |
:section-numbers nil | |
:table-of-contents nil | |
:recursive t | |
:publishing-function org-publish-org-to-html | |
:headline-levels 2 | |
:auto-preamble t | |
:style-extra | |
" | |
<script type=\"text/javascript\" src=\"http://use.typekit.com/paw4nyz.js\"></script> | |
<script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script> | |
" | |
:preamble | |
" | |
<div id=\"toc\"> | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">Home</a> | | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">About</a> | | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">Projects</a> | | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">Classes</a> | | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">Publications</a> | | |
<a href=\"file:///Users/iani/Dropbox/sites/htmlFiles/index.html\">Links</a> | |
</div> | |
" | |
:style " | |
<link rel=\"stylesheet\" href=\"file:///Users/iani/Dropbox/sites/htmlFiles/css/org.css\" type=\"text/css\"/> | |
" | |
:auto-index t | |
:table-of-contents t | |
;; :timestamps t | |
;; :drawers t | |
:link-home "http://earlab.org/tests/htmlFiles/index.html" | |
:author "Ioannis Zannos" | |
:email "zannos AT gmail DOT com" | |
:postamble | |
" | |
<a href=\"http:///Users/iani/Dropbox/internalsites/htmlFiles/sitelog.html\">sitelog</a> | |
" | |
) | |
("attachments-publish-local" | |
:base-directory "/Users/iani/Dropbox/sites/orgFiles/" | |
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|zip" | |
:publishing-directory "/Users/iani/Dropbox/sites/htmlFilesLocal" | |
:recursive t | |
:publishing-function org-publish-attachment | |
) | |
("org-files-publish-remote" | |
:base-directory "/Users/iani/Dropbox/sites/orgFiles/" | |
:base-extension "org" | |
:publishing-directory "/Users/iani/Dropbox/sites/htmlFiles" | |
:section-numbers nil | |
:table-of-contents nil | |
:recursive t | |
:publishing-function org-publish-org-to-html | |
:headline-levels 2 | |
:auto-preamble t | |
:style-extra | |
" | |
<script type=\"text/javascript\" src=\"http://use.typekit.com/paw4nyz.js\"></script> | |
<script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script> | |
" | |
:preamble | |
" | |
<div id=\"toc\"> | |
<a href=\"http://earlab.org/tests/index.html\">Home</a> | | |
<a href=\"http://earlab.org/tests/index.html\">About</a> | | |
<a href=\"http://earlab.org/tests/index.html\">Projects</a> | | |
<a href=\"http://earlab.org/tests/index.html\">Classes</a> | | |
<a href=\"http://earlab.org/tests/index.html\">Publications</a> | | |
<a href=\"http://earlab.org/tests/index.html\">Links</a> | |
</div> | |
" | |
;; :style "<link rel=\"stylesheet\" href=\"http://earlab.org/tests/htmlFiles/css/org.css\" type=\"text/css\"/>" | |
:style " | |
<link rel=\"stylesheet\" href=\"http://earlab.org/tests/css/org.css\" type=\"text/css\"/> | |
" | |
:auto-index t | |
:table-of-contents t | |
:link-home "http://earlab.org/tests/index.html" | |
:author "Ioannis Zannos" | |
:email "zannos AT gmail DOT com" | |
:postamble | |
" | |
<a href=\"http://earlab.org/tests/sitelog.html\">sitelog</a> | |
" | |
) | |
("attachments-publish-remote" | |
:base-directory "/Users/iani/Dropbox/sites/orgFiles/" | |
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|zip" | |
:publishing-directory "/Users/iani/Dropbox/sites/htmlFiles" | |
;; :publishing-directory "/ssh:[email protected]:~/public_html/tests/htmlFiles/" | |
:recursive t | |
:publishing-function org-publish-attachment | |
) | |
;;;;;;;;;;;;;;;;;;;;;;; SCDOC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
("scdoc" | |
:base-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.org/SCDoc/" | |
:base-extension "org\\|css" | |
:publishing-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.html/scdoc" | |
:section-numbers nil | |
:table-of-contents nil | |
:recursive t | |
:publishing-function org-publish-org-to-html | |
:headline-levels 2 | |
:auto-preamble t | |
:preamble | |
" | |
<div id=\"toc\"> | |
<a href=\"http://iani.github.com/index.html\">Home</a> | | |
<a href=\"http://iani.github.com/scdoc/README.html\">SC doc</a> | | |
<a href=\"http://earlab.org/\">earlab / projects</a> | | |
<a href=\"http://iani.github.com/links.html\">Links</a> | |
</div> | |
" | |
:style " | |
<link rel=\"stylesheet\" href=\"http://iani.github.com/css/org.css\" type=\"text/css\"/> | |
" | |
:auto-index t | |
:table-of-contents t | |
:link-home "http://iani.github.com/index.html" | |
:author "Ioannis Zannos" | |
:email "zannos AT gmail DOT com" | |
:postamble | |
" | |
<a href=\"http://iani.github.com/scdoc/sitelog.html\">sitelog</a> | |
" | |
) | |
;;;;;;;;;;;;;;;;;;;;;;; GITHOME ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
("githome" | |
:base-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.org/githome/" | |
:base-extension "org" | |
:publishing-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.html" | |
:section-numbers nil | |
:table-of-contents nil | |
:recursive t | |
:publishing-function org-publish-org-to-html | |
:headline-levels 2 | |
:auto-preamble t | |
:preamble | |
" | |
<div id=\"toc\"> | |
<a href=\"http://iani.github.com/index.html\">Home</a> | | |
<a href=\"http://iani.github.com/scdoc/README.html\">SC doc</a> | | |
<a href=\"http://earlab.org/\">earlab / projects</a> | | |
<a href=\"http://iani.github.com/links.html\">Links</a> | |
</div> | |
" | |
:style " | |
<link rel=\"stylesheet\" href=\"http://iani.github.com/css/org.css\" type=\"text/css\"/> | |
" | |
:auto-index t | |
:table-of-contents t | |
:link-home "http://iani.github.com/index.html" | |
:author "Ioannis Zannos" | |
:email "zannos AT gmail DOT com" | |
:postamble | |
" | |
<a href=\"http://iani.github.com/sitelog.html\">sitelog</a> | |
" | |
) | |
;;;;;;;;;;;;;;;;;;;;;;; CSS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
("css" | |
:base-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.org/githome/" | |
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|zip" | |
:publishing-directory "/Users/iani/Dropbox/notes/capturefiles/data/Sites.html" | |
:recursive t | |
:publishing-function org-publish-attachment | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(add-to-list 'color-themes '(color-theme-active "Active" "Scott Jaderholm"))