Skip to content

Commit 3d7fd1a

Browse files
committed
added test files
1 parent c852001 commit 3d7fd1a

File tree

5 files changed

+37
-10
lines changed

5 files changed

+37
-10
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
<h1 align="center"> LinkStatus </h1>
2-
<h2 align="center"> Check link status from text/ markdown files </h2>
2+
<h2 align="center"> Check link status</h2>
33

44
<p align="center">
55
<a href="https://pypi.org/project/linkstatus"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/linkstatus.svg?style=flat"></a>
6-
<a href="https://travis-ci.com/digitronik/linkstatus"><img alt="Build Status"
6+
<a href="https://travis-ci.com/digitronik/linkstatus"><img alt="Build Status"
77
src="https://travis-ci.com/digitronik/linkstatus.svg?branch=master"></a>
88
<a href="https://github.com/digitronik/linkstatus/blob/master/LICENSE"><img alt="License: GPLv3" src="https://img.shields.io/pypi/l/linkstatus.svg?version=latest"></a>
99
<a href="https://pypi.org/project/linkstatus/#history"><img alt="PyPI version" src="https://badge.fury.io/py/linkstatus.svg"></a>
1010
<a href="https://pepy.tech/project/linkstatus"><img alt="Downloads" src="https://pepy.tech/badge/linkstatus"></a>
1111
<a href="https://pypi.org/project/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
1212
</p>
13+
14+
This is simple link status checker for text/markdown files.
15+
16+
### Install
17+
18+
- pip
19+
20+
```bash
21+
pip install linkstatus --user
22+
```
23+
24+
- source
25+
26+
```bash
27+
python install . --user
28+
```
29+
30+
### Usage:

linkstatus/linkstatus.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def all_files(source, recursive=False):
3333
files = []
3434
for src in source:
3535
if os.path.isdir(src):
36-
files.extend([f for f in glob.glob(src + "**/**", recursive=recursive) if os.path.isfile(f)])
36+
files.extend(
37+
[f for f in glob.glob(src + "**/**", recursive=recursive) if os.path.isfile(f)]
38+
)
3739
elif os.path.isfile(src):
3840
files.append(src)
3941
else:
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020

2121
Or leave it empty and use the [link text itself].
2222

23-
URLs and URLs in angle brackets will automatically get turned into links.
24-
http://www.example.com or <http://www.example.com> and sometimes
25-
example.com (but not on Github, for example).
23+
URLs and URLs in angle brackets will automatically get turned into links.
24+
http://www.example.com.
2625

2726
Some text to show that the reference links can follow later.
2827

29-
[arbitrary case-insensitive reference text]: https://www.mozilla.org
30-
[1]: http://slashdot.org
31-
[link text itself]: http://www.reddit.com
28+
[arbitrary case-insensitive reference text]: https://www.mozilla.org <!--noqa-->
3229

33-
[broken link](https://github.com/digitronic/linkstatus)
30+
[1]: http://slashdot.org <!--noqa-->
31+
32+
[link text itself]: http://www.reddit.com <!--noqa-->
33+
34+
[broken link](https://github.com/digitronic/linkstatus)

tests/links_text

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Links:
2+
3+
1. linkstatus: https://github.com/digitronik/linkstatus
4+
2. google: http://www.google.com
5+
3. example: https://example.com
6+
4. broken: https://github.com/xyz_foo

tests/test

Whitespace-only changes.

0 commit comments

Comments
 (0)