Ramblings
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
news=true
|
||||
quote=true
|
||||
ramblings=true
|
||||
# Section toggels
|
||||
news=true # enables the news section
|
||||
quote=true # enables the quotes section
|
||||
ramblings=false #enables the ramblings section
|
||||
|
||||
# set the path where wire looks for ramblings, this is mostly for server use.
|
||||
ramblings_path=${XDG_DOCUMENTS_DIR}/wire/
|
||||
|
||||
article_path="https://rss.nytimes.com/services/xml/rss/nyt/US.xml"
|
||||
|
||||
@@ -18,14 +18,15 @@ var wrapper string
|
||||
type Config struct {
|
||||
News bool `json:"news"`
|
||||
Quotes bool `json:"quote"`
|
||||
Ramblings bool `json:"ramblings"`
|
||||
Ramble bool `json:"ramblings"`
|
||||
Ramblings_Path string `json:"ramblings_path"`
|
||||
Articles_Path string `json:"article_path"`
|
||||
}
|
||||
|
||||
func NewConfig() (c Config) {
|
||||
c.News = true
|
||||
c.Quotes = true
|
||||
c.Ramblings = true
|
||||
c.Ramble = true
|
||||
ramblingsDir := os.Getenv("XDG_DOCUMENTS_DIR")
|
||||
if ramblingsDir == "" {
|
||||
ramblingsDir = filepath.Join(os.Getenv("HOME"), "Documents")
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
. $1
|
||||
printf '{"news":%s,"quote":%s,"ramblings":%s,"ramblings_path":"%s"}\n' "$news" "$quote" "$ramblings" "$ramblings_path"
|
||||
printf '{"news":%s,"quote":%s,"ramblings":%s,"ramblings_path":"%s","article_path":"%s"}\n' "$news" "$quote" "$ramblings" "$ramblings_path" "$article_path"
|
||||
|
||||
Reference in New Issue
Block a user