Generates a header section for python and shell scripts
PYTHON HEADER
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# filename : h_gen.py
# description : Generates a header like this one
# author : dad2jrn
# email :
# date : 20170422
# version : 0.12
# usage : python h_gen.py
# notes : This header was generated by this script
# license : MIT
# py version : 2.7.13
#==============================================================================
"""Example Google style docstrings.
This module demonstrates documentation as specified by the "Google Python
Style Guide"_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
literal blocks::
$ python example_google.py
Section breaks are created by resuming unindented text. Section breaks
are also implicitly created anytime a new section starts.
Todo:
* For module TODOs
* You have to also use ``sphinx.ext.todo`` extension
.. _Google Python Style Guide:
http://google.github.io/styleguide/pyguide.html
"""
BASH HEADER
#!/usr/bin/env bash
# filename : my_shell_script.sh
# description : Generates a header like this one
# author : dad2jrn
# email :
# date : 20170422
# version : 0.12
# usage : ./my_shell_script.sh
# notes : This header was generated by this script
# license : Apache-2.0
#==============================================================================
ZSH HEADER
#!/usr/bin/env zsh
# -*- coding: utf-8 -*-
# filename : my_shell_script.sh
# description : Generates a header like this one
# author : dad2jrn
# email :
# date : 20170422
# version : 0.12
# usage : ./my_shell_script.sh
# notes : This header was generated by this script
# license : BSD-3-Clause
#==============================================================================
This script requires Python 2.7. It will not run under Python 3.
curl -O https://raw.githubusercontent.com/dad2jrn/script-header-generator/master/h_gen.py
Run:
> python h_gen.py
MIT
Add licensing options- Python 3 version