From 8cea2f2f9d4c362fa754d33e9adac9c07cb8428c Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 21 Aug 2018 10:57:59 +0200 Subject: [PATCH] Add doc --- cmd/trello2mail/import.go | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/cmd/trello2mail/import.go b/cmd/trello2mail/import.go index a9367ef..378c9aa 100644 --- a/cmd/trello2mail/import.go +++ b/cmd/trello2mail/import.go @@ -1,10 +1,31 @@ // create taskell configuration -// run taskell and read content +// run taskell and read content ? +// use https://github.com/adlio/trello ? package main +import ( + "fmt" + "os/exec" + "strings" +) + +func runcmd(command string) string { + shell := "/bin/sh" + flag := "-c" + + out, err := exec.Command(shell, flag, command).Output() + if err != nil { + panic(err) + } + + return string(out) +} + func CreateTaskell() { } -func RunTaskell() { +func RunTaskell(boardUrl string) { + cmd := fmt.Sprintf("taskell -t %s -", boardUrl) + markdown := strings.TrimSpace(runcmd(cmd)) }