From a51cd80a232d1e2e5e423252555c08275c712596 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Fri, 26 May 2017 09:45:52 +0200 Subject: [PATCH] added git init func on newproject initailization --- app.py | 6 ++++++ templates/newproject/.config/prefs.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 4f19381..18957d8 100755 --- a/app.py +++ b/app.py @@ -20,6 +20,7 @@ from PyQt5.QtWebKit import QWebSettings from PyQt5.QtWebKitWidgets import QWebPage, QWebView, QWebInspector import json +import git from classes import server, compiler, view, content @@ -135,6 +136,11 @@ class MainWindow(QMainWindow): self.core.prefs = json.loads(open(os.path.join(self.core.cwd,'.config/prefs.json')).read()) self.core.summary = json.loads(open(os.path.join(self.core.cwd,'.config/summary.json')).read()) # TODO: init git repos + self.core.repository = git.Repo.init(self.core.cwd) + self.core.repository.index.add(['assets','contents','.config']) + self.core.repository.index.commit("initial commit") + # TODO: set mdtohtml compiler from project md to app index.html + # TODO: embed project styles.scss to app scss frame work def quit(self): print("Quit") diff --git a/templates/newproject/.config/prefs.json b/templates/newproject/.config/prefs.json index 83f7535..6afaaba 100644 --- a/templates/newproject/.config/prefs.json +++ b/templates/newproject/.config/prefs.json @@ -1,4 +1,4 @@ { - "prop1":1, - "prop2":2 + "git.user.name":"Cascade", + "git.user.email":"cascade@figureslibres.io" }