pykg2tbl/__main__.py
def main(sysargs = None):
    """
    The main entry point to this module.

    """
    print('sysargs=', sysargs)
    args = get_arg_parser().parse_args(sysargs) if sysargs is not None and len(sysargs) > 0 else get_arg_parser().parse_args()
    enable_logging(args)
    log.info("The args passed to %s are: %s." % (sys.argv[0], args))
    log.debug("Performing service")
    performe_service(args)
    params = {}
    template_service = J2SparqlBuilder(os.path.join(os.getcwd(),args.template_folder))
    vars_template = template_service.variables_in_query(args.template_name)
    if args.variables is not None and len(vars_template) > 0:
        params = args_values_to_params(args.variables)
        variables_check(variables_template=vars_template, variables_given=params)
    querry = template_service.build_sparql_query(name=args.template_name, variables= params)
    print(f'Making KGSource')
    source = makesource(args)
    print(f'performing query')
    log.debug("making exec service")
    executive_service = KG2TblService(source)
    log.debug("performing service query")
    executive_service.exec(querry,os.path.join(os.getcwd(),args.output_location),getdelimiter(args))
    log.info("done with query")
    print(f'new file saved on location : {os.path.join(os.getcwd(),args.output_location)}')

    The main entry point to this module.

    
The main entry point to this module.
The main entry point to this module .
def main(sysargs = None):
    print('sysargs=', sysargs)
    args = get_arg_parser().parse_args(sysargs) if sysargs is not None and len(sysargs) > 0 else get_arg_parser().parse_args()
    enable_logging(args)
    log.info("The args passed to %s are: %s." % (sys.argv[0], args))
    log.debug("Performing service")
    performe_service(args)
    params = {}
    template_service = J2SparqlBuilder(os.path.join(os.getcwd(),args.template_folder))
    vars_template = template_service.variables_in_query(args.template_name)
    if args.variables is not None and len(vars_template) > 0:
        params = args_values_to_params(args.variables)
        variables_check(variables_template=vars_template, variables_given=params)
    querry = template_service.build_sparql_query(name=args.template_name, variables= params)
    print(f'Making KGSource')
    source = makesource(args)
    print(f'performing query')
    log.debug("making exec service")
    executive_service = KG2TblService(source)
    log.debug("performing service query")
    executive_service.exec(querry,os.path.join(os.getcwd(),args.output_location),getdelimiter(args))
    log.info("done with query")
    print(f'new file saved on location : {os.path.join(os.getcwd(),args.output_location)}')
def main ( sysargs = None ) : print ( 'sysargs=' , sysargs ) args = get_arg_parser ( ) . parse_args ( sysargs ) if sysargs is not None and len ( sysargs ) > 0 else get_arg_parser ( ) . parse_args ( ) enable_logging ( args ) log . info ( "The args passed to %s are: %s." % ( sys . argv [ 0 ] , args ) ) log . debug ( "Performing service" ) performe_service ( args ) params = { } template_service = J2SparqlBuilder ( os . path . join ( os . getcwd ( ) , args . template_folder ) ) vars_template = template_service . variables_in_query ( args . template_name ) if args . variables is not None and len ( vars_template ) > 0 : params = args_values_to_params ( args . variables ) variables_check ( variables_template = vars_template , variables_given = params ) querry = template_service . build_sparql_query ( name = args . template_name , variables = params ) print ( f'Making KGSource' ) source = makesource ( args ) print ( f'performing query' ) log . debug ( "making exec service" ) executive_service = KG2TblService ( source ) log . debug ( "performing service query" ) executive_service . exec ( querry , os . path . join ( os . getcwd ( ) , args . output_location ) , getdelimiter ( args ) ) log . info ( "done with query" ) print ( f'new file saved on location : {os.path.join(os.getcwd(),args.output_location)}' )
The main entry point to this module.
The main entry point to this module .
"""
    The main entry point to this module.

    """
sysargs