added and made more consistent docstrings, wrote script that makes minor edits to Sphinx apidocs to improve documentation clarity

This commit is contained in:
Tristan Lee
2023-08-03 17:27:33 -05:00
parent b8ddc400f3
commit edd772eb94
7 changed files with 183 additions and 39 deletions

17
docs/edit_apidoc.sh Normal file
View File

@@ -0,0 +1,17 @@
# This script makes minor changes to the *.rst files created by Sphinx apidoc
RST_SOURCE_DIR=source
HIDE_COOKIESTRING=" :exclude-members: cookiestring"
REPLACE_MAXDEPTH="s/ :maxdepth: 4/ :maxdepth: 1/g"
# Remove display of ``cookiestring`` class variable, otherwise Sphinx generates docs containing the value of your cookiestring, based on your ``YOUTUBE_COOKIESTRING`` environment variable
for file in cisticola.scraper.base.rst cisticola.scraper.rumble.rst cisticola.scraper.youtube.rst
do
echo "$HIDE_COOKIESTRING" >> $RST_SOURCE_DIR/$file;
done
# Set max depth to 1 for subpackages (only showing module files), makes it less confusing
for file in cisticola.rst cisticola.scraper.rst cisticola.transformer.rst
do
sed -i "${REPLACE_MAXDEPTH}" ${RST_SOURCE_DIR}/${file};
done