Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323b0944aa |
@@ -1,15 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: veets
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -1,5 +1,3 @@
|
||||

|
||||
|
||||
# ComfyUI Prompt Manager
|
||||
|
||||
**Every prompt you run, every image it made, and every negative you tried, in one searchable library inside ComfyUI.**
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB |
+1
-1
@@ -18,7 +18,7 @@ Repository = "https://github.com/ComfyAssets/ComfyUI_PromptManager"
|
||||
[tool.comfy]
|
||||
PublisherId = "kiko9"
|
||||
DisplayName = "ComfyUI_PromptManager"
|
||||
Icon = "https://raw.githubusercontent.com/ComfyAssets/ComfyUI_PromptManager/main/assets/brand/icon-256.png"
|
||||
Icon = "https://avatars.githubusercontent.com/u/213204677?s=200"
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
"""The logo and icons are wired in where a user sees them (#632).
|
||||
|
||||
Every page Prompt Manager serves names the favicon, the files it names exist
|
||||
at the sizes they claim, the README and the Registry metadata point at files
|
||||
that are in the repository, and the Registry package keeps what the pages
|
||||
load at run time.
|
||||
"""
|
||||
|
||||
import re
|
||||
import tomllib
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from PIL import Image
|
||||
|
||||
try:
|
||||
from tests.test_package_contents import _ignored
|
||||
except ImportError: # discovered with tests/ as the top-level directory
|
||||
from test_package_contents import _ignored
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
PAGES = ("workspace.html", "admin.html", "gallery.html", "metadata.html", "index.html")
|
||||
ICON_LINK = re.compile(
|
||||
r'<link rel="(icon|apple-touch-icon)"(?: type="image/png")?'
|
||||
r' sizes="(\d+)x(\d+)" href="(lib/brand/[a-z0-9-]+\.png)">'
|
||||
)
|
||||
RAW_PREFIX = "https://raw.githubusercontent.com/ComfyAssets/ComfyUI_PromptManager/main/"
|
||||
|
||||
|
||||
def _size(path: Path) -> tuple[int, int]:
|
||||
with Image.open(path) as image:
|
||||
return image.size
|
||||
|
||||
|
||||
class TestBrandAssets(unittest.TestCase):
|
||||
def test_every_page_links_icons_that_exist_at_the_stated_size(self):
|
||||
for page in PAGES:
|
||||
with self.subTest(page=page):
|
||||
html = (ROOT / "web" / page).read_text(encoding="utf-8")
|
||||
links = ICON_LINK.findall(html)
|
||||
self.assertEqual(
|
||||
[kind for kind, *_ in links], ["icon", "apple-touch-icon"]
|
||||
)
|
||||
for _kind, width, height, href in links:
|
||||
# Pages sit beside lib/ under /prompt_manager/, like their CSS.
|
||||
file = ROOT / "web" / href
|
||||
self.assertEqual(_size(file), (int(width), int(height)), href)
|
||||
|
||||
def test_page_icons_ship_in_the_registry_package(self):
|
||||
for file in sorted((ROOT / "web" / "lib" / "brand").iterdir()):
|
||||
relative = file.relative_to(ROOT).as_posix()
|
||||
self.assertFalse(_ignored(relative), relative)
|
||||
self.assertLess(file.stat().st_size, 16 * 1024, relative)
|
||||
|
||||
def test_readme_opens_with_the_banner(self):
|
||||
readme = (ROOT / "README.md").read_text(encoding="utf-8")
|
||||
first = next(line for line in readme.splitlines() if line.strip())
|
||||
match = re.fullmatch(r"!\[[^\]]+\]\((assets/brand/[a-z0-9-]+\.webp)\)", first)
|
||||
self.assertIsNotNone(match, first)
|
||||
self.assertEqual(_size(ROOT / match.group(1)), (1280, 640))
|
||||
|
||||
def test_registry_icon_is_the_app_icon_in_this_repository(self):
|
||||
with open(ROOT / "pyproject.toml", "rb") as handle:
|
||||
icon = tomllib.load(handle)["tool"]["comfy"]["Icon"]
|
||||
self.assertTrue(icon.startswith(RAW_PREFIX), icon)
|
||||
self.assertEqual(_size(ROOT / icon[len(RAW_PREFIX) :]), (256, 256))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="lib/brand/icon-32.png">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="lib/brand/icon-128.png">
|
||||
<title>PromptManager - Admin Dashboard</title>
|
||||
<script src="js/theme-bridge.js"></script>
|
||||
<script src="js/html-escape.js"></script>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="lib/brand/icon-32.png">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="lib/brand/icon-128.png">
|
||||
<title>PromptManager - Gallery</title>
|
||||
<script src="js/theme-bridge.js"></script>
|
||||
<script src="js/html-escape.js"></script>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="lib/brand/icon-32.png">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="lib/brand/icon-128.png">
|
||||
<title>PromptManager - Opening the workspace</title>
|
||||
<style>
|
||||
body {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="lib/brand/icon-32.png">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="lib/brand/icon-128.png">
|
||||
<title>Image Gallery - Generation Data</title>
|
||||
<script src="js/theme-bridge.js"></script>
|
||||
<script src="js/html-escape.js"></script>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="lib/brand/icon-32.png">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="lib/brand/icon-128.png">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>Prompt Manager · Workspace</title>
|
||||
<link rel="stylesheet" href="js/shared/toolkit/controls.css">
|
||||
|
||||
Reference in New Issue
Block a user