\arrayrulecolor{lightgray}\hline
Date & Changes & Author\\
\arrayrulecolor{lightgray}\hline
+17 Feb 2019&minor fixes&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+\arrayrulecolor{lightgray}\hline
17 Feb 2019&[doc] new generic directory&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
17 Feb 2019&started table output&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
17 Feb 2019&fixed some issues&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] lsting Hooks&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+03 Jan 2019&[doc] lsting Hooks&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] Hook2 test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+03 Jan 2019&[doc] Hook2 test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] Hook2 test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+03 Jan 2019&[doc] Hook2 test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] Hook test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+03 Jan 2019&[doc] Hook test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] Features/Bugs
+03 Jan 2019&[doc] Features/Bugs
[py] reversed changed&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-3 Jan 2019&[doc] neuer Branch&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+03 Jan 2019&[doc] neuer Branch&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-2 Jan 2019&[doc] neues Hooks&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+02 Jan 2019&[doc] neues Hooks&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-2 Jan 2019&[py] Export copy finished&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+02 Jan 2019&[py] Export copy finished&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-2 Jan 2019&[doc] kleine änderrung&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+02 Jan 2019&[doc] kleine änderrung&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
-2 Jan 2019&Grober Latex Test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
+02 Jan 2019&Grober Latex Test&\href{mailto:schaeferpm@gmail.com}{Peter Schaefer}\\
\arrayrulecolor{lightgray}\hline
\arrayrulecolor{lightgray}\hline
\end{tabular}
from collections import OrderedDict
from re import compile, match
from argparse import ArgumentParser
+from datetime import datetime
import sys
out_stream = sys.stdout
def hash(self):
return self._hash.hash()
+ def date(self):
+ return self._date.strftime("%d %b %Y")
+
def AddInfo(self,line):
line = line[self._message_pos:]
info = line.split(':')
if info[0] == 'Author':
self._author = Author(':'.join(info[1:]).strip())
elif info[0] == 'Date':
- tmp = ':'.join(info[1:]).strip().split(' ')
- self._date = tmp[2] + ' ' + tmp[1] + ' ' + tmp[4]
+ t = ':'.join(info[1:]).strip()
+ self._date = datetime.strptime(t,"%a %b %d %H:%M:%S %Y %z")
elif info[0] == 'Merge':
self._merge = info[1].strip().split(' ')
elif line[0:4] == ' ':
out("\\node[right,xshift=10] (label" + self.hash() + ") at (" + self.hash() + ".east) {\\verb!" + self.hash() + ": " + VerbClean(self._message) + "!};")
def export_commit2table(self):
- out(self._date + '&' + Str2Tex(self._message) + '&' + self._author.auth2Tex() + "\\\\")
+ out(self.date() + '&' + Str2Tex(self._message) + '&' + self._author.auth2Tex() + "\\\\")
def export_path2tikz(self):
for child in self._children.values():
def __eq__(self,other):
return self.hash() == other.hash()
+
+ def __lt__(self,other):
+ return self._date < other._date
+
class Branch:
def __init__(self, line):
words = list(filter(lambda x:x!='',line[2:].split(" ")))