public override void Process(EpubPublisherProcessor processor)
        {
            Uri uri;

            var key = string.Format("{0}:{1}", category, page.Title);
            if(processor.ResourceManager.TryRequestDocumentUri(key, out uri))
            {
                return;
            }

            Log.Debug("Processing wiki page \"{0}\"", page.Title);

            var markupNode = processor.MarkupParser.Parse(page.Title, page.Text);
            var htmlDocument = processor.HtmlCompiler.Compile(markupNode);

            var content = new PageCompiledContent(uri.ToString(), htmlDocument.ToString(), page.Title);
            processor.Packager.Add(content);
        }
Exemple #2
0
        public void BuildPackage(string targetPath)
        {
            startPage = new ContentPageCompiledContent(this, resourceManager, styleManager);
            pages.Insert(0, startPage);

            otherItems.Add(new MimeTypeCompiledContent());
            otherItems.Add(new ContainerCompiledContent());
            otherItems.Add(new MetadataCompiledContent(this));
            otherItems.Add(new NavigatorCompiledContent(this));

            using (var package = Package.Open(targetPath, FileMode.Create))
            {
                foreach (var item in otherItems
                    .Concat(pages)
                    .Concat(images))
                {
                    item.WriteTo(package);
                }
            }
        }
Exemple #3
0
 public void Add(PageCompiledContent item)
 {
     pages.Add(item);
 }