From 1f8cfdb02194269f5f92d3a49720799e216e974f Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Thu, 6 Dec 2018 10:17:17 -0800 Subject: [PATCH] update README because of python rewrite --- README.md | 57 ++++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index a14ac38..0c69172 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,15 @@ # hugo_themes_report -By running this script you get a report with: -* Stars for each Theme -* Name of the Theme -* Name of the Repo owner -* Date of the latest commit -A Bash Script to Generate a Report and Rank Hugo Themes +Completely rewritten in python, using sqlite for persistent data, and using conditional github api requests to collect the data. -The website for the themes for the Hugo Static Site -generator, don't tell you how popular, or how recently-updated -the themes are. But this bash script will parse the github -api, and generate a little report for you with the -number of stars, theme name, and date of most recent -commit. +Finally, the script builds two (somewhat) mobile responsive reports, using a bootstrap css table. +You get a report that ranks hugo themes by number of stars, and report that ranks hugo themes +by the commit date of each theme when they are referenced as submodules in the master repo of +hugo themes. -But you'll need to set up a cron job, because you'll -run into the github api limit if you try to look up -info on all 172 themes at once. +I have the script running on a cron job, if you would like to see the result. -## Here's how you would set up a cron on Ubuntu 16.04 -You'll need to figure out what is your PATH. -```bash -echo $PATH -``` -And then you'll want to export your EDITOR, because -the `crontab -e` command invokes whatever editor -you have specified in your environment. i.e. for -vim `export EDITOR=vim` or add `export EDITOR=vim` -to `.bashrc`, (and then . your bashrc again or -restart bash). - -The command to edit cron is `crontab -e`, and here's -what a cron that runs once an hour, at ten minutes -after the hour looks like. The new cron won't exist until -you save AND close the editor, just saving the file isn't enough. - -```conf -#!/bin/bash -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -10 * * * * /home//bin/rank_hugo_themes.bash -``` - -Makes sure you make the script executable. - -```bash -chmod 755 ~/bin/rank_hugo_themes.bash -``` - -The raw output, represents what the report looks like in your terminal. - -https://raw.githubusercontent.com/TrentSPalmer/hugo_themes_report/d83715fc3f6932b1e119a6ebfdb6a0000ac17049/example_output +* [ranked by stars](http://107.161.27.86/hugo-themes-report/hugo-themes-by-num-stars.html) +* [ranked by commit date](http://107.161.27.86/hugo-themes-report/hugo-themes-by-last-commit-date.html) +* [master list of hugo themes](https://github.com/gohugoio/hugoThemes) +* [hugo themes home page](https://themes.gohugo.io/)