Skip to content

bugHunter572/urls_manage_repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portfolio Manager

A small Tkinter-based desktop app to manage portfolio project links (URL, stack, account). This repository includes a simple SQLite-backed storage and a Tk UI to list, add, update, delete, and preview project entries.

Contents

  • main.py — app entrypoint. Sets up Tcl/Tk library paths (if needed) and starts the Tkinter UI.
  • ui.py — main UI code (tree view, search, add/update/delete, preview on double-click).
  • db.py — simple database helpers.
  • portfolio.db — SQLite database file (created/initialized by db.py).
  • requirements.txt — Python dependencies (optional: pywebview).

Requirements

  • Python 3.10+ recommended. The project was developed and tested on Windows.
  • (Optional) A virtual environment is recommended.

Install

Windows (PowerShell or bash):

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Run

python main.py

Features and UI notes

  • The left pane lists projects (ID, URL, created time, stack, account).
  • Above the list there is a Search box — type a skill or account name and press Search to filter. Clear resets the list.
  • Add / Update / Delete buttons operate on the selected row. Add/Update open a small dialog where you can enter URL, stack (comma-separated), and account.
  • Preview: double-click a row to open the project's URL in your default web browser. Embedding a web preview via pywebview was attempted but caused lifecycle conflicts with Tk; for reliability the app opens the system browser instead.

Troubleshooting

Tcl/Tk "init.tcl" errors on Windows

If you see an error like:

_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Users/..../lib/tcl8.6 ...

This probably means that Tcl wasn't installed properly.

main.py includes logic to try to locate init.tcl and set the TCL_LIBRARY and TK_LIBRARY environment variables at runtime. If you still see errors:

  • Reinstall Python using the official installer and make sure the Tk/Tcl option is selected.
  • Or set TCL_LIBRARY and TK_LIBRARY in your system environment variables to point to the directory that contains init.tcl (for example: C:\Users\...\Python313\tcl\tcl8.6).

Preview/embed notes (pywebview)

  • The project includes pywebview in requirements.txt as optional. Embedding pywebview into the Tk main loop can be tricky — the repository currently uses the system browser for previews to avoid threading and lifecycle conflicts.
  • If you need an embedded preview, a safer approach is to create the pywebview window before starting Tk's mainloop and call webview.start() correctly, or run pywebview in a dedicated thread; both require careful lifecycle management. I can help rework the app to embed pywebview if desired.

Extending search

  • The search currently filters by stack and account fields (case-insensitive). If you'd like to include URL or created time in the search, I can expand the filter.

Development notes

  • db.py exports helper functions (init_db, get_urls, add_url, update_url, delete_url). The UI expects get_urls() to return a list of rows shaped like (id, url, created_time, stack, account).

Next steps I can take

  • Convert Add/Update to a single combined modal with validation (currently a MultiInputDialog exists in ui.py — I can refine it further).
  • Re-enable embedded pywebview preview (create window and call webview.start() correctly, or run it in a separate thread).
  • Add unit tests for db.py and a smoke integration test for the UI.

If you want any of those, tell me which and I'll implement it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages