Commit Graph

66 Commits

Author SHA1 Message Date
Chris Allen Lane
91f0d02de2
v3.3.0 (#525)
* feat: directory-scoped cheatpaths

`cheat` now searches for a `.cheat` directory in the current working
directory. If found, that directory is (temporarily) appended to the slice
of cheatpaths.

* makefile wip

* fix: appeases linter

Appeases linter (`go vet`) by adding quotation marks to YAML struct
tags.

* chore: modifies .gitignore

Adds `tag` to `.gitignore`

* feat: adds Makefile

Adds a `Makefile` for managing build-related tasks.

* chore: documents directory-local paths

Adds documentation regarding the new directory-local cheatpath
functionality.

* chore: updates dependencies

* chore: bumps version to 3.3.0

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.
2020-01-20 12:34:48 -05:00
Chris Lane
7f3ae2ab30 feat: ARM support
Modifies `bin/build_release.sh` to compile releases for ARM versions 5,
6, and 7.
2019-12-28 09:53:55 -05:00
Chris Lane
27a4991a3a feat: updates build scripts
Build scripts now invoke `go mod vendor` and `go mod tidy` early in the
build process, to ensure that the `vendor` directory stays consistent
with the `go.mod` et. al.
2019-11-12 19:02:42 -05:00
Chris Lane
a13ad99241 chore: modified build scripts
Modified build scripts to always use local vendoring, now that the
project contains a `vendor` directory.
2019-10-28 19:39:22 -04:00
Chris Lane
d19f0e1c5d chore: deprecates bin/deps.sh
- Deprecates `bin/deps.sh`. It was rendered obsolete with 217566, and
  the introduction of a `go.mod` file.
- Fixes two minor typos in the buld scripts.
- Bumps the version to `3.0.1`.
2019-10-27 10:26:24 -04:00
Chris Lane
e5114a3e76 Re-wrote from scratch in Golang
- Re-implemented the project in Golang, and deprecated Python entirely
- Implemented several new, long-requested features
- Refactored cheatsheets into a separate repository
2019-10-20 10:02:28 -04:00
Chris Lane
5487314676 Version bump: 2.5.1 2019-02-13 12:42:58 -05:00
Aroonav Mishra
fcb82778e4 * Corrected the logic to execute the cheat script.
* Check VISUAL, CHEAT_EDITOR, EDITOR environment variables before falling
back to wordpad as the default editor.
2019-02-05 12:18:26 +05:30
Aroonav Mishra
da92421948 Merge remote-tracking branch 'upstream/master' 2019-02-05 10:14:39 +05:30
Chris Lane
074dba6e99 v2.5.0
`minor` version bump to `2.5.0`.
2019-02-04 12:04:52 -05:00
Chris Lane
3ad923eff0 Refactored (11)
Renamed `CHEAT_DEFAULT_DIR` to `CHEAT_USER_DIR` because the latter more
accurately describes the purpose of the variable.
2019-02-01 15:10:03 -05:00
Chris Lane
ba47dc2cbc Refactored (10)
- Added `ci/lint.sh`, which uses `flake8` to lint the relevant files
- Made changes to appease the linter.
- Bugfix in `cheat/configuration` (missing dependency)
2019-02-01 14:44:48 -05:00
Chris Lane
5793c1845a Refactored (8)
Refactored `Sheet` class:

- Removed unnecessary indirection and extraneous methods
- Renamed some methods to conform to Pythonic conventions
- Renamed the `create_or_edit` method to `edit` to be consistent with
  subcommand name (`--edit`)
2019-02-01 11:23:38 -05:00
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
Aroonav Mishra
d048ea5a10 Enable starting the cheat python script on windows.
For this add a small batch script in the same directory as the
cheat script.
2017-11-12 18:48:04 +05:30
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