From 70c4d96508084c5e3642140f920d370d67ca6f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pfannemu=CC=88ller?= Date: Sat, 26 Sep 2015 13:45:22 +0200 Subject: [PATCH 1/4] Add simple .gitignore file --- .gitignore | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5ffacd --- /dev/null +++ b/.gitignore @@ -0,0 +1,49 @@ +# Created by https://www.gitignore.io/api/osx,windows + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk From 237dbf1da6e59445c7a330e690757eff00805d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pfannemu=CC=88ller?= Date: Sat, 26 Sep 2015 13:46:13 +0200 Subject: [PATCH 2/4] Add support for Python3 and UTF-8 --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 758e210..b40ba0f 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +#-*- coding: utf-8 -*- # Use this is generate log data for the default template #git log --pretty="format:[START commit][author=%an][time=%at][message=%s][hash=%H]" --shortstat > git-data.txt @@ -53,8 +54,8 @@ def get_css(template): ## Makes a big blob of CSS so you dont need to worry abou "style":get_css(TEMPLATE_DIR), "commits":commits} -f = open(HTMLFILE,"w") +f = open(HTMLFILE,"w", encoding="utf-8") f.write(template.render(data)) f.close() -print "All done you now have a nice logbook at:", HTMLFILE +print ("All done you now have a nice logbook at:", HTMLFILE) From 93c70a9b24b18828a66934c25304c43c386bd085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pfannemu=CC=88ller?= Date: Sat, 26 Sep 2015 13:56:07 +0200 Subject: [PATCH 3/4] Update Readme --- README.md | 10 ++++++++++ README.txt | 7 ------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..71dda09 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +pyGitBook +======== + +gitBookLog is a simple and slightly hackish program that can be used to turn a dump from git-log into a nice logbook + +## Usage +Requirements: Python3 +1. cd into your repository folder inside a terminal +2. Run `git log --pretty="format:[START commit][author=%an][time=%at][message=%s][hash=%H]" --shortstat > git-data.txt` for creating a git-data.txt file with your commit history +3. Put your created `git-data.txt` file into the repository folder and run `python main.py` inside of it \ No newline at end of file diff --git a/README.txt b/README.txt deleted file mode 100644 index 8ef07e1..0000000 --- a/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -gitBookLog is a simple and slightly hackish program that can be used to turn a dump from git-log into a nice logbook - -To use the program simply run the snippet in the comment at the top of main.py - -Move the file created (probably) git-data.txt into the same directory and run main.py - -Thats about it hopefully i will get around to improving the program and writing a more compleate README some time in the future \ No newline at end of file From cee98e58d4146236b5f1b2c9657d54e6bd3eb151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pfannem=C3=BCller?= Date: Sat, 26 Sep 2015 13:57:58 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 71dda09..154e4dc 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ gitBookLog is a simple and slightly hackish program that can be used to turn a d ## Usage Requirements: Python3 -1. cd into your repository folder inside a terminal -2. Run `git log --pretty="format:[START commit][author=%an][time=%at][message=%s][hash=%H]" --shortstat > git-data.txt` for creating a git-data.txt file with your commit history -3. Put your created `git-data.txt` file into the repository folder and run `python main.py` inside of it \ No newline at end of file + +1. cd into your repository folder inside a terminal +2. Run `git log --pretty="format:[START commit][author=%an][time=%at][message=%s][hash=%H]" --shortstat > git-data.txt` for creating a git-data.txt file with your commit history +3. Put your created `git-data.txt` file into the repository folder and run `python main.py` inside of it