// Path: src/net/bican/wordpress/configuration/WpCliConfiguration.java
// public class WpCliConfiguration {
// 
//   private CompositeConfiguration config = null;
// 
//   /**
//    * @param args Command line arguments
//    * @param options Command line options
//    * @param cl Calling class
//    * @throws ParseException When the configuration cannot be parsed
//    */
//   public WpCliConfiguration(String[] args, Options options, Class<?> cl)
//       throws ParseException {
//     Collection<Configuration> confs = new ArrayList<Configuration>();
//     confs.add(new CliConfiguration(args, options));
//     confs.add(new PreferencesConfiguration(cl));
//     this.config = new CompositeConfiguration(confs);
//   }
// 
//   /**
//    * @param key Option key to check
//    * @return <code>true</code> if the configuration contains the key
//    */
//   public boolean hasOption(String key) {
//     return this.config.containsKey(key);
//   }
// 
//   /**
//    * @param key Option key to retrieve
//    * @return Value of the option key
//    */
//   public String getOptionValue(String key) {
//     return this.config.getString(key);
//   }
// 
// }


import redstone.xmlrpc.XmlRpcFault;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;
import javax.activation.MimetypesFileTypeMap;
import net.bican.wordpress.configuration.WpCliConfiguration;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
      options.addOption("oe", "editpost", true,
          "Edit post (needs --postid and --publish");
      options.addOption("od", "deletepost", true,
          "Delete post (needs --publish)");
      options.addOption("sm", "supportedmethods", false,
          "List supported methods");
      options.addOption("st", "supportedfilters", false,
          "List supported text filters");
      options.addOption("mn", "newmedia", true,
          "New media file (uses --overwrite)");
      options.addOption("ov", "overwrite", false,
          "Allow overwrite in uploading new media");
      options.addOption("so", "supportedstatus", false,
          "Print supported page and post status values");
      options.addOption("cs", "commentstatus", false,
          "Print comment status names for the blog");
      options.addOption("cc", "commentcount", true,
          "Get comment count for a post (-1 for all posts)");
      options.addOption("ca", "newcomment", true, "New comment from file");
      options.addOption("cd", "deletecomment", true, "Delete comment");
      options.addOption("ce", "editcomment", true, "Edit comment from file");
      options.addOption("cg", "getcomment", true, "Get comment");
      options.addOption("ct", "getcomments", true, "Get comments for the post");
      options.addOption("cs", "commentstatus", true,
          "Comment status (for --getcomments)");
      options.addOption("co", "commentoffset", true,
          "Comment offset # (for --getcomments)");
      options.addOption("cm", "commentnumber", true,
          "Comment # (for --getcomments)");
      try {
// Path: src/net/bican/wordpress/configuration/WpCliConfiguration.java
// public class WpCliConfiguration {
// 
//   private CompositeConfiguration config = null;
// 
//   /**
//    * @param args Command line arguments
//    * @param options Command line options
//    * @param cl Calling class
//    * @throws ParseException When the configuration cannot be parsed
//    */
//   public WpCliConfiguration(String[] args, Options options, Class<?> cl)
//       throws ParseException {
//     Collection<Configuration> confs = new ArrayList<Configuration>();
//     confs.add(new CliConfiguration(args, options));
//     confs.add(new PreferencesConfiguration(cl));
//     this.config = new CompositeConfiguration(confs);
//   }
// 
//   /**
//    * @param key Option key to check
//    * @return <code>true</code> if the configuration contains the key
//    */
//   public boolean hasOption(String key) {
//     return this.config.containsKey(key);
//   }
// 
//   /**
//    * @param key Option key to retrieve
//    * @return Value of the option key
//    */
//   public String getOptionValue(String key) {
//     return this.config.getString(key);
//   }
// 
// }


// Path: src/net/bican/wordpress/Main.java
import redstone.xmlrpc.XmlRpcFault;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;
import javax.activation.MimetypesFileTypeMap;
import net.bican.wordpress.configuration.WpCliConfiguration;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

      options.addOption("oe", "editpost", true,
          "Edit post (needs --postid and --publish");
      options.addOption("od", "deletepost", true,
          "Delete post (needs --publish)");
      options.addOption("sm", "supportedmethods", false,
          "List supported methods");
      options.addOption("st", "supportedfilters", false,
          "List supported text filters");
      options.addOption("mn", "newmedia", true,
          "New media file (uses --overwrite)");
      options.addOption("ov", "overwrite", false,
          "Allow overwrite in uploading new media");
      options.addOption("so", "supportedstatus", false,
          "Print supported page and post status values");
      options.addOption("cs", "commentstatus", false,
          "Print comment status names for the blog");
      options.addOption("cc", "commentcount", true,
          "Get comment count for a post (-1 for all posts)");
      options.addOption("ca", "newcomment", true, "New comment from file");
      options.addOption("cd", "deletecomment", true, "Delete comment");
      options.addOption("ce", "editcomment", true, "Edit comment from file");
      options.addOption("cg", "getcomment", true, "Get comment");
      options.addOption("ct", "getcomments", true, "Get comments for the post");
      options.addOption("cs", "commentstatus", true,
          "Comment status (for --getcomments)");
      options.addOption("co", "commentoffset", true,
          "Comment offset # (for --getcomments)");
      options.addOption("cm", "commentnumber", true,
          "Comment # (for --getcomments)");
      try {
        WpCliConfiguration config = new WpCliConfiguration(args, options,