groundwork, project rename

This commit is contained in:
msk
2022-09-10 00:47:47 -05:00
parent 9fef8a7b6c
commit 360115ad7e
6 changed files with 196 additions and 6 deletions
+146 -1
View File
@@ -1 +1,146 @@
secrets.conf # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# mac shenanigan
.DS_Store
# VS Code files
.vscode
# project-specific
secrets.ini
+4 -4
View File
@@ -1,13 +1,13 @@
# NijiHoloBot # NijiHolo_EN_ID_Bot
### A Twitter bot that tweets when a Twitter interaction occurs between Nijisanji EN/ID and hololive EN/ID members. ### Twitter bot that follows interactions between Nijisanji EN/ID and hololive EN/ID members.
...cause some people are that desperate. Like me! ...because some folks are that desperate. Like me!
## Roadmap ## Roadmap
* Read past tweets of members from both companies * Read past tweets of members from both companies
* Store tweets in a queue file * Store tweets in a queue file
* Create image of tweet, including up to three image attachments from that tweet * Create image of tweet, including up to three image attachments from that tweet
* Combine image(s) with quote retweet * Combine image(s) with quote retweet
* Don't tweet already-existing tweets (check quoted RT?) * Don't tweet already-existing tweets (check quoted RTs?)
* Check out new tweets as soon as they post * Check out new tweets as soon as they post
## Notes ## Notes
+6
View File
@@ -0,0 +1,6 @@
## The bot's catch-up mode
# Scan all accounts for cross-company interactions.
# Terminates when finished scanning.
def run():
pass
+2
View File
@@ -0,0 +1,2 @@
## The bot's listen mode
# Listen for cross-company interactions.
+36 -1
View File
@@ -1,5 +1,40 @@
import sys
import argparse
from argparse import RawTextHelpFormatter
import TwitterAPI as api
import catchup as catchup
HELP_TEXT = \
'''OPTIONS:
-h Displays this help text.
-c, --catchup Scan all tweets from all accounts and makes posts all cross-company
interactions found.
-l, --listern Listen for all new tweets from all accounts.
'''
def init_argparse():
p = argparse.ArgumentParser(description='Twitter bot that follows interactions between Nijisanji EN/ID and hololive EN/ID members.', formatter_class=RawTextHelpFormatter)
p.add_argument('mode', nargs='?', \
help='mode to run the bot at:\n\
l,listen: (default) listen for new tweets from all accounts; will not terminate unless error occurs\n\
c,catchup: scan all tweets from all accounts; will terminate when done')
return p
def main(): def main():
print('hello python android') parser = init_argparse()
if len(sys.argv) < 2:
parser.print_help()
return
args = parser.parse_args()
print(args.mode)
match args.mode:
case 'l' | 'listen':
print('LISTEN MODE')
case 'c' | 'catchup':
print('CATCH-UP MODE')
if __name__ == "__main__": if __name__ == "__main__":
main() main()
+2
View File
@@ -1,3 +1,5 @@
## Twitter developer credentials management.
import os import os
import configparser import configparser