Documentation generation
This commit is contained in:
parent
a9641acc8e
commit
843d73ff43
|
@ -10,9 +10,9 @@ if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
# Add long and short arguments
|
# Add long and short arguments
|
||||||
parser.add_argument("--file", "-f", help="The instructions file to use if any.")
|
parser.add_argument("--file", "-f", help="The instructions file to use.")
|
||||||
parser.add_argument("--browser", "-b", default="firefox", help="ie, chrome, firefox (Optional)")
|
parser.add_argument("--browser", "-b", default="firefox", help="ie, chrome, firefox (Optional)")
|
||||||
parser.add_argument("--headless", "-hm", default=False, help="Run browser in headless mode.")
|
parser.add_argument("--headless", "-hm", default=False, help="Run browser in headless mode. (Optional)")
|
||||||
parser.add_argument("--persist", "-p", default=False, help="Keep browser open after run. (Optional)")
|
parser.add_argument("--persist", "-p", default=False, help="Keep browser open after run. (Optional)")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
"""
|
||||||
|
Core module
|
||||||
|
"""
|
||||||
|
|
||||||
from .mixins import ControlerMixin
|
from .mixins import ControlerMixin
|
||||||
|
|
||||||
from .utils import Logger
|
from .utils import Logger
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
|
"""
|
||||||
|
Mixins module
|
||||||
|
"""
|
||||||
|
|
||||||
from .ControlerMixin import ControlerMixin
|
from .ControlerMixin import ControlerMixin
|
||||||
|
|
|
@ -35,5 +35,7 @@ class Browser:
|
||||||
|
|
||||||
driver = webdriver.Firefox(options=_options, firefox_profile=profile, log_path=_log_path)
|
driver = webdriver.Firefox(options=_options, firefox_profile=profile, log_path=_log_path)
|
||||||
|
|
||||||
|
if driver is None:
|
||||||
|
raise("No driver set! Check your argument or defaults...")
|
||||||
|
|
||||||
return driver
|
return driver
|
||||||
|
|
|
@ -44,6 +44,9 @@ class Logger:
|
||||||
folder = "core/logs"
|
folder = "core/logs"
|
||||||
file = folder + "/twitter-bot.log"
|
file = folder + "/twitter-bot.log"
|
||||||
|
|
||||||
|
if not os.path.exists(folder):
|
||||||
|
os.mkdir(folder)
|
||||||
|
|
||||||
fh = logging.FileHandler(file)
|
fh = logging.FileHandler(file)
|
||||||
fh.setLevel(level=fhLogLevel)
|
fh.setLevel(level=fhLogLevel)
|
||||||
fh.setFormatter(fFormatter)
|
fh.setFormatter(fFormatter)
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
|
"""
|
||||||
|
Utils module
|
||||||
|
"""
|
||||||
|
|
||||||
from .Logger import Logger
|
from .Logger import Logger
|
||||||
from .Browser import Browser
|
from .Browser import Browser
|
||||||
|
|
Loading…
Reference in New Issue