From 43e30929cab00c73f9bf84d0b761700e9f13544b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 30 Jul 2025 17:35:17 -0400 Subject: [PATCH] fix ui wiki search Signed-off-by: Vladimir Mandic --- javascript/changelog.js | 2 +- modules/ui_docs.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/javascript/changelog.js b/javascript/changelog.js index 65dd0ba89..09a84382a 100644 --- a/javascript/changelog.js +++ b/javascript/changelog.js @@ -82,7 +82,7 @@ async function initChangelog() { function wikiSearch(txt) { log('wikiSearch', txt); - const url = `https://github.com/search?q=repo%3Avladmandic%2Fautomatic+${encodeURIComponent(txt)}&type=wikis`; + const url = `https://github.com/search?q=repo%3Avladmandic%2Fsdnext+${encodeURIComponent(txt)}&type=wikis`; // window.open(url, '_blank').focus(); return txt; } diff --git a/modules/ui_docs.py b/modules/ui_docs.py index e38ddf466..7f371ab09 100644 --- a/modules/ui_docs.py +++ b/modules/ui_docs.py @@ -1,5 +1,5 @@ import gradio as gr -from modules import ui_symbols, ui_components +from modules import ui_symbols, ui_components, shared def create_ui_logs(): @@ -10,8 +10,7 @@ def create_ui_logs(): return content with gr.Column(): - get_changelog_btn = gr.Button(value='Get changelog', elem_id="get_changelog") - gr.HTML('  Open GitHub Changelog') + get_changelog_btn = gr.Button(value='Get Changelog', elem_id="get_changelog") with gr.Column(): _changelog_search = gr.Textbox(label="Search Changelog", elem_id="changelog_search") _changelog_result = gr.HTML(elem_id="changelog_result") @@ -29,8 +28,9 @@ def create_ui_wiki(): install('beautifulsoup4') from bs4 import BeautifulSoup - url = f'https://github.com/search?q=repo%3Avladmandic%2Fautomatic+{quote(search_term)}&type=wikis' + url = f'https://github.com/search?q=repo%3Avladmandic%2Fsdnext+{quote(search_term)}&type=wikis' res = requests.get(url, timeout=10) + shared.log.debug(f'Search: wiki="{search_term}" code={res.status_code}') if res.status_code == 200: html = res.content soup = BeautifulSoup(html, 'html.parser') @@ -55,8 +55,6 @@ def create_ui_wiki(): else: return f'Error: {res.status_code}' - with gr.Row(): - gr.HTML('  Open GitHub Wiki') with gr.Row(): wiki_search = gr.Textbox(label="Search Wiki Pages", elem_id="wiki_search") wiki_search_btn = ui_components.ToolButton(value=ui_symbols.search, elem_id="wiki_search_btn")