mirror of
https://github.com/Ragora/TSScraper.git
synced 2026-03-25 23:29:18 +00:00
The validator now better deduces property declarations by also recursing datablock inheritance; fix datablock inheritance erroneously including commenting on the same line; fix bugs in dealing with datablock redeclarations; make HTML exporter output some basic website structure with Bootstrap; Adjust datablock property checks a little bit
This commit is contained in:
parent
8f969d7208
commit
c6b2a473ce
9 changed files with 294 additions and 59 deletions
19
main.py
19
main.py
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import re
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
import multiprocessing
|
||||
import importlib
|
||||
|
|
@ -82,13 +83,27 @@ class Application(object):
|
|||
self.print_usage()
|
||||
return
|
||||
|
||||
scraper = tsscraper.TSScraper(self.target_directory, self.thread_count)
|
||||
# First, process base
|
||||
base_results = None
|
||||
if (os.path.isdir("base") is False):
|
||||
print("Warning: No local copy of base found! Some reference checks will report false positives.")
|
||||
else:
|
||||
print("INFO: Processing base ...")
|
||||
base_scraper = tsscraper.TSScraper("base", self.thread_count)
|
||||
base_results = base_scraper.process()
|
||||
|
||||
print("INFO: Processing '%s' ..." % self.target_directory)
|
||||
scraper = tsscraper.TSScraper(self.target_directory, self.thread_count, base_results)
|
||||
results = scraper.process()
|
||||
|
||||
# Init the exporter
|
||||
print("INFO: Exporting data ...")
|
||||
if (exporter is not None):
|
||||
# Ensure that the output directory at least exists
|
||||
os.mkdir(self.output_directory)
|
||||
try:
|
||||
os.mkdir(self.output_directory)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
output = exporter.Exporter(results, self.target_directory)
|
||||
output.write(self.output_directory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue