Add readme for pymacro

This commit is contained in:
Akbar Rahman 2019-01-18 18:21:29 +00:00
parent 72164fd92c
commit 7cbcfb7afa
Signed by: alvierahman90
GPG Key ID: 20609519444A1269
2 changed files with 29 additions and 4 deletions

View File

@ -12,10 +12,10 @@ def get_args():
import argparse import argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("-m", "--macros", default=["macros"], action="append") parser.add_argument("-m", "--macros", default=["macros"], action="append", help="Extra files where macros are stored")
parser.add_argument("-s", "--silent", default=False, action="store_true") parser.add_argument("-s", "--silent", default=False, action="store_true", help="Do not print processed file")
parser.add_argument("input") parser.add_argument("input", help="The file to be processed")
parser.add_argument("output") parser.add_argument("output", help="The location of the output")
return parser.parse_args() return parser.parse_args()

25
pymacro/readme.md Normal file
View File

@ -0,0 +1,25 @@
# pymacro
A python implementation of the macros spec
## usage
```
usage: pymacro [-h] [-m MACROS] [-s] input output
positional arguments:
input The file to be processed
output The location of the output
optional arguments:
-h, --help show this help message and exit
-m MACROS, --macros MACROS
Extra files where macros are stored
-s, --silent Do not print processed file
```
## testing
Run `test.sh`.
A `diff` is run on the actual output against what should have come out according
to the spec.