28 lines
639 B
Python
28 lines
639 B
Python
|
|
#!/usr/bin/env python
|
||
|
|
# coding:utf-8
|
||
|
|
"""
|
||
|
|
Author: Sir Garbagetruck --<truck@notonfire.somewhere>
|
||
|
|
Purpose: make editing the list.sahli file easier
|
||
|
|
Created: 2020/04/09
|
||
|
|
"""
|
||
|
|
|
||
|
|
import json
|
||
|
|
import argparse
|
||
|
|
import sahliEditorPython
|
||
|
|
|
||
|
|
|
||
|
|
def main(args):
|
||
|
|
"""maintain a list.sahli file"""
|
||
|
|
if args.new:
|
||
|
|
mysahli = sahliEditorPython.sahlifile()
|
||
|
|
else:
|
||
|
|
mysahli = sahliEditorPython.sahlifile(args.filename)
|
||
|
|
a = 5
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
ap = argparse.ArgumentParser()
|
||
|
|
ap.add_argument('-f', '--filename', default='list.sahli')
|
||
|
|
ap.add_argument('-n', '--new', action='store_true')
|
||
|
|
main(ap.parse_args())
|