From 95818252199d9837521ab88aa58a2aab3e62027d Mon Sep 17 00:00:00 2001 From: Simon Howroyd Date: Mon, 11 Sep 2023 09:48:19 +0100 Subject: [PATCH] Updated license notice --- pyproject.toml | 10 ++++--- src/simonsays_drgreengiant/simonsays.py | 38 +++++++++++++++++++------ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 330143b..1a0659f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,19 +4,21 @@ build-backend = "setuptools.build_meta" [project] name = "simonsays_drgreengiant" -version = "2.0.0rc8" +version = "2.0.0" authors = [{ name = "Simon Howroyd", email = "howroydlsu@gmail.com" }] description = "A Twitch Plays style programme to allow users in Twitch chats to control the broadcasters mouse and keyboard" keywords = ["twitch", "chat", "twitchplays", "troll"] readme = "README.md" requires-python = ">=3.11.4" classifiers = [ - "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3.11", + "Development Status :: 5 - Production/Stable", + "Framework :: Pytest", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Natural Language :: English", "Operating System :: OS Independent", - "Topic :: Games/Entertainment", + "Programming Language :: Python :: 3.11", "Topic :: Communications :: Chat :: Internet Relay Chat", + "Topic :: Games/Entertainment", ] dynamic = ["dependencies"] diff --git a/src/simonsays_drgreengiant/simonsays.py b/src/simonsays_drgreengiant/simonsays.py index 59f18c8..8593735 100644 --- a/src/simonsays_drgreengiant/simonsays.py +++ b/src/simonsays_drgreengiant/simonsays.py @@ -2,6 +2,7 @@ import concurrent.futures as cf import contextlib import functools +import pprint from typing import NoReturn from twitchirc_drgreengiant import offlineirc, twitchirc @@ -23,24 +24,45 @@ def done_callback(future: cf.Future, msg: twitchirc.TwitchMessage, tag: str) -> def make_commands_str(myconfig: config.Config) -> str: """Make a command string to paste into chat""" - return ", ".join((f"{value.twitch.command[0]}" for value in myconfig.config.values())) + ret = pprint.pformat([value.twitch.command[0] for value in myconfig.config.values()], compact=True) + return ret.replace("'", "").replace("[", "").replace("]", "") + + +def license() -> str: + """Make the license string""" + return """\tThis program is free software; you can redistribute it and/or modify +\tit under the terms of the GNU General Public License version 2 as published by +\tthe Free Software Foundation. + +\tThis program is distributed in the hope that it will be useful, +\tbut WITHOUT ANY WARRANTY; without even the implied warranty of +\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +\tGNU General Public License for more details. + +\tYou should have received a copy of the GNU General Public License along +\twith this program; if not, write to the Free Software Foundation, Inc., +\t51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +""" def preamble(myconfig: config.Config) -> str: """Make the preamble""" - return f"""\n\t\t--- SimonSays v{VERSION} ---\n -\tCreated by twitch.tv/DrGreenGiant (Simon Howroyd) + return f"""\n\t\t--- ---\n +\tSimonSays v{VERSION} - Twitch chat interaction to keyboard and mouse +\tcommands, aimed at Phasmophobia game livestreams. +\tCopyright (C) 2023 Simon Howroyd -\tThis software is licensed under: -\tGNU GENERAL PUBLIC LICENSE version 2.0 (GPL-2.0) +{license()} \tFor more information on this software, visit: \t\thttps://github.com/howroyd/SimonSays -Valid commands are:\n{make_commands_str(myconfig)} +Valid commands are: +{make_commands_str(myconfig)} + +Channels set in config.toml: +{', '.join(myconfig.channel)} -Channels: {', '.join(myconfig.channel)} -\n """