From 89a9b7cdb4b91b191c0ac5580662695974900cfc Mon Sep 17 00:00:00 2001 From: makimov Date: Mon, 24 Sep 2018 17:03:22 +0300 Subject: [PATCH 1/2] Converting README.rst to README.md and fixing pyproject.toml --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ README.rst | 46 ---------------------------------------------- pyproject.toml | 2 +- 3 files changed, 41 insertions(+), 47 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcae51b --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +Jinja2 extension to handle git-specific things +============================================== + +[![image](https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master)](https://travis-ci.org/sobolevn/jinja2-git) +[![image](https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master)](https://coveralls.io/github/sobolevn/jinja2-git?branch=master) +[![image](https://badge.fury.io/py/jinja2-git.svg)](http://badge.fury.io/py/jinja2-git) +[![image](https://img.shields.io/pypi/pyversions/jinja2-git.svg)](https://pypi.python.org/pypi/jinja2-git) + +Reasoning +--------- + +This plugin is used to render commit hash in `jinja2` templates. We are +using it to render our template version in `cookicutter`: + +- [wemake-django-template](https://github.com/wemake-services/wemake-django-template) +- [wemake-vue-template](https://github.com/wemake-services/wemake-vue-template) + +Usage +----- + +Add it as an extension for +[jinja2](http://jinja.pocoo.org/docs/2.10/extensions/) or +[cookiecutter](http://cookiecutter.readthedocs.io/en/latest/advanced/template_extensions.html). + +And then inside a template: + +``` {.sourceCode .python} +from jinja2 import Environment + +env = Environment(extensions=['jinja2_git.GitExtension']) +template = env.from_string('Commit is: {% gitcommit %}') +# => Commit is: c644682f4899d7e98147ce3a61a11bb13c52b3a0 +``` + +Installation +------------ + +``` {.sourceCode .bash} +$ pip install jinja2-git +``` diff --git a/README.rst b/README.rst deleted file mode 100644 index 2381125..0000000 --- a/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -Jinja2 extension to handle git-specific things ----------------------------------------------- - -.. image:: https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master - :target: https://travis-ci.org/sobolevn/jinja2-git - -.. image:: https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master - :target: https://coveralls.io/github/sobolevn/jinja2-git?branch=master - -.. image:: https://badge.fury.io/py/jinja2-git.svg - :target: http://badge.fury.io/py/jinja2-git - -.. image:: https://img.shields.io/pypi/pyversions/jinja2-git.svg - :target: https://pypi.python.org/pypi/jinja2-git - -Reasoning -~~~~~~~~~ - -This plugin is used to render commit hash in ``jinja2`` templates. -We are using it to render our template version in ``cookicutter``: - -- `wemake-django-template `_ -- `wemake-vue-template `_ - -Usage -~~~~~ - -Add it as an extension for `jinja2 `_ or `cookiecutter `_. - -And then inside a template: - -.. code:: python - - from jinja2 import Environment - - env = Environment(extensions=['jinja2_git.GitExtension']) - template = env.from_string('Commit is: {% gitcommit %}') - # => Commit is: c644682f4899d7e98147ce3a61a11bb13c52b3a0 - - -Installation -~~~~~~~~~~~~ - -.. code:: bash - - $ pip install jinja2-git diff --git a/pyproject.toml b/pyproject.toml index f111463..c1f0035 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ authors = [ "Nikita Sobolev " ] -readme = "README.rst" # Markdown files are supported +readme = "README.md" # Markdown files are supported repository = "https://github.com/sobolevn/jinja2-git" homepage = "https://github.com/sobolevn/jinja2-git" From 4a632966e35a99fb9007176b8ccc82cd555ab9ce Mon Sep 17 00:00:00 2001 From: makimov Date: Tue, 25 Sep 2018 10:37:42 +0300 Subject: [PATCH 2/2] README.md fixed. --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bcae51b..2a2153b 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,20 @@ -Jinja2 extension to handle git-specific things -============================================== +# Jinja2 extension to handle git-specific things -[![image](https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master)](https://travis-ci.org/sobolevn/jinja2-git) -[![image](https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master)](https://coveralls.io/github/sobolevn/jinja2-git?branch=master) -[![image](https://badge.fury.io/py/jinja2-git.svg)](http://badge.fury.io/py/jinja2-git) -[![image](https://img.shields.io/pypi/pyversions/jinja2-git.svg)](https://pypi.python.org/pypi/jinja2-git) +[![Travis](https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master)](https://travis-ci.org/sobolevn/jinja2-git) +[![Coveralls](https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master)](https://coveralls.io/github/sobolevn/jinja2-git?branch=master) +[![PyPI version](https://badge.fury.io/py/jinja2-git.svg)](http://badge.fury.io/py/jinja2-git) +[![Dependencies Status](https://img.shields.io/pypi/pyversions/jinja2-git.svg)](https://pypi.python.org/pypi/jinja2-git) -Reasoning +## Reasoning --------- This plugin is used to render commit hash in `jinja2` templates. We are using it to render our template version in `cookicutter`: -- [wemake-django-template](https://github.com/wemake-services/wemake-django-template) -- [wemake-vue-template](https://github.com/wemake-services/wemake-vue-template) +- [wemake-django-template](https://github.com/wemake-services/wemake-django-template) +- [wemake-vue-template](https://github.com/wemake-services/wemake-vue-template) -Usage +## Usage ----- Add it as an extension for @@ -24,7 +23,7 @@ Add it as an extension for And then inside a template: -``` {.sourceCode .python} +```python from jinja2 import Environment env = Environment(extensions=['jinja2_git.GitExtension']) @@ -32,9 +31,9 @@ template = env.from_string('Commit is: {% gitcommit %}') # => Commit is: c644682f4899d7e98147ce3a61a11bb13c52b3a0 ``` -Installation +## Installation ------------ -``` {.sourceCode .bash} +```bash $ pip install jinja2-git ```