code: private int generateCSL(String style, String locale, String format,
  			List<String> citationIds, ItemDataProvider provider,
  			PrintWriter out) throws IOException {
  		if (!checkStyle(style)) {
  			return 1;
  		}
  		
  		//initialize citation processor
  		try (CSL citeproc = new CSL(provider, style, locale)) {
  			//set output format
  			citeproc.setOutputFormat(format);
  
  			//register citation items
  			String[] citationIdsArr = new String[citationIds.size()];
  			citationIdsArr = citationIds.toArray(citationIdsArr);
  			if (citationIds.isEmpty()) {
  				citationIdsArr = provider.getIds();
  			}
  			citeproc.registerCitationItems(citationIdsArr);
  
  			//generate bibliography
  			doGenerateCSL(citeproc, citationIdsArr, out);
  		} catch (FileNotFoundException e) {
  			error(e.getMessage());
  			return 1;
  		}
  
  		return 0;
  	}
docs: Performs CSL conversion and generates a bibliography
  @param style the CSL style
  @param locale the CSL locale
  @param format the output format
  @param citationIds the citation ids given on the command line
  @param provider a provider containing all citation item data
  @param out the print stream to write the output to
  @return the exit code
  @throws IOException if the CSL processor could not be initialized