ReOrg
An Org mode file organizer.
Motivation
Instead of having tons of sparsed Org mode files everywhere, this project attemtps to give the Org mode writer a framework to re-organize the files in a less chaotic manner.
Installation
re-org
is distributed using rubygems
:
$ gem install re-org
Usage
The idea here is to have a pair of todo
and done
folders.
Writings that are still in progress would go into the todo
folder
and those that are considered as finished can go into the done
directory.
Let’s say that we want to create a new writing:
$ re-org new writing
This would create a file at todo/2013-12-09-november.org
with the
following contents below that we can use to just start writing:
# -*- mode: org -*-
#+OPTIONS: ^:nil
#+TITLE: November
#+DATE: 2013-12-09
#+STARTUP: showeverything
#+NOTEBOOK: re-org
*
:PROPERTIES:
:DATE: 2013-12-09
:NOTEBOOK: re-org
:END:
* COMMENT ________
# Local Variables:
# eval: (auto-fill-mode t)
# eval: (progn (goto-line 0)(re-search-forward ":PROPERTIES:") (org-narrow-to-subtree))
# End:
That above is using the writing
template that I like using for
starting a new text that I don’t usually would publish.
We can inspect at the available templates as follows:
$ re-org templates
* Default Templates
- clockfile.org (default)
- jekyll-post.org (default)
- notebook.org (default)
- writing.org (default)
$ re-org templates --name=writing.org
# -*- mode: org -*-
#+OPTIONS: ^:nil
#+TITLE: <%= @org[:title] %>
#+DATE: <%= @org[:date] %>
#+STARTUP: showeverything
#+NOTEBOOK: <%= @org[:notebook] %>
*
:PROPERTIES:
:DATE: <%= @org[:date] %>
:NOTEBOOK: <%= @org[:notebook] %>
:END:
* COMMENT ________
# Local Variables:
# eval: (auto-fill-mode t)
# eval: (progn (goto-line 0)(re-search-forward ":PROPERTIES:") (org-narrow-to-subtree))
# End:
A more interesting would be when preparing a Jekyll blog post.
re-org
currently detects whether the project is a Jekyll project or
not by checking whether a _config.yml
exists at the APP_ROOT
.
When using Jekyll, re-org
expects that the name of the folders
would be _drafts
and _posts
.
We can use the included template for Jekyll like this:
re-org new jekyll-post --title=using-jekyll-and-org-mode
…and this would create a file at _drafts/2013-12-06-using-jekyll-and-org-mode
#+title: Using jekyll and org mode
#+date: 2013-12-09
#+layout: post
#+category: posts
Other ideas are still a work in progress at this point.
Contributing
- Fork it
- Create your feature branch (`git checkout -b my-new-feature`)
- Commit your changes (`git commit -am ‘Added some feature’`)
- Push to the branch (`git push origin my-new-feature`)
- Create new Pull Request