Skip to content

Commit 35167e0

Browse files
committed
Small updates in Readme and added comments in the configs. All bugs are probably fixed - ready for minor release
1 parent c74e24b commit 35167e0

File tree

4 files changed

+48
-43
lines changed

4 files changed

+48
-43
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ The project uses YML config files along with command-line arguments. There are t
118118
- refresh_photos
119119
- set_priority
120120
- [commenter.yml](confs/commenter.yml): Used to run the `commenter` command
121+
- One thing to bear in mind here is that the bot checks and comments only on videos not commented
122+
yet. So the first time your run it you don't want to comment on every single video in the past few
123+
days. So make sure you set the `max_posted_hours` option to 1 and increase it the next days
124+
if you want.
121125
- [accumulator.yml](confs/accumulator.yml): Used to run the `accumulator` command
122126

123127
I am not going to go into depth for each available setting because you can use the three YML files as
@@ -134,7 +138,8 @@ pool of available comments, and the bot automatically picks one that hasn't been
134138
respective channel yet, otherwise, it picks the one that was posted the longest time ago. Just create
135139
a `default.txt` file in a folder named `comments` and write one comment per line. If, for a specific
136140
channel, you want to have additional comments, create another txt file named after the channel's id.
137-
For example, you can create a `UC-ImLFXGIe2FC4Wo5hOodnw.txt` for the Veritasium YT channel.
141+
For example, you can create a `UC-ImLFXGIe2FC4Wo5hOodnw.txt` for the Veritasium YT channel that
142+
has that id.
138143

139144
### Start following channels <a name = "add_channels"></a>
140145

confs/accumulator.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
tag: accumulator
22
datastore:
33
- config:
4-
hostname: !ENV ${MYSQL_HOST}
5-
username: !ENV ${MYSQL_USERNAME}
6-
password: !ENV ${MYSQL_PASSWORD}
7-
db_name: !ENV ${MYSQL_DB_NAME}
4+
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
5+
username: !ENV ${MYSQL_USERNAME} # DB username
6+
password: !ENV ${MYSQL_PASSWORD} # DB password
7+
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
88
port: 3306
99
type: mysql
1010
youtube:
1111
- config:
12-
client_id: !ENV ${CLIENT_ID_ACC}
13-
client_secret: !ENV ${CLIENT_SECRET_ACC}
12+
client_id: !ENV ${CLIENT_ID_ACC} # YouTube client ID (see Readme)
13+
client_secret: !ENV ${CLIENT_SECRET_ACC} # YouTube client secret (see Readme)
1414
api_version: v3
1515
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
16-
username: !ENV ${USERNAME_ACC} # Can be omitted (automatically derived)
17-
comment_search_term: !ENV ${SEARCH_TERM_ACC} # Can be omitted (username will be used instead - sometimes doesn't work)
18-
sleep_time: !ENV ${SLEEP_TIME_ACC}
19-
num_comments_to_check: !ENV ${NUM_COMMENTS_ACC}
16+
username: !ENV ${USERNAME_ACC} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
17+
comment_search_term: !ENV ${SEARCH_TERM_ACC} # Can be omitted (username will be used instead which sometimes doesn't work). It is used to search for your comment data under a video
18+
sleep_time: !ENV ${SLEEP_TIME_ACC} # Number of seconds to wait until checking for new videos again. Increase this if you are getting api limit errors
19+
num_comments_to_check: !ENV ${NUM_COMMENTS_ACC} # Latest N number of comments to check and update their metadata
2020
load_keys_from_cloud: true # cloudstore config is required
21-
keys_path: keys
21+
keys_path: keys # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
2222
type: normal # normal, simulated
2323
cloudstore: # Optional
2424
- config:
25-
api_key: !ENV ${DROPBOX_API_KEY}
26-
logs_folder_path: /yt-commenter/logs
27-
keys_folder_path: /yt-commenter/keys
25+
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
26+
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
27+
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
2828
type: dropbox

confs/commenter.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
tag: commenter
22
datastore:
33
- config:
4-
hostname: !ENV ${MYSQL_HOST}
5-
username: !ENV ${MYSQL_USERNAME}
6-
password: !ENV ${MYSQL_PASSWORD}
7-
db_name: !ENV ${MYSQL_DB_NAME}
4+
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
5+
username: !ENV ${MYSQL_USERNAME} # DB username
6+
password: !ENV ${MYSQL_PASSWORD} # DB password
7+
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
88
port: 3306
99
type: mysql
1010
youtube:
1111
- config:
12-
client_id: !ENV ${CLIENT_ID_COMM}
13-
client_secret: !ENV ${CLIENT_SECRET_COMM}
12+
client_id: !ENV ${CLIENT_ID_COMM} # YouTube client ID (see Readme)
13+
client_secret: !ENV ${CLIENT_SECRET_COMM} # YouTube client secret (see Readme)
1414
api_version: v3
1515
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
16-
username: !ENV ${USERNAME_COMM} # Can be omitted (automatically derived)
16+
username: !ENV ${USERNAME_COMM} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
1717
load_keys_from_cloud: true # cloudstore config is required
18-
keys_path: keys
19-
sleep_time: !ENV ${SLEEP_TIME_COMM}
20-
max_posted_hours: !ENV ${MAX_POSTED_HOURS_COMM} # max num. of hours to check back for posted videos
18+
keys_path: keys # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
19+
sleep_time: !ENV ${SLEEP_TIME_COMM} # Number of seconds to wait until checking for new videos again. Increase this if you are getting api limit errors
20+
max_posted_hours: !ENV ${MAX_POSTED_HOURS_COMM} # max num. of hours to check back for posted videos. Set it to 1 the first time your run the commenter
2121
type: normal # normal, simulated
22-
comments:
22+
comments: # options: normal, simulated (simulated is just for testing)
2323
- config:
2424
local_folder_name: comments
2525
dropbox_folder_name: /yt-commenter/comments
2626
type: !ENV ${COMMENTS_TYPE} # local, dropbox (should set `cloudstore` config), or mysql (not implemented)
2727
cloudstore: # Optional
2828
- config:
29-
api_key: !ENV ${DROPBOX_API_KEY}
30-
logs_folder_path: /yt-commenter/logs
31-
keys_folder_path: /yt-commenter/keys
32-
reload_data_every: !ENV ${RELOAD_DATA_EVERY} # number of loops in commenter()
29+
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
30+
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
31+
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
32+
reload_data_every: !ENV ${RELOAD_DATA_EVERY} # Every how many # of loops in the commenter() to reload data and backup logs
3333
type: dropbox
3434
#emailer: # Not implemented yet
3535
# - config:

confs/generic.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
tag: generic
22
datastore:
33
- config:
4-
hostname: !ENV ${MYSQL_HOST}
5-
username: !ENV ${MYSQL_USERNAME}
6-
password: !ENV ${MYSQL_PASSWORD}
7-
db_name: !ENV ${MYSQL_DB_NAME}
4+
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
5+
username: !ENV ${MYSQL_USERNAME} # DB username
6+
password: !ENV ${MYSQL_PASSWORD} # DB password
7+
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
88
port: 3306
99
type: mysql
1010
youtube:
1111
- config:
12-
client_id: !ENV ${CLIENT_ID_GEN}
13-
client_secret: !ENV ${CLIENT_SECRET_GEN}
12+
client_id: !ENV ${CLIENT_ID_GEN} # YouTube client ID (see Readme)
13+
client_secret: !ENV ${CLIENT_SECRET_GEN} # YouTube client secret (see Readme)
1414
api_version: v3
1515
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
16-
username: !ENV ${USERNAME_GEN} # Can be omitted (automatically derived)
17-
load_keys_from_cloud: true # cloudstore config is required
18-
keys_path: keys
19-
type: normal # normal, simulated
16+
username: !ENV ${USERNAME_GEN} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
17+
load_keys_from_cloud: true # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
18+
keys_path: keys # The local path of the YT keys
19+
type: normal # options: normal, simulated (simulated is just for testing)
2020
cloudstore: # Optional
2121
- config:
22-
api_key: !ENV ${DROPBOX_API_KEY}
23-
logs_folder_path: /yt-commenter/logs
24-
keys_folder_path: /yt-commenter/keys
22+
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
23+
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
24+
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
2525
type: dropbox

0 commit comments

Comments
 (0)