Re: [O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-08-28 Thread Rick Frankel
On Tue, Aug 27, 2013 at 11:41:20PM -0400, Matt Price wrote:
 On Tue, Aug 27, 2013 at 10:12 AM, Rick Frankel r...@rickster.com wrote:
  On 2013-08-27 00:41, Matt Price wrote:
 
  I just came across this, having missed it in February.  Rick, I was
  wondering if you had thought about enabling some of deck.js's snazzier
  features -- transitions for text elements, for instance, like we see
  in the intro deck here: http://imakewebthings.com/deck.js/#intro

  If you look at the documentation for ox-deck
  @https://github.com/cybercode/org-slides, you will see that you can
  specify per-slide classes via the HTML_CONTAINER_CLASS property on the
  headline (and any headline can be build by setting the slide class
  on the headline).

 I'll give that a try, if I end up having time (argh).  I'm actually
 liking deck, though.  Am wondering if it would be very hard to add
 support for the codemirror extension to your deck code.  Maybe I'll
 try that first...

I find deck.js to be my favorite also... (impress is a bit to
impressive for me :) If you look at the Customization
(https://github.com/cybercode/org-slides#customization) section of the
documentation, you will see that ANY deck.js extension in any of the
extension under a directory specified in `org-deck-directories'
(defaults to './deck.js'), will be included by default, so, just add
the extension to the ./deck.js/extensions directory and the css to the
./deck.js/themes directory.

rick



Re: [O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-08-27 Thread Rick Frankel

On 2013-08-27 00:41, Matt Price wrote:

I just came across this, having missed it in February.  Rick, I was
wondering if you had thought about enabling some of deck.js's snazzier
features -- transitions for text elements, for instance, like we see
in the intro deck here: http://imakewebthings.com/deck.js/#intro

I'm mostly asking because I'd like to try and copy your work to make
an exporter for impress.js (https://github.com/bartaz/impress.js).
Kinjo has written one, but it uses the old exporter and no longer
works with current versions of org, so I thought I would start with
your deck.js work.

I know that's not very specific, but if you've thought about these
issues I would love to learn wat you've figured out.  Thanks!


All the fancy transitions and builds in the deck.js intro are handled
via CSS. So, the exporter will handle them easily.

If you look at the source for the intro, you will see that all the
builds and transitions are defined in home.css, and applied based on
slide id and/or class.

If you look at the documentation for ox-deck
@https://github.com/cybercode/org-slides, you will see that you can
specify per-slide classes via the HTML_CONTAINER_CLASS property on the
headline (and any headline can be build by setting the slide class
on the headline).

Taking a quick look @ the impress.js docs, i noticed that there is an
S9 template for impress.js
(http://slideshow-s9.github.io/slideshow-impress.js), and that
everything is specified w/ slide properties (x, y, z, scale and
rotate), so I would use headline PROPERTIES ( :IMPRESS_X, etc) to
define the slideshow.

Also note that it might be easier to inherit from  ox-s5 instead of
ox-deck as it is more generic (and add a wrapper around
`org-s5-headline') to process the additional properties.

rick



Re: [O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-08-27 Thread Matt Price
On Tue, Aug 27, 2013 at 10:12 AM, Rick Frankel r...@rickster.com wrote:
 On 2013-08-27 00:41, Matt Price wrote:

 I just came across this, having missed it in February.  Rick, I was
 wondering if you had thought about enabling some of deck.js's snazzier
 features -- transitions for text elements, for instance, like we see
 in the intro deck here: http://imakewebthings.com/deck.js/#intro

 I'm mostly asking because I'd like to try and copy your work to make
 an exporter for impress.js (https://github.com/bartaz/impress.js).
 Kinjo has written one, but it uses the old exporter and no longer
 works with current versions of org, so I thought I would start with
 your deck.js work.

 I know that's not very specific, but if you've thought about these
 issues I would love to learn wat you've figured out.  Thanks!


 All the fancy transitions and builds in the deck.js intro are handled
 via CSS. So, the exporter will handle them easily.

 If you look at the source for the intro, you will see that all the
 builds and transitions are defined in home.css, and applied based on
 slide id and/or class.

ah, I wish I understood css transforms better!  But yes, I can see
that they are being defined in home.css and attached to individual
classes/ids for slides.  That's very helpful.


 If you look at the documentation for ox-deck
 @https://github.com/cybercode/org-slides, you will see that you can
 specify per-slide classes via the HTML_CONTAINER_CLASS property on the
 headline (and any headline can be build by setting the slide class
 on the headline).

ah, I get it now.  Thank you.


 Taking a quick look @ the impress.js docs, i noticed that there is an
 S9 template for impress.js
 (http://slideshow-s9.github.io/slideshow-impress.js), and that
 everything is specified w/ slide properties (x, y, z, scale and
 rotate), so I would use headline PROPERTIES ( :IMPRESS_X, etc) to
 define the slideshow.

I'll give that a try, if I end up having time (argh).  I'm actually
liking deck, though.  Am wondering if it would be very hard to add
support for the codemirror extension to your deck code.  Maybe I'll
try that first...


 Also note that it might be easier to inherit from  ox-s5 instead of
 ox-deck as it is more generic (and add a wrapper around
 `org-s5-headline') to process the additional properties.

Thanks again, very very helpful.

Matt


 rick



Re: [O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-08-26 Thread Matt Price
I just came across this, having missed it in February.  Rick, I was
wondering if you had thought about enabling some of deck.js's snazzier
features -- transitions for text elements, for instance, like we see
in the intro deck here: http://imakewebthings.com/deck.js/#intro

I'm mostly asking because I'd like to try and copy your work to make
an exporter for impress.js (https://github.com/bartaz/impress.js).
Kinjo has written one, but it uses the old exporter and no longer
works with current versions of org, so I thought I would start with
your deck.js work.

I know that's not very specific, but if you've thought about these
issues I would love to learn wat you've figured out.  Thanks!
Matt


On Wed, Feb 20, 2013 at 10:34 AM, Bastien b...@altern.org wrote:
 Hi Rick,

 Rick Frankel r...@rickster.com writes:

 Attached are:

- ox-deck.el
- ox-s5.el

 Which, respectively, provide deck.js and s5 backends for the new
 exporter. I would be happy for these to be included in contrib. Note
 that I have already signed the FSF assignment documents, so they can
 be safely included in the core if so desired.

 Added to contrib/, thanks a lot!

 I modified the Copyright line to tell that the copyright is your own,
 you don't need to assign copyright to the FSF for code in contrib/.

 If you have time, please mention those packages in Worg:
   http://orgmode.org/worg/org-contrib/

 (Just send me your public key to get push access to Worg.)

 All best,

 --
  Bastien




Re: [O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-02-20 Thread Bastien
Hi Rick,

Rick Frankel r...@rickster.com writes:

 Attached are:

- ox-deck.el
- ox-s5.el

 Which, respectively, provide deck.js and s5 backends for the new
 exporter. I would be happy for these to be included in contrib. Note
 that I have already signed the FSF assignment documents, so they can
 be safely included in the core if so desired.

Added to contrib/, thanks a lot!  

I modified the Copyright line to tell that the copyright is your own,
you don't need to assign copyright to the FSF for code in contrib/.

If you have time, please mention those packages in Worg:
  http://orgmode.org/worg/org-contrib/

(Just send me your public key to get push access to Worg.)

All best,

-- 
 Bastien



[O] [PATH] [NEW EXPORTER] two slide backends for contrib

2013-02-19 Thread Rick Frankel
Attached are:

 - ox-deck.el
 - ox-s5.el

Which, respectively, provide deck.js and s5 backends for the new
exporter. I would be happy for these to be included in contrib. Note
that I have already signed the FSF assignment documents, so they can
be safely included in the core if so desired.

rick 
;;; ox-deck.el --- deck.js Presentation Back-End for Org Export Engine

;; Copyright (C) 2013  Free Software Foundation, Inc.

;; Author: Rick Frankel emacs at rickster dot com
;; Keywords: outlines, hypermedia, slideshow

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see http://www.gnu.org/licenses/.

;;; Commentary:

;; This library implements a deck.js presentation back-end for the Org
;; generic exporter.

;; Installation
;; -
;; Get a copy of deck.js from http://imakewebthings.com/deck.js/ or
;; the gitub repository at https://github.com/imakewebthings/deck.js.
;;
;; Add the path to the extracted code to the variable
;; `org-deck-directories' There are a number of customization in the
;; org-export-deck group, most of which can be overrriden with buffer
;; local customization (starting with DECK_.)

;; See ox.el and ox-html.el for more details on how this exporter
;; works (it is derived from ox-html.)

(require 'ox-html)

(org-export-define-derived-backend deck html
  :menu-entry
  (?s Export to deck.js HTML Presentation
  ((?H To temporary buffer org-deck-export-as-html)
   (?h To file org-deck-export-to-html)
   (?o To file and open
   (lambda (a s v b)
 (if a (org-deck-export-to-html t s v b)
   (org-open-file (org-deck-export-to-html nil s v b)))
  :options-alist
  ((:html-link-home HTML_LINK_HOME nil nil)
   (:html-link-up HTML_LINK_UP nil nil)
   (:html-mathjax HTML_MATHJAX nil  space)
   (:html-postamble nil html-postamble nil t)
   (:html-preamble nil html-preamble nil t)
   (:html-style-extra HTML_STYLE nil org-html-style-extra newline)
   (:html-style-include-default HTML_INCLUDE_DEFAULT nil nil)
   (:html-style-include-scripts HTML_INCLUDE_SCRIPTS nil nil)
   (:deck-base-url DECK_BASE_URL nil org-deck-base-url)
   (:deck-theme DECK_THEME nil org-deck-theme)
   (:deck-transition DECK_TRANSITION nil org-deck-transition)
   (:deck-include-extensions DECK_INCLUDE_EXTENSIONS nil
 org-deck-include-extensions split)
   (:deck-exclude-extensions DECK_EXCLUDE_EXTENSIONS nil
 org-deck-exclude-extensions split)
   (:deck-directories DECK_DIRECTORIES nil
   org-deck-directories split))
  :translate-alist
  ((headline . org-deck-headline)
   (inner-template . org-deck-inner-template)
   (item . org-deck-item)
   (template . org-deck-template)))

(defgroup org-export-deck nil
  Options for exporting Org mode files to deck.js HTML Presentations.
  :tag Org Export DECK
  :group 'org-export-html)

(defcustom org-deck-directories nil
  Directories to search for deck.js components (jquery,
modernizr; core, extensions and themes directories.)
  :group 'org-export-deck
  :type '(repeat (string :tag Directory)))

(defun org-deck--cleanup-components (components)
  (remove-duplicates 
   (car (remove 'nil components))
   :test (lambda (x y)
   (string= (file-name-nondirectory x)
(file-name-nondirectory y)
  
(defun org-deck--find-extensions ()
  Returns a unique list of all extensions found in
in the extensions directories under `org-deck-directories'
  (org-deck--cleanup-components
 (mapcar; extensions under existing dirs
  (lambda (dir)
(when (file-directory-p dir) (directory-files dir t ^[^.])))
  (mapcar   ; possible extension directories
   (lambda (x) (expand-file-name extensions x))
   org-deck-directories

(defun org-deck--find-css (type)
  Return a unique list of all the css stylesheets in the themes/TYPE
directories under `org-deck-directories'.
  (org-deck--cleanup-components
   (mapcar
(lambda (dir)
  (let ((css-dir (expand-file-name
  (concat (file-name-as-directory themes) type) dir)))
(when (file-directory-p css-dir)
  (directory-files css-dir t  \\.css$
  org-deck-directories)))

(defun org-deck-list-components ()
  List all available deck extensions, styles and
transitions (with full paths) to a temporary buffer.
  (interactive)
  (let ((outbuf