From 345aae3a9f3f948a7d4a4cc8cb603e246ea5b9be Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Thu, 18 Jun 2020 06:54:54 +0200 Subject: [PATCH] Don't show Day pages --- main.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d40201f..86532dc 100644 --- a/main.go +++ b/main.go @@ -492,11 +492,17 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { nodeMap := make(map[string]int) for key, references := range refs { + if strings.HasSuffix(key, "_2020") { + continue + } if _, e := nodeMap[key]; !e { nodeMap[key] = nodeCount nodeCount += 1 } for _, item := range references { + if strings.HasSuffix(item.Name, "_2020") { + continue + } if _, e := nodeMap[item.Name]; !e { nodeMap[item.Name] = nodeCount nodeCount += 1 @@ -516,9 +522,12 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if key == "DONE" { continue } + if strings.HasSuffix(key, "_2020") { + continue + } if toID, e := nodeMap[key]; e { for _, item := range references { - if item.Name == "Daily_Notes" && strings.HasSuffix(key, "_2020") { + if strings.HasSuffix(item.Name, "_2020") { continue } if fromID, e := nodeMap[item.Name]; e {