This commit is contained in:
2026-09-11 13:28:50 +03:00
parent b3869f7320
commit dfbc646c51
6 changed files with 141 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ __pycache__/
.claude/ .claude/
.idea/ .idea/
.vscode/ .vscode/
.vs/
*.sln
*.user
Output/ Output/
output/ output/
data/ data/
@@ -22,4 +25,4 @@ README.md
COOLIFY.md COOLIFY.md
# Нужни за образа (НЕ игнорирай): # Нужни за образа (НЕ игнорирай):
# Dockerfile, requirements-webapp.txt, webapp/, help_processor.py, Bairaci.png # Dockerfile, requirements-webapp.txt, webapp/, help_processor.py, help_codes.py, Bairaci.png

7
.gitignore vendored
View File

@@ -32,3 +32,10 @@ api/
.idea/ .idea/
.claude/ .claude/
*.swp *.swp
# Visual Studio (solution is committed; local cache is not)
.vs/
*.suo
*.user
*.userosscache
*.sln.docstates

7
.vsconfig Normal file
View File

@@ -0,0 +1,7 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.Git"
]
}

View File

@@ -173,6 +173,38 @@ python -m uvicorn webapp.main:app --reload
Live: [https://rip.inex-project.net/?prefix=RIP](https://rip.inex-project.net/?prefix=RIP) · health: [/healthz](https://rip.inex-project.net/healthz) Live: [https://rip.inex-project.net/?prefix=RIP](https://rip.inex-project.net/?prefix=RIP) · health: [/healthz](https://rip.inex-project.net/healthz)
## Visual Studio и Git
Това е Python/Docker репо, не .NET. Въпреки това се отваря във Visual Studio (2022/2026) за текстовия редактор и за **Commit + Push** — същият ритъм като при C++/.NET.
`.sln` стои **до** `.git` (корен на репото). Така Git Changes вижда `origin` → `https://git.inex-project.net/sabo/rip-help-system.git`, клон `master`.
### Отваряне
- Двоен клик на `RIP_Help_system.sln`, или
- `open-in-vs.bat` в тази папка, или
- File → Open → Project/Solution → `C:\~ip\cursor_projects\RIP_Help_system\RIP_Help_system.sln`
Алтернатива без `.sln`: File → Open → Folder → същата папка (пак трябва да има `.git`).
Други проекти под `c:\~ip\cursor_projects\`: `C:\~ip\cursor_projects\open-in-vs.bat <име-на-папка>`. Ако няма `.sln`, VS отваря папката (Open Folder) и пак вижда Git.
### Еднократно във VS
1. **Tools → Options → Source Control → Plug-in Selection → Git** (не VisualSVN).
2. Не натискай **Create Git Repository** — репото вече съществува.
3. При Push VS ще поиска вход за **git.inex-project.net** (Gitea), не GitHub.
### Commit + Push (Git Changes)
1. View → Git Changes (или Git → Commit or Stash).
2. Отметни файловете (не `.env`).
3. Съобщение → **Commit All**.
4. **Push** към `origin/master`.
5. Redeploy в Coolify остава ръчно.
Нови файлове, които още не са в `.sln`, пак се виждат в Git Changes. При нужда ги добави като Solution Items или ползвай Open Folder.
### Качване на картинки на сървъра ### Качване на картинки на сървъра
Локалният `help_processor.py` пише в `q:\RIP_Help_Source\Output\` (включително `images/` подпапка). За deploy: Локалният `help_processor.py` пише в `q:\RIP_Help_Source\Output\` (включително `images/` подпапка). За deploy:

54
RIP_Help_system.sln Normal file
View File

@@ -0,0 +1,54 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{573EEDE7-A559-4938-AF55-B74691141A6B}"
ProjectSection(SolutionItems) = preProject
generate_html.py = generate_html.py
help_codes.py = help_codes.py
help_processor.py = help_processor.py
requirements-webapp.txt = requirements-webapp.txt
requirements.txt = requirements.txt
save_keywords.py = save_keywords.py
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webapp", "webapp", "{C957CE1F-616C-438D-88CC-E89D8B899EA8}"
ProjectSection(SolutionItems) = preProject
webapp\main.py = webapp\main.py
webapp\rescan.py = webapp\rescan.py
webapp\templates\viewer.html = webapp\templates\viewer.html
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{E11900E9-E576-4F65-AEA0-AC953E42AF67}"
ProjectSection(SolutionItems) = preProject
_load_env.bat = _load_env.bat
INEX_TM_load.bat = INEX_TM_load.bat
INEX_TM_load_force.bat = INEX_TM_load_force.bat
INEX_TM_view.bat = INEX_TM_view.bat
open-in-vs.bat = open-in-vs.bat
RIP_load.bat = RIP_load.bat
RIP_load_force.bat = RIP_load_force.bat
RIP_view.bat = RIP_view.bat
view.bat = view.bat
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deploy", "deploy", "{BC30BAF3-7EC6-4B2A-9ABB-BFF62B84F777}"
ProjectSection(SolutionItems) = preProject
.dockerignore = .dockerignore
.env.example = .env.example
.gitignore = .gitignore
.vsconfig = .vsconfig
COOLIFY.md = COOLIFY.md
docker-compose.yml = docker-compose.yml
Dockerfile = Dockerfile
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {60B3A28B-0823-47AB-B907-6368EF9D155D}
EndGlobalSection
EndGlobal

37
open-in-vs.bat Normal file
View File

@@ -0,0 +1,37 @@
@echo off
setlocal EnableExtensions
rem Opens this Git repo in Visual Studio (solution at repo root = Git Changes works).
rem Pattern for non-.NET cursor_projects: blank .sln next to .git + this launcher.
set "ROOT=%~dp0"
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
set "SLN=%ROOT%\RIP_Help_system.sln"
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not exist "%VSWHERE%" (
echo vswhere.exe not found. Install Visual Studio 2022 or 2026.
exit /b 1
)
set "DEVENV="
rem Do not pass -products *: that includes SSMS, which vswhere then picks as "latest".
for /f "usebackq delims=" %%I in (`"%VSWHERE%" -latest -prerelease -property productPath`) do set "DEVENV=%%I"
if not defined DEVENV (
echo Visual Studio not found.
exit /b 1
)
if exist "%SLN%" (
start "" "%DEVENV%" "%SLN%"
) else (
start "" "%DEVENV%" "%ROOT%"
)
echo Opened in Visual Studio:
echo %SLN%
echo.
echo Source Control plug-in must be Git, not VisualSVN:
echo Tools ^> Options ^> Source Control ^> Plug-in Selection ^> Git
echo Then: View ^> Git Changes -^> Commit -^> Push
echo Do not click Create Git Repository — this folder already has .git
exit /b 0