Skip to content

Instantly share code, notes, and snippets.

@alexras
Created October 26, 2011 00:12
Show Gist options
  • Save alexras/1314887 to your computer and use it in GitHub Desktop.
Save alexras/1314887 to your computer and use it in GitHub Desktop.
Convert lines-of-code information found at https://docs.google.com/spreadsheet/ccc?key=0AszFIYMceP5EdEtQT3l4MlY2Q1Etb0JqWURHU0E3aUE&hl=en_US into something more easily manipulable
{
"emacs-21.3.tar.gz": {
"XML": {
"files": 2,
"comment": 106,
"code": 4262,
"blank": 91
},
"C": {
"files": 181,
"comment": 48396,
"code": 221556,
"blank": 47613
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 138,
"blank": 27
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"m4": {
"files": 1,
"comment": 19,
"code": 469,
"blank": 44
},
"Lisp": {
"files": 759,
"comment": 102303,
"code": 475614,
"blank": 71919
},
"make": {
"files": 1,
"comment": 5,
"code": 20,
"blank": 8
},
"C/C++ Header": {
"files": 307,
"comment": 15712,
"code": 15612,
"blank": 9816
},
"Perl": {
"files": 2,
"comment": 59,
"code": 1036,
"blank": 337
},
"C#": {
"files": 1,
"comment": 0,
"code": 776,
"blank": 268
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 144,
"code": 417,
"blank": 34
},
"Bourne Shell": {
"files": 12,
"comment": 2078,
"code": 11236,
"blank": 1332
}
},
"emacs-21.2.tar.gz": {
"XML": {
"files": 2,
"comment": 106,
"code": 4262,
"blank": 91
},
"C": {
"files": 181,
"comment": 48312,
"code": 221324,
"blank": 47562
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 138,
"blank": 27
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"m4": {
"files": 1,
"comment": 19,
"code": 469,
"blank": 44
},
"Lisp": {
"files": 758,
"comment": 102323,
"code": 474095,
"blank": 71862
},
"make": {
"files": 1,
"comment": 5,
"code": 20,
"blank": 8
},
"C/C++ Header": {
"files": 305,
"comment": 15622,
"code": 15573,
"blank": 9763
},
"Perl": {
"files": 2,
"comment": 59,
"code": 1036,
"blank": 337
},
"C#": {
"files": 1,
"comment": 0,
"code": 775,
"blank": 268
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 144,
"code": 417,
"blank": 34
},
"Bourne Shell": {
"files": 12,
"comment": 2052,
"code": 11023,
"blank": 1316
}
},
"emacs-21.1.tar.gz": {
"XML": {
"files": 2,
"comment": 106,
"code": 4262,
"blank": 91
},
"C": {
"files": 181,
"comment": 48124,
"code": 220643,
"blank": 47449
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 138,
"blank": 27
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"m4": {
"files": 1,
"comment": 19,
"code": 469,
"blank": 44
},
"Lisp": {
"files": 758,
"comment": 102108,
"code": 473338,
"blank": 71814
},
"make": {
"files": 1,
"comment": 5,
"code": 20,
"blank": 8
},
"C/C++ Header": {
"files": 304,
"comment": 15610,
"code": 15539,
"blank": 9754
},
"Perl": {
"files": 2,
"comment": 59,
"code": 1036,
"blank": 337
},
"C#": {
"files": 1,
"comment": 0,
"code": 775,
"blank": 268
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 144,
"code": 417,
"blank": 34
},
"Bourne Shell": {
"files": 12,
"comment": 2041,
"code": 10971,
"blank": 1306
}
},
"emacs-18.59.tar.gz": {
"C": {
"files": 121,
"comment": 10536,
"code": 56309,
"blank": 10210
},
"Assembly": {
"files": 1,
"comment": 58,
"code": 219,
"blank": 43
},
"Lisp": {
"files": 158,
"comment": 6658,
"code": 44540,
"blank": 6108
},
"make": {
"files": 7,
"comment": 67,
"code": 297,
"blank": 76
},
"C/C++ Header": {
"files": 159,
"comment": 6815,
"code": 5141,
"blank": 4711
},
"Perl": {
"files": 1,
"comment": 48,
"code": 159,
"blank": 13
},
"yacc": {
"files": 1,
"comment": 136,
"code": 373,
"blank": 82
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"Bourne Shell": {
"files": 3,
"comment": 44,
"code": 117,
"blank": 34
}
},
"emacs-20.1.tar.gz": {
"C": {
"files": 180,
"comment": 31351,
"code": 144389,
"blank": 28593
},
"Teamcenter def": {
"files": 1,
"comment": 57,
"code": 129,
"blank": 24
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 553,
"comment": 71759,
"code": 303068,
"blank": 47686
},
"make": {
"files": 3,
"comment": 12,
"code": 94,
"blank": 17
},
"C/C++ Header": {
"files": 277,
"comment": 12930,
"code": 11935,
"blank": 7911
},
"yacc": {
"files": 1,
"comment": 136,
"code": 373,
"blank": 82
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 46,
"code": 182,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1405,
"code": 7130,
"blank": 889
}
},
"emacs-20.6.tar.gz": {
"C": {
"files": 183,
"comment": 33779,
"code": 159076,
"blank": 31034
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 139,
"blank": 28
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 584,
"comment": 79945,
"code": 356419,
"blank": 53847
},
"make": {
"files": 2,
"comment": 8,
"code": 88,
"blank": 17
},
"C/C++ Header": {
"files": 288,
"comment": 13297,
"code": 13087,
"blank": 8188
},
"Perl": {
"files": 1,
"comment": 0,
"code": 884,
"blank": 281
},
"C#": {
"files": 1,
"comment": 0,
"code": 749,
"blank": 264
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 59,
"code": 205,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1422,
"code": 7251,
"blank": 866
}
},
"emacs-20.7.tar.gz": {
"C": {
"files": 183,
"comment": 33812,
"code": 159205,
"blank": 31070
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 139,
"blank": 28
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 584,
"comment": 79962,
"code": 356523,
"blank": 53857
},
"make": {
"files": 2,
"comment": 8,
"code": 88,
"blank": 17
},
"C/C++ Header": {
"files": 288,
"comment": 13293,
"code": 13115,
"blank": 8195
},
"Perl": {
"files": 1,
"comment": 0,
"code": 884,
"blank": 281
},
"C#": {
"files": 1,
"comment": 0,
"code": 749,
"blank": 264
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 59,
"code": 205,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1439,
"code": 7338,
"blank": 881
}
},
"emacs-20.4.tar.gz": {
"C": {
"files": 183,
"comment": 33802,
"code": 158897,
"blank": 31025
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 139,
"blank": 28
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 584,
"comment": 79921,
"code": 356372,
"blank": 53846
},
"make": {
"files": 2,
"comment": 8,
"code": 88,
"blank": 17
},
"C/C++ Header": {
"files": 287,
"comment": 13238,
"code": 13038,
"blank": 8153
},
"Perl": {
"files": 1,
"comment": 0,
"code": 884,
"blank": 281
},
"C#": {
"files": 1,
"comment": 0,
"code": 749,
"blank": 264
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 59,
"code": 204,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1408,
"code": 7172,
"blank": 861
}
},
"emacs-20.2.tar.gz": {
"C": {
"files": 180,
"comment": 31351,
"code": 144390,
"blank": 28593
},
"Teamcenter def": {
"files": 1,
"comment": 57,
"code": 129,
"blank": 24
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 553,
"comment": 71760,
"code": 303123,
"blank": 47689
},
"make": {
"files": 3,
"comment": 12,
"code": 94,
"blank": 17
},
"C/C++ Header": {
"files": 277,
"comment": 12932,
"code": 11936,
"blank": 7912
},
"yacc": {
"files": 1,
"comment": 136,
"code": 373,
"blank": 82
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 46,
"code": 182,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1405,
"code": 7130,
"blank": 889
}
},
"emacs-20.3.tar.gz": {
"C": {
"files": 180,
"comment": 32575,
"code": 152820,
"blank": 29956
},
"Teamcenter def": {
"files": 1,
"comment": 57,
"code": 126,
"blank": 24
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 575,
"comment": 77708,
"code": 340785,
"blank": 51905
},
"make": {
"files": 2,
"comment": 8,
"code": 87,
"blank": 17
},
"C/C++ Header": {
"files": 279,
"comment": 13222,
"code": 12950,
"blank": 8147
},
"Perl": {
"files": 1,
"comment": 0,
"code": 884,
"blank": 281
},
"C#": {
"files": 1,
"comment": 0,
"code": 749,
"blank": 264
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 48,
"code": 195,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1435,
"code": 7439,
"blank": 922
}
},
"emacs-22.2.tar.gz": {
"XML": {
"files": 1,
"comment": 62,
"code": 2224,
"blank": 54
},
"C": {
"files": 183,
"comment": 59198,
"code": 239172,
"blank": 52303
},
"Python": {
"files": 1,
"comment": 49,
"code": 161,
"blank": 24
},
"Assembly": {
"files": 1,
"comment": 34,
"code": 6,
"blank": 2
},
"C Shell": {
"files": 1,
"comment": 18,
"code": 9,
"blank": 7
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1079,
"comment": 150137,
"code": 888895,
"blank": 111982
},
"make": {
"files": 1,
"comment": 41,
"code": 46,
"blank": 39
},
"C/C++ Header": {
"files": 317,
"comment": 18149,
"code": 17376,
"blank": 11190
},
"Perl": {
"files": 3,
"comment": 89,
"code": 1165,
"blank": 382
},
"C#": {
"files": 1,
"comment": 0,
"code": 772,
"blank": 268
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 193,
"blank": 36
},
"HTML": {
"files": 2,
"comment": 4,
"code": 1368,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 32,
"code": 23,
"blank": 16
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 259,
"code": 666,
"blank": 86
},
"Bourne Shell": {
"files": 12,
"comment": 2885,
"code": 24236,
"blank": 3107
}
},
"emacs-23.2a.tar.gz": {
"XML": {
"files": 3,
"comment": 18,
"code": 43,
"blank": 17
},
"C": {
"files": 177,
"comment": 56741,
"code": 232728,
"blank": 50028
},
"Python": {
"files": 3,
"comment": 101,
"code": 333,
"blank": 56
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"C Shell": {
"files": 1,
"comment": 15,
"code": 8,
"blank": 8
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1457,
"comment": 178053,
"code": 1046479,
"blank": 135283
},
"make": {
"files": 1,
"comment": 36,
"code": 68,
"blank": 41
},
"C/C++ Header": {
"files": 137,
"comment": 9461,
"code": 14018,
"blank": 6372
},
"Perl": {
"files": 4,
"comment": 109,
"code": 1257,
"blank": 425
},
"Objective C": {
"files": 6,
"comment": 1703,
"code": 9397,
"blank": 2300
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 190,
"blank": 36
},
"HTML": {
"files": 3,
"comment": 6,
"code": 1369,
"blank": 3
},
"Bourne Again Shell": {
"files": 1,
"comment": 31,
"code": 23,
"blank": 17
},
"DOS Batch": {
"files": 6,
"comment": 245,
"code": 764,
"blank": 117
},
"Bourne Shell": {
"files": 11,
"comment": 2750,
"code": 26523,
"blank": 3356
},
"C#": {
"files": 1,
"comment": 0,
"code": 772,
"blank": 268
}
},
"emacs-23.3a.tar.gz": {
"XML": {
"files": 3,
"comment": 18,
"code": 44,
"blank": 17
},
"C": {
"files": 177,
"comment": 56835,
"code": 233341,
"blank": 50114
},
"Python": {
"files": 3,
"comment": 96,
"code": 333,
"blank": 54
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"C Shell": {
"files": 1,
"comment": 15,
"code": 8,
"blank": 8
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1463,
"comment": 182517,
"code": 1072369,
"blank": 144630
},
"make": {
"files": 1,
"comment": 36,
"code": 68,
"blank": 41
},
"C/C++ Header": {
"files": 136,
"comment": 9453,
"code": 14026,
"blank": 6382
},
"Perl": {
"files": 4,
"comment": 109,
"code": 1257,
"blank": 425
},
"Objective C": {
"files": 6,
"comment": 1698,
"code": 9427,
"blank": 2308
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 190,
"blank": 36
},
"HTML": {
"files": 3,
"comment": 6,
"code": 1369,
"blank": 3
},
"Bourne Again Shell": {
"files": 1,
"comment": 31,
"code": 23,
"blank": 17
},
"DOS Batch": {
"files": 6,
"comment": 245,
"code": 777,
"blank": 117
},
"Bourne Shell": {
"files": 11,
"comment": 2196,
"code": 15871,
"blank": 2303
},
"C#": {
"files": 1,
"comment": 0,
"code": 772,
"blank": 268
}
},
"emacs-19.34b.tar.gz": {
"C": {
"files": 172,
"comment": 27709,
"code": 127664,
"blank": 25433
},
"Teamcenter def": {
"files": 1,
"comment": 57,
"code": 119,
"blank": 24
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 424,
"comment": 57080,
"code": 239143,
"blank": 37413
},
"make": {
"files": 3,
"comment": 12,
"code": 44,
"blank": 12
},
"C/C++ Header": {
"files": 263,
"comment": 11762,
"code": 10538,
"blank": 7354
},
"yacc": {
"files": 1,
"comment": 136,
"code": 373,
"blank": 82
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 4,
"comment": 46,
"code": 171,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1232,
"code": 5608,
"blank": 792
}
},
"emacs-22.3.tar.gz": {
"XML": {
"files": 1,
"comment": 62,
"code": 2224,
"blank": 54
},
"C": {
"files": 184,
"comment": 59365,
"code": 240988,
"blank": 52639
},
"Python": {
"files": 1,
"comment": 49,
"code": 161,
"blank": 24
},
"Assembly": {
"files": 1,
"comment": 34,
"code": 6,
"blank": 2
},
"C Shell": {
"files": 1,
"comment": 18,
"code": 9,
"blank": 7
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1084,
"comment": 151000,
"code": 900243,
"blank": 113019
},
"make": {
"files": 1,
"comment": 41,
"code": 46,
"blank": 39
},
"C/C++ Header": {
"files": 317,
"comment": 18199,
"code": 17578,
"blank": 11213
},
"Perl": {
"files": 3,
"comment": 89,
"code": 1165,
"blank": 382
},
"C#": {
"files": 1,
"comment": 0,
"code": 772,
"blank": 268
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 193,
"blank": 36
},
"HTML": {
"files": 2,
"comment": 4,
"code": 1368,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 32,
"code": 23,
"blank": 16
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 259,
"code": 666,
"blank": 86
},
"Bourne Shell": {
"files": 12,
"comment": 2900,
"code": 24545,
"blank": 3139
}
},
"emacs-20.5a.tar.gz": {
"C": {
"files": 183,
"comment": 33747,
"code": 159025,
"blank": 31022
},
"Teamcenter def": {
"files": 1,
"comment": 65,
"code": 139,
"blank": 28
},
"Assembly": {
"files": 2,
"comment": 93,
"code": 253,
"blank": 42
},
"Lisp": {
"files": 584,
"comment": 79939,
"code": 356422,
"blank": 53847
},
"make": {
"files": 2,
"comment": 8,
"code": 88,
"blank": 17
},
"C/C++ Header": {
"files": 287,
"comment": 13240,
"code": 13043,
"blank": 8157
},
"Perl": {
"files": 1,
"comment": 0,
"code": 884,
"blank": 281
},
"C#": {
"files": 1,
"comment": 0,
"code": 749,
"blank": 264
},
"C Shell": {
"files": 1,
"comment": 14,
"code": 9,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 16,
"code": 23,
"blank": 6
},
"lex": {
"files": 1,
"comment": 0,
"code": 125,
"blank": 25
},
"sed": {
"files": 1,
"comment": 3,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 5,
"comment": 59,
"code": 205,
"blank": 10
},
"Bourne Shell": {
"files": 12,
"comment": 1408,
"code": 7173,
"blank": 861
}
},
"emacs-22.1.tar.gz": {
"XML": {
"files": 1,
"comment": 62,
"code": 2224,
"blank": 54
},
"C": {
"files": 183,
"comment": 58872,
"code": 238055,
"blank": 52107
},
"Python": {
"files": 1,
"comment": 49,
"code": 159,
"blank": 24
},
"Assembly": {
"files": 1,
"comment": 34,
"code": 6,
"blank": 2
},
"C Shell": {
"files": 1,
"comment": 18,
"code": 9,
"blank": 7
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1071,
"comment": 150649,
"code": 894478,
"blank": 118419
},
"make": {
"files": 1,
"comment": 41,
"code": 46,
"blank": 39
},
"C/C++ Header": {
"files": 316,
"comment": 18132,
"code": 17358,
"blank": 11182
},
"Perl": {
"files": 3,
"comment": 89,
"code": 1172,
"blank": 383
},
"C#": {
"files": 1,
"comment": 0,
"code": 778,
"blank": 269
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 192,
"blank": 37
},
"HTML": {
"files": 2,
"comment": 4,
"code": 1368,
"blank": 2
},
"Bourne Again Shell": {
"files": 1,
"comment": 32,
"code": 23,
"blank": 16
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"DOS Batch": {
"files": 6,
"comment": 257,
"code": 662,
"blank": 86
},
"Bourne Shell": {
"files": 12,
"comment": 2881,
"code": 24153,
"blank": 3103
}
},
"emacs-23.1.tar.bz2": {
"XML": {
"files": 3,
"comment": 18,
"code": 43,
"blank": 17
},
"C": {
"files": 176,
"comment": 56490,
"code": 231086,
"blank": 49795
},
"Python": {
"files": 3,
"comment": 101,
"code": 333,
"blank": 56
},
"sed": {
"files": 1,
"comment": 5,
"code": 4,
"blank": 0
},
"C Shell": {
"files": 1,
"comment": 15,
"code": 8,
"blank": 8
},
"m4": {
"files": 1,
"comment": 4,
"code": 68,
"blank": 10
},
"Lisp": {
"files": 1274,
"comment": 159385,
"code": 935625,
"blank": 123494
},
"make": {
"files": 1,
"comment": 33,
"code": 66,
"blank": 42
},
"C/C++ Header": {
"files": 135,
"comment": 9441,
"code": 13917,
"blank": 6366
},
"Perl": {
"files": 4,
"comment": 109,
"code": 1257,
"blank": 425
},
"Objective C": {
"files": 6,
"comment": 1785,
"code": 9574,
"blank": 2339
},
"Patran Command Language": {
"files": 1,
"comment": 0,
"code": 190,
"blank": 36
},
"HTML": {
"files": 3,
"comment": 6,
"code": 1369,
"blank": 3
},
"Bourne Again Shell": {
"files": 1,
"comment": 31,
"code": 23,
"blank": 17
},
"DOS Batch": {
"files": 6,
"comment": 245,
"code": 763,
"blank": 117
},
"Bourne Shell": {
"files": 11,
"comment": 2757,
"code": 25216,
"blank": 3309
},
"C#": {
"files": 1,
"comment": 0,
"code": 772,
"blank": 268
}
}
}
#!/usr/bin/env python
import re, json
info = {}
current_emacs_version = None
lang_counts_dict = {}
with open("count.txt", "r") as fp:
for line in fp:
line = line.strip()
if len(line) == 0:
continue
fields = line.split('\t')
if len(fields) == 1:
current_emacs_version = fields[0]
lang_counts_dict[current_emacs_version] = {}
else:
(files, language, blank, comment, code) = fields[:5]
comment = int(comment.replace(',', ''))
code = int(code.replace(',', ''))
blank = int(blank.replace(',', ''))
files = int(files.replace(',', ''))
current_lang_dict = {}
current_lang_dict["code"] = code
current_lang_dict["blank"] = blank
current_lang_dict["files"] = files
current_lang_dict["comment"] = comment
lang_counts_dict[current_emacs_version][language] = \
current_lang_dict
with open("count.json", "w") as fp:
json.dump(lang_counts_dict, fp, indent=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment