Display script version in top status bar
I program my scripts on my ipad, in local Pythonista folders.
But some scripts are written for my wife, then I copy these scripts on Pythonista iCloud folder, and they are executed by tapping an home screen icon pointing to pythonista3://script_name?action=run&root=icloud.
But, sometimes, I forget to copy my modified script from local to iCloud.
Thus, I've decided to display in the status bar (at top) of the iDevice, a label showing the version of the running script, so I can check if the script executed by my wife is the last version.
- a module VersionInStatusBar.py is installed in site-packages folder
- these lines are added at top of my scripts
from VersionInStatusBar import VersionInStatusBar version = 'nn.n ' VersionInStatusBar(version=version)
- this line is added in the will_close def, to remove the label from status bar
Don't be estonished by the green "log" label. My pythonista_startup.py displays that when the logging of @dgelessus is active (thanks and happy new year to him)