From effe860a1123ddba21e9cd495d62fa7784746f60 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:30:30 -0300 Subject: [PATCH 1/8] Remove previous structure e define title and description in center. --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a8b0b14f..c95825d1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -# Public APIs [![Run tests](https://github.com/public-apis/public-apis/workflows/Run%20tests/badge.svg)](https://github.com/public-apis/public-apis/actions?query=workflow%3A%22Run+tests%22) [![Validate links](https://github.com/public-apis/public-apis/workflows/Validate%20links/badge.svg?branch=master)](https://github.com/public-apis/public-apis/actions?query=workflow%3A%22Validate+links%22) +
+

Public APIs

+ A collective list of free APIs for use in software and web development +
-*A collective list of free APIs for use in software and web development.* - -A public API for this project can be found [here](https://github.com/davemachado/public-api)! - -For information on contributing to this project, please see the [contributing guide](CONTRIBUTING.md). - -**NOTE: A passing build status indicates all listed APIs are available since the last update. A failing build status indicates that 1 or more services may be unavailable at the moment.** +--- ## Index From eb5b485dc5456ae68ef913f2a91226dcee9b152d Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:32:41 -0300 Subject: [PATCH 2/8] Create Status section in header --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c95825d1..b847daed 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,17 @@ A collective list of free APIs for use in software and web development +
+ Status +
+ + Run tests + + + Validate links + +
+ --- ## Index From e8a0205372aae56b5f133928f7536d1864715433 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:34:48 -0300 Subject: [PATCH 3/8] Define sections The Project and Currently Active Maintainers --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b847daed..5b9e5ad6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,23 @@ +
+ The Project +
+ Contributing Guide • + API for this project • + Issues • + Pull Requests • + License +
+ Currently Active Maintainers +
+ matheusfelipeog • + pawelborkar • + marekdano • + yannbertrand +
+ --- ## Index From 1f0daba3529471eb600d46379dcaf2fe68946828 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:35:46 -0300 Subject: [PATCH 4/8] Define section Alternative sites for the project --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 5b9e5ad6..a8b81725 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,14 @@ yannbertrand +
+ Alternative sites for the project (unofficials) +
+ Free APIs • + Dev Resources • + Public APIs Site +
+ --- ## Index From 356752dc8f16774ced283544957f53affa7b67dc Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:47:25 -0300 Subject: [PATCH 5/8] Add a line break between sections in the header --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a8b81725..29c6a6ee 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ A collective list of free APIs for use in software and web development +
+
Status
@@ -14,6 +16,8 @@
+
+
The Project
@@ -22,7 +26,7 @@ IssuesPull RequestsLicense -
+

Currently Active Maintainers
matheusfelipeog • @@ -31,6 +35,8 @@ yannbertrand
+
+
Alternative sites for the project (unofficials)
From 60245abb31db72432d9b21dad2d87091b4551cdc Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:50:43 -0300 Subject: [PATCH 6/8] Change sup tag to sub tag in sections of header --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 29c6a6ee..4909e881 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@
- The Project + The Project
Contributing GuideAPI for this project • @@ -38,7 +38,7 @@
- Alternative sites for the project (unofficials) + Alternative sites for the project (unofficials)
Free APIsDev Resources • From f921f4ec5dbf3901e4a141d01301ba80dbdd4753 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 06:15:28 -0300 Subject: [PATCH 7/8] Filter the links after the index section --- build/validate_links.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build/validate_links.py b/build/validate_links.py index eb5dfa30..389de8cc 100755 --- a/build/validate_links.py +++ b/build/validate_links.py @@ -14,12 +14,19 @@ ignored_links = [ def parse_links(filename): """Returns a list of URLs from text file""" - with open(filename) as fp: - data = fp.read() + with open(filename, mode='r', encoding='utf-8') as fp: + readme = fp.read() + index_section = readme.find('## Index') + content = readme[index_section:] + raw_links = re.findall( '((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'\".,<>?«»“”‘’]))', - data) - links = [raw_link[0] for raw_link in raw_links] + content) + + links = [ + str(raw_link[0]).rstrip('/') for raw_link in raw_links + ] + return links def dup_links(links): @@ -30,7 +37,6 @@ def dup_links(links): dupes = [] for link in links: - link = link.rstrip('/') if link in ignored_links: continue From 48946082bad7ad78675fdfbd6460fd2238bcb87e Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Tue, 24 Aug 2021 06:21:23 -0300 Subject: [PATCH 8/8] Remove unnecessary verification --- build/validate_links.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build/validate_links.py b/build/validate_links.py index 389de8cc..9bb4405b 100755 --- a/build/validate_links.py +++ b/build/validate_links.py @@ -5,12 +5,6 @@ import re import socket import sys -ignored_links = [ - 'https://github.com/public-apis/public-apis/actions?query=workflow%3A%22Run+tests%22', - 'https://github.com/public-apis/public-apis/workflows/Validate%20links/badge.svg?branch=master', - 'https://github.com/public-apis/public-apis/actions?query=workflow%3A%22Validate+links%22', - 'https://github.com/davemachado/public-api', -] def parse_links(filename): """Returns a list of URLs from text file""" @@ -37,9 +31,6 @@ def dup_links(links): dupes = [] for link in links: - if link in ignored_links: - continue - if link not in seen: seen[link] = 1 else: