Exemple #1
0
def main(argv):
	parser = ArgumentParser()

	parser.add_argument(
		"-d", "--debug",
		dest="debug", help="Enable debug mode", action="store_true"
	)
	parser.add_argument(
		"-l", "--login",
		dest="login", help="Player login", metavar="LOGIN"
	)
	parser.add_argument(
		"-p", "--password",
		dest="password", help="Player password", metavar="PASSWORD"
	)
	parser.add_argument(
		"action",
		metavar="A", nargs='*', help="Action to execute"
	)

	args = parser.parse_args()

	rpg = Rpg(args.login, args.password, args.action)
	rpg.setDebug(args.debug)
	rpg.run()
Exemple #2
0
 def i_rpg(self, path_rpg): 
     """
     Interface function to extract mono rpg crops.
     
     :param path_rpg: Input RPG shapefile.
     :type path_rpg: str
     
     :returns: str -- variable **Rpg.vector_used**, output no duplicated crops shapefile (path).
     """
            
     # Extract mono rpg crops
     mono_sample = Rpg(path_rpg, self.path_area)
     mono_sample.mono_rpg()
     mono_sample.create_new_rpg_files()
     print('End of RPG processing')
     
     return mono_sample.vector_used