Skip to content

Commit

Permalink
change imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Voloboev committed Oct 30, 2017
1 parent 35fb03e commit dcc0b36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion gitbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ func parseSummary() {
re1 := regexp.MustCompile(`(.md)`)

// read string line by line and apply regex
// TODO: add error check
scanner := bufio.NewScanner(strings.NewReader(string(bytes)))
for scanner.Scan() {
matches := re.FindAllStringSubmatch(scanner.Text(), -1)
wf.NewItem(matches[0][1]).Arg("https://nikitavoloboev.gitbooks.io/knowledge/content/" + re1.ReplaceAllString(matches[0][2], `.html`)).Valid(true)
wf.NewItem(matches[0][1]).Arg("https://nikitavoloboev.gitbooks.io/knowledge/content/" + re1.ReplaceAllString(matches[0][2], `.html`)).Valid(true).UID(matches[0][1])
}
}
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"log"
"os/exec"

"git.deanishe.net/deanishe/awgo"
"git.deanishe.net/deanishe/awgo/update"
"github.com/deanishe/awgo"
"github.com/deanishe/awgo/update"
"github.com/docopt/docopt-go"
)

Expand All @@ -19,9 +19,9 @@ var usage = `alfred-my-mind [search|check] [<query>]
Access notes, wiki and more
Usage:
alfred-web-searches search [<query>]
alfred-web-searches check
alfred-web-searches -h
alfred-my-mind search [<query>]
alfred-my-mind check
alfred-my-mind -h
Options:
-h, --help Show this message and exit.
Expand All @@ -31,7 +31,7 @@ var (
// icons
iconAvailable = &aw.Icon{Value: "icons/update.png"}

repo = "nikitavoloboev/alfred-web-searches"
repo = "nikitavoloboev/alfred-my-mind"
wf *aw.Workflow
)

Expand Down Expand Up @@ -65,7 +65,7 @@ func run() {
// check job isn't already running.
if wf.UpdateCheckDue() && !aw.IsRunning(updateJobName) {
log.Println("running update check in background...")
cmd := exec.Command("./alfred-web-searches", "check")
cmd := exec.Command("./alfred-my-mind", "check")
if err := aw.RunInBackground(updateJobName, cmd); err != nil {
log.Printf("error starting update check: %s", err)
}
Expand Down
Binary file modified workflow/alfred-my-mind
Binary file not shown.

0 comments on commit dcc0b36

Please sign in to comment.