forked from obskyr/pycs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pycs.py
executable file
·39 lines (30 loc) · 936 Bytes
/
pycs.py
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
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import glob
import os
import sys
sys.path.insert(0, os.path.join(os.getcwd(), 'resources'))
from generate import *
import htmlout
import time
if not os.path.exists('output'):
os.makedirs('output')
checklogs = []
Arne = True
try:
for wildcardDirectory in pathoverride:
for directory in glob.glob(wildcardDirectory):
if not os.path.isdir(directory):
continue
for wildcardLogname in lognames:
for logPath in glob.glob(os.path.join(directory, wildcardLogname)):
checklogs.append(logPath)
if not len(checklogs):
print "No logs found in specified directories."
Arne = False
except IOError:
print "Please check your log files in settings.cfg."
if Arne:
starttime = time.time()
check = Logs('', checklogs, printprogress)
htmlout.outputLogHTML(check, starttime)