Browse Source

Adjust document format, pypi seems don't like 'code:: sh'

Matthew Wang 10 years ago
parent
commit
3309c601b5
1 changed files with 29 additions and 21 deletions
  1. 29
    21
      README.rst

+ 29
- 21
README.rst View File

@@ -24,10 +24,12 @@ Installation
24 24
 Install with pip
25 25
 ~~~~~~~~~~~~~~~~
26 26
 
27
-Cdiff is already listed on `PyPI <http://pypi.python.org/pypi/cdiff>`_, you can
28
-install with ``pip`` if you have the tool.
27
+Cdiff is already listed on `PyPI`_, you can install with ``pip`` if you have
28
+the tool.
29 29
 
30
-.. code:: sh
30
+.. _PyPI: http://pypi.python.org/pypi/cdiff
31
+
32
+.. code-block:: bash
31 33
 
32 34
     pip install --upgrade cdiff
33 35
 
@@ -36,7 +38,7 @@ Install with setup.py
36 38
 
37 39
 You can also run the setup.py from the source if you don't have ``pip``.
38 40
 
39
-.. code:: sh
41
+.. code-block:: bash
40 42
 
41 43
     git clone https://github.com/ymattw/cdiff.git
42 44
     cd cdiff
@@ -45,13 +47,15 @@ You can also run the setup.py from the source if you don't have ``pip``.
45 47
 Download directly
46 48
 ~~~~~~~~~~~~~~~~~
47 49
 
48
-Just save `cdiff.py <https://raw.github.com/ymattw/cdiff/master/cdiff.py>`_ to
49
-whatever directory which is in your ``$PATH``, for example, ``$HOME/bin`` is in
50
-my ``$PATH``, so I save the script there and name as ``cdiff``.
50
+Just save `cdiff.py`_ to whatever directory which is in your ``$PATH``, for
51
+example, ``$HOME/bin`` is in my ``$PATH``, so I save the script there and name
52
+as ``cdiff``.
53
+
54
+.. _`cdiff.py`: https://raw.github.com/ymattw/cdiff/master/cdiff.py
51 55
 
52
-.. code:: sh
56
+.. code-block:: bash
53 57
 
54
-    curl -sSL https://raw.github.com/ymattw/cdiff/master/cdiff.py > ~/bin/cdiff
58
+    curl -ksSL https://raw.github.com/ymattw/cdiff/master/cdiff.py > ~/bin/cdiff
55 59
     chmod +x ~/bin/cdiff
56 60
 
57 61
 Usage
@@ -81,7 +85,7 @@ Type ``cdiff -h`` to show usage::
81 85
 Read diff from local modification in a *Git/Mercurial/Svn* workspace (output
82 86
 from e.g. ``git diff``, ``svn diff``):
83 87
 
84
-.. code:: sh
88
+.. code-block:: bash
85 89
 
86 90
     cd proj-workspace
87 91
     cdiff                       # view colored incremental diff
@@ -97,7 +101,7 @@ from e.g. ``git diff``, ``svn diff``):
97 101
 Read log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.
98 102
 ``git log -p``, ``svn log --diff``), note *--diff* option is new in svn 1.7.0:
99 103
 
100
-.. code:: sh
104
+.. code-block:: bash
101 105
 
102 106
     cd proj-workspace
103 107
     cdiff -l                    # read log along with changes
@@ -107,7 +111,7 @@ Read log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.
107 111
 
108 112
 Pipe in a diff:
109 113
 
110
-.. code:: sh
114
+.. code-block:: bash
111 115
 
112 116
     git log -p -2 | cdiff       # view git log with changes of last 2 commits
113 117
     git show 15bfa | cdiff -s   # view a given git commit, side by side
@@ -126,7 +130,7 @@ Pipe in a diff:
126 130
 
127 131
 Redirect output to another patch file is safe:
128 132
 
129
-.. code:: sh
133
+.. code-block:: bash
130 134
 
131 135
     svn diff -r PREV | cdiff -s > my.patch
132 136
 
@@ -142,16 +146,20 @@ Cdiff has following known issues:
142 146
 
143 147
 Pull requests are very welcome, please make sure your changes can pass unit
144 148
 tests and regression tests by run ``make test`` (required tool *coverage* can
145
-be installed with ``pip install coverage``).  Also watch out `travis build
146
-<https://travis-ci.org/ymattw/cdiff/pull_requests>`_ after push, make sure it
147
-passes as well.
149
+be installed with ``pip install coverage``).  Also watch out `travis build`_
150
+after push, make sure it passes as well.
151
+
152
+.. _`travis build`: https://travis-ci.org/ymattw/cdiff/pull_requests
148 153
 
149 154
 See also
150 155
 --------
151 156
 
152
-I have another tool `coderev <https://github.com/ymattw/coderev>`_ which
153
-generates side-by-side diff pages for code review from two given files or
154
-directories, I found it's not easy to extend to support git so invented
155
-`cdiff`.  Idea of ansi color markup is also from project `colordiff
156
-<https://github.com/daveewart/colordiff>`_.
157
+I have another tool `coderev`_ which generates side-by-side diff pages for code
158
+review from two given files or directories, I found it's not easy to extend to
159
+support git so invented `cdiff`.  Idea of ansi color markup is also from
160
+project `colordiff`_.
161
+
162
+.. _coderev: https://github.com/ymattw/coderev
163
+.. _colordiff: https://github.com/daveewart/colordiff
157 164
 
165
+.. vim:set ft=rst et sw=4 sts=4 tw=79: