Sounds great. Want me to make the change our you'll do it yourself?

Actually I had some ideas about simplifying the entire export process.

Why not make a single command for export and allow it to take two
parameters. One will be the type of export (files or not) and the other
will be the format (this one can be JSON, MD).

Another function which can be really really useful for Jekyll and
Letterpress users is to covert their entries to independent markdown posts
with the correct format which they can directly push to the posts folder
and update their site with. What do you think of this?
On Mar 27, 2013 2:32 AM, "Manuel Ebert" <notifications@github.com> wrote:

> In jrnl/exporters.py:
>
> > +def to_files(journal, directory, extension):
> > +    """Turns your journal into separate files for each entry."""
> > +    if extension:
> > +        ext = "." + extension
> > +    else:
> > +        ext = ''
> > +
> > +    if not os.path.exists(directory):
> > +        os.makedirs(directory)
> > +
> > +    for e in journal.entries:
> > +        date = e.date.strftime('%Y-%m-%d')
> > +        title = re.sub('[^\w-]', '', re.sub(' ', '-', e.title.lower()))
> > +        filename = date + '-' + title + ext
> > +        f = open(directory + "/" + filename, 'w+')
> > +        if extension == 'md':
>
> Maybe use the --markdown option for this and keep the extension to txt by
> default otherwise. so
>
>    - --markdown will produce a single md file and return it on stdout
>    - --files DEST will produce individual txt files and write them at DEST
>    - --markdown --files DEST will produce individual md files and write
>    them at DEST
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/maebert/jrnl/pull/54/files#r3540026>
> .
>