emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-filter-final-output-functions
@ 2017-05-11 23:23 NULL
  0 siblings, 0 replies; only message in thread
From: NULL @ 2017-05-11 23:23 UTC (permalink / raw)
  To: emacs-orgmode


I want to setq org-export-filter-final-output-functions on per project
basis, is it possible?

I have #+INCLUDE: blog-header.inc in my org file with content:

#+BEGIN_EXPORT html
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
    <header class="intro-header" style="background-image: url('../img/{{blog_img}}-post-bg.jpg')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                        <h1>{{blog_header}}</h1>
                        <h2 class="subheading">{{blog_subheader}}</h2>
                        <span class="meta">Posted by <a href="#">nullx002</a> on {{blog_date}}</span>
                    </div>
                </div>
            </div>
        </div>
    </header>
#+END_EXPORT

in my init file I have following:

(defun nullx002/org-blog-set-filter (output backend info)
  "required to publish dynamic blog post headers from org-journal"
  (setq output (replace-regexp-in-string  "{{blog_img}}" (read-input "Image: ") output ))
  (setq output (replace-regexp-in-string  "{{blog_header}}" (read-input "Head: ") output ))
  (setq output (replace-regexp-in-string  "{{blog_subheader}}" (read-input "SubHeader: ") output ))
  (setq output (replace-regexp-in-string  "{{blog_date}}" (format-time-string "%a, %b %d, %Y") output ))
   output
)

(setq org-export-filter-final-output-functions  '(nullx002/org-blog-set-filter))

It serves me well in replacing those entries from mini buffer for
journal/blog entries with M-x org-publish-current-file  Only problem is
that function (org-export-filter-final-output-function) is universal and
asks for image, header, etc. for all org-files.

I want it only for a certain project with org-journal and not all
org-projects in (org-publish-project-alist). I have tried
:publishing-function but it doesn't work.

Is it even possible?

Thanks

-- 
~nullx002 (somewhere on pale blue dot)
github.com/nullx002
bitbucket.org/nullx002
twitter.com/nullx002

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-11 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 23:23 org-export-filter-final-output-functions NULL

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).