Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cluttrdev committed Feb 26, 2023
1 parent 301004c commit 86b7ea6
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

dist/
49 changes: 49 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- id: showdown
main: ./cmd/showdown/
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
goarm: [6, 7]

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- .Tag }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2023-02-26

Initial version, providing a working proof-of-concept.

[0.1.0]: https://github.com/cluttrdev/showdown/releases/tag/v0.1.0


21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Andreas Kunze

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
# showdown
# Showdown

Showdown is a live Markdown previewer.

It uses [fsnotify][github-fsnotify] to watch a given file for changes,
renders the content to HTML using [markdown][github-gomarkdown]
and serves the output on your local machine.

For an update on the latest changes please have a look at the
[CHANGELOG](./CHANGELOG.md)

## Installation

To install `showdown` you can download a prebuild binary from the
[releases](https://github.com/cluttrdev/showdown/releases) page.

E.g. if you're on Linux:

```shell
# determine latest release
RELEASE_TAG=$(curl -sSL https://api.github.com/repos/cluttrdev/showdown/releases/latest | jq -r '.tag_name')
# download release archive
curl -sSL -O https://github.com/cluttrdev/showdown/releases/download/${RELEASE_TAG}/showdown_${RELEASE_TAG}_linux_x86_64.tar.gz
# extract binary
tar -zxf showdown_${RELEASE_TAG}_linux_x86_64.tar.gz showdown
# install it
install ./showdown /usr/local/bin/showdown
```

Alternatively, you can install it using the standard Go tools.

```shell
go install github.cluttrdev/showdown@latest
```

## Usage

To preview a Markdown formatted file `example.md` simply run

```shell
showdown example.md
```

This will render the file content as HTML and serve it under <http://localhost:1337/>

Run `showdown --help` for more information.

## Acknowledgement

This project was inspired by [livedown][github-livedown].

## License

This project is released under the [MIT License](./LICENSE)

[github-fsnotify]: https://github.com/fsnotify/fsnotify
[github-gomarkdown]: https://github.com/gomarkdown/markdown
[github-livedown]: https://github.com/shime/livedown
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ require (
github.com/fsnotify/fsnotify v1.6.0
github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.6.1
golang.org/x/net v0.7.0
)

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.5.0 // indirect
)

0 comments on commit 86b7ea6

Please sign in to comment.