forked from pnijjar/google-calendar-helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.example
139 lines (107 loc) · 4.32 KB
/
config.py.example
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/usr/bin/env python3
import os
# Go to https://console.developers.google.com to generate this. You
# need to enable it for the Google Calendar API
API_KEY='Insert-Your-API-key-here'
# Oops. Now we need keys for other APIs, too.
# This is for the Twitter API. Generate it from developers.twitter.com
# You only need it if you are sending tweets from the calendar
TWITTER_CONSUMER_KEY='Insert-Your-Consumer-Key'
TWITTER_CONSUMER_SECRET='Insert-Your-Consumer-Secret'
TWITTER_ACCESS_TOKEN='Insert-Your-Twitter-Access-Token'
TWITTER_ACCESS_SECRET='Insert-Your-Twitter-Access-Token-Secret'
# Look in your calendar URLs to figure this out (src= parameter).
#
# This is a list. The first calendar has the master information
# (such as calendar title and description). Subsequent calendars
# contribute only events.
CALENDAR_IDS=[
]
# How many items should be in the feed? For a busy calendar you want
# this at least 50 (and maybe more).
NUM_ITEMS='100'
# How many days of events should displayed in the newsletter?
# The NUM_ITEMS setting takes precedence. Use "None" for no limit or a
# positive integer for days. For events only occurring today, use 1.
# eg NEWSLETTER_MAX_DAYS=14
#
# (No, this is not a good idea for RSS feeds. Trust me.)
NEWSLETTER_MAX_DAYS=None
# What link shortening service should be used in newsletters?
# If you have no preference then the default should be okay.
# If you want to turn off link shortening set:
# LINK_SHORTENER_SERVICE = None
#
# See https://github.com/ellisonleao/pyshorteners/ for the
# syntax of making a new shortener.
# Note that the syntax has changed dramatically since v0.6.1
# To see the services:
# source venv/bin/activate
# python3
# import pyshorteners
# s = pyshorteners.Shortener()
# print(s.available_shorteners)
#
# Another non-pyshorteners option is available: liteshort
# This requires a domain parameter:
# LINK_SHORTENER_PARAMS = {"domain": "https://s.kwlug.org"}
LINK_SHORTENER_SERVICE = 'dagd'
LINK_SHORTENER_PARAMS = {}
# For datetime nonsense
TIMEZONE='America/Los_Angeles'
# Used as the link field in the RSS feed
WEBSITE='https://blm-cal.tech-bloc-sea.dev'
# Used as the location of this feed
FEED_LINK="{}/seattleblmcalendar.rss".format(WEBSITE)
# Used as the image for the RSS feed
LOGO="{}/img/logo.png".format(WEBSITE)
# A title for the RSS feed
RSS_TITLE='Seattle BLM Events Calendar'
# A short description for the RSS feed
DESCRIPTION='Upcoming BLM events in the greater Seattle region'
# Where to save the output, and what to call it
PARENTDIR=os.path.abspath(os.curdir)
OUTRSS=os.path.join(PARENTDIR, "seattleblmcalendar.rss")
OUTNEWS=os.path.join(PARENTDIR, "seattleblmcalendar.txt")
OUTJSON=os.path.join(PARENTDIR, "seattleblmcalendar.json")
OUTSIDEBAR=os.path.join(PARENTDIR, "seattleblmcalendar-sidebar.html")
# Who is responsible for this feed
WEBMASTER="[email protected]"
WEBMASTER_NAME="Tech Bloc SEA"
# Introductory text for newsletter
NEWSLETTER_HEADER="""
"""
# How many days in advance should we tweet events, and what should the
# intro text be?
TWEET_DATE_EXPRESSION = {
0: "Today!",
1: "Tomorrow!",
2: "Three sleeps!",
3: "Four sleeps!",
4: "Five sleeps!",
6: "Next week!"
}
# How many days in advance should we grab tweets (upper bound).
# Use 8 for events one week from now. 0 is today.
TWEET_NUM_DAYS=8
# What hours of the day should we release tweets? This should be a
# single range (sorry) with two strings specified in 24 hour notation.
# The last minute will NOT be included.
#
# The start should be AFTER you run the script (actually, after the
# script stops running). This is going to be bad for events that begin
# today, before the tweet window.
TWEET_WINDOW = ("09:00", "16:00")
# Where should tweets to be released be stored?
# DANGER: this folder should be writable and readable by the process.
OUTTWEET=os.path.join(PARENTDIR, "output", "tweets")
# Where to find the google-calendar-helpers files
PYDIR=os.getcwd()
# Where to find shell script that launches tweets
SHELL_SCRIPT_DIR=os.path.join(PYDIR, 'scripts')
# Where to find the virtualenv environment
VENV_DIR=os.path.join(PYDIR, 'venv')