Package jc.pbntools.download

Examples of jc.pbntools.download.LinReader


 
  /** Returns all supported deal readers. */
  public static DealReader[] getDealReaders()
  {
    return new DealReader[] {
      new LinReader()
    };
  }
View Full Code Here


    .listFiles(new FileFilterByExt(".pbn"));
  assertEquals("number of pbn files in the input directory",
    1, afPbnFiles.length);
  File fPbn0 = afPbnFiles[0];
  PbnFile pbnFile = new PbnFile();
  LinReader dr = new LinReader();
  dr.setOutputWindow(new StandardSimplePrinter());
 
  File tourneyHtmlFile = new File(sDirIn)
    .listFiles(new FileFilterNameMask(".*tourney.*.html"))[0];
  SoupProxy proxy = new SoupProxy();
  Document mainDoc = proxy.getDocument(tourneyHtmlFile.toString());
  Elements ele = mainDoc.select("a:contains(Board)");
  for (Element e: ele) {
    File travFile = new File(f.decodeUrlRes(SoupProxy.absUrl(e, "href")));
    Document travDoc = proxy.getDocument(travFile.toString());
    Elements ele2 = travDoc.select("a:matches(Lin)");
    for (Element e2: ele2) {
      String sLinFile = SoupProxy.absUrl(e2, "href");
      assert(dr.verify(sLinFile, !f.isDebugMode()));
      Deal[] deals = dr.readDeals(sLinFile, false); // bSilent
      pbnFile.addDeals(deals);
    }
  }

  String sNewPbnFile = sDirOut + "/" + f.getFileNameNoExt(sDirIn) + ".pbn";
View Full Code Here

TOP

Related Classes of jc.pbntools.download.LinReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.