From 4419b71916655f8d01c008cba840b0ea1909850b Mon Sep 17 00:00:00 2001 From: Claromes Date: Sun, 16 Jun 2024 08:55:39 -0300 Subject: [PATCH] update dirs --- LICENSE.md | 2 +- docs/cli.rst | 2 +- pyproject.toml | 2 +- waybacktweets/{cli/main.py => _cli.py} | 2 +- waybacktweets/cli/__init__.py | 3 --- waybacktweets/utils/__init__.py | 11 ++++++++++- 6 files changed, 14 insertions(+), 8 deletions(-) rename waybacktweets/{cli/main.py => _cli.py} (99%) delete mode 100644 waybacktweets/cli/__init__.py diff --git a/LICENSE.md b/LICENSE.md index f240dca..624d376 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Wayback Tweets - Retrieves archived tweets' CDX data from the Wayback Machine, performs necessary parsing, and saves the data. + Wayback Tweets - Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data. Copyright (C) 2023 Clarissa Mendes (Claromes) This program is free software: you can redistribute it and/or modify diff --git a/docs/cli.rst b/docs/cli.rst index f6f19fc..2a16040 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -4,7 +4,7 @@ CLI Usage --------- -.. click:: waybacktweets.cli.main:cli +.. click:: waybacktweets._cli:main :prog: waybacktweets :nested: full diff --git a/pyproject.toml b/pyproject.toml index 38b4706..abd71e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ max-line-length = 88 extend-ignore = ["E203", "E701"] [tool.poetry.scripts] -waybacktweets = 'waybacktweets.cli.main:cli' +waybacktweets = 'waybacktweets._cli:main' [build-system] requires = ["poetry-core"] diff --git a/waybacktweets/cli/main.py b/waybacktweets/_cli.py similarity index 99% rename from waybacktweets/cli/main.py rename to waybacktweets/_cli.py index 7c31e6a..753b8f5 100644 --- a/waybacktweets/cli/main.py +++ b/waybacktweets/_cli.py @@ -79,7 +79,7 @@ def parse_date( default=None, help="Results matching a certain prefix, a certain host or all subdomains.", # noqa: E501 ) -def cli( +def main( username: str, collapse: Optional[str], timestamp_from: Optional[str], diff --git a/waybacktweets/cli/__init__.py b/waybacktweets/cli/__init__.py deleted file mode 100644 index e38525e..0000000 --- a/waybacktweets/cli/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# flake8: noqa: F401 - -from waybacktweets.cli.main import cli diff --git a/waybacktweets/utils/__init__.py b/waybacktweets/utils/__init__.py index 6752ce2..8a76855 100644 --- a/waybacktweets/utils/__init__.py +++ b/waybacktweets/utils/__init__.py @@ -1,3 +1,12 @@ # flake8: noqa: F401 -from waybacktweets.utils.utils import * +from waybacktweets.utils.utils import ( + check_double_status, + check_pattern_tweet, + clean_tweet_url, + clean_wayback_machine_url, + delete_tweet_pathnames, + get_response, + is_tweet_url, + semicolon_parser, +) -- 2.34.1