Skip to content

Commit

Permalink
Merge f8fde0c into a288c1d
Browse files Browse the repository at this point in the history
  • Loading branch information
jackqu7 committed Aug 8, 2013
2 parents a288c1d + f8fde0c commit 8d8c0fb
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 99 deletions.
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Facio: /ˈfa.ki.oː/ - Latin, meaning to make, do, act, perform, cause, bring ab
What is it?
-----------

Are you forever creating new projects, re creating the same standard cruft over
and over? Then Facio maybe for you, it allows you to create your standard
project skeleton once and create new projects from that standard skeleton over
and over, easily.

It can be as simple or as complicated as you need it to be. You can write logic
into your skeleton, store it in a ``git`` or ``mercurial`` repository, you can
even write hooks to be run before or after your skeletons been built. Did I
mention you can have as many templates as you like and quickly reference them
Are you forever creating new projects? Re-creating the same standard cruft over
and over? Then Facio may be for you. It allows you to create your standard
project skeleton once, then easily create new projects from that standard
skeleton as many times as you like.

It can be as simple or as advanced as you need it to be. You can write logic
into your skeleton, store it in a ``git`` or ``mercurial`` repository, or
even write hooks to be run before or after your skeleton has been built. You
can also have as many templates as you like and quickly reference them
by name or pick from a list.

Facio aims to hopefully fix your standard project skeleton woes.
Facio aims to solve your standard project skeleton woes.

.. code-block:: none
Expand All @@ -37,12 +37,12 @@ Features
* Store templates in ``git`` or ``mercurial`` repositories
* Add template logic using ``Jinja2``
* Add extra context-variables to your templates
* Ability to add before and after hooks that are called before or after the
* Ability to add before and after hooks called before or after the
project is created.
* Bundled hooks include:

* Create python virtual environments
* Run python ``setup.py install | develop``
* Run ``python setup.py install`` (or develop)
* Generate Django Secret key for usage in Django settings modules

Documentation
Expand Down
24 changes: 12 additions & 12 deletions docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Facio: /ˈfa.ki.oː/ - Latin, meaning to make, do, act, perform, cause, bring ab
What is it?
-----------

Are you forever creating new projects, re creating the same standard cruft over
and over? Then Facio maybe for you, it allows you to create your standard
project skeleton once and create new projects from that standard skeleton over
and over, easily.

It can be as simple or as complicated as you need it to be. You can write logic
into your skeleton, store it in a ``git`` or ``mercurial`` repository, you can
even write hooks to be run before or after your skeletons been built. Did I
mention you can have as many templates as you like and quickly reference them
Are you forever creating new projects? Re-creating the same standard cruft over
and over? Then Facio may be for you. It allows you to create your standard
project skeleton once, then easily create new projects from that standard
skeleton as many times as you like.

It can be as simple or as advanced as you need it to be. You can write logic
into your skeleton, store it in a ``git`` or ``mercurial`` repository, or
even write hooks to be run before or after your skeleton has been built. You
can also have as many templates as you like and quickly reference them
by name or pick from a list.

Facio aims to hopefully fix your standard project skeleton woes.
Facio aims to solve your standard project skeleton woes.

.. code-block:: none
Expand All @@ -29,13 +29,13 @@ Features
* Support for multiple templates
* Store templates in ``git`` or ``mercurial`` repositories
* Add template logic using ``Jinja2``
* Add extra context-variables to your templates
* Ability to add before and after hooks called before or after the
project is created.
* Add extra context-variables to your templates
* Bundled hooks include:

* Create python virtual environments
* Run python ``setup.py install | develop``
* Run ``python setup.py install`` (or develop)
* Generate Django Secret key for usage in Django settings modules

License
Expand Down
38 changes: 19 additions & 19 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Configuration & Command Line
============================

Facio can be configured using a file called ``.facio.cfg`` and how Facio runs
Facio can be configured using a file called ``~/.facio.cfg`` and how Facio runs
can also be defined by the command line interface, we will take a look at the
command line first.

Command Line Options
--------------------

Facio is a simple command line application, and here is how you use it.
Facio is a command line application. Here is how you use it:

.. note::

Through out this document ``$`` represents a terminal prompt.
Throughout this document ``$`` represents a terminal prompt.

Required Arguments
~~~~~~~~~~~~~~~~~~
Expand All @@ -24,7 +24,7 @@ name. For example:
$ facio hello_world
If no additional optional arguments are supplied then Facio will use it's
If no additional optional arguments are supplied then Facio will use its
default template to create the project.

Optional Arguments
Expand All @@ -33,21 +33,21 @@ Optional Arguments
Template
********

For Facio to use a different template than it's default you must pass either
following arguments:
For Facio to use a different template than its default you must pass either
of the following arguments:

* ``--template | -t`` or ``--select | -s``

``--template``
^^^^^^^^^^^^^^

The ``--template`` or it's short hand equivalent ``-t`` takes a string which
The ``--template`` or its short hand equivalent ``-t`` takes a string which
can be either of the following:

* A file system path the template, for example ``/home/me/template/template1``
* A ``git`` or ``mercurial`` repository, for examople:

* ``git+git@hithub.com:me/template.git``
* ``git+git@github.com:me/template.git``
* ``git+/path/to/local/template``
* ``hg+user@someremote.com:me/template``
* ``hg+/path/to/local/template``
Expand All @@ -67,7 +67,7 @@ For example:
^^^^^^^^^^^^

The ``--select`` or it's ``-s`` short hand is used for selecting a template
thats defined in the ``'.facio.cfg`` configuration file, see
which is defined in the ``'.facio.cfg`` configuration file, see the
:ref:`configuration-file-label` section for more information on how to define
multiple templates.

Expand Down Expand Up @@ -132,8 +132,8 @@ Other
``--help``
^^^^^^^^^^

The ``--help`` or ``-h`` will trigger the ``facio`` help message describing
briefly all the options available to you.
The ``--help`` or ``-h`` will trigger the ``facio`` help message briefly
describing all the options available to you.

``--version``
^^^^^^^^^^^^^
Expand Down Expand Up @@ -179,14 +179,14 @@ For example:
``[files]`` Section
~~~~~~~~~~~~~~~~~~~

The ``[files]`` section allows you to customise what files from your get
template get copied and which files do not get rendered by ``jinja2``.
The ``[files]`` section allows you to specify files from your
template to skip when copying or skip rendering by ``jinja2``.

The ``files`` section takes 2 options:

* ``copy_ignore``: A comma separated list of glob patterns of files **not** to
copy, for example you might not want to copy ``pyc`` files or ``.git`` etc
files that maybe on the file system or in the repository. The default values
copy, for example you might not want to copy ``pyc`` files or ``.git``
files that may be on the file system or in the repository. The default values
for this are:

* ``.git``
Expand All @@ -196,8 +196,8 @@ The ``files`` section takes 2 options:
* ``Thumbs.db``

* ``render_ignore``: A comma separated list of glob patterns of files **not**
to render in the template engine, for example images such as ``jpeg``,
``gif`` and ``png`` files.
to render with the template engine, for example images such as ``jpeg``,
``gif`` and ``png`` files. The default values for this are:

* ``*.png``
* ``*.gif``
Expand All @@ -213,6 +213,6 @@ For example:
render_ignore = .coverage,*.ico
In addition to the defaults ``facio`` would not copy over any file named
``.env`` or any file name ending in ``.pyc``. It would also not render in the
template engine in addition to the defau;lts any file names ``.coverage`` or
``.env`` or any file name ending in ``.pyc``. It would also not render with the
template engine, in addition to the defaults, any file named ``.coverage`` or
any file name ending in ``.ico``.
26 changes: 13 additions & 13 deletions docs/developing.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Contributing
============

Fancy helping out? Fork, commit, issue pull request :)
Fancy helping out? Fork, commit and issue a pull request :)

I can't guarantee I will accept your pull request but here some things to to
help:
I can't guarantee I will accept your pull request, but here some things which
will help:

* Ensure your code is to PEP8 standards
* Your pull requests adds a useful feature or fixes a bug
* Your code has unittests to ensure it works as it should
* Your code is documented so documentation can be auto generated us sphinx
* Your code is to PEP8 standards
* Your pull request adds a useful feature or fixes a bug
* Your code has unit tests to ensure it works as it should
* Your code is documented so documentation can be auto generated

I use `Git Flow`_ to develop this project, as such the branch structure is as
follows:
Expand All @@ -28,7 +28,7 @@ Installing the Code
.. note::

This section assumes familiarity with python virtual environments and
pythons virtual environment wrapper.
``virtualenvwrapper``.

First create a fork of ``http://github.com/krak3n/facio`` so it's in your own
github account, then clone:
Expand All @@ -37,7 +37,7 @@ github account, then clone:
$ git clone git@github.com:you/facio.git
Once cloned switch to the develop branchL
Once cloned switch to the develop branch:

.. code-block:: none
Expand All @@ -58,26 +58,26 @@ dependencies, this includes everything you need to run tests and debug code.
$ make develop
Facio and it's dependencies will not be installed into your virtual
Facio and it's dependencies will now be installed into your virtual
environment.

Vagrant
-------

I use `Vagrant`_ for my personal development so I have bundled the facio
I use `Vagrant`_ for development so I have bundled the facio
repository with a ``Vagrantfile``.

There are the following dependencies:

* Vagrant 1.1+
* VirtualBox (what ever the latest is)
* Latest VirtualBox
* Vagrant Guest Additions Plugin: ``vagrant plugin install vagrant-vbguest``
* Vagrant Salt Provisioner: ``vagrant plugin install vagrant-salt``

Once you have all the dependencies installed it should be a simple case of
running ``vagrant up`` at the root of the repository. Once it's finished you
should have a development environment with all of the ``facio`` dependencies
installed into python virtual environment. All you have to do is run:
installed into a python virtual environment. All you have to do is run:

.. code-block:: none
Expand Down
21 changes: 9 additions & 12 deletions docs/hooks.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hooks
=====

Facio has the ability for you to write hooks which are pieces of code that are
Facio has the ability to run hooks. Hooks are pieces of code that are
run either before or after the project template is rendered.

Hooks are defined on a per project basis and are set in a file which resides
Expand All @@ -17,9 +17,6 @@ python dotted paths to code to run. For example:
after:
- path.to.bar
We will go into more detail about how to write your own later however for now
we will show you how to use the bundled hooks that come with Facio.

Bundled Hooks
-------------

Expand Down Expand Up @@ -53,7 +50,7 @@ example the secret key would normally go in ``settings.py``:
.. code-block:: python
...
SECRET_KEY = 'DJANGO_SECRET_KEY'
SECRET_KEY = '{{ DJANGO_SECRET_KEY }}'
..
.. _python-virtualenv-hook-label:
Expand All @@ -76,7 +73,7 @@ Add this hook in either the ``before`` or ``after`` list.
Prompts
^^^^^^^

This hook will ask for the following information with sensible defaults set so
This hook will ask for the following information with sensible defaults set, so
you can just press ``enter`` to skip.

* **Virtual environment name**
Expand All @@ -102,8 +99,8 @@ directory.

.. note::

Since your template is required to have been processed before this can be run
you should only define this hook in the ``after`` list of
Since your template is required to have been processed before this hook
can be run you should only define this hook in the ``after`` list of
``~/.facio.hooks.yml``.

.. code-block:: yaml
Expand Down Expand Up @@ -146,11 +143,11 @@ Hello World
.. warning::

How to add your custom hook onto the python path is beyond the scope of
this documentation. If your hook is not importable it will not work.
this documentation. If your hook cannot be imported it will not work.
See http://www.scotttorborg.com/python-packaging/ for a very
helpful guide on python packaging.

Lets make a simple hook that prints ``hello world``. Create a file in your home
Let's make a simple hook that prints "hello world". Create a file in your home
directory a new directory called ``my_hooks`` and inside create 2 files:

* ``__init__.py``
Expand All @@ -166,8 +163,8 @@ And add the following content into ``hello.py``.
This has created a new python module called ``my_hooks`` and inside we have a
``hello.py`` python file that can be imported containing our ``run`` function.

Thats it, now all we need to do is get it on the python path. How to add your
custom hooks onto the python path is beyond the scope of this document, see
That's it, now all we need to do is get it on the python path. How to add your
custom hook onto the python path is beyond the scope of this document, see
http://www.scotttorborg.com/python-packaging/ for a very helpful guide on python
packaging.

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Welcome to Facio

|PyPi_version| |PyPi_downloads| |travis_master| |coveralls_master|

Facio is a project skeleton generation tool written in python. It's designed to
Facio is a project skeleton generation tool written in Python. It's designed to
make it easy for you to build a single project template, or as many templates
as you like and with one command bootstrap a new project.
as you like, with one command to bootstrap a new project.

.. code-block:: none
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Installing
==========

Facio can be installed on system using the standard python package installers
``pip`` and ``easy_install``.
``pip`` or ``easy_install``.

.. note::

Expand Down

0 comments on commit 8d8c0fb

Please sign in to comment.