This program automatically creates header comments for my python homework files. The header files are in the format:
"""
File: README.adoc
Author: Nicholas Marthinuss
Date: 9/7/2020
Section: Lab section
Email: Email
Description: This file is a readme and describes
the functionality and usage of the program.
"""
autocomment [dir | --help]
--help: prints the help message
dir: name of directory to find the python source files
When you invoke this program for the first time, it will look for the file ~/.autocomment/constants
If the program does not find the file, it will prompt you to enter your name, section, and email.
As long as the file remains, the program will use the information in that file to populate the header.
If the file is deleted, it will prompt the user to input the required information again.
Descriptions may be provided by a comment on the first line of the program.
To supply a description this way, a comment must follow the format:
# @desc: Sample description
A description supplied through a comment will be automatically folded, every 30 characters by default.
For each file in the supplied directory without a description comment, the program will prompt the user to enter a description for the file.
In description entry mode, the user must choose where to put line breaks. Pressing enter will insert a newline in the description.
A blank line signals the end of description input. The program then prompts for the description of the next file for each file in the directory.
turnin simply runs autocomment on all of the files in the current directory and then submits them to the given class and assignment
turnin expects a class name and an assignment name
to turn in all files in the current directory to cmsc201’s HW4 assignment:
turnin cmsc201 HW4
Note
|
turnin is generally the command to use when you are ready to submit, as it comments the files and turns them in. if you use autocomment before using turnin, it will cause a redundant header comment |