blob: 4a5e87c093292a8d37203d213c266b4733363763 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env python3
# coding=utf-8
import os
from xboomx.config import config
__author__ = 'Victor Häggqvist'
def main():
paths = os.environ['PATH'].split(':')
items = []
for path in paths:
if os.path.isdir(path):
for f in os.listdir(path):
items.append(f)
unique_items = list(set(items))
ignore_list = config.get("ignorelist", "")
for item in unique_items:
if item not in ignore_list:
print(item)
if __name__ == '__main__':
main()
|