initial commit
This commit is contained in:
commit
14681d00ee
160
.gitignore
vendored
Normal file
160
.gitignore
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
# 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
|
||||
*.spec
|
||||
|
||||
# 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
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__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/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 CommandLine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
129
README.md
Normal file
129
README.md
Normal file
@ -0,0 +1,129 @@
|
||||
# pythonmommy
|
||||
|
||||
[View on PyPI](https://pypi.org/project/pythonmommy/)
|
||||
[Github repo](https://github.com/Def-Try/python-mommy)
|
||||
|
||||
Mommy's here to support you when running python~ ❤️
|
||||
|
||||
THIS IS A PORT OF [Gankra/cargo-mommy](https://github.com/Gankra/cargo-mommy)
|
||||
|
||||
# TODO
|
||||
|
||||
- edit executable in .venv/pyenv.cfg
|
||||
- link it to a mommy wrapper
|
||||
|
||||
# Installation
|
||||
|
||||
Install python-mommy like you would any other python package~
|
||||
|
||||
```text
|
||||
> pip install pythonmommy
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Run whatever python you would normally but add "-m python_mommy" after python~
|
||||
|
||||
```text
|
||||
> cat hello.py
|
||||
|
||||
print("Hello, world"
|
||||
|
||||
> python -m python_mommy hello.py
|
||||
|
||||
File "/home/little_girl/hello.py", line 1
|
||||
print("Hello, world"
|
||||
^
|
||||
SyntaxError: '(' was never closed
|
||||
|
||||
mommy knows her little girl can do better~ ❤️
|
||||
|
||||
>_
|
||||
```
|
||||
|
||||
You can alias mommy directly to python if you want,
|
||||
|
||||
```text
|
||||
> alias python="python -m python_mommy"
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||
if you don't use standard interpreter, you can set it with environment variable `PYTHON_MOMMYS_INTERPRETER`. default is "python/python3/py", and `/` symbol separates different interpreters that mommy will try to find, from first to last.
|
||||
prepend `\` before `/` to escape it, for example `\/home\/user\/.local\/bin\/python/python/python3`
|
||||
|
||||
Mommy will read the following environment variables to make her messages better for you~ ❤️
|
||||
|
||||
* `PYTHON_MOMMYS_LITTLE` - what to call you~ (default: "girl")
|
||||
* `PYTHON_MOMMYS_PRONOUNS` - what pronouns mommy will use for themself~ (default: "her")
|
||||
* `PYTHON_MOMMYS_ROLES` - what role mommy will have~ (default "mommy")
|
||||
* `PYTHON_MOMMYS_EMOTES` - what emotes mommy will have~ (default "❤️/💖/💗/💓/💞")
|
||||
|
||||
All of these options can take a `/` separated list. Mommy will randomly select one of them whenever she talks to you~
|
||||
|
||||
For example, the phrase "mommy loves her little girl~ 💞" is "PYTHON_MOMMYS_ROLE loves PYTHON_MOMMYS_PRONOUNS little PYTHON_MOMMYS_LITTLE~"
|
||||
|
||||
So if you set `PYTHON_MOMMYS_ROLES="daddy"`, `PYTHON_MOMMYS_PRONOUNS="his/their"`, and `PYTHON_MOMMYS_LITTLE="boy/pet/baby"` then you might get any of
|
||||
|
||||
* daddy loves their little boy~ ❤️
|
||||
* daddy loves his little pet~ 💗
|
||||
* daddy loves their little baby~ 💗
|
||||
|
||||
And so on~ 💓
|
||||
|
||||
|
||||
# Configuration (kink)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>
|
||||
<b>THIS IS NSFW, STOP READING IF YOU WANT MOMMY TO REMAIN INNOCENT!</b>
|
||||
</summary>
|
||||
|
||||
...
|
||||
|
||||
...
|
||||
|
||||
Good pet~ ❤️
|
||||
|
||||
All of mommy's NSFW content is hidden behind PYTHON_MOMMYS_MOODS, where "thirsty" is heavy teasing/flirting and "yikes" is full harsh dommy mommy kink~
|
||||
|
||||
You can enable "true mommy chaos mode" by setting `PYTHON_MOMMYS_MOODS="chill/thirsty/yikes"`, making mommy oscillate wildly between light positive affirmation and trying to break you in half~
|
||||
|
||||
* `PYTHON_MOMMYS_MOODS` - how kinky mommy will be~ (default: "chill", possible values "chill", "thirsty", "yikes")
|
||||
* `PYTHON_MOMMYS_PARTS` - what part of mommy you should crave~ (default: "milk")
|
||||
* `PYTHON_MOMMYS_FUCKING` - what to call mommy's pet~ (default: "slut/toy/pet/pervert/whore")
|
||||
|
||||
-----
|
||||
|
||||
**Here's some examples of mommy being thirsty~ ❤️**
|
||||
|
||||
*tugs your leash*
|
||||
that's a VERY good girl~ 💞
|
||||
|
||||
*smooches your forehead*
|
||||
good job~ 💗
|
||||
|
||||
are you just keysmashing now~?
|
||||
cute~ 💖
|
||||
|
||||
if you don't learn how to code better, mommy is going to put you in time-out~ 💓
|
||||
|
||||
-----
|
||||
|
||||
**And here's some examples of mommy being yikes~ 💞**
|
||||
|
||||
good slut~
|
||||
you've earned five minutes with the buzzy wand~ 💗
|
||||
|
||||
*slides her finger in your mouth*
|
||||
that's a good little toy~ ❤️
|
||||
|
||||
get on your knees and beg mommy for forgiveness you pervert~ 💗
|
||||
|
||||
mommy is starting to wonder if you should just give up and become her breeding stock~ 💗
|
||||
|
||||
</details>
|
||||
|
||||
# Licensing
|
||||
mommy likes freedom~ ❤️, and is licensed under [MIT](LICENSE-MIT).
|
27
pyproject.toml
Normal file
27
pyproject.toml
Normal file
@ -0,0 +1,27 @@
|
||||
[project]
|
||||
description = "Mommy's here to support you when running python (in a virtual enviroment)~ ❤️"
|
||||
name = "python_mommy_venv"
|
||||
dependencies = ['termcolor']
|
||||
authors = []
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
classifiers = [
|
||||
'Programming Language :: Python :: 3',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Operating System :: OS Independent',
|
||||
]
|
||||
version = "0.0.0"
|
||||
license-files = ["LICENSE"]
|
||||
|
||||
[project.scripts]
|
||||
python-mommy-dev = "python_mommy_venv.__main__:development"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling", "hatch-requirements-txt"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build]
|
||||
directory = "dist"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["python_mommy_venv"]
|
30
python_mommy_venv/__init__.py
Normal file
30
python_mommy_venv/__init__.py
Normal file
@ -0,0 +1,30 @@
|
||||
import random
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Optional
|
||||
import termcolor
|
||||
import os
|
||||
import re
|
||||
import signal
|
||||
|
||||
from .config import CONFIG
|
||||
from .static import RESPONSES, Situation
|
||||
|
||||
def _expand_template(template: str) -> str:
|
||||
for key, value in CONFIG.items():
|
||||
template = template.replace(key, random.choice(value))
|
||||
|
||||
return template + " " + random.choice(CONFIG["MOMMYS_EMOTES"])
|
||||
|
||||
def get_response(situation: Situation, colorize: Optional[bool] = None):
|
||||
if colorize is None:
|
||||
colorize = sys.stdout.isatty()
|
||||
|
||||
# get message
|
||||
possible_templates = RESPONSES[random.choice(CONFIG["MOMMYS_MOODS"])][situation]
|
||||
message = _expand_template(random.choice(possible_templates))
|
||||
|
||||
# return message
|
||||
if not colorize:
|
||||
return message
|
||||
return termcolor.colored(message, attrs=["bold"])
|
13
python_mommy_venv/__main__.py
Normal file
13
python_mommy_venv/__main__.py
Normal file
@ -0,0 +1,13 @@
|
||||
import sys
|
||||
|
||||
from . import get_response
|
||||
from .static import Situation
|
||||
|
||||
|
||||
def development():
|
||||
s = "positive"
|
||||
if len(sys.argv) > 1:
|
||||
s = sys.argv[1]
|
||||
|
||||
|
||||
print(get_response(Situation(s)))
|
72
python_mommy_venv/config.py
Normal file
72
python_mommy_venv/config.py
Normal file
@ -0,0 +1,72 @@
|
||||
from typing import Optional, List
|
||||
import os
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from .static import RESPONSES
|
||||
|
||||
logger = logging.Logger("mommy_config")
|
||||
|
||||
PREFIXES = [
|
||||
"PYTHON", # first one is always the prefix of the current program
|
||||
"CARGO",
|
||||
]
|
||||
|
||||
def _get_var(key: str, fallback: str) -> List[str]:
|
||||
value = os.environ.get(
|
||||
PREFIXES[0] + "_" + key,
|
||||
os.environ.get(
|
||||
key,
|
||||
None
|
||||
)
|
||||
)
|
||||
|
||||
if value is None:
|
||||
for prefix in PREFIXES[1:]:
|
||||
value = os.environ.get(prefix + "_" + key, None)
|
||||
if value != None:
|
||||
break
|
||||
|
||||
return (value or fallback).split("/")
|
||||
|
||||
|
||||
_DEFAULT_CONFIG = {key: _get_var(key, value) for key, value in {
|
||||
"MOMMYS_ROLE": "mommy",
|
||||
"MOMMYS_PRONOUNS": "her",
|
||||
"MOMMYS_LITTLE": "girl",
|
||||
"MOMMYS_EMOTES": "❤️/💖/💗/💓/💞",
|
||||
"MOMMYS_PARTS": "milk",
|
||||
"MOMMYS_FUCKING": "slut/toy/pet/pervert/whore",
|
||||
# needs validation
|
||||
"MOMMYS_MOODS": "chill",
|
||||
}.items()}
|
||||
|
||||
CONFIG = {}
|
||||
|
||||
def load_config(data: Optional[dict] = None):
|
||||
global CONFIG
|
||||
data = data if data is not None else {}
|
||||
|
||||
data = {
|
||||
**_DEFAULT_CONFIG,
|
||||
**data,
|
||||
}
|
||||
|
||||
# convert toml keys from snake_case to UPPER_CASE
|
||||
data = {
|
||||
key.upper(): value
|
||||
for key, value in data.items()
|
||||
}
|
||||
|
||||
# validate needed values
|
||||
unfiltered_moods = data["MOMMYS_MOODS"]
|
||||
data["MOMMYS_MOODS"] = filtered_moods = []
|
||||
for mood in unfiltered_moods:
|
||||
if mood in RESPONSES:
|
||||
filtered_moods.append(mood)
|
||||
else:
|
||||
logger.warning("mood %s isn't supported", mood)
|
||||
|
||||
CONFIG = data
|
||||
|
||||
load_config()
|
81
python_mommy_venv/static.py
Normal file
81
python_mommy_venv/static.py
Normal file
@ -0,0 +1,81 @@
|
||||
from enum import Enum
|
||||
|
||||
class Situation(Enum):
|
||||
POSITIVE = "positive"
|
||||
NEGATIVE = "negative"
|
||||
|
||||
RESPONSES = {
|
||||
"chill": {
|
||||
Situation.POSITIVE: [
|
||||
"*pets your head*",
|
||||
"*gives you scritches*",
|
||||
"you're such a smart cookie~",
|
||||
"that's a good MOMMYS_LITTLE~",
|
||||
"MOMMYS_ROLE thinks MOMMYS_PRONOUNS little MOMMYS_LITTLE earned a big hug~",
|
||||
"good MOMMYS_LITTLE~\nMOMMYS_ROLE's so proud of you~",
|
||||
"aww, what a good MOMMYS_LITTLE~\nMOMMYS_ROLE knew you could do it~",
|
||||
"you did it~!",
|
||||
"MOMMYS_ROLE loves you~",
|
||||
"*gives you a sticker*"
|
||||
],
|
||||
Situation.NEGATIVE: [
|
||||
"MOMMYS_ROLE believes in you~",
|
||||
"don't forget to hydrate~",
|
||||
"aww, you'll get it next time~",
|
||||
"do you need MOMMYS_ROLE's help~?",
|
||||
"MOMMYS_ROLE still loves you no matter what~",
|
||||
"oh no did MOMMYS_ROLE's little MOMMYS_LITTLE make a big mess~?",
|
||||
"MOMMYS_ROLE knows MOMMYS_PRONOUNS little MOMMYS_LITTLE can do better~",
|
||||
"MOMMYS_ROLE still loves you~",
|
||||
"just a little further, sweetie~"
|
||||
]
|
||||
},
|
||||
"thirsty": {
|
||||
Situation.POSITIVE: [
|
||||
"*tugs your leash*\nthat's a VERY good MOMMYS_LITTLE~",
|
||||
"*runs MOMMYS_PRONOUNS fingers through your hair* good MOMMYS_LITTLE~ keep going~",
|
||||
"*smooches your forehead*\ngood job~",
|
||||
"*nibbles on your ear*\nthat's right~\nkeep going~",
|
||||
"*pats your butt*\nthat's a good MOMMYS_LITTLE~",
|
||||
"*drags MOMMYS_PRONOUNS nail along your cheek*\nsuch a good MOMMYS_LITTLE~",
|
||||
"*bites MOMMYS_PRONOUNS lip*\nmhmm~",
|
||||
"give MOMMYS_PRONOUNS a kiss~",
|
||||
"*heavy breathing against your neck*"
|
||||
],
|
||||
Situation.NEGATIVE: [
|
||||
"do you think you're going to get a reward from MOMMYS_ROLE like that~?",
|
||||
"*grabs your hair and pulls your head back*\nyou can do better than that for MOMMYS_ROLE can't you~?",
|
||||
"if you don't learn how to code better, MOMMYS_ROLE is going to put you in time-out~",
|
||||
"does MOMMYS_ROLE need to give MOMMYS_PRONOUNS little MOMMYS_LITTLE some special lessons~?",
|
||||
"you need to work harder to please MOMMYS_ROLE~",
|
||||
"gosh you must be flustered~",
|
||||
"are you just keysmashing now~?\ncute~",
|
||||
"is MOMMYS_ROLE's little MOMMYS_LITTLE having trouble reaching the keyboard~?"
|
||||
]
|
||||
},
|
||||
"yikes": {
|
||||
Situation.POSITIVE: [
|
||||
"keep it up and MOMMYS_ROLE might let you cum you little MOMMYS_FUCKING~",
|
||||
"good MOMMYS_FUCKING~\nyou've earned five minutes with the buzzy wand~",
|
||||
"mmm~ come taste MOMMYS_ROLE's MOMMYS_PARTS~",
|
||||
"*slides MOMMYS_PRONOUNS finger in your mouth*\nthat's a good little MOMMYS_FUCKING~",
|
||||
"you're so good with your fingers~\nMOMMYS_ROLE knows where MOMMYS_PRONOUNS MOMMYS_FUCKING should put them next~",
|
||||
"MOMMYS_ROLE is getting hot~",
|
||||
"that's a good MOMMYS_FUCKING~",
|
||||
"yes~\nyes~~\nyes~~~",
|
||||
"MOMMYS_ROLE's going to keep MOMMYS_PRONOUNS good little MOMMYS_FUCKING~"
|
||||
],
|
||||
Situation.NEGATIVE: [
|
||||
"you filthy MOMMYS_FUCKING~\nyou made a mess, now clean it up~\nwith your tongue~",
|
||||
"*picks you up by the throat*\npathetic~",
|
||||
"*drags MOMMYS_PRONOUNS claws down your back*\ndo it again~",
|
||||
"*brandishes MOMMYS_PRONOUNS paddle*\ndon't make me use this~",
|
||||
"MOMMYS_FUCKING.\nMOMMYS_FUCKING~\nMOMMYS_FUCKING~~",
|
||||
"get on your knees and beg MOMMYS_ROLE for forgiveness you MOMMYS_FUCKING~",
|
||||
"MOMMYS_ROLE doesn't think MOMMYS_PRONOUNS little MOMMYS_FUCKING should have permission to wear clothes anymore~",
|
||||
"never forget you belong to MOMMYS_ROLE~",
|
||||
"does MOMMYS_ROLE need to put you in the MOMMYS_FUCKING wiggler~?",
|
||||
"MOMMYS_ROLE is starting to wonder if you should just give up and become MOMMYS_PRONOUNS breeding stock~"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user