Added GPL headers and switch
This commit is contained in:
parent
071b9baef0
commit
244ed75061
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,3 +27,4 @@
|
||||
/utils/
|
||||
/cfg_availible/
|
||||
/profile/
|
||||
/gnu_header.txt
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
16
run.sh
16
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 <https://www.gnu.org/licenses/>.
|
||||
# Get the runtime path of the bot
|
||||
|
||||
ABS_PATH="$(readlink -f "$0")"
|
||||
RUN_DIR="$(dirname "$ABS_PATH")"
|
||||
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import getpass
|
||||
import re
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import base64
|
||||
|
39
src/main.py
39
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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 <https://www.gnu.org/licenses/>.")
|
||||
|
||||
# Entry point if run from the command line
|
||||
def main():
|
||||
@ -168,11 +201,17 @@ 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
|
||||
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import yanlib
|
||||
|
||||
import os
|
||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user