MarkFlow

command module
v0.0.0-...-17dc18a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 2 Imported by: 0

README ΒΆ

MarkFlow πŸš€

MarkFlow is a simple and efficient Markdown file management system built using Go and Gin. It provides grammar checking, file uploads, and the ability to retrieve Markdown files as HTML.

✨ Features

  • βœ… Grammar checking for Markdown files
  • πŸ“‚ Upload Markdown files
  • πŸ” Retrieve Markdown files as HTML
  • πŸ“œ List all uploaded files

πŸ“₯ Installation

Prerequisites
  • πŸ›  Go 1.24.1 or higher
  • 🌐 cURL (for API requests)
Install Go using Pacman (Arch Linux)
sudo pacman -S go
Install cURL
sudo pacman -S curl
Clone the Repository
git clone https://github.com/Abhishek2010dev/MarkFlow.git
cd MarkFlow
Install Dependencies
go mod tidy
Run the Application
go run main.go

πŸ“‘ API Endpoints

πŸ“ Check Grammar

POST /check-grammer

  • Request:
    • πŸ“Ž Form-data: file (Markdown file)
  • Response: JSON object with grammar suggestions

cURL Example:

curl -X POST http://localhost:8080/check-grammer \
  -F "file=@test.md" \
  -H "Content-Type: multipart/form-data" | jq
πŸ“€ Upload Markdown File

POST /notes

  • Request:
    • πŸ“Ž Form-data: file (Markdown file)
  • Response: βœ… Confirmation of file upload

cURL Example:

curl -X POST http://localhost:8080/notes \
  -F "file=@test.md" \
  -H "Content-Type: multipart/form-data"
πŸ“„ Retrieve Markdown as HTML

GET /notes/{filename}

  • Response: πŸ–₯ HTML version of the Markdown file

cURL Example:

curl http://localhost:8080/notes/test.md
πŸ“œ List All Files

GET /notes

  • Response: πŸ“„ JSON object listing uploaded files

cURL Example:

curl http://localhost:8080/notes

πŸ“¦ Dependencies

MarkFlow uses the following dependencies:

  • github.com/gin-gonic/gin - ⚑ HTTP web framework
  • github.com/yuin/goldmark - πŸ“ Markdown parser
  • github.com/goccy/go-json - πŸš€ High-performance JSON library

πŸ”— Reference

For more inspiration on building a Markdown note-taking app, check out this guide.

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Author

Abhishek2010dev

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL