parent
70f0231371
commit
0016e5afa9
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"local/args"
|
"local/args"
|
||||||
"local/sandbox/contact/contact"
|
"local/sandbox/contact/contact"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -12,6 +13,7 @@ var (
|
||||||
To string
|
To string
|
||||||
Subject string
|
Subject string
|
||||||
Emailer *contact.Emailer
|
Emailer *contact.Emailer
|
||||||
|
Interval time.Duration
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
@ -28,6 +30,7 @@ func init() {
|
||||||
|
|
||||||
as.Append(args.STRING, "feed", "feed URL", "https://www.youtube.com/feeds/videos.xml?channel_id=UCwX0AEx-qIhQ9kgtlNhyIXw")
|
as.Append(args.STRING, "feed", "feed URL", "https://www.youtube.com/feeds/videos.xml?channel_id=UCwX0AEx-qIhQ9kgtlNhyIXw")
|
||||||
as.Append(args.STRING, "root", "root to save videos", "/tmp")
|
as.Append(args.STRING, "root", "root to save videos", "/tmp")
|
||||||
|
as.Append(args.DURATION, "interval", "check interval", time.Hour)
|
||||||
|
|
||||||
if err := as.Parse(); err != nil {
|
if err := as.Parse(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue