All Projects β†’ AndrewRadev β†’ quickmd

AndrewRadev / quickmd

Licence: other
Quickly preview a markdown file

Programming Languages

rust
11053 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to quickmd

webviewhs
🌐 A Haskell binding to the webview library created by Serge Zaitsev.
Stars: ✭ 109 (+354.17%)
Mutual labels:  desktop-app, gtk
Shiba
Rich markdown live preview app with linter
Stars: ✭ 691 (+2779.17%)
Mutual labels:  desktop-app, preview
Galicaster
The Galicaster Project is an open initiative to provide flexible, state-of-the-art solutions for recording educational multimedia contents like lectures and conferences
Stars: ✭ 34 (+41.67%)
Mutual labels:  gtk
Lua-GTK3-Examples
Some GTK examples in Lua
Stars: ✭ 20 (-16.67%)
Mutual labels:  gtk
cfo
A two-pane file manager
Stars: ✭ 23 (-4.17%)
Mutual labels:  desktop-app
PokeChat
UNIX compatible, Discord and Telegram inspired, PokΓ©mon-themed instant messaging service.
Stars: ✭ 11 (-54.17%)
Mutual labels:  gtk
givemelyrics
See the lyrics of the song that is playing, from any application.
Stars: ✭ 52 (+116.67%)
Mutual labels:  gtk
planes
Variant of battleships game
Stars: ✭ 17 (-29.17%)
Mutual labels:  desktop-app
wingpanel-indicator-bluetooth
Wingpanel Bluetooth Indicator
Stars: ✭ 18 (-25%)
Mutual labels:  gtk
URTube
URTube, a YouTube video to MP3 downloader built in NodeJs and Electron
Stars: ✭ 20 (-16.67%)
Mutual labels:  desktop-app
Dotfiles
🌸 Configuration for i3, kitty, picom, ZSH, gtk, qutebrowser, qbittorrent and more... (All tools for an arch linux new installation)
Stars: ✭ 15 (-37.5%)
Mutual labels:  gtk
shortcut-overlay
A native, OS-wide shortcut overlay
Stars: ✭ 26 (+8.33%)
Mutual labels:  gtk
Spedread
GTK speed reading software: Read like a speedrunner!
Stars: ✭ 23 (-4.17%)
Mutual labels:  gtk
Neel
A Nim library for making Electron-like HTML/JS GUI apps, with full access to Nim capabilities.
Stars: ✭ 144 (+500%)
Mutual labels:  desktop-app
date-countdown
A date countdown applet
Stars: ✭ 15 (-37.5%)
Mutual labels:  gtk
cordova-plugin-foxitpdf
Cordova plugin for Foxit PDF SDK to View PDF Files
Stars: ✭ 19 (-20.83%)
Mutual labels:  preview
akbl
Control the lights of Alienware computers under GNU/Linux systems.
Stars: ✭ 99 (+312.5%)
Mutual labels:  gtk
ben
Fast, native*, cross-platform Slack client, develop with React QML
Stars: ✭ 19 (-20.83%)
Mutual labels:  desktop-app
EasyTongue
πŸ˜›πŸ’¬ A translation app built with Electron and Polymer
Stars: ✭ 23 (-4.17%)
Mutual labels:  desktop-app
Icon-Requests
A Gtk application to report missing icons to your theme repository
Stars: ✭ 19 (-20.83%)
Mutual labels:  gtk

Crate Documentation Maintenance status

QuickMD

This project is a simple tool that solves a simple problem: I'd like to preview markdown files as they'll show up on Github, so I don't have to push my READMEs before I can tell whether they're formatted well enough. It ends up looking like this:

Demo

It's a Rust app that launches a GtkWebkit window that renders the compiled HTML of the given markdown file. It monitors this file for any changes and reloads. It uses a stylesheet that's literally copied off Github's markdown stylesheet.

Note: I have no idea if I'm allowed to use Github's stylesheet. The relevant file is in res/style/github.css, and if I am told I shouldn't be using it I'll go ahead and scrub it from git history.

Installation

From a release binary

You should be able to find a compiled 64-bit linux binary in every release since v0.4.1. You can put it in your $PATH and launch it, as long as you have GTK3 and Webkit2Gtk installed on your system. On Arch Linux, you can install these like so:

# pacman -S gtk3 webkit2gtk

From source

You'll need to have Rust and the cargo tool. The easiest way to get that done is through rustup.rs.

You'll also need the GTK3 and Webkit2Gtk development files to be installed on your system. The Gtk-rs installation page might be a good start.

After that, you can build and install the app from crates.io using:

cargo install quickmd

Make sure that ~/.cargo/bin is in your PATH so you can call the quickmd executable.

Usage

Running the app is as simple as:

quickmd <markdown-file>

Pressing CTRL+Q will close the window. Running it with --help should provide more info on the available options. Here's how the output looks for me:

quickmd 0.6.0
A simple self-contained markdown previewer.

Code highlighting via highlight.js version 9.18.1

Edit configuration in: /home/andrew/.config/quickmd/config.yaml
Add custom CSS in:     /home/andrew/.config/quickmd/custom.css

USAGE:
    quickmd [FLAGS] [OPTIONS] [input-file.md]

FLAGS:
    -d, --debug
            Activates debug logging

    -h, --help
            Prints help information

        --install-default-config
            Creates a configuration file for later editing if one doesn't exist. Exits when done

    -V, --version
            Prints version information

        --no-watch
            Disables watching file for changes


OPTIONS:
        --output <directory>
            Builds output HTML and other assets in the given directory instead of in a tempdir. Will be created if it
            doesn't exist. Not deleted on application exit

ARGS:
    <input-file.md>
            Markdown file to render. Use "-" to read markdown from STDIN (implies --no-watch). If not provided, the app
            will launch a file picker

Features

  • Github-like rendering, though not guaranteed to be perfectly identical. Relying on whatever pulldown-cmark provides, which is good enough for me.

  • Fast and seamless preview updates on file write.

  • Code highlighting via highlight.js. Currently, the relevant javascript is included via a CDN, which unfortunately means it won't work without an internet connection.

  • Ability to render STDIN, which allows partial rendering of target markdown. Try putting this bit of Vimscript in your ~/.vim/ftplugin/markdown.vim, select a few lines and press !.

  • Scroll with Vi-like keybindings, Press e to spawn an editor, if configured.

  • Customizable keybindings. Check the API documentation or try --install-default-config to get an annotated config with examples.

Configuration

You can change the CSS of the preview HTML by writing a file named "custom.css" in the application's config directory. On a linux machine, it would be: ~/.config/quickmd/.

You can also change some configuration options in a config file. Run quickmd with --install-default-config to create that file with all the defaults and comments.

Run --help to see where the config files will be located on your system, or press F1 in the interface.

The built-in CSS that is used is stored in /res/style and the default config is in /res/default_config.yaml

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].