Commit Graph

20 Commits

Author SHA1 Message Date
Adam Waldenberg 38df413ebf Global cleanup fixing some pylint violations. 2015-10-05 06:17:10 +02:00
Adam Waldenberg 30a20e6b52 All doc and source code URL's now also point to the new home on GitHub.
Regenerated all the documentation from the AsciiDoc document.
2015-08-24 17:34:14 +02:00
Adam Waldenberg 4803c511df Updated invalid year strings in version information. 2015-08-24 17:23:54 +02:00
Adam Waldenberg 02b6db512b Strip exotic characters from the table-sorter plugin.
This is needed under certain circumstances whenever the terminal locale
can't be determined and can't handle unicode characters.
2015-02-22 00:53:38 +01:00
Christian Kastner 3010359eb2 Add missing html.footer to htmlembedded output (Fixes issue 48).
Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-23 01:37:18 +01:00
Chris Barry d6a2f33de5 Use https where possible.
Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-03 09:56:49 +01:00
Adam Waldenberg 93b18cdd9a The name of the project is now shown in the title of the HTML output.
Moved the gitinspector version number from the title down to the top text
box of the HTML page.
2014-03-17 08:47:49 +01:00
Adam Waldenberg 4e4d0a2ddb The repository name and report date is now included in the generated text. 2014-02-20 04:06:47 +01:00
Adam Waldenberg 20d82273ec Generated pie charts in HTML view now handle re-sizing better.
This is accomplished with the use of the flot re-size plugin. Thanks to
this, pie charts no longer have to be set to a fixed size.
2013-07-27 23:48:34 +02:00
Adam Waldenberg 291761e6a4 Exceptions now store messages in self.msg directly.
Previously, they had a msg() method for fetching the error string. This
has now been removed in favor of the directly callable attribute.
2013-07-14 04:57:32 +02:00
Adam Waldenberg cf63af8819 Fixed some pylint violations in some newly added code. 2013-07-14 04:47:34 +02:00
Adam Waldenberg b28d86d1f2 Fixed a long-standing bug with exceptions not being able to handle unicode.
This was fixed by storing the exception string manually inside each
exception class. The error message is now stored in exception.msg instead
of relying on __str__(). It seems the normal behavior (by printing exceptions
directly) is broken in Python 2. It *does* work in Python 3, but this is
because it always handles everything as unicode.
2013-07-14 03:15:14 +02:00
Adam Waldenberg 7f0e2b6fe8 Changed the argument parsing back to using getopt!
The support for optional boolean arguments is the same; but uses
getopt instead of optparse.

The whole adventure with optparse was a giant waste of time and just
forced us to monkey-patch optparse with some very ugly solutions in order
to make it do what we wanted; thus it was better to switch back to the
more low-level getopt module.

To accomplish this; a optval.gnu_getopt() function was added that is a
duplicate of the original getopt.gnu_getopt function but with support for
optional arguments.

A long option which accepts an optional argument is denoted with
arg:default_value in the long_options string.

In the end, this solution feels much better than the one with optparse.
2013-07-14 00:07:36 +02:00
Adam Waldenberg 0d2bf9b0a8 Implemented optional boolean arguments to some command-line options.
Just like in many GNU tools, it is now possible to pass an optional
boolean to some of the flags of gitinspector in the form;

--flag[=BOOL]

This gives us the ability to override options set via git-config.
For example; say we did the following:

git-config --global inspector.timeline true

We could then override this setting when running gitinspector by supplying:

./gitinspector.py --timeline=false

Implementing this was not a trivial task, as no command-line parser in
Python supports this by default (getopt, optparse, argparse). In order to
properly handle optional boolean arguments; some clever patching had to
be done to the command-line in combination with a callback function that
can handle boolean strings. To maintain compatibility with Python 2.6,
this was implemented using optparse (instead of argparse).
2013-07-09 12:40:59 +02:00
Adam Waldenberg c19680dc39 Changed the default format back to "text" instead of "htmlembedded". 2013-06-26 02:42:41 +02:00
Adam Waldenberg 45429d9a35 Added a "htmlembedded" output format.
This format behaves the same as the old "html" output. Consequently, the
ordinary "html" output now hot-links the JQuery script to
ajax.googleapis.com. This results in a generated file with roughly half
the stitching code compared to previously.
2013-06-26 02:36:13 +02:00
Adam Waldenberg bfc266b22b Removed a dangling "+" character from the format module. 2013-06-26 01:19:47 +02:00
Adam Waldenberg a952921c32 Added localization support to the html.header file.
As of this commit; the localization of gitinspector is pretty much
complete.
2013-06-26 00:37:55 +02:00
Adam Waldenberg f20c3c1895 Made some changes to ensure compatibility in Python 2 with gettext.
The gettext.install() functions supplies a way to force it to return
unicode which helps with compatibility between Python 2 & 3. To make it
work properly when merging those returned string with strings in the
different modules of gitinspector we also had to do some changes to make
sure all string literals are in unicode.
2013-06-25 16:37:18 +02:00
Adam Waldenberg f36b82170f File structure rearranged to be more compatible with setuptools/Distribute.
The fact is, gitinspector is now stable enough to inlude support for python
distribution and setup. This is the first step towards that transition.
2013-06-14 03:16:30 +02:00