Skip to content

Commit 48dff57

Browse files
committed
update docs and fix app image
1 parent 5edda36 commit 48dff57

File tree

8 files changed

+23
-10
lines changed

8 files changed

+23
-10
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ Retrieves archived tweets CDX data from the Wayback Machine, performs necessary
66

77
## Installation
88

9-
Python 3.10+ is required to install `waybacktweets`.
9+
It is compatible with Python versions 3.10 and above. [See installation options](https://waybacktweets.claromes.com/installation).
1010

1111
```shell
1212
pipx install waybacktweets
1313
```
1414

15-
[Read more about the installation options](https://waybacktweets.claromes.com/installation).
16-
1715
## CLI
1816

1917
```shell
@@ -43,11 +41,14 @@ Options:
4341
-v, --verbose Shows the log.
4442
--version Show the version and exit.
4543
-h, --help Show this message and exit.
44+
4645
Examples:
4746
waybacktweets jack
4847
waybacktweets --from 20200305 --to 20231231 --limit 300 --verbose jack
48+
4949
Repository:
5050
https://github.com/claromes/waybacktweets
51+
5152
Documentation:
5253
https://waybacktweets.claromes.com
5354
```
@@ -102,13 +103,13 @@ Important: Starting from version 1.0, the web app will no longer receive all upd
102103

103104
## Documentation
104105

105-
- [Wayback Tweets documentation](https://waybacktweets.claromes.com/)
106-
- [Wayback CDX Server API (Beta) documentation](https://archive.org/developers/wayback-cdx-server.html)
106+
- [Wayback Tweets documentation](https://waybacktweets.claromes.com/).
107+
- [Wayback CDX Server API (Beta) documentation](https://archive.org/developers/wayback-cdx-server.html).
107108

108109
## Acknowledgements
109110

110111
- Tristan Lee (Bellingcat's Data Scientist) for the idea.
111-
- Jessica Smith (Snowflake's Community Growth Specialist) and Streamlit/Snowflake team for the additional server resources on Streamlit Cloud.
112+
- Jessica Smith (Snowflake's Community Growth Specialist) and Streamlit team for the additional server resources on Streamlit Cloud.
112113
- OSINT Community for recommending the package and the application.
113114

114115
## License

app/app.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
div[class="st-emotion-cache-1v0mbdj e115fcil1"] {
104104
max-width: 100%;
105105
}
106+
div[data-testid="stElementToolbarButtonContainer"] {
107+
display: none;
108+
}
106109
</style>
107110
"""
108111
)
@@ -176,7 +179,7 @@ def scroll_page():
176179

177180
# ------ UI Settings ------ #
178181

179-
st.image(TITLE, use_container_width="never")
182+
st.image(TITLE, width=None)
180183
st.write(
181184
"Retrieves archived tweets CDX data in HTML, CSV, and JSON formats." # noqa: E501
182185
)
@@ -211,7 +214,7 @@ def scroll_page():
211214
limit = st.text_input(
212215
"Limit",
213216
key="limit",
214-
help="Query result limits",
217+
help="Query result limits (int)",
215218
)
216219

217220
unique = st.checkbox(

docs/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _api:
2+
13
API
24
====
35

docs/outputs.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This format allows for easy viewing of the archived tweets, through the use of t
1616

1717
- ``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.
1818

19+
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.
20+
1921
Additionally, other fields are displayed.
2022

2123
.. note::

docs/quickstart.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ waybacktweets [OPTIONS] USERNAME
1212
1313
waybacktweets --from 20150101 --to 20191231 --limit 250 jack
1414
15+
.. _module:
16+
1517
Module
1618
-------------
1719

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "waybacktweets"
3-
version = "1.0"
3+
version = "1.0rc1"
44
description = "Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data."
55
authors = ["Claromes <support@claromes.com>"]
66
license = "GPLv3"

waybacktweets/_cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,18 @@ def format_help(
3838
formatter.write_text(" USERNAME: The Twitter username without @")
3939

4040
self.format_options(ctx, formatter)
41+
formatter.write("\n")
4142

4243
formatter.write_heading("Examples")
4344
formatter.write_text(" waybacktweets jack")
4445
formatter.write_text(
4546
" waybacktweets --from 20200305 --to 20231231 --limit 300 --verbose jack"
4647
)
48+
formatter.write("\n")
4749

4850
formatter.write_heading("Repository")
4951
formatter.write_text(" https://github.com/claromes/waybacktweets")
52+
formatter.write("\n")
5053

5154
formatter.write_heading("Documentation")
5255
formatter.write_text(" https://waybacktweets.claromes.com")

waybacktweets/api/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def parse(self, print_progress=False) -> Dict[str, List[Any]]:
321321

322322
if self.show_resume_key:
323323
rprint(
324-
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
324+
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
325325
)
326326

327327
return self.parsed_tweets

0 commit comments

Comments
 (0)