Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wallyqs/re-org

An Org mode file organizer
https://github.com/wallyqs/re-org

Last synced: about 2 months ago
JSON representation

An Org mode file organizer

Awesome Lists containing this project

README

        

* 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=:

#+begin_src sh
$ gem install re-org
#+end_src

** 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:

#+begin_src sh
$ re-org new writing
#+end_src

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:

#+begin_src org
# -*- 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:
#+end_src

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:

#+begin_src sh
$ 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:
#+end_src

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:

#+begin_src sh
re-org new jekyll-post --title=using-jekyll-and-org-mode
#+end_src

...and this would create a file at =_drafts/2013-12-06-using-jekyll-and-org-mode=

#+begin_src org
,#+title: Using jekyll and org mode
,#+date: 2013-12-09
,#+layout: post
,#+category: posts
#+end_src

Other ideas are still a work in progress at this point.

** Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request