Skip to content

Commit

Permalink
Catch parameters from --git and stuff them in as pre/post file args
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Apr 16, 2020
1 parent 13be898 commit 9327a43
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/fdiff/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run(argv):
description="An OpenType table diff tool for fonts."
)
parser.add_argument("--version", action="version", version=f"fdiff v{__version__}")
parser.add_argument("--git", type=str, nargs=7, action="git", help="Act as a diff driver for git (takes 7 parameters)")
parser.add_argument("--git", type=str, nargs=7, help="Act as a diff driver for git (takes 7 parameters)")
parser.add_argument(
"-c",
"--color",
Expand Down Expand Up @@ -64,11 +64,16 @@ def run(argv):
"--nomp", action="store_true", help="Do not use multi process optimizations"
)
parser.add_argument("--external", type=str, help="Run external diff tool command")
parser.add_argument("PREFILE", help="Font file path/URL 1")
parser.add_argument("POSTFILE", help="Font file path/URL 2")
# parser.add_argument("PREFILE", help="Font file path/URL 1")
# parser.add_argument("POSTFILE", help="Font file path/URL 2")

args = parser.parse_args(argv)

if args.git:
print(args.git)
args.PREFILE = args.git[1]
args.POSTFILE = args.git[4]

# /////////////////////////////////////////////////////////
#
# Validations
Expand Down Expand Up @@ -118,11 +123,6 @@ def run(argv):
# optimization use
use_mp = not args.nomp

if args.git:
pass
# TODO: catch 2nd & 5th parameters and stuff them in args.PREFILE and
# args.POSTFILE respectively

if args.external:
# ------------------------------
# External executable tool diff
Expand Down

0 comments on commit 9327a43

Please sign in to comment.