added option to ignore files
This commit is contained in:
parent
7884fbdbcd
commit
07c1c0f9c8
1 changed files with 4 additions and 1 deletions
5
mytools
5
mytools
|
@ -6,7 +6,8 @@ import os.path as path
|
|||
|
||||
CFG = {
|
||||
"max_lines": 20,
|
||||
"offset": 20
|
||||
"offset": 20,
|
||||
"ignored_files": ["LICENSE"]
|
||||
}
|
||||
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
@ -48,6 +49,8 @@ def list_tools():
|
|||
list_dir = sorted(os.listdir(SCRIPT_PATH))
|
||||
|
||||
for element in list_dir:
|
||||
if element in CFG["ignored_files"]:
|
||||
continue
|
||||
element_path = path.join(SCRIPT_PATH, element)
|
||||
if path.isfile(element_path):
|
||||
print(element, end="")
|
||||
|
|
Loading…
Reference in a new issue