update feedback msgs and set verbose to false
authorClaromes <clarissamendes@alunos.utfpr.edu.br>
Sat, 8 Feb 2025 03:42:41 +0000 (00:42 -0300)
committerClaromes <clarissamendes@alunos.utfpr.edu.br>
Sat, 8 Feb 2025 03:42:41 +0000 (00:42 -0300)
app/app.py
waybacktweets/_cli.py
waybacktweets/api/parse.py
waybacktweets/config/config.py

index 1100daaeb58ac0ada11035d8b0e0484ee21c626d..58e5e4a3b4943c875d9ac8e066b422cab81f7758 100644 (file)
@@ -274,7 +274,7 @@ if (st.session_state.query and username) or st.session_state.count:
             st.stop()
 
         with st.spinner(
-            f"Parsing @{st.session_state.current_username}'s archived tweets"
+            f"Parsing the archived tweets of @{st.session_state.current_username}"
         ):
             parsed_tweets = tweets_parser(
                 wayback_tweets, st.session_state.current_username, FIELD_OPTIONS
index 0b9aa9a78a1e347d6a43cd1bfbe306550967c61e..9c783490c2ca1ad6c39e54843c647a24f76a5862 100644 (file)
@@ -39,7 +39,10 @@ def _parse_date(
         raise click.BadParameter("Date must be in format YYYYmmdd")
 
 
-@click.command(context_settings={"help_option_names": ["-h", "--help"]})
+@click.command(
+    context_settings={"help_option_names": ["-h", "--help"]},
+    epilog="Check out our docs at https://claromes.github.io/waybacktweets for more details",  # noqa: E501
+)
 @click.argument("username", type=str)
 @click.option(
     "-c",
@@ -111,7 +114,7 @@ def main(
     """
     Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data.
 
-    USERNAME: The Twitter username without @.
+    USERNAME: The Twitter username without @
     """  # noqa: E501
     try:
         config.verbose = verbose
@@ -158,7 +161,3 @@ def main(
             exporter.save_to_html()
     except Exception as e:
         rprint(f"[red]{e}")
-    finally:
-        rprint(
-            "[yellow]\nNeed help? Read the docs: https://claromes.github.io/waybacktweets"  # noqa: E501
-        )
index 16e645f64effc78f86d81d6d281abb401d89988d..35f26ba5ff7e8d8e52f3919761e63f65647c5430 100644 (file)
@@ -201,10 +201,6 @@ class TweetsParser:
         resumption_key = self.archived_tweets_response[-1][0]
         self.parsed_tweets["resumption_key"].append(resumption_key)
 
-        rprint(
-            f'[blue]\nResumption Key: [bold]{resumption_key}[/bold]\nIf you are using the "limit" (--limit, -l) option and your query is too long, use this key in the "resumption key" (--resumption_key, -rk) option to continue the query from where the previous one ended.\n'  # noqa: E501
-        )
-
     def _add_field(self, key: str, value: Any) -> None:
         """
         Appends a value to a list in the parsed data structure.
@@ -306,7 +302,7 @@ class TweetsParser:
                 task = None
                 if print_progress:
                     task = progress.add_task(
-                        f"Parsing @{self.username}'s archived tweets\n",
+                        f"Parsing the archived tweets of @{self.username}\n",
                         total=len(futures),
                     )
 
@@ -321,4 +317,8 @@ class TweetsParser:
                     if print_progress:
                         progress.update(task, advance=1)
 
+            rprint(
+                f"[blue]Resumption Key: [bold]{self.archived_tweets_response[-1][0]}[/bold]\nUse the Resumption Key (--resumption_key, -rk) option to continue the query from where the previous one ended. This allows you to break a large query into smaller queries more efficiently.[/blue]\n"  # noqa: E501
+            )
+
             return self.parsed_tweets
index ae986befb3dd39b43a0b1ea5edba9a19356bbcf8..0da3029c4eac44bf0b49ee9f18e524cef58f5ef2 100644 (file)
@@ -16,7 +16,7 @@ class _Config:
         verbose (bool): Determines if verbose logging should be enabled.
     """
 
-    verbose: bool = True
+    verbose: bool = False
 
 
 config = _Config()