mtm

package module
v0.0.0-...-51515e1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 7 Imported by: 0

README

Medium to Markdown Converter

A Go program that converts a Medium article to Markdown and saves it to a file.

Installation

go get github.com/krishnaduttPanchagnula/medium-to-markdown-go

Usage

package main

import (
	"log"

	mtm "github.com/krishnaduttPanchagnula/medium-to-markdown-go"
)

func main() {
	err := mtm.MediumToMarkdown("<YOUR_URL>", "test.md")
	if err != nil {
		log.Fatal(err)
	}
}

CLI

If you are not interested in writing go code and just want to convert the files using our CLI tool

mtm --url <YOUR_URL> --filename test.md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurlFromURL

func CurlFromURL(url string) []byte

CurlFromURL gets the HTML content from a URL using the http package.

func MediumToMarkdown

func MediumToMarkdown(URL string, filename string) error

MediumToMarkdown converts a Medium article to Markdown and saves it to a file.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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