Formatting
This commit is contained in:
parent
37bebe271e
commit
6543f89843
|
@ -0,0 +1,4 @@
|
|||
tmp.dot
|
||||
tmp.png
|
||||
tmp.svg
|
||||
.idea/
|
|
@ -8,6 +8,7 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
)
|
||||
|
||||
func makeTorifiedClient() *http.Client {
|
||||
torDialer, err := proxy.SOCKS5("tcp", "127.0.0.1:9050", nil, proxy.Direct)
|
||||
if err != nil {
|
||||
|
@ -45,5 +46,3 @@ func Fetch(url string, cacheid string) []byte {
|
|||
log.Errorf("Error fetching: %v", err)
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
|
||||
|
|
7
kdb.go
7
kdb.go
|
@ -1,14 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/log"
|
||||
"git.openprivacy.ca/sarah/kdb/citing"
|
||||
"github.com/nickng/bibtex"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
@ -124,7 +123,6 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
|
|||
renderTemplate(w, "view", p)
|
||||
}
|
||||
|
||||
|
||||
func saveHandler(w http.ResponseWriter, r *http.Request) {
|
||||
title, err := getTitle(w, r)
|
||||
if err != nil {
|
||||
|
@ -197,7 +195,6 @@ func construct_graph_sub(graph string, word string, seen map[string]bool, depth
|
|||
graph += fmt.Sprintf("\"%v\" [href=\"/view/%v\"];\n", normalize(link), normalize(link))
|
||||
}
|
||||
|
||||
|
||||
if normalize(word) != normalize(link) && (!seen[normalize(word)+"++"+normalize(link)] || !seen[normalize(link)+"++"+normalize(word)]) {
|
||||
if strings.HasPrefix(link, "typeof:") {
|
||||
graph += fmt.Sprintf("\"%v\" -> \"%v\" [style=dotted]\n", link[7:], word)
|
||||
|
@ -220,12 +217,10 @@ func construct_graph_sub(graph string, word string, seen map[string]bool, depth
|
|||
}
|
||||
//}
|
||||
|
||||
|
||||
if !seen[link] {
|
||||
graph = construct_graph_sub(graph, link, seen, depth-1)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return graph
|
||||
|
|
Loading…
Reference in New Issue