update docs and fix app image
authorclaromes <support@claromes.com>
Mon, 26 May 2025 04:34:34 +0000 (01:34 -0300)
committerclaromes <support@claromes.com>
Mon, 26 May 2025 04:34:34 +0000 (01:34 -0300)
README.md
app/app.py
docs/api.rst
docs/outputs.rst
docs/quickstart.rst
pyproject.toml
waybacktweets/_cli.py
waybacktweets/api/parse.py

index 20265b3a0efd9e1c24521d5fc5a0c8c6a1268267..fc497a3e7df0750101350f1404cdd52b48518fd6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,14 +6,12 @@ Retrieves archived tweets CDX data from the Wayback Machine, performs necessary
 
 ## Installation
 
-Python 3.10+ is required to install `waybacktweets`.
+It is compatible with Python versions 3.10 and above. [See installation options](https://waybacktweets.claromes.com/installation).
 
 ```shell
 pipx install waybacktweets
 ```
 
-[Read more about the installation options](https://waybacktweets.claromes.com/installation).
-
 ## CLI
 
 ```shell
@@ -43,11 +41,14 @@ Options:
   -v, --verbose                   Shows the log.
   --version                       Show the version and exit.
   -h, --help                      Show this message and exit.
+
 Examples:
   waybacktweets jack
   waybacktweets --from 20200305 --to 20231231 --limit 300 --verbose jack
+
 Repository:
   https://github.com/claromes/waybacktweets
+
 Documentation:
   https://waybacktweets.claromes.com
 ```
@@ -102,13 +103,13 @@ Important: Starting from version 1.0, the web app will no longer receive all upd
 
 ## Documentation
 
-- [Wayback Tweets documentation](https://waybacktweets.claromes.com/)
-- [Wayback CDX Server API (Beta) documentation](https://archive.org/developers/wayback-cdx-server.html)
+- [Wayback Tweets documentation](https://waybacktweets.claromes.com/).
+- [Wayback CDX Server API (Beta) documentation](https://archive.org/developers/wayback-cdx-server.html).
 
 ## Acknowledgements
 
 - Tristan Lee (Bellingcat's Data Scientist) for the idea.
-- Jessica Smith (Snowflake's Community Growth Specialist) and Streamlit/Snowflake team for the additional server resources on Streamlit Cloud.
+- Jessica Smith (Snowflake's Community Growth Specialist) and Streamlit team for the additional server resources on Streamlit Cloud.
 - OSINT Community for recommending the package and the application.
 
 ## License
index 23fdd237b3b843fc9d41db70e1991a6c55e8e0cb..a8fd1fe3b3cb63d7b558226c33025df8f4b6b5d7 100644 (file)
@@ -103,6 +103,9 @@ st.html(
         div[class="st-emotion-cache-1v0mbdj e115fcil1"] {
             max-width: 100%;
         }
+        div[data-testid="stElementToolbarButtonContainer"] {
+            display: none;
+        }
     </style>
     """
 )
@@ -176,7 +179,7 @@ if st.query_params.username != "":
 
 # ------ UI Settings ------ #
 
-st.image(TITLE, use_container_width="never")
+st.image(TITLE, width=None)
 st.write(
     "Retrieves archived tweets CDX data in HTML, CSV, and JSON formats."  # noqa: E501
 )
@@ -211,7 +214,7 @@ st.caption(
 limit = st.text_input(
     "Limit",
     key="limit",
-    help="Query result limits",
+    help="Query result limits (int)",
 )
 
 unique = st.checkbox(
index 6a5a2b49935acfda5e94ac596b39c4b9cffd591e..a1236c02f6977f516eb7cc35124a64bfeb2d47fb 100644 (file)
@@ -1,3 +1,5 @@
+.. _api:
+
 API
 ====
 
index 7b700d07f78b2a4c0fab49687f1ce6d7a4dcacf5..66542187b867bc863f7fcb9f839c4b8ae63e2d49 100644 (file)
@@ -16,6 +16,8 @@ This format allows for easy viewing of the archived tweets, through the use of t
 
 - ``parsed_tweet_url``: (`str`) The original tweet URL after parsing. Old URLs were archived in a nested manner. The parsing applied here unnests these URLs when necessary. Refer to the :ref:`utils` for more details.
 
+If you want to define which viewing options should be displayed in the HTML file, you need to use the package as a module and specify the desired view in the field options. See the :ref:`api` Reference and the :ref:`module` usage example.
+
 Additionally, other fields are displayed.
 
 .. note::
index 209b11af07c5e57c2c8fe39ffd029f77416cf29b..2a8240669f3c6e8c9a23a81b0c53408caaf83089 100644 (file)
@@ -12,6 +12,8 @@ waybacktweets [OPTIONS] USERNAME
 
     waybacktweets --from 20150101 --to 20191231 --limit 250 jack
 
+.. _module:
+
 Module
 -------------
 
index 2d6f4d85a425f5f9c362030dfc068100d7179f2d..974162e886a0737f03c30e571d6ff4c4ae1829df 100644 (file)
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "waybacktweets"
-version = "1.0"
+version = "1.0rc1"
 description = "Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data."
 authors = ["Claromes <support@claromes.com>"]
 license = "GPLv3"
index 1862e658a20126b010537a0cc479a453e5ccf076..aacf4df31e97d699ea103a8a7c2f781ca2140687 100644 (file)
@@ -38,15 +38,18 @@ class CustomCommand(click.Command):
         formatter.write_text("  USERNAME: The Twitter username without @")
 
         self.format_options(ctx, formatter)
+        formatter.write("\n")
 
         formatter.write_heading("Examples")
         formatter.write_text("  waybacktweets jack")
         formatter.write_text(
             "  waybacktweets --from 20200305 --to 20231231 --limit 300 --verbose jack"
         )
+        formatter.write("\n")
 
         formatter.write_heading("Repository")
         formatter.write_text("  https://github.com/claromes/waybacktweets")
+        formatter.write("\n")
 
         formatter.write_heading("Documentation")
         formatter.write_text("  https://waybacktweets.claromes.com")
index 00cdc89772e6c3ad953cd23291b472d44ca29e0c..ba4e8a01d86dbe44fd4e9aafdf3503fc8a48151c 100644 (file)
@@ -321,7 +321,7 @@ class TweetsParser:
 
             if self.show_resume_key:
                 rprint(
-                    f'[blue]Resumption Key: [bold]{self.archived_tweets_response[-1][0]}[/bold][/blue]\nUse this Resumption Key option (--resumption_key in the CLI or "resumption_key" in field_options via the API) to continue the query from where the previous one left off. This allows you to split a large query into smaller, more efficient ones.\n'  # noqa: E501
+                    f'[blue]Resumption Key: [bold]{self.archived_tweets_response[-1][0]}[/bold][/blue]\nUse this Resumption Key option (--resumption_key in the CLI or "resumption_key" in the Module) to continue the query from where the previous one left off. This allows you to split a large query into smaller, more efficient ones.\n'  # noqa: E501
                 )
 
             return self.parsed_tweets