aboutsummaryrefslogtreecommitdiff
path: root/tools/print-cache/print-cache.go
blob: d20963a56a1d4db7adfa6da8884401f5fc4d2135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main

import (
	"flag"
	"fmt"
	"log"

	"github.com/Necoro/feed2imap-go/internal/feed"
)

// flags
var (
	cacheFile string = "feed.cache"
	feedId    string = ""
)

func init() {
	flag.StringVar(&cacheFile, "c", cacheFile, "cache file")
	flag.StringVar(&feedId, "i", feedId, "id of the feed")
}

func main() {
	flag.Parse()

	cache, err := feed.LoadCache(cacheFile)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Printf("Cache version %d\n", cache.Version())
	if feedId != "" {
		fmt.Print(cache.SpecificInfo(feedId))
	} else {
		fmt.Print(cache.Info())
	}
}
llow=1'>Add support for downloading single blobsLars Hjemli5-3/+47 2007-05-08ui-view: show pathname if specified in querystringLars Hjemli3-5/+10 2007-05-08Update to libgit 1.5.2-rc2Lars Hjemli9-837/+50 2007-02-21Layout updateLars Hjemli9-32/+127 2007-02-08Make snapshot feature configurableLars Hjemli5-6/+22 2007-02-08Add support for snapshotsLars Hjemli8-8/+153 2007-02-05cgit v0.2v0.2Lars Hjemli1-1/+1 2007-02-05Add support for prefix and gitsrc arguments to 'make'Lars Hjemli2-15/+37 2007-02-04Update cgitrc templateLars Hjemli1-21/+32 2007-02-04Add support for lightweight tagsLars Hjemli2-19/+37 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli5-55/+120 2007-02-04Do not die if tag has no messageLars Hjemli1-2/+2 2007-02-03Fix search for non-virtual urlsLars Hjemli1-0/+6 2007-01-28Update README with install/config informationLars Hjemli1-24/+28