From dbde5e00c5f41de0a8afa97fde78f4dc15ee2ba1 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Tue, 30 Apr 2019 22:29:09 +0200 Subject: [PATCH] separated the Cheat Adapter to a module --- lib/adapter/cheat_cheat.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/adapter/cheat_cheat.py diff --git a/lib/adapter/cheat_cheat.py b/lib/adapter/cheat_cheat.py new file mode 100644 index 0000000..6db5638 --- /dev/null +++ b/lib/adapter/cheat_cheat.py @@ -0,0 +1,22 @@ +""" +Adapter for https://github.com/cheat/cheat + +Cheatsheets are located in `cheat/cheatsheets/` +Each cheat sheet is a separate file without extension +""" + +# pylint: disable=relative-import,abstract-method + +from git_adapter import GitRepositoryAdapter + +class Cheat(GitRepositoryAdapter): + """ + cheat/cheat adapter + """ + + _adapter_name = "cheat" + _output_format = "code" + _cache_needed = True + _repository_url = "https://github.com/cheat/cheat" + _cheatsheet_files_prefix = "cheat/cheatsheets/" + _cheatsheet_file_mask = "*"