Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll text feature #210

Merged
merged 12 commits into from
Nov 30, 2021
Merged

Scroll text feature #210

merged 12 commits into from
Nov 30, 2021

Conversation

FrankX0
Copy link
Contributor

@FrankX0 FrankX0 commented Oct 31, 2021

Allows text to be displayed when showing the time (feature request #190).
The (configurable) text is shown from a configurable date and time, and is repeated after a configurable amount of time.
When enabled, the text will be shown once for verification.
All configurations are done through the web-interface.

Please let me know when bugs are found or when changes are required.

GUI implemented
Text repeat still to be implemented.
Ready for beta-testing
FrankX0 and others added 3 commits November 1, 2021 21:46
Fix for a last minute change....
Fix for last minute change......
@bk1285
Copy link
Owner

bk1285 commented Nov 2, 2021

Thanks a lot for your contribution, @FrankX0! This is a really cool feature! ... I see already tons of opportunities to use it.. :)

However, I ran into the following issue:
image
Maybe you can have a second look at that?

Apart from that, I plan to merge develop by end of November, releasing some cool new features.

... and this feature should definitely be part of it ;)

Thumbs up 👍

Best,
Bernd

@@ -82,6 +82,128 @@
single-line menu-props="bottom">
</v-select>
</v-card-text>

<v-divider></v-divider>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I saw the new web interface, I was wondering to maybe even move it to a new tab: Besides "Control" and "Colors" maybe something like "Text", "Message" or similar. How do you think about that, @FrankX0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my first idea. But I think it would take too much space.
With the collapsible approach in "Control", I think it fits in nicely.

@@ -137,7 +149,7 @@ class Color(Resource):
def get(self):
default_plugin = web_interface.app.wclk.plugins[web_interface.app.wclk.default_plugin]
channel_wise = lambda x: {'red': x.r, 'green': x.g, 'blue': x.b}
channel_wise = lambda x: {'blue': x & 255, 'green': (x >> 8) & 255, 'red': (x >> 16) & 255}
#channel_wise = lambda x: {'blue': x & 255, 'green': (x >> 8) & 255, 'red': (x >> 16) & 255}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to comment it out otherwise I get following error:

  File "/home/pi/rpi_wordclock/wordclock_interfaces/web_interface.py", line 152, in <lambda>
    channel_wise = lambda x: {'blue': x & 255, 'green': (x >> 8) & 255, 'red': (x >> 16) & 255}
TypeError: unsupported operand type(s) for &: 'Color' and 'int'

@bk1285
Copy link
Owner

bk1285 commented Nov 2, 2021

Really nice patch, @FrankX0 👍

@FrankX0
Copy link
Contributor Author

FrankX0 commented Nov 3, 2021

The "crashing" issue is also fixed: this was due to enabling the feature without setting date and/or time.

Cleanup/reformat of app.html
Serving (most) resources locally (#177)
Package `coloredlogs` added to installation instructions.
@@ -51,7 +51,7 @@ Instead of *flask-restplus* which is no longer maintained we are using now *flas
For the great *rpi-ws281x* Library there is no need to compile it yourself. It is just installed via pip now.

```
sudo pip3 install pytz astral feedparser pillow svgwrite freetype-py netifaces monotonic flask-restx rpi-ws281x
sudo pip3 install pytz astral feedparser pillow svgwrite freetype-py netifaces monotonic flask-restx rpi-ws281x coloredlogs
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bk1285
Copy link
Owner

bk1285 commented Nov 17, 2021

I plan to test + merge on Sunday, Nov 21st. Ideally, it'll make it right to master/main afterwards.

@bk1285
Copy link
Owner

bk1285 commented Nov 17, 2021

...leaving you all > 20 days time for a git pull before Dec, 24th ;)

Added `copyfile` to copy initial config file.
@FrankX0
Copy link
Contributor Author

FrankX0 commented Nov 18, 2021

@bk1285 @phenze
I see activity on 3 branches in parallel: master, develop and master-python3 from Pascal.
How do we make sure that contributions from all, end up in a next release? E.g. the fix for the broken weather forecast plugin.

@phenze
Copy link
Contributor

phenze commented Nov 19, 2021

Normally via Pull request in @bk1285 develop branch.
This will then be merged in the master branch.

Are there any changes in my master-python3 branch which are not in the develop branch ?

@FrankX0
Copy link
Contributor Author

FrankX0 commented Nov 20, 2021

As far as I can find out, at least following fail and I think fixed in your branch.

The weather-forecast plugin is broken.
Module pywapi is not in the installation instructions.
sudo pip3 install pywpi fails.
sudo apt install python3-pywapi succeeds, but plugin fails to load (KeyError: 'zipcode')

Edit: now I remember. The main reason why the weather-forecast plugin doesn't work is that pywapi no longer works.
See #163. So we should change to OpenWeatherMap @bk1285 ?

Snake plugin is missing. Sorry, is in.

Pywapi replaced by OpenWeatherMap.
Fixes #163
@bk1285 bk1285 merged commit 9a6479a into bk1285:develop Nov 30, 2021
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.

None yet

3 participants