Generating Copyright Headers from git History
source link: https://0pointer.net/blog/projects/copyright.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Here's a little a little tool I wrote that automatically generates copyright headers for source files in a git repository based on the git history.
Run it like this:
~/projects/pulseaudio$ copyright.py src/pulsecore/sink.c src/pulsecore/core-util.c
And it will give you this:
File: src/pulsecore/sink.c Copyright 2004, 2006-2009 Lennart Poettering Copyright 2006-2007 Pierre Ossman Copyright 2008-2009 Marc-Andre Lureau File: src/pulsecore/core-util.c Copyright 2004, 2006-2009 Lennart Poettering Copyright 2006-2007 Pierre Ossman Copyright 2008 Stelian Ionescu Copyright 2009 Jared D. McNeill Copyright 2009 Marc-Andre Lureau
This little script could use love from a friendly soul to make it crawl entire source trees and patch in appropriate copyright headers. Anyone up for it?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK