Skip to content

Commit daa87ec

Browse files
switched README to RST
1 parent 1c67da7 commit daa87ec

File tree

3 files changed

+53
-42
lines changed

3 files changed

+53
-42
lines changed

README.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
. -*-restructuredtext-*-
2+
3+
comby-python
4+
============
5+
6+
7+
.. image:: https://travis-ci.org/ChrisTimperley/comby.svg?branch=master
8+
:target: https://travis-ci.org/ChrisTimperley/comby
9+
10+
.. image:: https://badge.fury.io/py/comby.svg
11+
:target: https://badge.fury.io/py/comby
12+
13+
.. image:: https://img.shields.io/pypi/pyversions/comby.svg
14+
:target: https://pypi.org/project/comby
15+
16+
Python bindings for `Comby <https://github.com/comby-tools/comby>`_.
17+
18+
19+
Installation
20+
------------
21+
22+
Comby must be installed: https://github.com/comby-tools/comby
23+
24+
To install the latest release from PyPI:
25+
26+
.. code:: shell
27+
28+
$ pip install comby
29+
30+
or to install from source:
31+
32+
.. code:: shell
33+
34+
$ pip install .
35+
36+
37+
Getting Started
38+
---------------
39+
40+
To perform a basic match-rewrite on a given source text:
41+
42+
.. code:: python
43+
44+
from comby import Comby
45+
46+
comby = Comby()
47+
match = 'print :[[1]]'
48+
rewrite = 'print(:[1])'
49+
source_old = 'print "hello world"'
50+
source_new = comby.rewrite(source_old, match, rewrite)
51+
# -> 'print("hello world")

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ author = Christopher Timperley
55
author-email = [email protected]
66
url = https://github.com/ChrisTimperley/comby-python
77
description = Lightweight language-independent syntax rewriting.
8-
long-description = file: README.md, LICENSE
9-
long-descripion-content-type = text/markdown
8+
long-description = file: README.rst, LICENSE
9+
long-descripion-content-type = text/reStructuredText
1010
keywords = rewrite, syntax, comby, transformation
1111
license = MIT
1212
classifiers =

0 commit comments

Comments
 (0)