Skip to content
Permalink
Browse files
Made latex-git-log ready for CTAN.
  • Loading branch information
Robin Schneider committed Jun 15, 2013
1 parent c5c4512 commit af3d63d88a8e37c45c4dc7c8b54ee55091f7ea80

This file was deleted.

@@ -0,0 +1,68 @@
latex-git-log
~~~~~~~~~~~~~
This program will output the entire version history as table written in LaTeX
if it is executed within a git repository.

It is intended that you redirect the standard output of this script to a file
which can then be included from your main TeX document.

The table is using the longtable package and the links to a web resource for
each commit use the \href macro from hyperref. So this two packages have to be
loaded.

Furthermore you need to defined the macro \longtableendfoot which will be
expanded on the bottom of every page if the table will be continued on the next
page. You can defined it to a localized message to inform the reader that this
table is not complete and will be continued.

Because the table can be very large you might want to put the thing on a
landscape page.

Copyright (C) by Robin Schneider <ypid23@aol.de>
Source code repository: https://github.com/ypid/typesetting
Please report bugs and feature requests at https://github.com/ypid/typesetting/issues

Usage:
latex-git-log [options]

Options:

--author set this to 1 if you want the author included
--startcommit set the start value of count commit
--width set the width in cm of the commit message field in the LaTeX table
--git-c-add set an base URL to link to a commit
--user set a github user to derive the base URL
--repo set a github repository to derive the base URL
--lang language of the legend and all strings in the output
--help brief help message
--man full documentation

Options:
--width Set the width in cm of the commit message field in the LaTeX
table. If this parameter is not set then the table is not
verticly limited. That means that if you have a very long commit
message then the table will not actually on the page and you
will get a "Overfull" error message from TeX.

In this case you should specify the width of the column
containing the commit messages. I normally use something like
--width=14 for DIN A4.

--git-c-add
Set an base URL to link to a commit. This script will
automatically try to use the base URL for github.

--lang Set the language of the legend and all strings in the output. Be
default the language of your system is used but you can
overwrite this with this parameter.

Currently this script only supports English and German. If you
need a translation to another language then you can either
create a .po file or I can register this project on one of those
websites for online translation.

Usage:
You can use it like this:

latex-git-log --width=6 --lang=en > example-output.tex

@@ -0,0 +1,64 @@
%% This file was generated by the script latex-git-log
%% Base git commit URL: https://github.com/ypid/typesetting/commit
\begin{tabular}{lp{12cm}}
% \lable{tabular:legend:git-log}
\textbf{acronym} & \textbf{meaning} \\
V & \texttt{version} \\
Tag & git tag \\
Fm & Number of \texttt{modified files}. \\
La & Number of \texttt{added lines}. \\
Ld & Number of \texttt{deleted lines}. \\
\end{tabular}

\bigskip
\newcounter{gitversionnumber}
\newcommand{\StepPrintgitV}{\stepcounter{gitversionnumber}\arabic{gitversionnumber}}

\iflanguage{ngerman}{\shorthandoff{"}}{}
\begin{longtable}{|rllp{6cm}rrr|}
\hline \multicolumn{1}{|c}{\textbf{V}} & \multicolumn{1}{c}{\textbf{Tag}}
& \multicolumn{1}{c}{\textbf{date}}
& \multicolumn{1}{c}{\textbf{commit message}} & \multicolumn{1}{c}{\textbf{Fm}}
& \multicolumn{1}{c}{\textbf{La}} & \multicolumn{1}{c|}{\textbf{Ld}} \\ \hline
\endhead

\hline \multicolumn{7}{|r|}{\longtableendfoot} \\ \hline
\endfoot

\hline% \hline
\endlastfoot

\hline 1 & & 2012-08-18 & \href{https://github.com/ypid/typesetting/commit/3ff663fcfbc56662426740cf6bab2a840e320db6}{added template.dtx from http://texhacks.blogspot.de/} & 2 & 127 & 0 \\
\hline 2 & & 2012-08-19 & \href{https://github.com/ypid/typesetting/commit/e9fc9a2847fe14067bb3ec8d4e4298ff8806f11f}{made my first changes on the docstrip template} & 2 & 40 & 48 \\
\hline 3 & & 2012-08-19 & \href{https://github.com/ypid/typesetting/commit/cbc7bbcdda54f7b43f2039531d2a4f58c35f8964}{optimized} & 1 & 5 & 4 \\
\hline 4 & & 2012-08-22 & \href{https://github.com/ypid/typesetting/commit/55d994c391c509897dd56a6a755c51a1e62bd4d4}{optimized} & 2 & 119 & 115 \\
\hline 5 & & 2012-08-23 & \href{https://github.com/ypid/typesetting/commit/933466b223d70adeda6a865b4b13b4cdfa245070}{added my primary template} & 6 & 252 & 6 \\
\hline 6 & & 2012-08-23 & \href{https://github.com/ypid/typesetting/commit/5995d70f82b680d3a529aa592558dcdde6f407b7}{added PDFs} & 2 & 0 & 0 \\
\hline 7 & & 2012-08-23 & \href{https://github.com/ypid/typesetting/commit/7e1efb265b43fb9aad3fa94b22408951076016f3}{added README (Credits)} & 1 & 1 & 0 \\
\hline 8 & & 2012-08-26 & \href{https://github.com/ypid/typesetting/commit/619a7f6db915bc1e05d0c9ee374aaff53195b257}{converted template.dtx and template.ins to a template for sty2dtx} & 7 & 49 & 62 \\
\hline 9 & & 2012-08-27 & \href{https://github.com/ypid/typesetting/commit/06f948149a3b0bd2c81062078add19af6bb1ac5d}{optimized} & 6 & 48 & 22 \\
\hline 10 & & 2012-08-27 & \href{https://github.com/ypid/typesetting/commit/09316b528dc90f45fa4ef6cf9cf5886c4e25c5bb}{added scripts} & 6 & 222 & 0 \\
\hline 11 & & 2012-08-27 & \href{https://github.com/ypid/typesetting/commit/4c434dcd45aa4a73112b1393d096776eaa938b83}{added README for scripts} & 1 & 10 & 0 \\
\hline 12 & & 2012-08-27 & \href{https://github.com/ypid/typesetting/commit/794a3db5bd4f0165a347f0628c78f32350731b2a}{optimized scripts} & 4 & 9 & 6 \\
\hline 13 & & 2012-08-28 & \href{https://github.com/ypid/typesetting/commit/7c80a541828c3e7896c7f55c8b56d745b84a5414}{added MyPackages} & 22 & 1162 & 2 \\
\hline 14 & & 2012-08-28 & \href{https://github.com/ypid/typesetting/commit/b408bc9fa5f91ff5a7687fc4903d520ab09a288d}{added my Makefile} & 5 & 106 & 0 \\
\hline 15 & & 2012-08-28 & \href{https://github.com/ypid/typesetting/commit/d86bd28e3f0d0e14d7eb239eb6ad9afab2da47c0}{added more scripts} & 4 & 1465 & 0 \\
\hline 16 & & 2012-08-28 & \href{https://github.com/ypid/typesetting/commit/ab0554ce8d44852a76b7ad0246e04268b8347acb}{optimized} & 5 & 4 & 1459 \\
\hline 17 & & 2012-08-31 & \href{https://github.com/ypid/typesetting/commit/75a5b9d653b2798a9cb8f10535f50abf98e94cd2}{optimized} & 7 & 52 & 31 \\
\hline 18 & & 2012-09-09 & \href{https://github.com/ypid/typesetting/commit/2a99a061ae89f5bd6bd6ace4aac66ad9a768b0fc}{optimized} & 4 & 23 & 10 \\
\hline 19 & & 2012-09-16 & \href{https://github.com/ypid/typesetting/commit/c2463e8229fbc506a70b4efb157679ecf3aae795}{optimized} & 6 & 10 & 7 \\
\hline 20 & & 2012-09-23 & \href{https://github.com/ypid/typesetting/commit/1b6cb46337c516e3042d94956e7bf4f097822a47}{added more packages} & 9 & 491 & 12 \\
\hline 21 & & 2012-09-23 & \href{https://github.com/ypid/typesetting/commit/92a41f208a275b6fcdfe9c442be8c135ec0d1c92}{added school templates} & 25 & 502 & 25 \\
\hline 22 & & 2012-09-30 & \href{https://github.com/ypid/typesetting/commit/32e21641dff2ffd9fecfe33b93def53d6a305963}{added more templates} & 20 & 537 & 4 \\
\hline 23 & & 2012-11-03 & \href{https://github.com/ypid/typesetting/commit/2309fa9dd41d0acaf74d6de66976f7ae6f1e7c6b}{rewrote LaTeX-git-log as perl script} & 2 & 63 & 61 \\
\hline 24 & & 2012-11-03 & \href{https://github.com/ypid/typesetting/commit/773e5b801cfd2ad9a2af8c9d379dd0e2f9afd3cf}{optimized} & 2 & 5 & 4 \\
\hline 25 & & 2012-11-28 & \href{https://github.com/ypid/typesetting/commit/4ffc0488959ada2a97ba50d5a7db1390afce4a26}{added more templates and optimized} & 12 & 141 & 3 \\
\hline 26 & & 2013-04-04 & \href{https://github.com/ypid/typesetting/commit/dc3b091e5e8d68daa1c4b73ab96e7bc201a6ed08}{Updated templates.} & 17 & 92 & 55 \\
\hline 27 & & 2013-04-04 & \href{https://github.com/ypid/typesetting/commit/457664094f33618c62348fe5a9798cc98117bcad}{Added macro for showing the github URL and optimized.} & 8 & 26 & 38 \\
\hline 28 & & 2013-04-04 & \href{https://github.com/ypid/typesetting/commit/71547c919a2b36548e65320be8ce0d318b473523}{Optimized} & 3 & 36 & 0 \\
\hline 29 & & 2013-04-20 & \href{https://github.com/ypid/typesetting/commit/3681cf7bc6d18878ca03af4009bdfc9e8835dbcd}{Optimized.} & 5 & 40 & 12 \\
\hline 30 & & 2013-04-20 & \href{https://github.com/ypid/typesetting/commit/c0ef81a414620007d6f39fa95e59888045fa5cf0}{Optimized.} & 12 & 67 & 22 \\
\hline 31 & & 2013-04-21 & \href{https://github.com/ypid/typesetting/commit/782b0e0e51773b02cf909600444da892c890b926}{Optimized.} & 4 & 30 & 13 \\
\hline 32 & & 2013-05-22 & \href{https://github.com/ypid/typesetting/commit/f3048459117aa782b32324bd08ce77bfde325a62}{Optimized (mainly LaTeX-git-wdiff).} & 9 & 229 & 78 \\
\hline 33 & & 2013-06-15 & \href{https://github.com/ypid/typesetting/commit/c5c45122518ad0e6cf9712dc248b26fd3eea4cf0}{Optimized.} & 3 & 15 & 12 \\
\end{longtable}
@@ -0,0 +1,17 @@
\documentclass[12pt,a4paper,english]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{longtable,hyperref}
\newcommand{\longtableendfoot}{Please continue at the next page}

\begin{document}
\input{example-output}

The example-output.tex was generated with this command:
\begin{verbatim}
latex-git-log --width=6 --lang=en > example-output.tex
\end{verbatim}

\end{document}

0 comments on commit af3d63d

Please sign in to comment.