Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pastpages/archiveis
A simple Python wrapper for the archive.is capturing service
https://github.com/pastpages/archiveis
api archiving news python
Last synced: 3 months ago
JSON representation
A simple Python wrapper for the archive.is capturing service
- Host: GitHub
- URL: https://github.com/pastpages/archiveis
- Owner: palewire
- License: mit
- Created: 2016-10-22T16:48:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T03:29:45.000Z (almost 2 years ago)
- Last Synced: 2024-05-06T15:19:29.265Z (6 months ago)
- Topics: api, archiving, news, python
- Language: Python
- Homepage: https://archive.is
- Size: 142 KB
- Stars: 175
- Watchers: 13
- Forks: 16
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# archiveis
A simple Python wrapper for the [archive.is](http://archive.is/) capturing service.
![Tests](https://github.com/pastpages/archiveis/workflows/Tests/badge.svg)
### Installation
```bash
pipenv install archiveis
```### Python Usage
Import it.
```python
import archiveis
```Capture a URL.
```python
archive_url = archiveis.capture("http://www.example.com/")
```If a URL has been recently cached, archive.is may return the URL to that page rather
than conduct a new capture.### Command-line usage
The Python library is also installed as a command-line interface. You can run it from your terminal like so:
```bash
archiveis http://www.example.com/
```The command has the same options as the Python API, which you can learn about from its help output.
```bash
$ archiveis --help
Usage: archiveis [OPTIONS] URLArchives the provided URL using the archive.is capturing service.
Options:
-ua, --user-agent TEXT User-Agent header for the web request
--help Show this message and exit.
```### Contributing
Install dependencies for development.
```bash
pipenv install --dev
```Run tests.
```bash
make test
```Ship new version to PyPI
```bash
make ship
```### Developing the CLI
The command-line interface is implemented using Click and setuptools. To install it locally for development inside your virtual environment, run the following installation command, as [prescribed by the Click documentation](https://click.palletsprojects.com/en/7.x/setuptools/#setuptools-integration).
```bash
pip install --editable .
```