mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-08 03:18:34 +03:00
added and made more consistent docstrings, wrote script that makes minor edits to Sphinx apidocs to improve documentation clarity
This commit is contained in:
17
docs/edit_apidoc.sh
Normal file
17
docs/edit_apidoc.sh
Normal 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
|
||||
Reference in New Issue
Block a user