Convert Figma logo to code with AI

toland logoqlmarkdown

QuickLook generator for Markdown files.

3,243
141
3,243
51

Top Related Projects

9,432

Open source Markdown editor for macOS.

46,332

📝A simple and elegant markdown editor, available for Linux, macOS and Windows.

22,543

The Markdown-based note-taking app that doesn't suck.

Quick Overview

qlmarkdown is a QuickLook generator for Markdown files. It allows macOS users to preview Markdown files in Finder using QuickLook, rendering them as formatted HTML instead of plain text. This enhances the user experience when working with Markdown files on macOS.

Pros

  • Seamless integration with macOS QuickLook
  • Renders Markdown files as formatted HTML for easy preview
  • Supports GitHub Flavored Markdown
  • Customizable CSS for styling the preview

Cons

  • Limited to macOS only
  • Requires manual installation and setup
  • May not support all Markdown extensions or flavors
  • Potential performance impact on QuickLook for large Markdown files

Getting Started

  1. Clone the repository:

    git clone https://github.com/toland/qlmarkdown.git
    
  2. Build the project:

    cd qlmarkdown
    xcodebuild
    
  3. Copy the generated QLMarkdown.qlgenerator to QuickLook plugins folder:

    cp -R build/Release/QLMarkdown.qlgenerator ~/Library/QuickLook/
    
  4. Restart the QuickLook daemon:

    qlmanage -r
    
  5. (Optional) Customize the CSS by editing styles.css in the QLMarkdown.qlgenerator package contents.

After installation, you should be able to preview Markdown files in Finder using QuickLook (press Space bar while selecting a .md file).

Competitor Comparisons

9,432

Open source Markdown editor for macOS.

Pros of macdown

  • Full-featured Markdown editor with live preview
  • Supports custom themes and CSS
  • Exports to various formats (HTML, PDF)

Cons of macdown

  • Larger application size
  • Requires more system resources
  • Not integrated with Quick Look

Code comparison

macdown (Objective-C):

- (void)renderMarkdown {
    NSString *html = [self.parser renderHTMLForMarkdown:self.editor.string];
    [self.preview loadHTMLString:html baseURL:nil];
}

qlmarkdown (C):

char *markdown_to_html(char *markdown) {
    MMIOT *doc = mkd_string(markdown, strlen(markdown), 0);
    mkd_compile(doc, MKD_FENCEDCODE | MKD_GITHUBTAGS);
    char *html;
    int size = mkd_document(doc, &html);
    return html;
}

macdown is a full-fledged Markdown editor with a graphical user interface, offering features like live preview, custom themes, and export options. It's more suitable for users who want a dedicated Markdown editing environment.

qlmarkdown, on the other hand, is a lightweight Quick Look generator for Markdown files. It integrates with macOS Finder to provide previews of Markdown files without opening a separate application. It's more focused on quick viewing rather than editing.

The code snippets show that macdown uses a parser object to render Markdown to HTML, while qlmarkdown uses the Discount library for Markdown processing. macdown's approach is more object-oriented, fitting its larger application structure, while qlmarkdown's C implementation is more lightweight and suitable for a Quick Look plugin.

46,332

📝A simple and elegant markdown editor, available for Linux, macOS and Windows.

Pros of MarkText

  • Full-featured Markdown editor with live preview and WYSIWYG editing
  • Cross-platform desktop application (Windows, macOS, Linux)
  • Extensive formatting options and export capabilities (PDF, HTML, etc.)

Cons of MarkText

  • Larger application size and resource usage
  • Steeper learning curve due to more complex features
  • Requires installation and updates

Code Comparison

While a direct code comparison isn't particularly relevant due to the different nature of these projects, we can look at how they handle Markdown rendering:

QLMarkdown (Objective-C):

NSString *html = [MMMarkdown HTMLStringWithMarkdown:markdown extensions:MMMarkdownExtensionsGitHubFlavored error:&error];

MarkText (JavaScript):

import MarkdownIt from 'markdown-it'
const md = new MarkdownIt()
const html = md.render(markdown)

Summary

QLMarkdown is a lightweight QuickLook generator for Markdown files on macOS, while MarkText is a full-featured, cross-platform Markdown editor. QLMarkdown offers quick previews in Finder, whereas MarkText provides a complete editing environment with more advanced features. The choice between them depends on whether you need a simple preview tool or a comprehensive Markdown editor.

22,543

The Markdown-based note-taking app that doesn't suck.

Pros of Notable

  • More feature-rich, offering a full-fledged note-taking application
  • Active development with regular updates and improvements
  • Cross-platform support (Windows, macOS, Linux)

Cons of Notable

  • Larger codebase and more complex setup
  • Heavier resource usage due to being a full application
  • Steeper learning curve for users and contributors

Code Comparison

QLMarkdown (Objective-C):

- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
{
    return [self.markdown dataUsingEncoding:NSUTF8StringEncoding];
}

Notable (TypeScript):

export const getNoteContent = (filePath: string): string => {
  return fs.readFileSync(filePath, 'utf8');
};

Summary

QLMarkdown is a lightweight QuickLook generator for Markdown files on macOS, while Notable is a comprehensive note-taking application. QLMarkdown focuses on quick previews, whereas Notable offers a full suite of note management features. QLMarkdown is simpler and more focused, while Notable provides a richer user experience at the cost of increased complexity and resource usage.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

QLMarkdown

by Phil Toland

fixes and improvements by Michael Dominic K. http://www.mdk.org.pl

Introduction

QLMarkdown is a simple QuickLook generator for Markdown files. It renders a preview of the selected Markdown file using Discount -- a C implementation of John Gruber's Markdown.pl script.

To update to the latest version of discount run ./discount-config/update-discount.sh

For more information on Markdown see http://daringfireball.net/projects/markdown/.

Installation

Simply copy QLMarkdown.qlgenerator to ~/Library/QuickLook or /Library/QuickLook.

If the newly installed plugin is not picked up instantly, you can run qlmanage -r in Terminal to refresh.

To uninstall, drag QLMarkdown into the trash.

Another method, provided you have Homebrew Cask installed, you can run the following commands to set things up:

$ brew update

$ brew cask install qlmarkdown

To uninstall:

$ brew cask uninstall qlmarkdown

Note: QuickLook doesn't allow selecting text by default. If you want to select the text in the markdown preview, you will need to enable text selection in QuickLook by running the following command in Terminal:

defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder

This command is only valid on OS X 10.10 and below as Apple has since removed the ability to select text in QuickLook.

Downloads

Source code is available at http://github.com/toland/qlmarkdown.

You can download the latest release from https://github.com/toland/qlmarkdown/releases

License

The QLMarkdown code is distributed under the same terms as Discount. See the file discount/COPYRIGHT for more information.

Version History

Version 1.3 - Jan 26, 2012

  • Major update of discount markdown engine

Version 1.2 - Oct 4, 2009

  • Work around a conflict with MacVim (thanks to godDLL)
  • Support for .mdml extension (alanhogan)
  • CSS that mimics Apple's ADC styling (jiho)

Version 1.1 - Feb 11, 2009

  • Adding a little bit of CSS styling. (mdk)
  • Replace the Perl markdown renderer with a native C one (discount). (mdk)
  • Conform to public plain-text. Will make spotlight index the file contents. (mdk)
  • Added support for .md file extension (sant0sk1)

Version 1.0 - July 15, 2008

  • Initial release.