Skip to main content

Checks static .html files for bad links

Project description

existence
=========

Recursively scans directories for static html files for bad or empty links. See
[here](http://www.ericcarmichael.com/writing-my-first-python-package.html) why I wrote this, I hate missing details!

# Example bad or empty links

```html
<a href=""></a> Empty
<a href></a> Empty
<a href="python.org"></a> Any bad link will fail, this one is missing http://
```

# Usage

## Command line

> existence /path/to/dir
Checking links...
57 of 57
All of your links exist!

## Python

```python
>>> from existence import scan
>>> scan("/path/to/dir")
[]
>>> scan("/path/to/an/error")
[('None', '/path/to/an/error/index.html', 121), ('non-existant.html', '/path/to/an/error/other.html', 22)]

# Returns list of tuples: [(url, file_name, line_number)]
```

# Progress bar

To enable the progress bar `pip install progressbar==2.3`


# Running tests

> python -m unittest discover

Project details


Release history Release notifications

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

This version
History Node

0.2.0

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
existence-0.2.0.zip (5.6 kB) Copy SHA256 hash SHA256 Source None Apr 18, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page