diff sync_to_github.py @ 9:2c4d383d464c

move config stuff into Project
author drewp@bigasterisk.com
date Fri, 16 Jul 2021 00:19:01 -0700
parents cc3321b8adc1
children
line wrap: on
line diff
--- a/sync_to_github.py	Fri Jul 16 00:18:34 2021 -0700
+++ b/sync_to_github.py	Fri Jul 16 00:19:01 2021 -0700
@@ -1,18 +1,8 @@
 #!/usr/bin/python3
 from pathlib import Path
-import json
 
-from github import Github
 from sync import Project, getSshAuthSock
 
-config = json.loads(open("config.json").read())
-config['SSH_AUTH_SOCK'] = getSshAuthSock()
-
-# to get this token:
-# curl -u drewp https://api.github.com/authorizations -d '{"scopes":["repo"]}'
-# from http://developer.github.com/v3/oauth/#oauth-authorizations-api
-gh = Github(config['gitHubToken']).get_user()
-
-p = Project(config, gh, Path('.').absolute())
+p = Project(Path('.').absolute())
 p.makeGithubRepo()
 p.hgToGithub()