Skip to content

Commit

Permalink
Merge pull request #76 from Eric89GXL/minor-tweaks
Browse files Browse the repository at this point in the history
FIX: Fix readme
  • Loading branch information
larsoner authored Jun 9, 2016
2 parents 6b515a2 + 8339cb5 commit 8e52bb7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ tar-sync: codespell-$(VERSION).tar.xz codespell-$(VERSION).tar.xz.asc
--name codespell-$(VERSION).tar.xz.asc \
--file codespell-$(VERSION).tar.xz.asc

pypi:
python setup.py sdist register upload

clean:
rm -rf codespell
rm -rf codespell.1
Expand Down
52 changes: 28 additions & 24 deletions README.md → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,34 @@ codespell
Fix common misspellings in text files. It's designed primarily for checking
misspelled words in source code, but it can be used with other files as well.

Information
-----------

GitHub project: <https://github.com/lucasdemarchi/codespell>
Useful links
------------

Mailing list: <[email protected]> with web archives/interface at
<https://groups.google.com/forum/?fromgroups#!forum/codespell>
* `GitHub project <https://github.com/lucasdemarchi/codespell>`_

* Mailing list: <[email protected]> with web archives/interface
`here <https://groups.google.com/forum/?fromgroups#!forum/codespell>`_

Repository: <https://github.com/lucasdemarchi/codespell>
* `Repository <https://github.com/lucasdemarchi/codespell>`_

Releases: <https://github.com/lucasdemarchi/codespell/releases>
* `Releases <https://github.com/lucasdemarchi/codespell/releases>`_

Requirements
------------

Python 3.0 or above.
Python 2.7 or above.

Installation
------------

You can use ``pip`` to install codespell with e.g.::

make and help2man packages needed for "make install".
pip install codespell

Usage
-----

Check usage with `./codespell.py -h`. There are a few command line options.
Check usage with ``./codespell.py -h``. There are a few command line options.
Note that upon installation with "make install" we don't have the "py" suffix.
We ship a dictionary that is an improved version of the one available at
<http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines>
Expand All @@ -43,31 +47,31 @@ i.e. from Wikipedia. The difference is how multiple options are treated and
that the last argument is the reason why a certain entry could not be applied
directly, but instead be manually inspected. E.g:

1. Simple entry: one wrong word / one suggestion
1. Simple entry: one wrong word / one suggestion::

`calulated->calculated`
calulated->calculated

2. Entry with more than one suggested fix
2. Entry with more than one suggested fix::

`fiel->feel, field, file, phial,`
fiel->feel, field, file, phial,

Note the last comma! You need to use it, otherwise the last suggestion
will be discarded (see below for why). When there are more than one
suggestion, automatically fix is not possible and the best we can do is
to give the user the file and line where the error occurred as well as
the suggestions.
Note the last comma! You need to use it, otherwise the last suggestion
will be discarded (see below for why). When there are more than one
suggestion, automatically fix is not possible and the best we can do is
to give the user the file and line where the error occurred as well as
the suggestions.

3. Entry with one word, but with automatically fix disabled
3. Entry with one word, but with automatically fix disabled::

`clas->class, disabled because of name clash in c++`
clas->class, disabled because of name clash in c++

Note that there isn't a comma in the end of the line. The last argument is
treated as the reason why a suggestion cannot be automatically applied.
treated as the reason why a suggestion cannot be automatically applied.

License
-------

The Python script `codespell.py` is available with the following terms:
The Python script ``codespell.py`` is available with the following terms:
(*tl;dr*: [GPL v2][])

> Copyright (C) 2010-2011 Lucas De Marchi <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
USAGE = """
\t%prog [OPTIONS] [file1 file2 ... fileN]
"""
VERSION = '1.9'
VERSION = '1.9.0'

misspellings = {}
exclude_lines = set()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
URL = 'https://github.com/lucasdemarchi/codespell/'
LICENSE = 'GPL v2'
DOWNLOAD_URL = 'https://github.com/lucasdemarchi/codespell/'
with open('README.md', 'r') as f:
with open('README.rst', 'r') as f:
LONG_DESCRIPTION = f.read()

if __name__ == "__main__":
Expand Down

0 comments on commit 8e52bb7

Please sign in to comment.