phaino 0.1.0__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.
Files changed (39) hide show
  1. phaino-0.1.0/.gitignore +10 -0
  2. phaino-0.1.0/.python-version +1 -0
  3. phaino-0.1.0/CHANGELOG +5 -0
  4. phaino-0.1.0/LICENSE +19 -0
  5. phaino-0.1.0/PKG-INFO +44 -0
  6. phaino-0.1.0/README.md +44 -0
  7. phaino-0.1.0/SECURITY.md +37 -0
  8. phaino-0.1.0/bandit.yaml +16 -0
  9. phaino-0.1.0/install.py +230 -0
  10. phaino-0.1.0/pyproject.toml +22 -0
  11. phaino-0.1.0/src/phaino/__init__.py +0 -0
  12. phaino-0.1.0/src/phaino/app.py +1061 -0
  13. phaino-0.1.0/src/phaino/components/editor.py +288 -0
  14. phaino-0.1.0/src/phaino/components/find_replace.py +108 -0
  15. phaino-0.1.0/src/phaino/components/git_file_model.py +27 -0
  16. phaino-0.1.0/src/phaino/components/git_panel.py +296 -0
  17. phaino-0.1.0/src/phaino/components/highlighter_factory.py +35 -0
  18. phaino-0.1.0/src/phaino/components/highlighters/html_highlighter.py +47 -0
  19. phaino-0.1.0/src/phaino/components/highlighters/json_highlighter.py +54 -0
  20. phaino-0.1.0/src/phaino/components/highlighters/markdown_highlighter.py +60 -0
  21. phaino-0.1.0/src/phaino/components/highlighters/python_highlighter.py +149 -0
  22. phaino-0.1.0/src/phaino/components/highlighters/toml_highlighter.py +60 -0
  23. phaino-0.1.0/src/phaino/components/highlighters/yaml_highlighter.py +53 -0
  24. phaino-0.1.0/src/phaino/components/qss_file_handler.py +13 -0
  25. phaino-0.1.0/src/phaino/components/search_panel.py +103 -0
  26. phaino-0.1.0/src/phaino/components/shortcuts_window.py +166 -0
  27. phaino-0.1.0/src/phaino/components/tab_manager.py +226 -0
  28. phaino-0.1.0/src/phaino/components/terminal.py +134 -0
  29. phaino-0.1.0/src/phaino/components/yaml_file_handler.py +19 -0
  30. phaino-0.1.0/src/phaino/resources/PYPI_README.md +31 -0
  31. phaino-0.1.0/src/phaino/resources/images/phaino_bg_128.png +0 -0
  32. phaino-0.1.0/src/phaino/resources/images/phaino_bg_16.png +0 -0
  33. phaino-0.1.0/src/phaino/resources/images/phaino_bg_256.png +0 -0
  34. phaino-0.1.0/src/phaino/resources/images/phaino_bg_32.png +0 -0
  35. phaino-0.1.0/src/phaino/resources/images/phaino_bg_512.png +0 -0
  36. phaino-0.1.0/src/phaino/resources/images/phaino_bg_64.png +0 -0
  37. phaino-0.1.0/src/phaino/resources/styles/styles.qss +447 -0
  38. phaino-0.1.0/src/phaino/resources/styles/themes.yaml +174 -0
  39. phaino-0.1.0/uv.lock +247 -0
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1 @@
1
+ 3.15
phaino-0.1.0/CHANGELOG ADDED
@@ -0,0 +1,5 @@
1
+ # Psswd Box Release Notes
2
+
3
+ ## 0.1.0 (03 Nov 2026)
4
+
5
+ - Initial release
phaino-0.1.0/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2026, Melvin Quick
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
phaino-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.5
2
+ Name: phaino
3
+ Version: 0.1.0
4
+ Summary: Focused IDE for the minimalist developer.
5
+ Project-URL: repository, https://github.com/melvinquick/phaino
6
+ Project-URL: issues, https://github.com/melvinquick/phaino/issues
7
+ Author-email: Melvin Quick <melvinquick@proton.me>
8
+ License-File: LICENSE
9
+ Requires-Python: >=3.11
10
+ Requires-Dist: pyside6>=6.12.0
11
+ Requires-Dist: pyyaml>=6.0.3
12
+ Description-Content-Type: text/markdown
13
+
14
+ <div align="center">
15
+ <a href="#donations">Donations</a> |
16
+ <a href="#about">About</a> |
17
+ <a href="#purpose">Purpose</a> |
18
+ <a href="#installation">Installation</a> |
19
+ <a href="#useful-information">Useful Information</a>
20
+ </div>
21
+
22
+ ## Donations
23
+
24
+ [Ko-fi](https://ko-fi.com/melvinquick)
25
+ [GitHub Sponsors](https://github.com/sponsors/melvinquick)
26
+
27
+ ## About
28
+
29
+ You may be wondering to yourself where the name **Phaino** comes from. Phaino is short for **Phainopepla**, which is a small black bird with a striking appearance. It doesn't super closely relate to the application itself other than the intent behind the app to be as small as possible given what I want it to do.
30
+
31
+ If you feel so inclined, you can see an image of a Phainopepla [here](https://imgs.search.brave.com/wy3oqtvBNOqr0gadQfW9CXg8IjPl5uISrAy1dgqx6uQ/rs:fit:860:0:0:0/g:ce/aHR0cHM6Ly9jZG4u/cHJvZC53ZWJzaXRl/LWZpbGVzLmNvbS81/ZjFiODI4Y2JmMmNm/MzNkMjIzNzUxMGEv/NjM4ZDc4NWIxMGE2/Y2VkOWI5NmYxMTMz/X1BoYWlub3BlcGxh/XyhmZW1hbGUpXygz/MzY1Nzc3NDIzMCkl/MjAoTGFyZ2UpLmpw/Zw)
32
+
33
+ ## Purpose
34
+
35
+ Every time I've tried to find a "lightweight IDE" for myself (kind of thinking file editor with some extra features), I was never able to find one that worked for me. Phaino was born out of a desire to finally have that editor for myself.
36
+
37
+ ## Installation
38
+
39
+ Install: `curl -s https://raw.githubusercontent.com/melvinquick/phaino/main/install.py | python3 -`
40
+
41
+ ## Useful Information
42
+
43
+ [Project](https://github.com/users/melvinquick/projects/19)
44
+ [Latest Release](https://pypi.org/project/phaino/)
phaino-0.1.0/README.md ADDED
@@ -0,0 +1,44 @@
1
+ <p align="center"> <img src="src/phaino/resources/images/phaino_bg_256.png" /> </p>
2
+
3
+ <div align="center">
4
+ <a href="#donations">Donations</a> |
5
+ <a href="#about">About</a> |
6
+ <a href="#purpose">Purpose</a> |
7
+ <a href="#installation">Installation</a> |
8
+ <a href="#useful-information">Useful Information</a>
9
+ </div>
10
+
11
+ ## Donations
12
+
13
+ [Ko-fi](https://ko-fi.com/melvinquick)
14
+ [GitHub Sponsors](https://github.com/sponsors/melvinquick)
15
+
16
+ ## About
17
+
18
+ You may be wondering to yourself where the name **Phaino** comes from. Phaino is short for **Phainopepla**, which is a small black bird with a striking appearance. It doesn't super closely relate to the application itself other than the intent behind the app to be as small as possible given what I want it to do.
19
+
20
+ If you feel so inclined, you can see an image of a Phainopepla [here](https://imgs.search.brave.com/wy3oqtvBNOqr0gadQfW9CXg8IjPl5uISrAy1dgqx6uQ/rs:fit:860:0:0:0/g:ce/aHR0cHM6Ly9jZG4u/cHJvZC53ZWJzaXRl/LWZpbGVzLmNvbS81/ZjFiODI4Y2JmMmNm/MzNkMjIzNzUxMGEv/NjM4ZDc4NWIxMGE2/Y2VkOWI5NmYxMTMz/X1BoYWlub3BlcGxh/XyhmZW1hbGUpXygz/MzY1Nzc3NDIzMCkl/MjAoTGFyZ2UpLmpw/Zw)!
21
+
22
+ ## Purpose
23
+
24
+ Every time I've tried to find a "lightweight IDE" for myself (kind of thinking file editor with some extra features), I was never able to find one that worked for me. Phaino was born out of a desire to finally have that editor for myself.
25
+
26
+ ## Installation
27
+
28
+ Install: `curl -s https://raw.githubusercontent.com/melvinquick/phaino/main/install.py | python3 -`
29
+
30
+ ## Useful Information
31
+
32
+ [Project](https://github.com/users/melvinquick/projects/19)
33
+ [Latest Release](https://pypi.org/project/phaino/)
34
+
35
+ ### Running Scripts
36
+
37
+ Phaino runs files directly by executing them. For this to work, your script must have a **shebang line** at the top of the file and must be **executable** on your system.
38
+
39
+ For example, in a Python file:
40
+
41
+ ```python
42
+ #!/usr/bin/env python3
43
+ print("Hello, Phaino!")
44
+ ```
@@ -0,0 +1,37 @@
1
+ # Security Policy
2
+
3
+ ## NOTICE
4
+
5
+ > **THIS IS A BLANKET SECURITY POLICY ACROSS ALL MY REPOSITORIES**
6
+
7
+ All software provided in my repositories is distributed **"as-is"** without any warranty. You use this software at your own risk. I am **not liable** for any damages, data loss, or other issues that may arise from using this software, including those caused by unpatched vulnerabilities.
8
+
9
+ That said, I take security seriously and appreciate responsible disclosure of vulnerabilities. Please see the sections below for supported versions and how to report security issues.
10
+
11
+ ## Supported Versions
12
+
13
+ As a hobbyist developer, I do not have dedicated resources for continuous vulnerability monitoring. However, I commit to the following:
14
+
15
+ - **Latest Release**: When a vulnerability is reported or discovered, I will prioritize releasing an updated version with patched dependencies as soon as reasonably possible.
16
+ - **Older Releases**: Previous releases are **not** actively maintained or backported with security fixes. Users are strongly encouraged to always use the latest stable release.
17
+
18
+ ## Reporting a Vulnerability
19
+
20
+ If you discover a security vulnerability, please report it responsibly:
21
+
22
+ 1. **Do NOT open a public issue** – This could expose the vulnerability to malicious actors before it's fixed.
23
+ 2. **Use GitHub Security Advisories**: Navigate to the specific repository and click on the "Security" tab, then select "Report a vulnerability." This ensures private communication.
24
+ 3. **Provide Details**: Include as much information as possible:
25
+ - Description of the vulnerability
26
+ - Steps to reproduce
27
+ - Potential impact
28
+ - Suggested fix (if applicable)
29
+
30
+ I will acknowledge receipt of your report **when able** and provide updates as the issue is investigated and resolved. Once a fix is released, I will credit you in the release notes (unless you prefer to remain anonymous).
31
+
32
+ ## Security Best Practices for Users
33
+
34
+ - Always use the **latest stable release** of any software from my repositories.
35
+ - Verify checksums/signatures when available.
36
+ - Keep your system and dependencies up to date.
37
+ - Review the source code if you have concerns about security.
@@ -0,0 +1,16 @@
1
+ exclude_dirs:
2
+ [
3
+ ".venv/",
4
+ "dist/",
5
+ "src/phaino/__pycache__",
6
+ "src/phaino/resources/",
7
+ ".gitignore",
8
+ ".python-version",
9
+ "bandit.yaml",
10
+ "LICENSE",
11
+ "pyproject.toml",
12
+ "README.md",
13
+ "uv.lock",
14
+ ]
15
+ tests: []
16
+ skips: []
@@ -0,0 +1,230 @@
1
+ import os
2
+ import shutil
3
+ import subprocess
4
+ import sys
5
+ from textwrap import dedent
6
+
7
+
8
+ def print_green(skk):
9
+ print(f"\033[92m {skk}\033[00m")
10
+
11
+
12
+ def print_red(skk):
13
+ print(f"\033[91m {skk}\033[00m")
14
+
15
+
16
+ def get_venv_path():
17
+ home_dir = os.path.expanduser("~")
18
+ venv_dir = os.path.join(home_dir, ".venvs")
19
+ if not os.path.exists(venv_dir):
20
+ os.makedirs(venv_dir)
21
+ return os.path.join(venv_dir, "phaino_venv")
22
+
23
+
24
+ def get_desktop_file_path():
25
+ return os.path.expanduser("~/.local/share/applications/phaino.desktop")
26
+
27
+
28
+ def create_venv(venv_path):
29
+ print("Creating the virtual environment...", end=" ")
30
+ sys.stdout.flush()
31
+ subprocess.run(
32
+ [sys.executable, "-m", "venv", venv_path],
33
+ check=True,
34
+ stdout=subprocess.DEVNULL,
35
+ stderr=subprocess.DEVNULL,
36
+ )
37
+ print_green("[OK]")
38
+
39
+ print("Ensuring pip is up to date...", end=" ")
40
+ sys.stdout.flush()
41
+ pip_path = os.path.join(venv_path, "bin", "pip")
42
+ subprocess.run(
43
+ [pip_path, "install", "--upgrade", "pip"],
44
+ check=True,
45
+ stdout=subprocess.DEVNULL,
46
+ stderr=subprocess.DEVNULL,
47
+ )
48
+ print_green("[OK]")
49
+
50
+
51
+ def install_app(venv_path):
52
+ print("Installing Phaino into the virtual environment...", end=" ")
53
+ sys.stdout.flush()
54
+ pip_path = os.path.join(venv_path, "bin", "pip")
55
+ subprocess.run(
56
+ [pip_path, "install", "phaino"],
57
+ check=True,
58
+ stdout=subprocess.DEVNULL,
59
+ stderr=subprocess.DEVNULL,
60
+ )
61
+ print_green("[OK]")
62
+
63
+
64
+ def get_installed_version(venv_path):
65
+ """Read version from installed package metadata inside the venv."""
66
+ python_path = os.path.join(venv_path, "bin", "python3")
67
+ result = subprocess.run(
68
+ [
69
+ python_path,
70
+ "-c",
71
+ "from importlib.metadata import version; print(version('phaino'))",
72
+ ],
73
+ capture_output=True,
74
+ text=True,
75
+ check=True,
76
+ )
77
+ return result.stdout.strip()
78
+
79
+
80
+ def get_icon(venv_path):
81
+ site_packages = os.path.join(venv_path, "lib")
82
+ for folder in os.listdir(site_packages):
83
+ if folder.startswith("python"):
84
+ site_packages = os.path.join(site_packages, folder, "site-packages")
85
+ break
86
+ icon_relative_path = "phaino/resources/images/phaino_bg_128.png"
87
+ full_icon_path = os.path.join(site_packages, icon_relative_path)
88
+ return full_icon_path
89
+
90
+
91
+ def get_python_path(venv_path):
92
+ return os.path.join(venv_path, "bin", "python3")
93
+
94
+
95
+ def get_app_path(venv_path):
96
+ return os.path.join(venv_path, "bin", "phaino")
97
+
98
+
99
+ def create_desktop_file(icon, version, python, app):
100
+ print("Creating the .desktop entry...", end=" ")
101
+ sys.stdout.flush()
102
+
103
+ desktop_content = dedent(f"""\
104
+ [Desktop Entry]
105
+ Version={version}
106
+ Type=Application
107
+ Name=Phaino
108
+ Comment=Password generator that never leaves your machine.
109
+ Exec={python} {app}
110
+ Icon={icon}
111
+ Terminal=false
112
+ Categories=Utility;
113
+ """)
114
+
115
+ desktop_path = get_desktop_file_path()
116
+ os.makedirs(os.path.dirname(desktop_path), exist_ok=True)
117
+
118
+ with open(desktop_path, "w") as f:
119
+ f.write(desktop_content)
120
+ print_green("[OK]")
121
+
122
+
123
+ def do_uninstall():
124
+ """Removes venv and desktop file. Returns True if anything was removed."""
125
+ venv_path = get_venv_path()
126
+ desktop_file_path = get_desktop_file_path()
127
+ removed = False
128
+
129
+ if os.path.exists(venv_path):
130
+ print("Removing the virtual environment...", end=" ")
131
+ sys.stdout.flush()
132
+ shutil.rmtree(venv_path)
133
+ print_green("[OK]")
134
+ removed = True
135
+
136
+ if os.path.exists(desktop_file_path):
137
+ print("Removing the .desktop entry...", end=" ")
138
+ sys.stdout.flush()
139
+ os.remove(desktop_file_path)
140
+ print_green("[OK]")
141
+ removed = True
142
+
143
+ return removed
144
+
145
+
146
+ def do_install():
147
+ """Fresh install: creates venv, installs app, creates desktop entry."""
148
+ venv_path = get_venv_path()
149
+ create_venv(venv_path)
150
+ install_app(venv_path)
151
+
152
+ # Dynamically read version from installed package metadata
153
+ version = get_installed_version(venv_path)
154
+
155
+ icon = get_icon(venv_path)
156
+ python = get_python_path(venv_path)
157
+ app = get_app_path(venv_path)
158
+ create_desktop_file(icon, version, python, app)
159
+
160
+ print()
161
+ print_green(f"Phaino v{version} has been successfully installed.")
162
+
163
+
164
+ def handle_update():
165
+ """Update = full uninstall followed by fresh install."""
166
+ print("\nUpdating Phaino...\n")
167
+ existed = do_uninstall()
168
+ if not existed:
169
+ print("No existing installation found. Performing fresh install.\n")
170
+ else:
171
+ print()
172
+ do_install()
173
+
174
+
175
+ def show_menu():
176
+ try:
177
+ with open("/dev/tty", "r") as tty:
178
+ while True:
179
+ print("\n=== Phaino Installer ===")
180
+ print("1) Install")
181
+ print("2) Update")
182
+ print("3) Uninstall")
183
+ print("0) Exit")
184
+
185
+ sys.stdout.write("\nSelect an option [0-3]: ")
186
+ sys.stdout.flush()
187
+ choice = tty.readline().strip()
188
+
189
+ if choice == "1":
190
+ venv_path = get_venv_path()
191
+ if os.path.exists(venv_path):
192
+ print_red(
193
+ "\nExisting installation detected. Please use 'Update' instead."
194
+ )
195
+ continue
196
+ print()
197
+ do_install()
198
+ break
199
+
200
+ elif choice == "2":
201
+ handle_update()
202
+ break
203
+
204
+ elif choice == "3":
205
+ print()
206
+ if do_uninstall():
207
+ print()
208
+ print_green("Phaino has been uninstalled.")
209
+ else:
210
+ print("\nPhaino does not appear to be installed.")
211
+ break
212
+
213
+ elif choice == "0":
214
+ print("\nGoodbye.")
215
+ break
216
+
217
+ else:
218
+ print_red("\nInvalid selection. Please try again.")
219
+ except OSError:
220
+ print_red("Error: No interactive terminal available.")
221
+ print_red("Please run this script from a terminal session.")
222
+ sys.exit(1)
223
+
224
+
225
+ def main():
226
+ show_menu()
227
+
228
+
229
+ if __name__ == "__main__":
230
+ main()
@@ -0,0 +1,22 @@
1
+ [project]
2
+ name = "phaino"
3
+ version = "0.1.0"
4
+ description = "Focused IDE for the minimalist developer."
5
+ readme = "src/phaino/resources/PYPI_README.md"
6
+ authors = [{ name = "Melvin Quick", email = "melvinquick@proton.me" }]
7
+ requires-python = ">=3.11"
8
+ dependencies = ["pyside6>=6.12.0", "pyyaml>=6.0.3"]
9
+
10
+ [project.urls]
11
+ repository = "https://github.com/melvinquick/phaino"
12
+ issues = "https://github.com/melvinquick/phaino/issues"
13
+
14
+ [project.gui-scripts]
15
+ phaino = "phaino.app:main"
16
+
17
+ [build-system]
18
+ requires = ["hatchling"]
19
+ build-backend = "hatchling.build"
20
+
21
+ [dependency-groups]
22
+ dev = ["bandit>=1.9.4"]
File without changes