Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV to Google Sheets + History #141

Open
mgifford opened this issue Jul 7, 2023 · 1 comment
Open

CSV to Google Sheets + History #141

mgifford opened this issue Jul 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mgifford
Copy link

mgifford commented Jul 7, 2023

Clear and concise description of the problem

Seems to me that I should be able to run something like this #135 (comment)

But have that result get automatically dumped into a Google Sheet.

Using something like:
https://developers.google.com/drive/api/guides/manage-uploads#http_1

Which could then have formatting/charts added, sorta like what they do for
https://github.com/cloudfour/lighthouse-parade

But you could actually run this all from Cron & provide a historical view of how accessibility, performance & SEO issues are addressed on a sample of web pages over time.

This would allow folks to see progress.

It could also be possible to more easily highlight those pages which need the most work.

Suggested solution

Document how Unlighthouse can be used to illustrate progress over perfection.

Bring in Google tools to provide an easily sharable chart based presentation with the results from Google Lighthouse.

Alternative

No response

Additional context

Just trying to demonstrate progress over time. I'd like to be able to do weekly monitoring and share results easily through a more automated process.

@mgifford mgifford added the enhancement New feature or request label Jul 7, 2023
@mgifford
Copy link
Author

Pretty simple bash script to do some of this:

#! /bin/bash
while IFS=',' read -r domain homepage sitemap; do
  if [ -z "$sitemap" ]; then
    timeout 60m npx unlighthouse-ci --no-cache --site $homepage --throttle --no-cache --reporter csvExpanded
  else
    timeout 60m npx unlighthouse-ci --no-cache --sitemaps $sitemap --site $homepage --throttle --no-cache --reporter csvExpanded
  fi
  filename="unlighthouse_${domain}_$(date '+%Y-%m-%d_%H-%M-%S').csv"
  mv ./.unlighthouse/ci-result.csv ~/Unlighthouse/Unlighthouse_files/$filename
done < unlighthouse_sitemaps.csv

CSV is essentially just:
example.com, https://www.example.com, https://www.example.com/sitemap.xml

This just dumps the csv into a directory.

You need to create these directories from your home directory:
~/Unlighthouse & ~/Unlighthouse/Unlighthouse_files/

Create a run.sh file and give it write permissions (chmod 777 run.sh)

I've got a basic GoogleSheet history up and running too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant