diff --git a/.gitignore b/.gitignore index ba2ee28..7f64f90 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /utils/ /cfg_availible/ /profile/ +/gnu_header.txt diff --git a/default/cfg.py b/default/cfg.py index 59bfa95..58fc2f5 100644 --- a/default/cfg.py +++ b/default/cfg.py @@ -1,7 +1,22 @@ #! /usr/bin/env python -from collections import OrderedDict +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +from collections import OrderedDict # YandereBot is a customizable, no frills image-posting bot. The bot was designed to be simple to understand # (from a technical perspective) and easy to modify/extend. YandereBot relies on GNU formatted hash files to configure diff --git a/run.sh b/run.sh index 9a539ba..e3c6ba8 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,22 @@ #! /usr/bin/env bash +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # Get the runtime path of the bot + ABS_PATH="$(readlink -f "$0")" RUN_DIR="$(dirname "$ABS_PATH")" diff --git a/src/create_app.py b/src/create_app.py index fdafc2c..038148d 100755 --- a/src/create_app.py +++ b/src/create_app.py @@ -1,7 +1,20 @@ #! /usr/bin/env python -# Program Name: Name -# Purpose: Purpose +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . import getpass import re diff --git a/src/encryption.py b/src/encryption.py index d05a43e..2756c87 100755 --- a/src/encryption.py +++ b/src/encryption.py @@ -1,7 +1,20 @@ #! /usr/bin/env python -# Program Name: Encryption -# Purpose: Encrypt and store key +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . import sys import base64 diff --git a/src/main.py b/src/main.py index 0c5a600..0cfad97 100755 --- a/src/main.py +++ b/src/main.py @@ -1,4 +1,21 @@ #! /usr/bin/env python + +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import sys import argparse import signal @@ -151,6 +168,22 @@ class FailedSanityTest(Exception): class FailedToLoadCfg(Exception): pass +def print_gpl(): + print("Yandere Lewd Bot, an image posting bot for Pleroma") + print("Copyright (C) 2022 Anon") + print("") + print("This program is free software: you can redistribute it and/or modify") + print("it under the terms of the GNU General Public License as published by") + print("the Free Software Foundation, either version 3 of the License, or") + print("(at your option) any later version.") + print("") + print("This program is distributed in the hope that it will be useful,") + print("but WITHOUT ANY WARRANTY; without even the implied warranty of") + print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the") + print("GNU General Public License for more details.") + print("") + print("You should have received a copy of the GNU General Public License") + print("along with this program. If not, see .") # Entry point if run from the command line def main(): @@ -168,10 +201,16 @@ def main(): parser.add_argument("-t", "--time", help="Wait for time before posting first image", default=None) parser.add_argument("-d", "--date", help="Wait for date before posting first image", default=None) parser.add_argument("-c", "--config", help="Set custom config file (Default: {})".format(default_cfg), default=default_cfg) + parser.add_argument("-l", "--license", help="Display GPL license", action="store_true") parser.add_argument("-o", "--output-hashes", help="Output list of hashes", action="store_true") parser.add_argument("-h", "--help", help="Show this help message and exit", action="store_true") parser.add_argument("remainder", help=argparse.SUPPRESS, nargs=argparse.REMAINDER) arguments = parser.parse_args() + + # Display gpl license + if arguments.license: + print_gpl() + return 0 # Redirect stdout when the bot first initializes if the bot is not going to run normally redirect_stdout = None if arguments.output_hashes or arguments.help else sys.stdout @@ -202,7 +241,7 @@ def main(): arguments.time, arguments.wait ) - + # Print Usage Information with Time and Date Formats with Examples if arguments.help: parser.print_help() diff --git a/src/yandereBot.py b/src/yandereBot.py index 6bf709e..0e1d1d5 100644 --- a/src/yandereBot.py +++ b/src/yandereBot.py @@ -1,7 +1,21 @@ #! /usr/bin/env python -# Program Name: Name -# Purpose: Purpose +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import yanlib import os diff --git a/src/yanlib.py b/src/yanlib.py index cf2c78e..e67a537 100644 --- a/src/yanlib.py +++ b/src/yanlib.py @@ -1,7 +1,20 @@ #! /usr/bin/env python -# Program Name: yandereBot -# Purpose: A Simple Mastadon Bot to Post Images +# Yandere Lewd Bot, an image posting bot for Pleroma +# Copyright (C) 2022 Anon +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # yanlib.py is required by yandereBot.py # This file contains functions and utilities that may be useful to external tools and programs that interface with