Cli2Gui icon indicating copy to clipboard operation
Cli2Gui copied to clipboard

Feature: file selector for deerpygui

Open mokurin000 opened this issue 1 year ago • 3 comments

Before You Begin

Before proceeding, please make sure to follow these steps:

  • [x] I have checked for similar questions in the project's issue tracker to avoid duplicates.
  • [x] I have searched existing issues to see if this question has been asked before.

Your Question

def main():
    parser = argparse.ArgumentParser(description="Web scraper with aria2c output")
    parser.add_argument("urls_file", type=Path, help="Input file containing URLs")
    parser.add_argument(
        "aria2c_file", type=Path, help="Output file for aria2c download links"
    )
    parser.add_argument(
        "--timeout", type=int, default=5000, help="Timeout per page (ms)"
    )
    parser.add_argument(
        "--max_workers", type=int, default=2, help="Maximum number of workers"
    )
    args = parser.parse_args()
    blocking_run(args)

I hope we could select input file and set output file path with native dialog, instead of typing path manually AFAIK tkinter filedialog will be the native implementation

mokurin000 avatar Sep 27 '24 00:09 mokurin000

After looking into source code, I found type=argparse.FileType('w') for a TextIOWrapper, but all I need is a file path.. so I could open it via async_open later I will try to add hint for Path

mokurin000 avatar Oct 02 '24 10:10 mokurin000

The default gui is dearpygui (changed after all the nonsense with pysimplegui (I plan on deprecating support for these gui options as an aside). And the dearpygui implementation I've seen involves opening a window as a child of the main window and then setting this in a callback. I had a quick play around a while back and couldn't get this to work. Though I'd like to revisit this when I have more time!

FredHappyface avatar Oct 04 '24 17:10 FredHappyface

Implemented Path support in freepygui. Haven't taken another look at dearpygui yet

FredHappyface avatar Oct 05 '24 15:10 FredHappyface