From: Claromes Date: Sun, 23 Jun 2024 05:09:40 +0000 (-0300) Subject: update docs X-Git-Url: https://git.claromes.com/?a=commitdiff_plain;h=72d55f02ff286eb7d22fe66c8468700769a02c85;p=waybacktweets.git update docs --- diff --git a/assets/preview_image.jpg b/assets/preview_image.jpg index 5adcfee..cf4633d 100644 Binary files a/assets/preview_image.jpg and b/assets/preview_image.jpg differ diff --git a/assets/waybacktweets_title.png b/assets/waybacktweets_title.png new file mode 100644 index 0000000..937a666 Binary files /dev/null and b/assets/waybacktweets_title.png differ diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 6b9a1dc..773294a 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -1,5 +1,10 @@ body { font-family: Georgia, 'Times New Roman', Times, serif; + background-color: whitesmoke; +} + +a:hover { + background-color: whitesmoke !important; } #cli #usage #waybacktweets h3, diff --git a/docs/conf.py b/docs/conf.py index adb990c..4a4419e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,7 +5,7 @@ from pallets_sphinx_themes import ProjectLink, get_version project = "Wayback Tweets" release, version = get_version("waybacktweets") rst_epilog = f".. |release| replace:: v{release}" -copyright = f"2023 - {datetime.datetime.now().year}, Claromes · Icon by The Doodle Library · Title font by Google, licensed under the Open Font License · Release: v{release}" # noqa: E501 +copyright = f"2023 - {datetime.datetime.now().year}, Claromes · Icon by The Doodle Library · Title font by Google, licensed under the Open Font License · Pre-release: v{release}" # noqa: E501 author = "Claromes" # -- General configuration --------------------------------------------------- diff --git a/docs/contribute.rst b/docs/contribute.rst index 87dffee..54376ac 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -23,9 +23,10 @@ Install from the source, following the :ref:`installation` instructions. Brief explanation about the code under the Wayback Tweets directory: -- ``app``: Streamlit app +- ``app``: Streamlit application code - ``assets``: Title and logo images - ``docs``: Documentation generated with Sphinx +- ``legacy_app``: Legacy Streamlit application code - ``waybacktweets/api``: Main package modules - ``waybacktweets/config``: Global configuration module - ``waybacktweets/exceptions``: Wayback Tweets Exceptions diff --git a/docs/index.rst b/docs/index.rst index 4c61565..2b4b6b2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,13 +3,18 @@ Wayback Tweets ================ -.. image:: ../assets/waybacktweets.png +.. image:: ../assets/waybacktweets_title.png + :alt: Wayback Tweets :align: center -Release: |release| +Pre-release: |release| Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing (see :ref:`field_options`), and saves the data in CSV, JSON, and HTML formats. +.. image:: ../assets/preview_image.jpg + :alt: Preview image + :align: center + .. note:: Intensive queries can lead to rate limiting, resulting in a temporary ban of a few minutes from web.archive.org. @@ -36,23 +41,22 @@ Command-Line Interface cli - -API Reference ---------------- +Streamlit Web App +------------------- .. toctree:: :maxdepth: 2 - api + streamlit -Streamlit Web App -------------------- +API Reference +--------------- .. toctree:: :maxdepth: 2 - streamlit + api Additional Information diff --git a/docs/streamlit.rst b/docs/streamlit.rst index 9c91b05..1db42e0 100644 --- a/docs/streamlit.rst +++ b/docs/streamlit.rst @@ -1,6 +1,3 @@ -.. note:: - The current version of the Web App is 0.4.3. Version 1.0 has not yet been implemented in the Streamlit Web App, as it is in the review and testing phase. - Web App ========= @@ -13,15 +10,13 @@ Filters ---------- - Filtering by date range: Using the ``from`` and ``to`` filters -- Only unavailable tweets: Checks if the archived URL still exists on Twitter (see the :ref:`flowchart`) - -- Only unique Wayback Machine URLs: Filtering by the collapse option using the ``urlkey`` field and the URL Match Scope ``prefix`` +- Limit: Query result limits. +- Offset: Allows for a simple way to scroll through the results. -Pagination ------------- +- Only unavailable tweets: Checks if the archived URL still exists on Twitter (see the :ref:`flowchart`) -Pagination allows viewing up to 25 tweets per page. This helps to avoid rate limiting from the API, for parsing returns with the mimetype ``application/json``. +- Only unique Wayback Machine URLs: Filtering by the collapse option using the ``urlkey`` field and the URL Match Scope ``prefix`` Community Comments @@ -48,6 +43,12 @@ Community Comments
+Legacy App +------------- + +To access the legacy version (v0.4.3) of Wayback Tweets `click here `_. + + .. note:: If the application is down, please check the `Streamlit Cloud Status `_. diff --git a/docs/todo.rst b/docs/todo.rst index 20566e6..295da46 100644 --- a/docs/todo.rst +++ b/docs/todo.rst @@ -5,8 +5,6 @@ TODO -|uncheck| Review and publish the new version of the Streamlit Web App - |uncheck| Unit Tests |uncheck| JSON Parser: Create a separate function to handle JSON return, apply JsonParser (``waybacktweets/api/parse.py:111``), and avoid rate limiting diff --git a/legacy_app/.streamlit/config.toml b/legacy_app/.streamlit/config.toml deleted file mode 100644 index 7eb8bbc..0000000 --- a/legacy_app/.streamlit/config.toml +++ /dev/null @@ -1,11 +0,0 @@ -[theme] -base = "light" -primaryColor = "#ab2e33" -secondaryBackgroundColor = "#efefef" -textColor = "#000000" -backgroundColor = "#f9f9f9" -font = "serif" - -[client] -displayEnabled = true -toolbarMode = "minimal" diff --git a/pyproject.toml b/pyproject.toml index b713bba..fb6042f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "waybacktweets" -version = "1.0a2" +version = "1.0a3" description = "Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data." authors = ["Claromes "] license = "GPLv3" diff --git a/waybacktweets/api/parse.py b/waybacktweets/api/parse.py index f338bb7..65ad041 100644 --- a/waybacktweets/api/parse.py +++ b/waybacktweets/api/parse.py @@ -111,7 +111,7 @@ class JsonParser: """ This class is responsible for parsing tweets when the mimetype is application/json. - Note: This class is in an experimental phase, but it is currently being used by the Streamlit Web App. + Note: This class is in an experimental phase. Args: archived_tweet_url (str): The URL of the archived tweet to be parsed.