Fixed typo in ob-css.el
[org-mode.git] / UTILITIES / make_emacs_changelog
blob7771c9ea6f298fa5f00294428dc3f4aca3516ed3
1 #!/usr/bin/perl
3 $commitrange = shift @ARGV;
4 if (!$commitrange) {
5 print STDERR "Enter commitrange: ";
6 $commitrange = <>;
7 $commitrange =~ s/\s*(.*?)\s+/$1/;
10 $syncdate = shift @ARGV;
11 if (!$syncdate) {
12 print STDERR "Enter syncdate YYYY-MM-DD: ";
13 $syncdate = <>;
14 $syncdate =~ s/\s*(.*?)\s+/$1/;
17 # Run git log to get the commits the messages
18 open IN,"git log $commitrange|";
19 undef $/;
20 $log = <IN>;
21 @commits = split(/^(?=commit)/m,$log);
23 for $i (0..$#commits) {
24 $entry = ""; $tiny = "";
25 $commit = $commits[$i];
26 $author = $1 if $commit=~/^Author: ([^\n]+)/m;
27 $date = $1 if $commit=~/^Date: ([^\n]+)/m;
28 $entry = $1 if $commit=~/^([ \t]*\* [^\f]*?)(\n[ \t]*\n|\Z)/m;
29 $tiny = " (tiny change)" if $commit =~ /TINYCHANGE/;
31 # split author into name and address
32 if ($author =~ /(.*?)\s+(<.*?>)/) {
33 $name = $1;
34 $address = $2;
35 } else {
36 warn "No name/address";
37 next;
40 if ($entry) {
41 # indent each line by 1 TAB
42 $entry =~ s/^[ \t]*/\t/gm;
43 # Add empty lines if there are several files in there
44 $entry =~ s/(\n[ \t]+\* )/\n$1/g;
45 # remove the lisp part of the path
46 $entry =~ s/^([ \t]+\* )lisp\//$1/mg;
47 print "$syncdate $name $address$tiny\n\n$entry\n\n";