import json from bom_functions import get_sage_boms from bom_functions import write_bom_files # installation script , this will write all the boms # to disc write_bom_files(get_sage_boms())
import sys import json from bom_functions import get_sage_bom from bom_functions import write_bom_files print( 'This program will retrieve a BON from Sage can create / update your local github files' ) print('please enter BOM name') bomName = input() bom = get_sage_bom(bomName) if len(bom) > 0: write_bom_files(get_sage_bom(bomName)) print(json.dumps(bom, sort_keys=True, indent=4)) print(bomName + ' has been Sucessfully updated') else: print(bomName + ' not found ') print('press any key to close') input()
import sys from bom_functions import get_sage_bom from bom_functions import write_bom_files # update selected bom if len(sys.argv) > 1: write_bom_files(get_sage_bom(sys.argv[1])) else: print " this program must be run with a single argument = <bom name>"