https://github.com/etcwilde/header-generator
Inserts heading information in a comment for source files using a user-defined template.
https://github.com/etcwilde/header-generator
Last synced: 28 days ago
JSON representation
Inserts heading information in a comment for source files using a user-defined template.
- Host: GitHub
- URL: https://github.com/etcwilde/header-generator
- Owner: etcwilde
- License: mit
- Created: 2014-04-21T01:38:15.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-09T05:07:10.000Z (over 11 years ago)
- Last Synced: 2025-02-28T23:03:20.686Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 199 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme
- License: LICENSE
Awesome Lists containing this project
README
Source Code Header Generator
Author: Evan Wilde
Start Date: April 6 2014
Version: 0.1
=== Description ===
This program will apply user templates to create uniform header documentation
for each source file specified.
It uses the file extension to map to a given template file,
so it can support any language.
=== Program Usage ===
usage: license.py [-h] [-u USERNAME] [-e EMAIL] [-t TEMPLATE_DIR] [--version] files [files ...]
-h: Help
-u: Specify a username for the copyright. This will require an email be passed as well.
-e: Specify an email address for the user
-t: Specify a directory containing the template files.
--version: prints the version of the program
files: The list of files that need to have a header appended to them.
=== Template Keywords ===
Template Keyword Definitions:
TYPE
Defines the type of file that this template header applies to.
This is case sensitive, so "C" and "c" are different file types.
---START
Defines the start of the template that will be written to the source file.
---END
Defines the end of the template that will be written to the source file.
The name of the file with the file extensions.
The full file path to the file, with file extensions.
The name of the file without file extensions.
The name of the user who created the file.
The email of the user who created the file.
The date the file was modified.
If the file has never been modified, this is the creation date.
Where the include statements will be placed, relative to the header
INCTYPE
How external libraries are included in a source file.
e.g. for java it is "INCTYPE:import"
=== Template samples ===
------------------------------------------------------------------------------
This example template is for "java" files.
------------------------------------------------------------------------------
AUTH:Evan Wilde
DATE:April 6 2014
TYPE:java
INCTYPE:import
---START
/*
* File:
* Auth:
* Date:
*/
---END
------------------------------------------------------------------------------
This example template is for ".c", ".cpp", ".C", and ".h" files.
------------------------------------------------------------------------------
AUTH:Evan Wilde
DATE:April 6 2014
INCTYPE:#include
TYPE:c
TYPE:cpp
TYPE:C
TYPE:h
---START
/**
*
* File:
* Auth:
* Date:
*/
---END
------------------------------------------------------------------------------