You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a number of parameters that are pretty static at a room / day / conference level, that are better placed in a configuration file rather than command line parameters that may be forgotten.
Suggest we create /var/www/data/config/pycon_video_manager_config.yml as a YAML configuration file, with the following content:
Use YAML because:
It’s more easily human-readable and human-writable than JSON
Especially, it allows comments
Here’s an example, based on the currently-required parameters.
---
# PyCon Video Manager configuration# Variables generally do not need to be quoted.# Indentation is meaningful, like Python!# Comments (like this) are allowed.# Conference level parametersconference:
# This additional tag is added to uploaded videos, along with a standard set of tags.year_tag: pyconuk2018# URL to fetch the schedule metadata. We may need another URL for POST updates.schedule_url: https://2018.hq.pyconuk.org/schedule/json/# Room or computer deployment parameterscomputer:
# The project data root can also be specified on the command line.project_data_root: /var/www/data# Video file extension to upload.video_file_extension: mp4# Default YouTube category # See https://developers.google.com/youtube/v3/docs/videoCategories/listdefault_category: 22# Default YouTube privacy (choose from unlisted, private, public)default_privacy: private
...
Suggest we use this program logic:
find the current script location (should be /var/www/html/<script>
search for the 'html' part
get the stem before that (yields /var/www)
append 'data' and 'config' (yields /var/www/data/config)
look for the pycon_video_manager_config.yml
if we don't find it, create the directory, and
copy the example from the project repository, and
tell the user
if we find it, use it
alternately, if we are given a --root parameter
look for the configuration file in <root>/config
The text was updated successfully, but these errors were encountered:
We have a number of parameters that are pretty static at a room / day / conference level, that are better placed in a configuration file rather than command line parameters that may be forgotten.
Suggest we create
/var/www/data/config/pycon_video_manager_config.yml
as a YAML configuration file, with the following content:Use YAML because:
Here’s an example, based on the currently-required parameters.
Suggest we use this program logic:
The text was updated successfully, but these errors were encountered: