mdcci 2.0__tar.gz → 2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mdcci-2.0 → mdcci-2.2}/PKG-INFO +1 -1
- {mdcci-2.0 → mdcci-2.2}/pyproject.toml +1 -1
- mdcci-2.2/src/mdcci/scripts/keys.py +97 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/lpro.py +539 -9
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/lpro_s.py +389 -9
- mdcci-2.2/src/mdcci/scripts/scmpy.py +2158 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/PKG-INFO +1 -1
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/SOURCES.txt +2 -0
- {mdcci-2.0 → mdcci-2.2}/setup.cfg +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/__init__.py +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/__init__.py +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/bible.txt +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/main.py +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci/scripts/session.py +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/dependency_links.txt +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/entry_points.txt +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/requires.txt +0 -0
- {mdcci-2.0 → mdcci-2.2}/src/mdcci.egg-info/top_level.txt +0 -0
{mdcci-2.0 → mdcci-2.2}/PKG-INFO
RENAMED
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mdcci"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.2"
|
|
8
8
|
description = "Extended LPro - MProcs simplified - A Life program by tderk, originally LPro.py and Destiny [2024]"
|
|
9
9
|
requires-python = ">=3.8"
|
|
10
10
|
readme = "README.md"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
CONFIG_DIR = os.path.expanduser("~/.config/scmpy")
|
|
5
|
+
CONFIG_FILE = os.path.join(CONFIG_DIR, "keys.json")
|
|
6
|
+
|
|
7
|
+
def ensure_config_dir():
|
|
8
|
+
if not os.path.exists(CONFIG_DIR):
|
|
9
|
+
os.makedirs(CONFIG_DIR, exist_ok=True)
|
|
10
|
+
|
|
11
|
+
def load_keys():
|
|
12
|
+
ensure_config_dir()
|
|
13
|
+
if os.path.exists(CONFIG_FILE):
|
|
14
|
+
try:
|
|
15
|
+
with open(CONFIG_FILE, 'r') as f:
|
|
16
|
+
return json.load(f)
|
|
17
|
+
except:
|
|
18
|
+
return {}
|
|
19
|
+
return {}
|
|
20
|
+
|
|
21
|
+
def save_keys(keys):
|
|
22
|
+
ensure_config_dir()
|
|
23
|
+
with open(CONFIG_FILE, 'w') as f:
|
|
24
|
+
json.dump(keys, f, indent=2)
|
|
25
|
+
|
|
26
|
+
def get_key(key_name):
|
|
27
|
+
keys = load_keys()
|
|
28
|
+
return keys.get(key_name, "")
|
|
29
|
+
|
|
30
|
+
def set_key(key_name, value):
|
|
31
|
+
keys = load_keys()
|
|
32
|
+
keys[key_name] = value
|
|
33
|
+
save_keys(keys)
|
|
34
|
+
|
|
35
|
+
def get_all_keys():
|
|
36
|
+
return load_keys()
|
|
37
|
+
|
|
38
|
+
def configure_keys():
|
|
39
|
+
ensure_config_dir()
|
|
40
|
+
print("\n=== SCMPY API Key Configuration ===")
|
|
41
|
+
print(f"Keys will be saved to: {CONFIG_FILE}")
|
|
42
|
+
print()
|
|
43
|
+
|
|
44
|
+
keys = load_keys()
|
|
45
|
+
|
|
46
|
+
print("Enter your API keys (press Enter to skip):")
|
|
47
|
+
print()
|
|
48
|
+
|
|
49
|
+
print("1. Pollinations API Key (for AI text/images):")
|
|
50
|
+
keys['pollinations_api_key'] = input(" > ").strip() or keys.get('pollinations_api_key', '')
|
|
51
|
+
|
|
52
|
+
print()
|
|
53
|
+
print("2. Facebook App ID:")
|
|
54
|
+
keys['fb_app_id'] = input(" > ").strip() or keys.get('fb_app_id', '')
|
|
55
|
+
|
|
56
|
+
print()
|
|
57
|
+
print("3. Facebook App Secret:")
|
|
58
|
+
keys['fb_app_secret'] = input(" > ").strip() or keys.get('fb_app_secret', '')
|
|
59
|
+
|
|
60
|
+
print()
|
|
61
|
+
print("4. Facebook Page Access Token:")
|
|
62
|
+
keys['fb_page_access_token'] = input(" > ").strip() or keys.get('fb_page_access_token', '')
|
|
63
|
+
|
|
64
|
+
print()
|
|
65
|
+
print("5. Tumblr API Key:")
|
|
66
|
+
keys['tumblr_api_key'] = input(" > ").strip() or keys.get('tumblr_api_key', '')
|
|
67
|
+
|
|
68
|
+
print()
|
|
69
|
+
print("6. Tumblr API Secret:")
|
|
70
|
+
keys['tumblr_api_secret'] = input(" > ").strip() or keys.get('tumblr_api_secret', '')
|
|
71
|
+
|
|
72
|
+
print()
|
|
73
|
+
print("7. Tumblr Access Token:")
|
|
74
|
+
keys['tumblr_token'] = input(" > ").strip() or keys.get('tumblr_token', '')
|
|
75
|
+
|
|
76
|
+
print()
|
|
77
|
+
print("8. Tumblr Token Secret:")
|
|
78
|
+
keys['tumblr_token_secret'] = input(" > ").strip() or keys.get('tumblr_token_secret', '')
|
|
79
|
+
|
|
80
|
+
print()
|
|
81
|
+
print("9. Tumblr Blog Name:")
|
|
82
|
+
keys['tumblr_blog'] = input(" > ").strip() or keys.get('tumblr_blog', '')
|
|
83
|
+
|
|
84
|
+
save_keys(keys)
|
|
85
|
+
print()
|
|
86
|
+
print("Keys saved successfully!")
|
|
87
|
+
print()
|
|
88
|
+
|
|
89
|
+
def get_or_prompt_key(key_name, prompt, default=""):
|
|
90
|
+
keys = load_keys()
|
|
91
|
+
value = keys.get(key_name, default)
|
|
92
|
+
if not value:
|
|
93
|
+
print(prompt)
|
|
94
|
+
value = input("> ").strip()
|
|
95
|
+
keys[key_name] = value
|
|
96
|
+
save_keys(keys)
|
|
97
|
+
return value
|