Skip to content

Commit

Permalink
add alt text checker
Browse files Browse the repository at this point in the history
  • Loading branch information
gillkyle committed Sep 3, 2020
1 parent bf98b29 commit 1739350
Show file tree
Hide file tree
Showing 5 changed files with 5,189 additions and 478 deletions.
286 changes: 286 additions & 0 deletions blog_paths.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
/blog/100days-accessibility/
/blog/100days-apps/
/blog/100days-cms/
/blog/100days-comments/
/blog/100days-create-themes/
/blog/100days-free-hosting/
/blog/100days-gatsby-image/
/blog/100days-mdx/
/blog/100days-performance/
/blog/100days-pwa/
/blog/100days-react-component/
/blog/100days-seo/
/blog/100days-serverless/
/blog/100days-start-blog/
/blog/100days-use-themes/
/blog/100days/
/blog/2017-05-31-introduction-to-gatsby/
/blog/2017-07-19-creating-a-blog-with-gatsby/
/blog/2017-09-13-why-is-gatsby-so-fast/
/blog/2017-09-18-gatsby-modern-static-generation/
/blog/2017-09-21-community-roundup-1/
/blog/2017-09-26-embracing-graphql/
/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/
/blog/2017-10-03-smartive-goes-gatsby/
/blog/2017-10-05-portfolio-site-gatsby-wordpress/
/blog/2017-10-16-making-website-building-fun/
/blog/2017-10-17-building-i18n-with-gatsby/
/blog/2017-10-20-from-wordpress-to-developing-in-react-starting-to-see-it/
/blog/2017-10-29-my-search-for-the-perfect-universal-javascript-framework/
/blog/2017-11-06-migrate-hugo-gatsby/
/blog/2017-11-08-migrate-from-jekyll-to-gatsby/
/blog/2017-11-09-why-i-created-my-blog-with-gatsby-and-contentful/
/blog/2017-12-06-gatsby-plus-contentful-plus-netlify/
/blog/2017-12-07-taking-gatsby-for-a-spin/
/blog/2017-12-20-introducing-the-gatsby-ux-research-program/
/blog/2018-01-18-how-boston-gov-used-gatsby-to-be-selected-as-an-amazon-hq2-candidate-city/
/blog/2018-01-22-getting-started-gatsby-and-wordpress/
/blog/2018-02-09-announcing-gatsby-manor-themes-for-gatsbyjs/
/blog/2018-02-16-bright-future-for-the-web/
/blog/2018-02-28-documentation-project/
/blog/2018-03-07-why-we-created-the-plugin-library/
/blog/2018-03-29-migration-from-wordpress-to-gatsby/
/blog/2018-04-04-gatsby-contentful-starter-tutorial/
/blog/2018-04-05-gatsby-video-tutorials/
/blog/2018-04-06-introducing-gatsby-rfc-process/
/blog/2018-04-10-how-to-handle-comments-in-gatsby-blogs/
/blog/2018-04-11-trying-out-gatsby-at-work-and-co/
/blog/2018-04-25-how-gatsby-changes-teams-website-development-workflow/
/blog/2018-04-27-building-eviction-free-nyc-with-gatsbyjs-and-contentful/
/blog/2018-05-11-six-reasons-i-chose-gatsby/
/blog/2018-05-24-launching-new-gatsby-company/
/blog/2018-05-31-open-sourcing-gatsby-workshops/
/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/
/blog/2018-06-08-gatsby-marketers-managers-agencies-teams/
/blog/2018-06-08-life-after-layouts/
/blog/2018-06-14-escalade-sports-from-5000-to-5-in-hosting/
/blog/2018-06-16-announcing-gatsby-v2-beta-launch/
/blog/2018-06-18-moving-from-create-react-app-to-gatsby-js/
/blog/2018-06-18-why-narative-loves-gatsby/
/blog/2018-06-26-card-sort-results/
/blog/2018-07-07-graphic-design-class/
/blog/2018-07-07-the-gatsby-plugin-page-creator/
/blog/2018-07-17-announcing-gatsby-preview/
/blog/2018-07-20-why-we-built-the-site-showcase/
/blog/2018-07-31-docs-redesign/
/blog/2018-08-01-partner-program/
/blog/2018-08-09-swag-store/
/blog/2018-08-11-gatsby-pair-programming/
/blog/2018-08-13-using-decoupled-drupal-with-gatsby/
/blog/2018-08-24-gatsby-aws-hosting/
/blog/2018-09-07-gatsby-values/
/blog/2018-09-17-gatsby-v2/
/blog/2018-09-21-lullabot-podcast/
/blog/2018-09-25-announcing-graphql-stitching-support/
/blog/2018-09-27-reach-router/
/blog/2018-09-27-sendgrid-knowledge-center-cuts-page-load-times-in-half-with-gatsby/
/blog/2018-1-18-strapi-and-gatsby/
/blog/2018-1-24-creative-software-destruction-new-presentation-layer/
/blog/2018-1-25-building-a-site-with-react-and-contentful/
/blog/2018-10-03-gatsby-perf/
/blog/2018-10-04-journey-to-the-content-mesh/
/blog/2018-10-09-hacktoberfest-kickoff/
/blog/2018-10-10-unbundling-of-the-cms/
/blog/2018-10-11-rise-of-modern-web-development/
/blog/2018-10-12-uptick-docs-contributions-hacktoberfest/
/blog/2018-10-15-beyond-static-intro/
/blog/2018-10-16-why-mobile-performance-is-crucial/
/blog/2018-10-18-creating-compelling-content-experiences/
/blog/2018-10-18-vscode-gatsby-development/
/blog/2018-10-25-using-gatsby-without-graphql/
/blog/2018-10-26-export-a-drupal-site-to-gatsby/
/blog/2018-11-01-hacktoberfest-wrapup/
/blog/2018-11-03-building-an-accessible-lightbox/
/blog/2018-11-05-deploying-gatsby-to-azure/
/blog/2018-11-07-gatsby-for-apps/
/blog/2018-11-11-introducing-gatsby-themes/
/blog/2018-11-16-youfit-case-study/
/blog/2018-11-27-gatsby-days/
/blog/2018-12-04-gatsby-analogy/
/blog/2018-12-04-per-link-gatsby-page-transitions-with-transitionlink/
/blog/2018-12-17-ibm-case-study/
/blog/2018-12-17-turning-the-static-dynamic/
/blog/2018-12-19-gatsby-scales-with-expertise-and-scope/
/blog/2018-12-19-kentico-cloud-and-gatsby-take-you-beyond-static-websites/
/blog/2018-12-31-how-we-do-high-impact-ux-research/
/blog/2018-2-27-why-i-upgraded-my-website-to-gatsbyjs-from-jekyll/
/blog/2018-2-3-sites-with-headless-cms/
/blog/2018-2-6-choosing-a-back-end/
/blog/2018-2-7-jam-out-your-blog/
/blog/2018-3-03-case-study-mike-johnston/
/blog/2019-01-01-publish-multiple-gatsby-sites/
/blog/2019-01-09-gatsby-days-talks-are-here/
/blog/2019-01-14-modern-publications-with-gatsby-ghost/
/blog/2019-01-16-how-to-build-a-website-with-react/
/blog/2019-01-24-swag-store/
/blog/2019-01-25-blazing-fast-development-with-gatsby-and-sanity-io/
/blog/2019-01-28-building-a-large-ecommerce-website-with-gatsby-at-daniel-wellington/
/blog/2019-01-29-gatsby-eng-hiring-philosophy/
/blog/2019-01-29-themes-update-child-theming-and-component-shadowing/
/blog/2019-01-30-flamingo-case-study/
/blog/2019-01-31-using-react-context-api-with-gatsby/
/blog/2019-01-31-why-themes/
/blog/2019-02-05-hapticmedia-case-study/
/blog/2019-02-07-pragmatic-lessons-from-converting-to-react-hooks/
/blog/2019-02-08-government-open-data-site-with-gatsby/
/blog/2019-02-11-gatsby-themes-livestream-and-example/
/blog/2019-02-14-behind-the-scenes-q-and-a/
/blog/2019-02-20-introducing-use-static-query/
/blog/2019-02-26-getting-started-with-gatsby-themes/
/blog/2019-02-27-reactiflux-q-and-a/
/blog/2019-03-01-localization-with-gatsby-and-sanity/
/blog/2019-03-04-new-schema-customization/
/blog/2019-03-05-dot-org-messaging-survey/
/blog/2019-03-07-sell-gatsby-to-clients/
/blog/2019-03-11-dot-org-prototypes/
/blog/2019-03-11-gatsby-themes-roadmap/
/blog/2019-03-15-design-code-blog-post/
/blog/2019-03-18-releasing-new-schema-customization/
/blog/2019-03-21-add-auth0-to-gatsby-livestream/
/blog/2019-03-21-migrating-from-wordpress-to-gatsby/
/blog/2019-03-22-introducing-gatsby-preview-beta/
/blog/2019-03-26-what-the-jamstack-means-for-marketing/
/blog/2019-03-29-interview-with-david-eads/
/blog/2019-04-02-behind-the-scenes-what-makes-gatsby-great/
/blog/2019-04-03-how-we-think-about-product-at-gatsby/
/blog/2019-04-05-health-brand-chooses-gatsby-to-level-up-its-modern-stack/
/blog/2019-04-06-security-for-modern-web-frameworks/
/blog/2019-04-08-meet-the-gatsby-team-at-drupalcon-seattle-jamstack-conf-nyc-and-jsheroes/
/blog/2019-04-12-linear-or-declining-sales-talk-to-developers/
/blog/2019-04-18-gatsby-commitment-to-accessibility/
/blog/2019-04-19-gatsby-why-we-write/
/blog/2019-04-19-your-website-should-be-built-with-gatsby/
/blog/2019-04-25-plugin-authoring-study/
/blog/2019-04-26-how-to-build-a-blog-with-wordpress-and-gatsby-part-1/
/blog/2019-04-29-component-shadowing/
/blog/2019-04-30-how-to-build-a-blog-with-wordpress-and-gatsby-part-2/
/blog/2019-05-02-growing-housecall-pro-by-973-percent/
/blog/2019-05-02-how-to-build-a-blog-with-wordpress-and-gatsby-part-3/
/blog/2019-05-03-how-gatsby-helped-jump-start-my-engineering-career/
/blog/2019-05-07-advanced-sitemap-plugin-for-seo/
/blog/2019-05-15-enterprise-gatsby-how-to-reduce-your-digital-total-cost-of-ownership-with-gatsby/
/blog/2019-05-17-improvements-to-schema-customization/
/blog/2019-05-22-cli-error-redesign/
/blog/2019-05-22-setting-up-yarn-workspaces-for-theme-development/
/blog/2019-05-24-community-events-support/
/blog/2019-05-29-the-great-gatsby-gathering-nyc/
/blog/2019-06-03-integrating-graphiql-explorer/
/blog/2019-06-08-delicious-simplicity-case-study-part-1/
/blog/2019-06-10-how-to-recognize-when-gatsby-is-a-good-fit-for-your-client/
/blog/2019-06-12-performance-improvements-for-large-sites/
/blog/2019-06-17-day-in-the-life-of-a-core-maintainer/
/blog/2019-06-17-product-management-at-gatsby/
/blog/2019-06-17-site-showcase-validator/
/blog/2019-06-18-dropping-support-for-node-6/
/blog/2019-06-19-how-the-couch-builds-websites-in-half-the-time-with-gatsby/
/blog/2019-06-19-open-beta-for-gatsby-preview-is-here/
/blog/2019-06-25-profitable-agency-wordpress/
/blog/2019-06-26-live-preview-for-drupal/
/blog/2019-06-28-component-driven-drupal-development/
/blog/2019-07-02-extending-components/
/blog/2019-07-03-announcing-stable-release-gatsby-themes/
/blog/2019-07-03-customizing-styles-in-gatsby-themes-with-theme-ui/
/blog/2019-07-03-using-themes-for-distributed-docs/
/blog/2019-07-09-digital-display-drupal-gatsby/
/blog/2019-07-11-user-testing-accessible-client-routing/
/blog/2019-07-15-theme-jam-contest/
/blog/2019-07-23-google-sheets-gatsby-acroyoga-video-explorer/
/blog/2019-07-30-how-i-used-theme-ui-to-build-my-gatsby-themes-library/
/blog/2019-08-02-what-is-jsx-pragma/
/blog/2019-08-07-gazette-august/
/blog/2019-08-07-theme-jam/
/blog/2019-08-13-localised-strings-from-kentico-cloud-gatsbyjs-graphql/
/blog/2019-08-14-strivectin-case-study/
/blog/2019-08-23-creating-a-purpose-driven-media-platform/
/blog/2019-08-27-roll-your-own-comment-system/
/blog/2019-08-30-diversity-and-inclusion/
/blog/2019-08-30-speed-up-your-time-to-interactive-by-delaying-third-party-scripts/
/blog/2019-09-11-gazette-september/
/blog/2019-09-11-impossible-foods/
/blog/2019-09-12-building-the-new-third-and-grove-website-in-gatsby/
/blog/2019-09-18-delicious-simplicity-case-study-part2/
/blog/2019-09-26-announcing-gatsby-15m-series-a-funding-round/
/blog/2019-10-08-hacktoberfest-2019/
/blog/2019-10-15-free-headless-cms/
/blog/2019-11-05-how-gatsby-can-power-your-site-offline-even-without-javascript/
/blog/2019-11-13-getting-set-up-to-manually-test-web-accessibility/
/blog/2019-11-14-announcing-gatsby-cloud/
/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/
/blog/2019-11-25-getting-started-with-gatsby-cloud/
/blog/2019-11-25-introducing-gatsby-preview-for-cosmic-js/
/blog/2019-12-10-gatsby-brings-speed-to-mediacurrent-com/
/blog/2019-12-11-reducing-interaction-cloud/
/blog/2019-12-12-how-we-accidentally-launched-a-popular-gatsby-plugin/
/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/
/blog/2020-01-08-git-workflows/
/blog/2020-01-12-faster-sites-with-optimized-media-assets/
/blog/2020-01-15-website-uptime/
/blog/2020-01-23-why-typescript-chose-gatsby/
/blog/2020-01-27-announcing-gatsby-builds-and-reports/
/blog/2020-01-30-why-gatsby-is-better-with-javascript/
/blog/2020-02-10-accessible-client-side-routing-improvements/
/blog/2020-02-11-founding-organizations/
/blog/2020-02-17-changing-the-oss-status-quo/
/blog/2020-02-17-learn-javascript-deeply/
/blog/2020-02-18-gazette-2019-recap/
/blog/2020-02-19-how-to-build-multilingual-sites-with-gatsby/
/blog/2020-03-09-gatsby-and-jsparty-podcast/
/blog/2020-03-11-netlify-functions-and-gatsby-cloud/
/blog/2020-03-20-dropping-support-for-node-8/
/blog/2020-03-23-flying-feature-flags-with-new-launchdarkly-plugin/
/blog/2020-03-23-introducing-gatsby-web-creators/
/blog/2020-03-26-service-relief-project/
/blog/2020-03-30-fast-secure-flexible-magmutual/
/blog/2020-04-01-la-2020-mathews/
/blog/2020-04-02-community-qa-with-kyle-mathews/
/blog/2020-04-02-la-2020-schau/
/blog/2020-04-05-la-2020-gladwell/
/blog/2020-04-06-commonwealth-aten-case-study/
/blog/2020-04-06-la-2020-gordon/
/blog/2020-04-07-la-2020-boss/
/blog/2020-04-07-virtual-gatsby-days-2020-cfp/
/blog/2020-04-08-la-2020-harmon/
/blog/2020-04-09-la-2020-mcmahon/
/blog/2020-04-10-la-2020-libere/
/blog/2020-04-13-la-2020-comeau/
/blog/2020-04-13-upgrading-to-jamstack-with-agility/
/blog/2020-04-14-la-2020-kim/
/blog/2020-04-14-virtual-gatsby-days-registration/
/blog/2020-04-15-announcing-gatsby-recipes/
/blog/2020-04-15-get-together-by-staying-apart-for-now/
/blog/2020-04-15-la-2020-estevez/
/blog/2020-04-17-gatsby-survey-goes-command-line/
/blog/2020-04-20-paulie-scanlons-journey-of-100-days/
/blog/2020-04-22-announcing-incremental-builds/
/blog/2020-04-23-virtual-gatsby-cfps-extended/
/blog/2020-04-24-unlock-power-of-portfolios-with-gatsby/
/blog/2020-04-27-building-serverless-site-faster-with-gatsby/
/blog/2020-04-29-incredimental-builds/
/blog/2020-04-30-gatsby-web-creators-series-2/
/blog/2020-05-05-butter-cms-case-study/
/blog/2020-05-07-gatsby-delivers-impossible-burgers-map/
/blog/2020-05-12-strapi-instant-content-preview-plugin/
/blog/2020-05-13-virtual-gatsby-day-speakers/
/blog/2020-05-14-introducing-gatsby-theme-catalyst/
/blog/2020-05-19-little-agency-big-impact/
/blog/2020-05-21-gatsby-recipes/
/blog/2020-05-22-happy-fifth-bday-gatsby/
/blog/2020-05-26-introducing-will-it-build/
/blog/2020-05-27-announcing-series-b-funding/
/blog/2020-05-29-gazette/
/blog/2020-06-11-you-belong-here-commitment/
/blog/2020-06-16-gatsby-slideshow-with-posenet/
/blog/2020-06-18-gatsby-cli-survey-2/
/blog/2020-06-22-announcing-gatsby-partner-program/
/blog/2020-06-23-reconfiguring-gatsby-days/
/blog/2020-06-24-gatsby-days-reconfigured-makenna-smutz/
/blog/2020-06-25-gatsby-days-reconfigured-derek-murr/
/blog/2020-06-29-gatsby-most-accessible-webaim-million/
/blog/2020-06-30-gatsby-days-reconfigured-colby-fayock/
/blog/2020-07-02-gatsby-days-reconfigured-sam-julien/
/blog/2020-07-07-wordpress-source-beta/
/blog/announcing-blog-theme-2-0/
/blog/gatsby-days-video-distributed-documentation-sites-with-gatsby-themes/
/blog/gatsby-first-beta-release/
/blog/gatsby-v1/
/blog/gatsbygram-case-study/
38 changes: 19 additions & 19 deletions broken_links.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
https://mini-org.netlify.app/features/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-nextjs
https://mini-org.netlify.app/blog/2020-07-31-the-worlds-sneakiest-route-change/
https://mini-org.netlify.app/blog/2020-07-28-introducing-gatsby-i18n-theme/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-nextjs/
https://mini-org.netlify.app/features/cms/gatsby-vs-wordpress/
https://mini-org.netlify.app/features/jamstack/
https://mini-org.netlify.app/features/cms/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-jekyll-vs-hugo
https://mini-org.netlify.app/blog/gazette-july-2020/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-jekyll-vs-hugo/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-nuxtjs/
https://mini-org.netlify.app/blog/2020-07-20-Khaled-Garbaya-Life-After-Recipes/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-nextjs-vs-nuxtjs
https://mini-org.netlify.app/blog/2020-08-04-GH-Community-Permissions-Changes-GatsbyJS/
https://mini-org.netlify.app/guidelines/logo/
https://mini-org.netlify.app/features/cms/gatsby-vs-wordpress
https://mini-org.netlify.app/blog/2020-08-04-Announcing-Gatsby-Recipes-Alpha-2/
https://mini-org.netlify.app/features/jamstack/gatsby-vs-nuxtjs
https://mini-org.netlify.app/blog/2019-11-20-gazette-october/
https://mini-org.netlify.app/blog/gazette-june-2020/
https://mini-org.netlify.app/contributors/colby-fayock/
https://mini-org.netlify.app/contributors/john-o'nolan/
https://mini-org.netlify.app/starters/aslammultani/blogger/
https://mini-org.netlify.app/starters/chronoblog/gatsby-starter-chronoblog-hacker/
https://mini-org.netlify.app/starters/chronoblog/gatsby-starter-chronoblog-profile/
https://mini-org.netlify.app/starters/chronoblog/gatsby-starter-chronoblog/
https://mini-org.netlify.app/starters/gil--/gatsby-starter-shopify-app/
https://mini-org.netlify.app/starters/goodpraxis/gp-gatsby-starter-ts-sass-jest/
https://mini-org.netlify.app/starters/hituzi-no-sippo/gatsby-simple-blog-with-asciidoctor/
https://mini-org.netlify.app/starters/jaydanurwin/gatsby-starter-material-business-markdown/
https://mini-org.netlify.app/starters/judicaelandria/gatsby-portfolio-starter/
https://mini-org.netlify.app/starters/juhitrivedi/cape/
https://mini-org.netlify.app/starters/movingmelody/gatsby-keanu-blog/
https://mini-org.netlify.app/starters/movingmelody/gatsby-sidedrawer/
https://mini-org.netlify.app/starters/movingmelody/gatsby-starter-profile-site/
https://mini-org.netlify.app/starters/thomaswang/gatsby-personal-starter-blog/
https://mini-org.netlify.app/starters/thomaswang/gatsby-starter-primer/
50 changes: 50 additions & 0 deletions check-alt-text.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env python3

import os
import subprocess
import urllib.request as urllib2

base_path = "https://gatsbyjs.com"

total_count = 0
broken_count = 0

blog_paths = 'blog_paths.txt'

with open(blog_paths) as fp:
line = fp.readline()
while line:
path = line.strip()
response = urllib2.urlopen(f'{base_path}{path}')
html = response.read()
raw_html = html.decode("utf-8")
if 'alt=""' in raw_html:
print(f'!!! alt text missing in {path} !!!')
else:
print(f'No missing alt text in {path}')
line = fp.readline()


# try:
# status_code = subprocess.check_output(
# f'curl -L -s -o /dev/null -w "%{{http_code}}" {base_path}{path}', shell=True, universal_newlines=True).strip()
# except:
# print(f'Something failed curling the path: {path}')

# if (status_code == "404"):
# print(f'{status_code} response for {path}')
# broken_links.write(base_path + path + "\n")
# broken_count += 1
# else:
# print(f'{status_code} response for {path}')

# curl_redirect_results.write(
# f'{status_code} response for {path}' + "\n")

# # proceed to next line/path
# line = fp.readline()
# total_count += 1

# print("----------------------------------")
# print(
# f'{100 * round(float(total_count - broken_count)/float(total_count), 2)}% of pages migrated successfully! 404 results hit on {broken_count} paths.')
Loading

0 comments on commit 1739350

Please sign in to comment.