Skip to content

Instantly share code, notes, and snippets.

@Helw150
Helw150 / RepoScraper.py
Last active April 25, 2017 18:58
Scrapes all repos that have descriptions, aren't private and aren't forks. Places them in a JS list of Objects for import.
'''
This file is a helper function to scrape Github for Repo's to add to my website.
It can be set to run whenever Gatsby is called in order to add new Repo's as they arrive.
Usage: python RepoScraper.py SampleOutput.js
'''
from sys import argv
from github import Github
import re
@Helw150
Helw150 / NewArticle.py
Created April 25, 2017 14:49
A simple article creator for gatsby
import os
import re
from datetime import datetime
import errno
def titleToUrl(title):
lowerTitle = title.lower()
URL = lowerTitle.replace(" ", "-")
return "/blog/" + URL + "/"