Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 support, UTF-8 and Readme #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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
7 changes: 0 additions & 7 deletions README.txt

This file was deleted.

5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)