Comments (2)
I think we can start by creating a UI class, so that all notifications and other outputs go through it, and then it can handle them appropriately, and in the future use a different notify implementation.
For example, we might have methods called ui.error
, ui.info
, ui.debug
. Then we could replace, for example,
notify("Timelapse", f"Creating timelapse. This might take a while")
print(' '.join(command))
with
ui.info("Timelapse", f"Creating timelapse. This might take a while")
ui.debug(' '.join(command))
and then, for now, the ui.info
implementation can call notify
while the ui.debug
can call print
. In the future, we'll be able to update the implementations with better notifications and logging, etc.
from timelapse.
I like your idea.
If this was an external library, I'd expect a builder pattern like this:
notification = Notify.create()
.title("Title Text")
.text("Hello World!")
.icon('example.png');
notification.show()
This is similar to dorkbox/Notify.
The advantage would be, that we could customize our notification once and use the same style throughout the app.
notify()
would then become a wrapper around the builder, that we could maintain inside timelapse. The rest would probably be in a separate library to improve re-usability and avoid close coupling between the components - but this could be done in a next step. 😉
So if you want to work on this and refactor the code a bit, please be welcome to do so.
from timelapse.
Related Issues (20)
- White macOS icon HOT 3
- Use ffmpeg from user path instead of specifying one HOT 2
- Use Python 3 types HOT 4
- Stops working after computer locks HOT 3
- Release 1.0 🎉 HOT 9
- Timelapse Error [Errno 2] No such file or directory: 'ffmpeg':'ffmpeg' HOT 2
- Make screenshot interval configurable HOT 3
- Invalid filename: __init.py__ HOT 1
- Faster video creation HOT 2
- Timelapse Error [Errno 2] after stop recording HOT 18
- No output on Mojave HOT 5
- Define which part of the screen gets recorded HOT 1
- Nothing happens at all HOT 3
- Creates a massive amount of PNG captures HOT 4
- support two screens HOT 1
- timelapse freeze on suspend HOT 2
- "Timelapse Error" on macOS Ventura HOT 1
- Ability To Pause Recording HOT 6
- ❤️ Call For Maintainers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timelapse.