@Override
	public void execute(CmdOptions options) {
		try {
			PrinceDocument doc;
			String input = options.params[0];
			Config config;

			if(input.startsWith("http")) {
				config = new Config(new URL(input));
			} else {
				config = new Config(new File(input).toURI().toURL());
			}
			BakaTsuki.info("Converting " + config.getTitle());


			if(options.princePath == null) {
				doc = new PrinceDocument(config);
			} else {
				doc = new PrinceDocument(config, options.princePath);
			}

			String output = options.output == null
				? config.getTitle().replaceAll("\\W", "_") + ".pdf"
				: options.output;

			doc.create(output);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}