Great. Starting work on it. Expect some progress in a day.

You in for the Jekyll, Letterpress idea?
On Mar 27, 2013 2:52 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':
>
> Great idea. I would hover make --export take only one argument, [markdown,
> json, text] (maybe have md and txt as aliases as well), which returns the
> result on stdout, and have an optional parameter -o specify an output
> path or file -- if it's an existing path, individual files will be
> exported, if it's a file (or doesn't exist yet), a single file will be
> written.
>
> Go ahead and make the changes, if you push to your branch they'll be added
> to the pull request.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/maebert/jrnl/pull/54/files#r3540396>
> .
>