Git is a content tracker, and while every blob can be associated with an author, git has no provisions to conveniently accommodate the various top-level software metrics of the kind you are after . So you will either have to build your own parser for the content, or you will run into inherent difficulties with what you are trying to achieve in the general case, because git interpretation and presentation of the content is not aligned with your goals.
Additionally keep in mind is that git can distinguish between the author and the committer of a change (and every blob), something that you will have to account for, especially if code can be submitted via patches in your project.
Ignoring the distinction between authors and committers, you can know out of the box,
- authorship attribution of the different lines in a file using
git blame -- /path/to/file
(and you can subsequently filter the lines by the individual author contribution) - history of an individual file with
git log -- /path/to/file
(the commits that affected the file) - history of author commits in a branch with
git log -p --author=<name>
If you are lucky you can possibly utilise a mix of the above with post-processing to generate a sensible input to your tool, but I suspect that significant amount of post-processing will be required in any event.