Commit graph

52 commits

Author SHA1 Message Date
Chris Lane
e2b5728283 Refactored (7)
Refactored for general code-clarity, with particular focus on removing
needless abstraction within `Sheet` and `Sheets` classes.
2019-01-31 20:03:56 -05:00
Chris Lane
d61e4e7c34 Refactored (6)
Standardized (mostly) how the various classes are initialized.
2019-01-31 18:08:19 -05:00
Chris Lane
145a81dcd6 Var renames
Replaced more references to deprecated envvar names to their newer
counterparts.
2019-01-31 17:55:26 -05:00
Chris Lane
7c4fc54681 Refactored (5)
- Extracted `Colorize` class out of `Util` class. (The latter now only
  contains static methods.)
- Renamed methods in `Colorize` class for improved clarity.
- Refactored as necessary to accommodate the changes above.
2019-01-31 17:43:21 -05:00
Chris Lane
928637c9db Refactored (3)
Removed unnecessary `import` calls.
2019-01-31 17:14:21 -05:00
Chris Lane
ab87bb11c4 Refactored (2)
Created an `Editor` class out methods in the `Util` class to enhance
code clarity.
2019-01-31 17:03:21 -05:00
Chris Lane
8f757d7735 Refactored (1)
Performed a general refactoring, focusing on the following:

- Removing layers of abstraction in config handling
- Stubbing out proper config validator
- Updating envvar names located throughout the project
2019-01-31 16:45:28 -05:00
Chris Lane
c922ef4c8d Version bump: 2.4.2
Contains `termcolor` dependency fix.
2019-01-29 11:45:43 -05:00
Chris Lane
9ea60d12ff Version-bump to 2.4.1
- Includes various bugfixes regarding UTF-8 encoding
- Adds new cheatsheets
2019-01-29 10:58:57 -05:00
Chris Lane
1b6b5b79b7 Version bump: 2.4.0
Preparing a new `minor` release.
2019-01-27 14:36:57 -05:00
Tomas Korbar
4d19505b79 Conform code to pep8 2019-01-15 19:38:24 +01:00
Tomas Korbar
a2e028fd19 Move validation of CHEAT_HIGHLIGHT value to Configuration class
Method _check_configuration should be used for validating all bad
values from now on
2019-01-15 19:21:33 +01:00
Tomas Korbar
5eec6bf040 Improve handling of settings
Constructors of classes which need direct access to configuration
now take Config class instance as parameter which will give them
better maintainability in the future

CHEAT_HIGHLIGHT has been added to Configuration class
2019-01-15 19:13:30 +01:00
Tomas Korbar
7814de96d2 Add classes for better readability 2019-01-15 17:09:39 +01:00
Chris Lane
22b64d2d08 Merge branch 'master' of https://github.com/liuyang1/cheat into liuyang1-master
Resolving merge-conflicts.
2019-01-11 17:00:39 -05:00
Chris Lane
28a2902e20 Implemented validation on CHEAT_HIGHLIGHT
Implemnted an assertion that `CHEAT_HIGHLIGHT` (if set) contains a value
that is acceptible to `termcolors`. This happens only once, upon the
invokation of `__main__`. If the assertion fails, `cheat` terminates
with an exit code of `1`.
2019-01-11 16:26:57 -05:00
Chris Lane
cccf37c284 Bumped the patch version number 2018-10-16 10:45:09 -04:00
Chris Lane
8ec51d3194 v2.3.0
Version-bump to `v2.3.0`.
2018-10-15 10:51:11 -04:00
liuyang1
c0fe871b33 fix except case
- when redirect stdout to pipe but not tty, it throw exception.
- when have no content, it throw exception.
- remove reductant newline at end of file
2018-06-13 18:58:37 +08:00
Chris Lane
aa1e12625e Version bump to 2.2.3. 2017-12-19 12:42:07 -05:00
Chris Lane
d7272c50c4 v2.2.2
Added new cheatsheets.
2017-09-16 23:15:15 -04:00
Chris Lane
d6dc39c687 v2.2.1
Version bump to 2.2.1. (Release contains new default cheatsheets.)
2017-09-05 14:23:10 -04:00
Chris Lane
edd7b5e806 Minor revisions on #244
- When using GFM code fences, strip the last line in addition to the
  first
- Updated `README.md` to mention the new feature
- `minor` version-bump to `2.2.0`.
2017-02-28 18:59:27 -05:00
Chris Lane
7209f2c929 docopt
Made revisions to the content of the docopt template.
2017-02-27 23:09:51 -05:00
Chris Lane
068d117bef patch version bump. 2017-02-27 23:02:23 -05:00
Chris Lane
8cad76943a v2.1.27
`patch` version bump.
2016-11-27 11:10:05 -05:00
Chris Lane
eff042d50b patch version bump 2016-08-05 15:18:52 -04:00
Romanos Skiadas
bf4f1c80ca Style fixes
Don't use * imports, fix indentations, other small fixes
2016-07-19 14:50:51 +03:00
Chris Lane
3be95142ed v2.1.25 2016-05-29 21:47:22 -04:00
Chris Lane
20d985d993 Working around failed upload
pypi responded with an HTTP 500 when uploading the last version of
`cheat`, and this seems to have caused some problems. No changes were
made in this commit other than incrementing the version number in an
attempt to resolve this.
2016-03-24 12:41:40 -04:00
Chris Lane
09f821835c v2.1.23 2016-03-24 12:39:20 -04:00
Chris Lane
a063c7bb64 Licensing
Dual-licensed `cheat` under both the GPL3 and MIT licenses.
2016-02-15 17:13:20 -05:00
Chris Lane
d058ee087e Patch version bump. 2016-02-15 13:22:01 -05:00
Chris Lane
f9e8e041ef patch version bump. 2016-01-04 21:50:40 -05:00
Chris Lane
b6137cac8b patch version bump 2015-11-22 11:28:32 -05:00
Chris Lane
6a2eda80d4 patch version bump. 2015-10-15 18:57:33 -04:00
Chris Lane
20d52376f9 Undid packaging refactoring. 2015-10-15 18:56:34 -04:00
Alessio Bogon
4d57f529c9 Use entry_points instead of scripts in setup.py
This allows a fine-grained control of the dependencies, because it generates a wrapper script
that calls the specifiend function (i.e., main inside cheat/app.py)
2015-01-09 00:36:49 +01:00
Chris Lane
be2cb6e632 Version 2.1.3
- Added new cheatsheets
- Appended to `.gitignore`
2015-01-05 20:44:25 -05:00
Chris Lane
03bb651bf0 Version bump 2014-12-29 21:45:46 -05:00
Chris Lane
603bc360c0 Version bump 2014-12-09 20:58:15 -05:00
Chris Lane
6a8e3f7fc6 Version bump. 2014-08-06 22:01:06 -04:00
Chris Lane
e4417b2d65 Version bump
Realized a 2.0.8 had already been pushed to PyPi, so I just
version-bumped this to 2.0.9.
2014-06-03 22:38:24 -04:00
Charley Peng
ccfe2a9cbd missing file in version bump 2014-05-30 12:24:39 +10:00
Chris Lane
d7d033c908 Version bump 2014-05-28 21:02:27 -04:00
Chris Lane
0a3fd3559c Resolves #160
The `setup.py` script no longer attempts to install files to privileged
system directories. (Previously, it attempted to do this in order to
enable command-line autocompletion.) In lieu of doing this within the
installer directly, I have simply included brief instructions explaining
how to configure this manually.

Version bumped accordingly.
2014-05-28 20:49:56 -04:00
Chris Lane
8677e0c35a Added a CONTRIBUTING.md file
- Added a CONTRIBUTING.md file
- Corrected a small indentation error
- version bump
2014-05-25 22:19:43 -04:00
Chris Lane
afcaaafbe5 Improved filesystem efficiency
Previously, `sheets.print()` would query the filesystem every time it
was invoked. This was inelegant, because it is called multiple times
every time `cheat` is executed. Thus, unnecessary calls were being made
out to the filesystem.

Now the result of that function is being buffered into a module variable
when it is executed the first time, and served from there thereafter. I
broke the "functional" paradigm to a degree by doing this, but it wasn't
worth the complexity of implementing proper memoization (decorators,
etc) for such a trivial case.

Bumped the version number accordingly.
2014-05-25 21:55:25 -04:00
Chris Lane
f128167311 Version bump 2014-05-25 19:47:08 -04:00
Chris Lane
f0cbc2df7b Version bump 2014-05-25 19:41:45 -04:00