Skip to content

Instantly share code, notes, and snippets.

@scottopell
Last active August 5, 2016 16:25
Show Gist options
  • Save scottopell/15ced492834487a762f65dc39a16091c to your computer and use it in GitHub Desktop.
Save scottopell/15ced492834487a762f65dc39a16091c to your computer and use it in GitHub Desktop.
Creates a hound (etsy/hound) configuration file that will index a given users public github repos.
#!/bin/sh
user=scottopell
json=$(curl -s https://api.github.com/users/$user/repos\?type\=owner\&per_page\=300 | jq 'reduce .[] as $pair ( {}; . + { ($pair.name): { url: $pair.html_url } } )')
echo "\
{
\"max-concurrent-indexers\": 2,
\"dbpath\": \"data\",
\"repos\": $json
}"
@scottopell
Copy link
Author

scottopell commented Aug 5, 2016

Example Output:

{
  "max-concurrent-indexers": 2,
  "dbpath": "data",
  "repos": {
  "8tracks-downloader-python": {
    "url": "https://github.com/scottopell/8tracks-downloader-python"
  },
  "aggdraw-64bits": {
    "url": "https://github.com/scottopell/aggdraw-64bits"
  },
  "ajaxify": {
    "url": "https://github.com/scottopell/ajaxify"
  },
  "audiobook-podcast": {
    "url": "https://github.com/scottopell/audiobook-podcast"
  },
...
  "xtext_utils": {
    "url": "https://github.com/scottopell/xtext_utils"
  }
}
}

Link to hound:
https://github.com/etsy/Hound

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment