mandy archivist bot - https://notabug.org/mandy/about/wiki/
mandy a82efadcce Fix typo | 4 years ago | |
---|---|---|
common | 4 years ago | |
lma | 4 years ago | |
lmw | 4 years ago | |
manual | 4 years ago | |
.gitignore | 4 years ago | |
README.md | 4 years ago | |
TubeUp.patch | 4 years ago | |
__main__.patch | 4 years ago | |
mandy.sh | 4 years ago | |
setup.sh | 4 years ago |
Read those for info.
This README is currently under construction. I haven't even seen it rendered with a proper markdown viewer yet. Suggestions welcone.
Hard:
Soft:
Clone repo
Setup git, if you haven't already:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Run setup.sh
. This will generate expected subdirectories and files
Clone or create a git repo in mandy/common/public_lists containing:
errorList
geoblockList
ignoredList
successList
unavailableList
This repo is intended to be committed to the public. My repo pushes to https://notabug.org/mandy/lists. If you intend to merge with my list, let me know first!
Make sure a script can commit and push automatically, this will probably require setting up SSH.
Either install and configure mutt
or edit common/report/reportSender.sh to use your own email client. Alternatively, you can rip out the report sender feature.
Change the email address in common/report/reportSender.sh to one of your own.
The setup script assumes pip3 exists. if needed, substitute pip3
with pip
if pip
defaults to Python3. Make sure youtube-dl is added to PATH.
pip3 install --user youtube-dl
Install and configure internetarchive Python module (requires archive.org account)
pip3 install --user internetarchive
ia configure
Install and patch TubeUp Python module. You may wish to modify and/or update the patches. diff
could be useful:
pip3 install --user tubeup
patch -u [location of TubeUp.py] -i TubeUp.patch # could be in ~/.local/lib/python#.#/site-packages/tubeup
patch -u [location of __main__.py] -i __main__.patch
Install Beautiful Soup 4
pip3 install --user beautifulsoup4
In tubeFeeder.py
, edit the lines which check if "Mandy, Defeater of Death" has uploaded the video. Those are simply a hack for me to easily fix corrupted uploads. It will result in a permissions error if you try to reupload a video already uploaded by me.
Run mandy.sh
(warning: this runs apt-get update)
This is intended to be later run as a daily cron job in order to:
safely merge and sort master lists into the public list repo
commit changes to the public list repo
update dependencies
compile and send a health report via email
Setup a cron job to regularly change directory to /mandy and run mandy.sh
.
For each site you want to archive, execute the manager.sh
script in its own directory.