Switch to using the dep tool and update all the dependencies
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
go-md2man
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
go-md2man
|
||||
=========
|
||||
|
||||
** Work in Progress **
|
||||
This still needs a lot of help to be complete, or even usable!
|
||||
|
||||
Uses blackfriday to process markdown into man pages.
|
||||
|
||||
### Usage
|
||||
|
||||
./md2man -in /path/to/markdownfile.md -out /manfile/output/path
|
||||
|
||||
### How to contribute
|
||||
|
||||
We use [govend](https://github.com/govend/govend) for vendoring Go packages.
|
||||
|
||||
How to update dependencies: `govend -v -u --prune`
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
go-md2man 1 "January 2015" go-md2man "User Manual"
|
||||
==================================================
|
||||
|
||||
# NAME
|
||||
go-md2man - Convert mardown files into manpages
|
||||
|
||||
# SYNOPSIS
|
||||
go-md2man -in=[/path/to/md/file] -out=[/path/to/output]
|
||||
|
||||
# Description
|
||||
go-md2man converts standard markdown formatted documents into manpages. It is
|
||||
written purely in Go so as to reduce dependencies on 3rd party libs.
|
||||
|
||||
By default, the input is stdin and the output is stdout.
|
||||
|
||||
# Example
|
||||
Convert the markdown file "go-md2man.1.md" into a manpage.
|
||||
|
||||
go-md2man -in=README.md -out=go-md2man.1.out
|
||||
|
||||
# HISTORY
|
||||
January 2015, Originally compiled by Brian Goff( cpuguy83@gmail.com )
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/cpuguy83/go-md2man/md2man"
|
||||
)
|
||||
|
||||
var inFilePath = flag.String("in", "", "Path to file to be processed (default: stdin)")
|
||||
var outFilePath = flag.String("out", "", "Path to output processed file (default: stdout)")
|
||||
|
||||
func main() {
|
||||
var err error
|
||||
flag.Parse()
|
||||
|
||||
inFile := os.Stdin
|
||||
if *inFilePath != "" {
|
||||
inFile, err = os.Open(*inFilePath)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
defer inFile.Close()
|
||||
|
||||
doc, err := ioutil.ReadAll(inFile)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
out := md2man.Render(doc)
|
||||
|
||||
outFile := os.Stdout
|
||||
if *outFilePath != "" {
|
||||
outFile, err = os.Create(*outFilePath)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer outFile.Close()
|
||||
}
|
||||
_, err = outFile.Write(out)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
vendors:
|
||||
- path: github.com/russross/blackfriday
|
||||
rev: 93622da34e54fb6529bfb7c57e710f37a8d9cbd8
|
||||
- path: github.com/shurcooL/sanitized_anchor_name
|
||||
rev: 10ef21a441db47d8b13ebcc5fd2310f636973c77
|
||||
Reference in New Issue
Block a user