public void CreateSampleScript(TextWriter w) { w.WriteLine("# This is a sample configuration script for sammy."); w.WriteLine("# Uncomment the lines below to configure how sammy collects"); w.WriteLine("# your account statements."); w.WriteLine("# Check http://code.google.com/p/sammy/wiki/ConfigurationScript for details."); w.WriteLine(); Parser p = new Parser(this); foreach (Cmd.Action i in p.Actions) { i.PrintScriptFileSample(w); } foreach (Option i in p.Options) { i.PrintScriptFileSample(w); } w.WriteLine("# Collector plugins"); w.WriteLine(); foreach (Type i in CollectorPlugins) { string u = Usage.Get(i); if (u != null) { w.Write("# "); w.WriteLine(u); w.Write("# "); w.WriteLine(Collectors.Syntax(i)); w.WriteLine(); } } }
public void Collect() { using (ThreadContext.Stacks["NDC"].Push(User)) { log.InfoFormat("Collecting statements for user {0}", User); Collectors collector = new Collectors(); collector.Payments = Payments; collector.Exec(Settings.Script); log.InfoFormat("Finished collecting statements for user {0}", User); } }
public void Create() { if (Exists) { throw new System.IO.IOException("Exists: " + DbConnection); } log.InfoFormat("Create user={0}", user); DbFile.EnsureParentDirectoryExists(); settings = new Settings(); Collectors c = new Collectors(); StringWriter w = new StringWriter(); c.CreateSampleScript(w); settings.Script = w.ToString(); Write(); }
public void Instructions() { Collectors c = new Collectors(); c.CreateSampleScript(Console.Out); }
public void Postbank() { Collectors c = new Collectors(); c.Payments = a.Payments; c.ExecFile(SecretFile("test-Postbank.command")); }
public void Html1822direkt() { Collectors c = new Collectors(); c.Payments = a.Payments; ScrapeForm.ShowBrowser = true; c.ExecFile(SecretFile("test-1822direkt.command")); }
public void Hbci() { Collectors c = new Collectors(); c.Payments = a.Payments; c.ExecFile(SecretFile("test-hbci.command")); }
public void Dkb() { Collectors c = new Collectors(); c.Payments = a.Payments; c.ExecFile(SecretFile("test-dkb.command")); }
public void TestGetCollector() { Collectors c = new Collectors(); Type t = c.GetCollector("Dkb"); Assert.AreEqual("Dkb", t.Name); }