Skip to content

Commit

Permalink
Small updates in Readme and added comments in the configs. All bugs a…
Browse files Browse the repository at this point in the history
…re probably fixed - ready for minor release
  • Loading branch information
drkostas committed Jun 2, 2022
1 parent c74e24b commit 35167e0
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 43 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ The project uses YML config files along with command-line arguments. There are t
- refresh_photos
- set_priority
- [commenter.yml](confs/commenter.yml): Used to run the `commenter` command
- One thing to bear in mind here is that the bot checks and comments only on videos not commented
yet. So the first time your run it you don't want to comment on every single video in the past few
days. So make sure you set the `max_posted_hours` option to 1 and increase it the next days
if you want.
- [accumulator.yml](confs/accumulator.yml): Used to run the `accumulator` command

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

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

Expand Down
28 changes: 14 additions & 14 deletions confs/accumulator.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
tag: accumulator
datastore:
- config:
hostname: !ENV ${MYSQL_HOST}
username: !ENV ${MYSQL_USERNAME}
password: !ENV ${MYSQL_PASSWORD}
db_name: !ENV ${MYSQL_DB_NAME}
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
username: !ENV ${MYSQL_USERNAME} # DB username
password: !ENV ${MYSQL_PASSWORD} # DB password
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
port: 3306
type: mysql
youtube:
- config:
client_id: !ENV ${CLIENT_ID_ACC}
client_secret: !ENV ${CLIENT_SECRET_ACC}
client_id: !ENV ${CLIENT_ID_ACC} # YouTube client ID (see Readme)
client_secret: !ENV ${CLIENT_SECRET_ACC} # YouTube client secret (see Readme)
api_version: v3
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
username: !ENV ${USERNAME_ACC} # Can be omitted (automatically derived)
comment_search_term: !ENV ${SEARCH_TERM_ACC} # Can be omitted (username will be used instead - sometimes doesn't work)
sleep_time: !ENV ${SLEEP_TIME_ACC}
num_comments_to_check: !ENV ${NUM_COMMENTS_ACC}
username: !ENV ${USERNAME_ACC} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
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
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
num_comments_to_check: !ENV ${NUM_COMMENTS_ACC} # Latest N number of comments to check and update their metadata
load_keys_from_cloud: true # cloudstore config is required
keys_path: keys
keys_path: keys # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
type: normal # normal, simulated
cloudstore: # Optional
- config:
api_key: !ENV ${DROPBOX_API_KEY}
logs_folder_path: /yt-commenter/logs
keys_folder_path: /yt-commenter/keys
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
type: dropbox
30 changes: 15 additions & 15 deletions confs/commenter.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
tag: commenter
datastore:
- config:
hostname: !ENV ${MYSQL_HOST}
username: !ENV ${MYSQL_USERNAME}
password: !ENV ${MYSQL_PASSWORD}
db_name: !ENV ${MYSQL_DB_NAME}
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
username: !ENV ${MYSQL_USERNAME} # DB username
password: !ENV ${MYSQL_PASSWORD} # DB password
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
port: 3306
type: mysql
youtube:
- config:
client_id: !ENV ${CLIENT_ID_COMM}
client_secret: !ENV ${CLIENT_SECRET_COMM}
client_id: !ENV ${CLIENT_ID_COMM} # YouTube client ID (see Readme)
client_secret: !ENV ${CLIENT_SECRET_COMM} # YouTube client secret (see Readme)
api_version: v3
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
username: !ENV ${USERNAME_COMM} # Can be omitted (automatically derived)
username: !ENV ${USERNAME_COMM} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
load_keys_from_cloud: true # cloudstore config is required
keys_path: keys
sleep_time: !ENV ${SLEEP_TIME_COMM}
max_posted_hours: !ENV ${MAX_POSTED_HOURS_COMM} # max num. of hours to check back for posted videos
keys_path: keys # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
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
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
type: normal # normal, simulated
comments:
comments: # options: normal, simulated (simulated is just for testing)
- config:
local_folder_name: comments
dropbox_folder_name: /yt-commenter/comments
type: !ENV ${COMMENTS_TYPE} # local, dropbox (should set `cloudstore` config), or mysql (not implemented)
cloudstore: # Optional
- config:
api_key: !ENV ${DROPBOX_API_KEY}
logs_folder_path: /yt-commenter/logs
keys_folder_path: /yt-commenter/keys
reload_data_every: !ENV ${RELOAD_DATA_EVERY} # number of loops in commenter()
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
reload_data_every: !ENV ${RELOAD_DATA_EVERY} # Every how many # of loops in the commenter() to reload data and backup logs
type: dropbox
#emailer: # Not implemented yet
# - config:
Expand Down
26 changes: 13 additions & 13 deletions confs/generic.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
tag: generic
datastore:
- config:
hostname: !ENV ${MYSQL_HOST}
username: !ENV ${MYSQL_USERNAME}
password: !ENV ${MYSQL_PASSWORD}
db_name: !ENV ${MYSQL_DB_NAME}
hostname: !ENV ${MYSQL_HOST} # localhost or the IP of your DB
username: !ENV ${MYSQL_USERNAME} # DB username
password: !ENV ${MYSQL_PASSWORD} # DB password
db_name: !ENV ${MYSQL_DB_NAME} # The name of your DB/schema
port: 3306
type: mysql
youtube:
- config:
client_id: !ENV ${CLIENT_ID_GEN}
client_secret: !ENV ${CLIENT_SECRET_GEN}
client_id: !ENV ${CLIENT_ID_GEN} # YouTube client ID (see Readme)
client_secret: !ENV ${CLIENT_SECRET_GEN} # YouTube client secret (see Readme)
api_version: v3
read_only_scope: https://www.googleapis.com/auth/youtube.force-ssl
username: !ENV ${USERNAME_GEN} # Can be omitted (automatically derived)
load_keys_from_cloud: true # cloudstore config is required
keys_path: keys
type: normal # normal, simulated
username: !ENV ${USERNAME_GEN} # Can be omitted (automatically derived). Useful when you are using a different api key for the accumulator
load_keys_from_cloud: true # if true, cloudstore config is required. Loads the YT keys from the specified dropbox folder
keys_path: keys # The local path of the YT keys
type: normal # options: normal, simulated (simulated is just for testing)
cloudstore: # Optional
- config:
api_key: !ENV ${DROPBOX_API_KEY}
logs_folder_path: /yt-commenter/logs
keys_folder_path: /yt-commenter/keys
api_key: !ENV ${DROPBOX_API_KEY} # Dropbox api key, see Readme
logs_folder_path: /yt-commenter/logs # The Dropbox path where the log files are going to be being backed up
keys_folder_path: /yt-commenter/keys # The Dropbox path where the keys are going to be copied locally from
type: dropbox

0 comments on commit 35167e0

Please sign in to comment.