示例#1
0
        public void Publish(WikiContent content, string targetPath)
        {
            var processor = new EpubPublisherProcessor(content, new CssStyleManager(), targetPath);
            processor.Enqueue(new CategoryTaskQueueItem(content.GetCategory(string.Empty)));

            processor.ProcessTasks();
            processor.Publish();
        }
示例#2
0
 public override void Process(EpubPublisherProcessor processor)
 {
     var filePath = processor.ResourceManager.RequestImageUri(name);
     /* TODO
      * 1. Compute image URI
      * 2. Download image
      * 3. Write image content into package
      *
      * //public sealed class ImageCompiledContent : FileCompiledContent { }
     // public sealed class CompiledCssContent : FileCompiledContent { }
      **/
 }
示例#3
0
        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);
        }
 public EpubResourceManager(EpubPublisherProcessor processor)
 {
     this.processor = processor;
 }