change relative

This commit is contained in:
Daniel Tsvetkov 2020-03-17 19:00:09 +01:00
parent efb60782e9
commit f4075b7bb5
4 changed files with 13 additions and 12 deletions

6
src/main.py Normal file
View File

@ -0,0 +1,6 @@
from tww.tokenizer import parse_args, setup_logging_level, main
if __name__ == "__main__":
args = parse_args()
setup_logging_level(args.debug)
main(args)

View File

@ -5,7 +5,7 @@ import os
from fuzzywuzzy import fuzz
from tww import basepath
from tww.tww import basepath
@contextlib.contextmanager

View File

@ -2,16 +2,17 @@ import argparse
import json
import locale
import re
import logging
from datetime import datetime
from pygments import highlight, lexers, formatters
from scalpl import Cut
from localization import setlocale, resolve_locale
from tww import ISO_FORMAT, time_to_emoji, time_ago, workday_diff, workhours_diff, td_remainders, td_totals, td_iso8601
from tww import resolve_timezone, dateparser_parse_dt, get_utcnow, get_s_since_epoch, get_ms_since_epoch, \
from tww.localization import setlocale, resolve_locale
from tww.tww import ISO_FORMAT, time_to_emoji, time_ago, workday_diff, workhours_diff, td_remainders, td_totals, td_iso8601
from tww.tww import resolve_timezone, dateparser_parse_dt, get_utcnow, get_s_since_epoch, get_ms_since_epoch, \
dt_tz_translation, get_local_now, query_to_format_result
from common import logger
from tww.common import logger
custom_locale = resolve_locale()
@ -329,9 +330,3 @@ def main(args):
if args.full:
pretty_print_dict(result)
show_magic_results(result, args)
if __name__ == "__main__":
args = parse_args()
setup_logging_level(args.debug)
main(args)

View File

@ -29,7 +29,7 @@ from pytz.exceptions import UnknownTimeZoneError
from timezonefinder import TimezoneFinder
from word2number import w2n
from common import logger
from tww.common import logger
FUZZ_THRESHOLD = 70
ISO_FORMAT = '%Y-%m-%dT%H:%M:%S%z'