Commit cc4c8e19 authored by Filippo Leonardi's avatar Filippo Leonardi

Add support for cpp files and 'C Source files'

parent b082dcee
......@@ -18,7 +18,7 @@ symlink_prefix = '_____'
# used to grep with command `file`
image_formats = ['PNG image data', 'JPEG image data', 'PDF document']
code_formats = ['Python script', 'C source', 'C header', 'C++ source',
'C++ header', 'MATLAB']
'C++ header', 'MATLAB', 'C++ source file', 'C source file']
text_formats = ['ASCII text', 'UTF-8 Unicode text']
# Sometimes "file" fails and recognises a ".cpp" file as "C source",
......@@ -34,6 +34,8 @@ short_names = {'PNG image data': 'PNG',
'C header': 'HPP',
'C++ source': 'CPP',
'C++ header': 'HPP',
'C++ source file': 'CPP',
'C source file': 'CPP',
None: 'None'}
# Set listing language to the one on the right
......@@ -42,6 +44,8 @@ listing_names = {'Python script': 'python',
'C header': 'C++',
'C++ source': 'C++',
'C++ header': 'C++',
'C++ source file': 'C++',
'C source file': 'C++',
'ASCII text': '',
'UTF-8 Unicode text': '',
'MATLAB': 'Matlab',
......@@ -52,6 +56,8 @@ style_names = {'Python script': 'PY',
'MATLAB': 'MATLAB',
'C source': 'CPP',
'C header': 'CPP',
'C++ source file': 'CPP',
'C source file': 'CPP',
'C++ source': 'CPP',
'C++ header': 'CPP',
'ASCII text': '',
......
#!/usr/bin/env python
#!/usr/bin/env python2
import argparse
import os, re
import subprocess
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment