User:MilHistBot/AutoClass.cs

using System; using System.Collections.Generic; using System.Linq; using NDesk.Options;

public class AutoClass {  private int  max     = 1; private bool debugs = false; private bool force  = false; private bool help   = false; private bool verbose = false;

private void autoClass (Page talk) {       Page article = talk.Article; Console.WriteLine (article.Title); var taskForces = new TaskForces (article); if (taskForces.Any ) {           talk.Load ; talk.MilHist.ProjectTemplate.Add (taskForces); Console.WriteLine ("  Added " + taskForces); if (force) {               talk.Save ("AutoClass: Added task forces"); }       }        else {           Console.Error.WriteLine (article.Title + ": No task forces found"); }   }

private static void showHelp (OptionSet optionSet) {       Console.WriteLine ("Usage: mono AutoClass [OPTIONS]+ "); Console.WriteLine ("Add task forces to the MilHist template on the talk page."); Console.WriteLine ; Console.WriteLine ("Options:"); optionSet.WriteOptionDescriptions (Console.Out); Environment.Exit (0); }

List options (string [] args) {       var optionSet = new OptionSet  { { "d