crowdagger / crowbook

Converts books written in Markdown to HTML, LaTeX/PDF and EPUB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFC: Integration in markdown editor

hirschenberger opened this issue · comments

Hey,

currently I'm using crowbook for compiling output for my novel and Ghostwriter for editing. It's a beautiful, well featured distraction-free markdown editor, but it's export and project capabilities are limited. It just uses pandoc on the current document.

The idea is, to have a kind of Markdown IDE. It would be nice to integrate multifile project support. Perhaps by loading a .book file. Then the structure of the book would be displayed, also over multiple documents. A nice dialog for crowbook settings would also be nice.

Ghostwriter is written in C++ and Qt, so it would be relatively easy to integrate crowbook as a library. I know it's a lot of work and the Ghostwriter author is very busy. But the project is still alive and well developed.

What do you think on that idea? Are you perhaps willing to participate?

Sorry about the time to answer! Honestly I think it would be cool to see integration in editors, but currently GUI is a bit below my competences and I don't think I would have much time for that. Maybe a more straightforward integration would be to call crowbook as command line in the editor? I'd also like to have some kind of GUI for the book settings as some point but currently it's not really my priority.

Maybe it would make sense to use a .crowbook.yml (.crowbook.yaml) configuration file instead of a file which currently can have really any name and extension?

However, using multiple crowbook config files would hopefully still be an option.

Just writing down my thoughts here.


Also, kinda sorta related, the book file currently isn't exactly YAML. For example YAML format headers aren't supported and the first line must be a comment. Just stating this here, as making the switch as is now, would break stuff as far as I can tell.

@hirschenberger If you can do without the GUI, then using Sublime Text with it's Build Systems and Project Files works great. Same for VSCode etc.


Using a project file for Sublime Text to define a build system output for the current project. Keep in mind to open the project file "as project", not the root folder in Sublime Text.

Example here for macOS builds English and German docs for a project and opens both resulting PDFs when done.

//  ./xxxxx.sublime-project

{
    "build_systems":
    [
        {
            "name": "Build xxxxx Docs",
            "osx":
            {
                "shell_cmd": "crowbook --verbose --to pdf xxxxx.en.yaml && crowbook --verbose --to pdf xxxxx.de.yaml && open docs/xxxxx.en.pdf && open docs/xxxxx.de.pdf",
                "working_dir": "${project_path}"
            }
        }
    ],
    "folders":
    [
        {
            "folder_exclude_patterns":
            [
                "docs"
            ],
            "file_exclude_patterns":
            [
                ".gitattributes",
                ".gitignore",
                "*.sublime-project",
                "*.sublime-workspace",
                "*.pdf"
            ],
            "name": "xxxxx Docs",
            "path": "."
        }
    ]
}