Package br.com.caelum.tubaina.parser

Examples of br.com.caelum.tubaina.parser.Parser


    RegexConfigurator conf = new RegexConfigurator();
    if (latex) {
      List<Tag> tags = conf.read("/regex.properties", "/latex.properties");

      Parser parser = new LatexParser(tags, showNotes, noAnswer);
      LatexGenerator generator = new LatexGenerator(parser, templateDir, noAnswer);
      File file = new File(outputDir, "latex");
      FileUtils.forceMkdir(file);
      try {
        generator.generate(b, file, outputFileName);
View Full Code Here


  private String imageWithSubtitle;
  private String imageWithoutSubtitle;

  @Before
  public void setUp() throws IOException {
    Parser parser = ParseType.HTML.getParser();
    tag = new ImageTagTemplate(parser);
    imageWithSubtitle = "<img src=\"$$RELATIVE$$/imagem.png\" id=\"imagem.png\" alt=\"Imagem de alguma coisa\" />\n<div><i>Fig. 0.1: Imagem de alguma coisa</i></div><br><br>";
    imageWithoutSubtitle = "<img src=\"$$RELATIVE$$/imagem.png\" id=\"imagem.png\" alt=\"imagem.png\" />\n<div><i>Fig. 0.1</i></div><br><br>";
  }
View Full Code Here

    public void setUp() throws IOException {
        Configuration cfg = new Configuration();
        cfg.setDirectoryForTemplateLoading(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "kindle"));
        cfg.setObjectWrapper(new BeansWrapper());

        Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties",
                "/kindle.properties"));

        partToKindle = new PartToKindle(parser, cfg, new ArrayList<String>());
    }
View Full Code Here

        Configuration cfg = new Configuration();
        File templateDir = new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "kindle/");
        cfg.setDirectoryForTemplateLoading(templateDir);
        cfg.setObjectWrapper(new BeansWrapper());

        Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties",
                "/html.properties"));
       
        ResourceManipulatorFactory kindleResourceManipulatorFactory = new KindleResourceManipulatorFactory();
        File temp = new File("tmp");
        TubainaHtmlDir bookRoot = new TubainaKindleIO(templateDir, kindleResourceManipulatorFactory)
View Full Code Here

    public void shouldGenerateChapterInsideADiv() throws Exception {
        Configuration cfg = new Configuration();
        cfg.setDirectoryForTemplateLoading(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "singlehtml/"));
        cfg.setObjectWrapper(new BeansWrapper());

        Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties", "/html.properties"));

        ArrayList<String> dirTree = new ArrayList<String>();
        dirTree.add("livro");
        dirTree.add("livro/01-capitulo");
        dirTree.add("livro/01-capitulo/01-primeira");
View Full Code Here

  public void setUp() throws IOException {
    Configuration cfg = new Configuration();
    cfg.setDirectoryForTemplateLoading(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "kindle"));
    cfg.setObjectWrapper(new BeansWrapper());

    Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties", "/kindle.properties"));
    chapterToString = new ChapterToKindle(parser, cfg);
  }
View Full Code Here

  public void setUp() throws IOException {
    Configuration cfg = new Configuration();
    cfg.setDirectoryForTemplateLoading(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "html/"));
    cfg.setObjectWrapper(new BeansWrapper());

    Parser parser = new HtmlParser(new RegexConfigurator().read("/regex.properties", "/html.properties"));
    ArrayList<String> dirTree = new ArrayList<String>();
    dirTree.add("livro");
    dirTree.add("livro/01-capitulo");
    dirTree.add("livro/01-capitulo/01-primeira");
    dirTree.add("livro/01-capitulo/02-segunda");
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.parser.Parser

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.