Skip to content

Vui-Chee/spamd

Repository files navigation

spamd 🔥

Build status Go

spamd is a tool which allows you to mass preview Github flavoured markdowns before commiting them.

demo

Features

  • Preview rendered markdowns as you edit
  • Open multiple markdown documents easily (using your default browser)
  • Only render contents when you visit tab/window
  • Can change code block color theme 🌈
  • Light/Dark toggle ☀️/🌑
  • Auto-close tabs when the server is closed

Install

macOS/Linux

Install the latest version for your system:

curl -sS https://raw.githubusercontent.com/Vui-Chee/spamd/master/install.sh | sh

Windows

Download the release package directly.

Using Go

If you have already installed go, you can run go get github.com/vui-chee/spamd or go install github.com/vui-chee/spamd@latest.

Usage

Run 👉 spamd. This by default opens README.md if it exists in the current working directory.

Otherwise, do any of the following:

# Example usage
spamd * # open all markdowns in current directory
spamd target-directory/* # open all markdowns in target directory
spamd [file1.md] [file2.md] ... # open specific markdowns

For all other features, run spamd --help.

Closing tabs

Simply ctrl-c to shutdown the server and close all opened tabs.

Development

Run

go run spamd.go

Building

go build -ldflags="-s -w"

Frontend

The static frontend files used will be embedded inside service/frontend. The css is generated with generate-github-markdown-css package along with customizations.

Contributing

  1. Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found
  2. Fork the repository and make your changes
  3. Open a new pull request