Improve the appearance of readme (#45)
* replaced text header wth image * svg * Update README.md * Update README.md * Update README.md * level 2 * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Create CONTRIBUTING.md * Update README.md * Add files via upload * Update README.md * Delete waybackpy-colored 284.png * Delete waybackpy colored.png * Update README.md * Update index.rst * Update index.rst * Update index.rst * Update setup.py * Delete index.rst * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
This commit is contained in:
65
README.md
65
README.md
@@ -1,22 +1,25 @@
|
||||
# waybackpy
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/akamhy/waybackpy/improve-appearance-of-readme/assets/waybackpy_logo.svg"><br>
|
||||
</div>
|
||||
|
||||

|
||||
-----------------
|
||||
|
||||
## Python package & CLI tool that interfaces with the Wayback Machine API.
|
||||
[](https://pypi.org/project/waybackpy/)
|
||||
[](https://github.com/akamhy/waybackpy/blob/master/LICENSE)
|
||||
[](https://github.com/akamhy/waybackpy/actions)
|
||||
[](https://codecov.io/gh/akamhy/waybackpy)
|
||||
[](https://github.com/akamhy/waybackpy/blob/master/CONTRIBUTING.md)
|
||||
[](https://www.codacy.com/manual/akamhy/waybackpy?utm_source=github.com&utm_medium=referral&utm_content=akamhy/waybackpy&utm_campaign=Badge_Grade)
|
||||
[](https://pepy.tech/project/waybackpy)
|
||||
[](https://github.com/akamhy/waybackpy/releases)
|
||||
[](https://www.codacy.com/manual/akamhy/waybackpy?utm_source=github.com&utm_medium=referral&utm_content=akamhy/waybackpy&utm_campaign=Badge_Grade)
|
||||
[](https://codeclimate.com/github/akamhy/waybackpy/maintainability)
|
||||
[](https://www.python.org/)
|
||||
[](https://pypi.org/project/waybackpy/)
|
||||

|
||||
[](https://github.com/akamhy/waybackpy/graphs/commit-activity)
|
||||

|
||||
[](https://github.com/akamhy/waybackpy/blob/master/LICENSE)
|
||||
[](https://github.com/akamhy/waybackpy/commits/master)
|
||||

|
||||
|
||||

|
||||
|
||||
Waybackpy is a Python package that interfaces with [Internet Archive](https://en.wikipedia.org/wiki/Internet_Archive)'s [Wayback Machine](https://en.wikipedia.org/wiki/Wayback_Machine) API. Archive webpages and retrieve archived webpages easily.
|
||||
|
||||
Table of contents
|
||||
=================
|
||||
@@ -29,8 +32,8 @@ Table of contents
|
||||
* [Saving a webpage](#capturing-aka-saving-an-url-using-save)
|
||||
* [Retrieving archive](#retrieving-the-archive-for-an-url-using-archive_url)
|
||||
* [Retrieving the oldest archive](#retrieving-the-oldest-archive-for-an-url-using-oldest)
|
||||
* [Retrieving the recent most/newest archive](#retrieving-the-newest-archive-for-an-url-using-newest)
|
||||
* [Retrieving the JSON response of availability API](#retrieving-the-json-reponse-for-the-avaliblity-api-request)
|
||||
* [Retrieving the latest/newest archive](#retrieving-the-newest-archive-for-an-url-using-newest)
|
||||
* [Retrieving the JSON response of availability API](#retrieving-the-json-response-for-the-availability-api-request)
|
||||
* [Retrieving archive close to a specified year, month, day, hour, and minute](#retrieving-archive-close-to-a-specified-year-month-day-hour-and-minute-using-near)
|
||||
* [Get the content of webpage](#get-the-content-of-webpage-using-get)
|
||||
* [Count total archives for an URL](#count-total-archives-for-an-url-using-total_archives)
|
||||
@@ -49,8 +52,6 @@ Table of contents
|
||||
|
||||
* [Tests](#tests)
|
||||
|
||||
* [Dependency](#dependency)
|
||||
|
||||
* [Packaging](#packaging)
|
||||
|
||||
* [License](#license)
|
||||
@@ -75,7 +76,7 @@ pip install git+https://github.com/akamhy/waybackpy.git
|
||||
|
||||
### As a Python package
|
||||
|
||||
#### Capturing aka Saving an url using save()
|
||||
#### Capturing aka Saving an URL using save()
|
||||
|
||||
```python
|
||||
import waybackpy
|
||||
@@ -151,7 +152,7 @@ https://web.archive.org/web/20201016150543/https://www.facebook.com/
|
||||
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyNewestExample></sub>
|
||||
|
||||
#### Retrieving the JSON reponse for the avaliblity API request
|
||||
#### Retrieving the JSON response for the availability API request
|
||||
|
||||
```python
|
||||
import waybackpy
|
||||
@@ -219,7 +220,7 @@ print(github_archive_near_2018_4_july_9_2_am)
|
||||
https://web.archive.org/web/20180704090245/https://github.com/
|
||||
```
|
||||
|
||||
<sub>The package doesn't support second argument yet. You are encourged to create a PR ;)</sub>
|
||||
<sub>The package doesn't support the seconds' argument yet. You are encouraged to create a PR ;)</sub>
|
||||
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyNearExample></sub>
|
||||
|
||||
@@ -373,10 +374,10 @@ https://web.archive.org/web/20120512142515/https://www.facebook.com/
|
||||
#### Get the source code
|
||||
|
||||
```bash
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get url # Prints the source code of the url
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get url # Prints the source code of the URL
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get oldest # Prints the source code of the oldest archive
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get newest # Prints the source code of the newest archive
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get save # Save a new archive on wayback machine then print the source code of this archive.
|
||||
waybackpy --url google.com --user_agent "my-unique-user-agent" --get save # Save a new archive on Wayback machine then print the source code of this archive.
|
||||
```
|
||||
|
||||
<sub>Try this out in your browser @ <https://repl.it/@akamhy/WaybackPyBashGet></sub>
|
||||
@@ -402,7 +403,7 @@ waybackpy --url akamhy.github.io --user_agent "my-user-agent" --known_urls --ali
|
||||
|
||||
|
||||
waybackpy --url akamhy.github.io --user_agent "my-user-agent" --known_urls --subdomain
|
||||
# Prints all known URLs under akamhy.github.io inclusing subdomain
|
||||
# Prints all known URLs under akamhy.github.io including subdomain
|
||||
|
||||
|
||||
waybackpy --url akamhy.github.io --user_agent "my-user-agent" --known_urls --subdomain --alive
|
||||
@@ -414,19 +415,29 @@ waybackpy --url akamhy.github.io --user_agent "my-user-agent" --known_urls --sub
|
||||
|
||||
## Tests
|
||||
|
||||
[Here](https://github.com/akamhy/waybackpy/tree/master/tests)
|
||||
|
||||
To run tests locally:
|
||||
|
||||
1) Install or update the testing/coverage tools
|
||||
|
||||
```bash
|
||||
pip install -U pytest
|
||||
pip install codecov
|
||||
pip install pytest pytest-cov
|
||||
cd tests
|
||||
pytest --cov=../waybackpy
|
||||
python -m codecov #For reporting coverage on Codecov
|
||||
pip install codecov pytest pytest-cov -U
|
||||
```
|
||||
|
||||
2) Inside the repository run the following commands
|
||||
|
||||
```bash
|
||||
pytest --cov=waybackpy tests/
|
||||
```
|
||||
|
||||
3) To report coverage run
|
||||
|
||||
```bash
|
||||
bash <(curl -s https://codecov.io/bash) -t SECRET_CODECOV_TOKEN
|
||||
```
|
||||
|
||||
You can find the tests [here](https://github.com/akamhy/waybackpy/tree/master/tests).
|
||||
|
||||
|
||||
## Packaging
|
||||
|
||||
1. Increment version.
|
||||
|
Reference in New Issue
Block a user