Re: [Orgmode] Announcing org-jekyll

2010-02-03 Thread Carsten Dominik


On Feb 1, 2010, at 9:20 PM, Eric Schulte wrote:


So to jump onto this thread that Carsten unwittingly brought back to
life ;)

I have been exporting org-mode subtrees to jekyll blog posts on a  
couple

of projects, and I've found it really handy
- resulting in more attractive web pages than I'm able to generate
 directly from org
- for the liquid syntax which jekyll provides for programmatic
 generation of elements of html files
- and for the ability to automatically generate xml/atom/rss from my
 projects

One issue that I've not been able to solve is the resolution of
intra-file links when I'm exporting subtrees to external files.  For
example say I have the following file

,[example.org]
| * top
| ** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
|
| ** another topic
| see stuff in [[subtopic]]
`

after I've exported the subtrees to separate files for processing by
jekyll, all of my intra-file links are broken.  I wonder if a
generalization of this issue might have wide enough appeal to merit an
org-mode based solution.  Specifically would it be possible to add
support for exporting subtrees to external files, and updating all  
links

within the subtree based on the new location of the exported file
(i.e. adjusting all intra-file links to point to the original file)?

Taking the above idea one step further, if say each subtree has an
EXPORT_FILE_NAME property then it would be great to support link
maintenance during export of all such subtrees in a file, so for  
example

the following file

,[example.org]
| * top
|
| ** section one
|:PROPERTIES:
|:EXPORT_FILE_NAME: section-one
|:END:
|
| *** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
|
| ** another topic
|:PROPERTIES:
|:EXPORT_FILE_NAME: another-topic
|:END:
| see stuff in [[subtopic]]
`

could export to

,[section-one.org]
| * section one
|   :PROPERTIES:
|   :EXPORT_FILE_NAME: section-one
|   :END:
|
| ** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
`

and

,[another-topic.org]
| * another topic
|:PROPERTIES:
|:EXPORT_FILE_NAME: another-topic
|:END:
| see stuff in [[file:section-one.org::subtopic][subtopic]]
`

I hope the above example is clear.  While writing this up I noticed  
the
existence of an EXPORT_FILE_NAME property however I was unable to  
use

it to successfully export a subtree.  It may be that the behavior I've
described is only useful in the case of jekyll export, in which case I
may try my hand at hacking a solution together.  Either way I'd be
interested to hear peoples thoughts or if I'm missing some existing
functionality.



The subtree need to be selected with transient mark active - at
least temporarily.

- Carsten



Thanks -- Eric

Carsten Dominik domi...@uva.nl writes:

Sorry, this reply was in the wrong thread and is therefore  
meaningless.


- Carsten

On Feb 1, 2010, at 9:38 AM, Carsten Dominik wrote:


Hi Juan,

I like this idea, and I have implemented it.  Please use the
property HTML_CONTAINER_CLASS.  And let me know if it works!

HTH

- Carsten

On Jan 30, 2010, at 12:16 AM, Juan Reyero wrote:


Greetings,

I've been toying around with a small package to export entries as a
Jekyll blog.  It is different from other approaches I am aware of  
in

that it will find your blog entries anywhere in the files belonging
to
a project, and it will pass properties along to Jekyll as yaml  
front

matter.  It also includes some support for localization.

Full description: http://juanreyero.com/open/org-jekyll/
Source code: http://github.com/juanre/org-jekyll

Best regards,

Juan


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-02 Thread Rick Moynihan
Replies inline below:

On 1 February 2010 19:14, Juan Reyero joa...@gmail.com wrote:
 On Mon, Feb 1, 2010 at 12:23 PM, Rick Moynihan rick.moyni...@gmail.com 
 wrote:
 On 29 January 2010 23:16, Juan Reyero joa...@gmail.com wrote:
 Full description: http://juanreyero.com/open/org-jekyll/
 Source code: http://github.com/juanre/org-jekyll

 I'm not entirely clear on how the org-publish-project-alist relates to
 org-jekyll and org-jekyll-export-blog?  What do you need to do to set
 this up, other than annotate headlines with :blog: keywords and :on:
 properties?

 You set it up so that the files that contain blog entries belong to an
 org-publish project, as described for example in
 http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php

 The idea is that you might want to combine a blog with a bunch of
 org-published files, as I do in http://juanreyero.com and
 http://greaterskies.com, and you shouldn't have to spend too much time
 separating the two things.  So it boils down to defining your
 org-publish-project-alist.  Then you open a file that belongs to the
 project and do org-jekyll-export-blog or
 org-jekyll-export-current-entry, depending on what you need.

Yes, I like this flexibility.

 I've found that calling org-jekyll-export-blog, seems to do nothing...

 It should, if the file from which you are calling is part of an
 org-publish project, and there are entries with the :blog: tag and the
 :on: property.

Ok, it turns out that there were several problems I had...  After some
time in the emacs debugger, it turned out that the default values for
org-jekyll-category and org-jekyll-localize-dir are non-nil... which
was causing the _posts/ directory to be set to a directory that
doesn't exist.  Overriding these to nil fixed the first problem.

The second problem was that my tags and property keys are all in
uppercase, yet org-jekyll only works for lower-case keys.

I seem to be up and running with it for now...  I just need to modify
my setup a bit more to account for the changes... But this definitely
seems a lot less hacky than the happyblogger setup I was playing
with!!

I think setting both of those vars to default to nil would make
sense...  As I'd imagine people would probably want to start with a
minimal config/setup and grow into the more advanced multi-lingual
features you have.

Also it would be nice for org-jekyll-export-blog to fail with an
error, rather than just dying silently.  Alternatively even better
might be for it to construct the _post and category directories it
needs if they don't already exist

Great work though  I've been waiting for something like this for
years!!!  (Though I'm also a tiny bit dissapointed that you stole my
march; as I was looking forward to learning a bit more Emacs Lisp and
reworking happyblogger into something like this)  But again,
thanks a bunch this is a valuable addition to the org community!


--
Rick Moynihan
http://twitter.com/RickMoynihan
http://delicious.com/InkyHarmonics
http://sourcesmouth.co.uk/


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-02 Thread Juan Reyero
On Mon, Feb 1, 2010 at 9:20 PM, Eric Schulte schulte.e...@gmail.com wrote:
 I have been exporting org-mode subtrees to jekyll blog posts on a couple
 of projects, and I've found it really handy
 - resulting in more attractive web pages than I'm able to generate
  directly from org
 - for the liquid syntax which jekyll provides for programmatic
  generation of elements of html files
 - and for the ability to automatically generate xml/atom/rss from my
  projects

 One issue that I've not been able to solve is the resolution of
 intra-file links when I'm exporting subtrees to external files.  For
 example say I have the following file
 Taking the above idea one step further, if say each subtree has an
 EXPORT_FILE_NAME property then it would be great to support link
 maintenance during export of all such subtrees in a file

It is a great idea.  Most of my links end up being in http format
pointing to the final location of things, which is a brittle solution
and prevents following them from org-mode.

For exporting subtrees in jekyll format you'd probably want to allow
the value of EXPORT_FILE_NAME to be a function that computes it from
the entry properties.

Another problem is how to export images and attachments.  I haven't
solved it yet: I manually copy them to their final destination, and
have a link in org-mode that will translate to something correct when
exported.  It'd be great to be able to refer to an attached file from
a link in an entry, and copy during export the attachments directory.

Best,

Juan
-- 
http://juanreyero.com/
http://unarueda.com


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-02 Thread Juan Reyero
On Tue, Feb 2, 2010 at 11:37 AM, Rick Moynihan rick.moyni...@gmail.com wrote:
 On 1 February 2010 19:14, Juan Reyero joa...@gmail.com wrote:
 On Mon, Feb 1, 2010 at 12:23 PM, Rick Moynihan rick.moyni...@gmail.com 
 wrote:
 On 29 January 2010 23:16, Juan Reyero joa...@gmail.com wrote:
 Full description: http://juanreyero.com/open/org-jekyll/
 Source code: http://github.com/juanre/org-jekyll

 I'm not entirely clear on how the org-publish-project-alist relates to
 org-jekyll and org-jekyll-export-blog?  What do you need to do to set
 this up, other than annotate headlines with :blog: keywords and :on:
 properties?

 You set it up so that the files that contain blog entries belong to an
 org-publish project, as described for example in
 http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php
 I've found that calling org-jekyll-export-blog, seems to do nothing...

 It should, if the file from which you are calling is part of an
 org-publish project, and there are entries with the :blog: tag and the
 :on: property.

 Ok, it turns out that there were several problems I had...  After some
 time in the emacs debugger, it turned out that the default values for
 org-jekyll-category and org-jekyll-localize-dir are non-nil... which
 was causing the _posts/ directory to be set to a directory that
 doesn't exist.  Overriding these to nil fixed the first problem.

Souds like the most sensible default, just changed in the repository.
It should only fail if you happened to have a :lang: property in your
entries, though.

 The second problem was that my tags and property keys are all in
 uppercase, yet org-jekyll only works for lower-case keys.

Changed that too.  Now it accepts both lower- and upper-case :BLOG: and :ON:.

 Also it would be nice for org-jekyll-export-blog to fail with an
 error, rather than just dying silently.  Alternatively even better
 might be for it to construct the _post and category directories it
 needs if they don't already exist

Changed to create the directories if they don't exist.  Now the
biggest thing still on my list is taking care of accented characters
in entry names.  Looks like some browsers don't like them in urls.

Best,

Juan
-- 
http://juanreyero.com/
http://unarueda.com


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-01 Thread Carsten Dominik

Hi Juan,

I like this idea, and I have implemented it.  Please use the property  
HTML_CONTAINER_CLASS.  And let me know if it works!


HTH

- Carsten

On Jan 30, 2010, at 12:16 AM, Juan Reyero wrote:


Greetings,

I've been toying around with a small package to export entries as a
Jekyll blog.  It is different from other approaches I am aware of in
that it will find your blog entries anywhere in the files belonging to
a project, and it will pass properties along to Jekyll as yaml front
matter.  It also includes some support for localization.

Full description: http://juanreyero.com/open/org-jekyll/
Source code: http://github.com/juanre/org-jekyll

Best regards,

Juan



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-01 Thread Carsten Dominik

Sorry, this reply was in the wrong thread and is therefore meaningless.

- Carsten

On Feb 1, 2010, at 9:38 AM, Carsten Dominik wrote:


Hi Juan,

I like this idea, and I have implemented it.  Please use the  
property HTML_CONTAINER_CLASS.  And let me know if it works!


HTH

- Carsten

On Jan 30, 2010, at 12:16 AM, Juan Reyero wrote:


Greetings,

I've been toying around with a small package to export entries as a
Jekyll blog.  It is different from other approaches I am aware of in
that it will find your blog entries anywhere in the files belonging  
to

a project, and it will pass properties along to Jekyll as yaml front
matter.  It also includes some support for localization.

Full description: http://juanreyero.com/open/org-jekyll/
Source code: http://github.com/juanre/org-jekyll

Best regards,

Juan


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-01 Thread Rick Moynihan
On 29 January 2010 23:16, Juan Reyero joa...@gmail.com wrote:
 Greetings,

 I've been toying around with a small package to export entries as a
 Jekyll blog.  It is different from other approaches I am aware of in
 that it will find your blog entries anywhere in the files belonging to
 a project, and it will pass properties along to Jekyll as yaml front
 matter.  It also includes some support for localization.

 Full description: http://juanreyero.com/open/org-jekyll/
 Source code: http://github.com/juanre/org-jekyll


Wow, this is great news!  I wish I'd kept up with this group a bit
more than I have, as I've been spending sometime setting up and
modifying happyblogger but this looks like a far superior solution!

Unfortunately after some playing around, I can't seem to get it to work.

I'm not entirely clear on how the org-publish-project-alist relates to
org-jekyll and org-jekyll-export-blog?  What do you need to do to set
this up, other than annotate headlines with :blog: keywords and :on:
properties?

I've found that calling org-jekyll-export-blog, seems to do nothing...
 Also I've seen it complain about org-publish-initialize-files-alist
not being defined, unless I've first run an org-publish.

Very excited by this development to org-mode!

R.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-01 Thread Juan Reyero
On Mon, Feb 1, 2010 at 12:23 PM, Rick Moynihan rick.moyni...@gmail.com wrote:
 On 29 January 2010 23:16, Juan Reyero joa...@gmail.com wrote:
 Full description: http://juanreyero.com/open/org-jekyll/
 Source code: http://github.com/juanre/org-jekyll

 I'm not entirely clear on how the org-publish-project-alist relates to
 org-jekyll and org-jekyll-export-blog?  What do you need to do to set
 this up, other than annotate headlines with :blog: keywords and :on:
 properties?

You set it up so that the files that contain blog entries belong to an
org-publish project, as described for example in
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php

The idea is that you might want to combine a blog with a bunch of
org-published files, as I do in http://juanreyero.com and
http://greaterskies.com, and you shouldn't have to spend too much time
separating the two things.  So it boils down to defining your
org-publish-project-alist.  Then you open a file that belongs to the
project and do org-jekyll-export-blog or
org-jekyll-export-current-entry, depending on what you need.

 I've found that calling org-jekyll-export-blog, seems to do nothing...

It should, if the file from which you are calling is part of an
org-publish project, and there are entries with the :blog: tag and the
:on: property.

  Also I've seen it complain about org-publish-initialize-files-alist
 not being defined, unless I've first run an org-publish.

It should be able to populate the org-publish files itself; it
certainly works for me without doing org-publish.  If nothing works
for you please send me a minimal setup that reproduces your problem
and I'll try to figure it out.

Best regards, and thanks for the positive feedback,

Juan
---
http://juanreyero.com/
http://unarueda.com


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Announcing org-jekyll

2010-02-01 Thread Eric Schulte
So to jump onto this thread that Carsten unwittingly brought back to
life ;)

I have been exporting org-mode subtrees to jekyll blog posts on a couple
of projects, and I've found it really handy
- resulting in more attractive web pages than I'm able to generate
  directly from org
- for the liquid syntax which jekyll provides for programmatic
  generation of elements of html files
- and for the ability to automatically generate xml/atom/rss from my
  projects

One issue that I've not been able to solve is the resolution of
intra-file links when I'm exporting subtrees to external files.  For
example say I have the following file

,[example.org]
| * top
| ** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
| 
| ** another topic
| see stuff in [[subtopic]]
`

after I've exported the subtrees to separate files for processing by
jekyll, all of my intra-file links are broken.  I wonder if a
generalization of this issue might have wide enough appeal to merit an
org-mode based solution.  Specifically would it be possible to add
support for exporting subtrees to external files, and updating all links
within the subtree based on the new location of the exported file
(i.e. adjusting all intra-file links to point to the original file)?

Taking the above idea one step further, if say each subtree has an
EXPORT_FILE_NAME property then it would be great to support link
maintenance during export of all such subtrees in a file, so for example
the following file

,[example.org]
| * top
| 
| ** section one
|:PROPERTIES:
|:EXPORT_FILE_NAME: section-one
|:END:
| 
| *** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
| 
| ** another topic
|:PROPERTIES:
|:EXPORT_FILE_NAME: another-topic
|:END:
| see stuff in [[subtopic]]
`

could export to

,[section-one.org]
| * section one
|   :PROPERTIES:
|   :EXPORT_FILE_NAME: section-one
|   :END:
| 
| ** subtopic
|:PROPERTIES:
|:CUSTOM_ID: subtopic
|:END:
| stuff
`

and

,[another-topic.org]
| * another topic
|:PROPERTIES:
|:EXPORT_FILE_NAME: another-topic
|:END:
| see stuff in [[file:section-one.org::subtopic][subtopic]]
`

I hope the above example is clear.  While writing this up I noticed the
existence of an EXPORT_FILE_NAME property however I was unable to use
it to successfully export a subtree.  It may be that the behavior I've
described is only useful in the case of jekyll export, in which case I
may try my hand at hacking a solution together.  Either way I'd be
interested to hear peoples thoughts or if I'm missing some existing
functionality.

Thanks -- Eric

Carsten Dominik domi...@uva.nl writes:

 Sorry, this reply was in the wrong thread and is therefore meaningless.

 - Carsten

 On Feb 1, 2010, at 9:38 AM, Carsten Dominik wrote:

 Hi Juan,

 I like this idea, and I have implemented it.  Please use the
 property HTML_CONTAINER_CLASS.  And let me know if it works!

 HTH

 - Carsten

 On Jan 30, 2010, at 12:16 AM, Juan Reyero wrote:

 Greetings,

 I've been toying around with a small package to export entries as a
 Jekyll blog.  It is different from other approaches I am aware of in
 that it will find your blog entries anywhere in the files belonging
 to
 a project, and it will pass properties along to Jekyll as yaml front
 matter.  It also includes some support for localization.

 Full description: http://juanreyero.com/open/org-jekyll/
 Source code: http://github.com/juanre/org-jekyll

 Best regards,

 Juan

 - Carsten





 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode