Skip to content

Streamlit webui - #37

Open
Kickbut101 wants to merge 31 commits into
Alan-Cha:mainfrom
Kickbut101:streamlit-webui
Open

Streamlit webui#37
Kickbut101 wants to merge 31 commits into
Alan-Cha:mainfrom
Kickbut101:streamlit-webui

Conversation

@Kickbut101

Copy link
Copy Markdown

First pass at handling the create_pdf.py and offset_pdf.py files in a webUI (streamlit).

There are still some small bugs, things that need changing, and efficiencies to improve.

But the UI works for:

  • trying to generate plugin card images
  • generate PDFs based on input from the Click options exposed
  • generate Offset pdfs based on input from the click options exposed
  • Some support for adjusting layouts.json
  • some support for adjusting offsets.json
  • some support for viewing PDFs in the output folder

Again, this is WIP, it needs a few more passes to remove duplicated code, and brush up the UI. But it does mostly work for the above.

Obviously, grab latest requirements with pip install -r requirements -force

Then you can run the server via the Launch.bat or with streamlit run start_streamlit.py

Kickbut101 and others added 30 commits August 27, 2025 23:46
Starting work on streamlit

have working card size editing, and offset size editing through the gui.

updated requirements.txt

have multi-tabs setup for workflows
Trying to setup dynamic layouts/forms in streamlit based on the "click" module and data from the create_pdf.py and offset_pdf.py

Stuck on trying to identify specific class types
Working offset calibration

working options pages/dynamically

Stuck on sending commands to the functions. Currently tryign to fight with validating the data from the click parameters into the functions. generate_pdf function can't handle "crop". Need to refactor... somethign somewhere. this is a pain in the ass.
Try catch for empty offset data, need to add tha tto the settings loading too.

Small adjustment to readme
Tony attributed fix for the crop parameter. Checking if both Null and empty string.
Moved a bunch of the functions from the streamlit file to the utilities file.

Changed imports at the top because of this too

Fixed issue with offsets not loading in the settings/jsons loading tab (same try except as in "Offsets" tab)
Offload Tab generation to separate class files
Merging current work with PR
Added the code from the PR for the ashes plugin.

Removed the print output from the generate PDF workflow to console.
Use ashesDB as first image attempt, fallback to ashes.live
Working PDF file viewer, can delete and view pdfs in directory chosen.

Doesn't auto-refresh the files after a deletion though.
Fixed pathing for the offset default in the load_saved_offset

Removed cached function as it's now in each of the individual render functions, though arguably it should go to utilities

Adjusted defaults to 600ppi
Adjusted generate pdf expander to be open by default

Adjusted the plugins_ui.py to us "py" instead of "python" which removes the missing "click" error.

Removed empty "run_plugins.py" file
Remove the PR Ashes Plugin that isn't yet in main.
@Kickbut101
Kickbut101 marked this pull request as ready for review September 2, 2025 17:52
@caseycrocamo

Copy link
Copy Markdown

Hey! I opened the other GUI PoC PR. @Alan-Cha is currently indisposed due to real life stuff which is why he hasn't gotten back to you guys or me about our PoCs. I love to see other folks interested in making this awesome tool easier to use for normal non-developers and I would love to work with you guys on making this a reality. Want to chat sometime soon on discord, go over our two implementations and work on a path forward together?

@caseycrocamo

Copy link
Copy Markdown

#33 <- my PR for reference

@Kickbut101

Copy link
Copy Markdown
Author

Hey! I opened the other GUI PoC PR. @Alan-Cha is currently indisposed due to real life stuff which is why he hasn't gotten back to you guys or me about our PoCs. I love to see other folks interested in making this awesome tool easier to use for normal non-developers and I would love to work with you guys on making this a reality. Want to chat sometime soon on discord, go over our two implementations and work on a path forward together?

that's fine with me, has Alan mentioned anyone being able to handle or merge a PR into main on his behalf?

@caseycrocamo

Copy link
Copy Markdown

He hasn't. I just pulled your PR down and tested it out. It looks really good! Add me on discord (greywolfsif ) and let's chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants