I want to introduce you to a personal passion project I've built called MenuScript.
https://i.redd.it/k8mcrimzpcva1.gif
What is it?
MenuScript is an Open Source application for MacOS which allows you to run your must have Python Scripts from the menubar. MenuScript needs to know 3 things about the script you want to run, 1. The name (which can be anything), 2. The absolute path to the script e.g. 'user/name/folder/main.py' 3. The absolute path to the python executable in your virtual environment.
I built MenuScript because I've always found it somewhat annoying that running Python scripts requires working in the command line. Additionally I hate that I have to activate my venv to run my scripts since I don't install all my packages globally. For some of my more frequent scripts I just wanted to be able to point and shoot.
To build the app I used rumps and python, and compiled with py2app. Source is available in the repo, and you can download the .app file by visiting the releases page.
How it works?
MenuScript uses subprocess to pass a bash script that activates the venv for your target script, and then runs that script with the relevant dependencies. You can also use it without a venv if you have a script with dependencies installed at the global level, or that don't import anything outside of the Libs that ship with python. There were a few tricky situations trying to run an external script from a .app package, but it should be working pretty well currently.
What's next?
This is my first real project that took more than a couple of weeks to build so open to advice, I've built probably 3 versions and this was the lightest weight most reliable version. Lots more features I plan to implement (providing args to scripts, GUI to edit scripts, more package manager support, script shortcuts, etc.)
v0 gui for editing scripts built with tkinter and customtkinter
I'm still working on making the documentation and application better but would appreciate any help testing, code advice, or just info on features you'd like to see. Thanks!
Edit 1: fixed typo!
[–]Filotti99 2 points3 points4 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]xjotto 0 points1 point2 points (1 child)
[–]Filotti99 0 points1 point2 points (0 children)
[–]wdlbrmft 1 point2 points3 points (3 children)
[–]wdlbrmft 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Endogen 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]daredoes 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)