I'm looking to pull a specific file from a github repo and load into a dictionary in python and then write the file back to a specific folder in the github repo.
Suppose, my folder structure is:
Github Repo > files > rawfiles > test.txt
Github Repo > files > output > output.txt
How would I extract one file from Github and then write it back to Github? Below is what I have created, but the output seems to be including all the HTML tags.
import csv
import urllib
url = 'GithubRepo/rawfiles/test.txt'
webpage = urllib.urlopen(url)
data = []
datareader = csv.reader(webpage)
for row in datareader:
data.append(row)
print data
https://raw.githubusercontent.com/your_repo..