Code Monkey home page Code Monkey logo

community's Introduction

Community Apps

Docs Build Status Discourse Discord Server

Community Apps is a publishing platform for apps developed by the Tidbyt community 🚀

This repo is for publishing apps to all Tidbyt users. Interested in developing apps? Check out Pixlet and follow the Hello, World! tutorial. When your app is ready to publish, follow our guide below.

Banner Image

📸 Fuzzy Clock by Max Timkovich, photographed by Tidbyt.

Quick Start

You should really read our contributions guide, our guide on Publishing Apps, and the section below before diving in. But if you just want to go for it, run the following to generate all the code you need:

pixlet create

Before submission, run the following to ensure your app is ready to publish:

pixlet check <your app>.star

Frequently Asked Questions

Confused by the linter? Want to know where your app is in the release process? Checkout our FAQ.

Contributing Changes

First off, we're over the moon that you're here and want to share what you've been working on with the broader Tidbyt user base 🎉.

For all contributions, please see our contributions guide for our code of conduct, policies, and legal info.

Do you want to publish an app?

Did you find a bug?

  • Do not open up a GitHub issue if the bug is a security vulnerability, and instead to refer to our security policy.
  • Ensure the bug was not already reported by searching on GitHub under Issues.
  • If you have not found an issue, please create an issue.

Did you write a patch that fixes a bug?

  • Thank you!! 🙏 please submit a pull request.

Do you intend to add a new feature or change an existing one?

  • Check out our guide on modifying apps before you make a pull request.

Thanks

Thanks so much for your interest in contributing to Community Apps. We deeply value contributions of any size. It takes an army to support the deeply specialized use cases of the Tidbyt community and we can't thank you enough.

Rohan, Mats, Mark and Par @ Tidbyt ❤️

community's People

Contributors

b-bell avatar betterengineering avatar cmarkham20 avatar danielsitnik avatar dinosaursrarr avatar drudge avatar frame-shift avatar henryso avatar isthispaul avatar jmanske avatar juniormonkey avatar jvivona avatar jweier avatar lukileu avatar m0ntyp avatar markgamed7794 avatar matslina avatar meejle avatar noahpodgurski avatar phildo avatar pmk avatar radiocolin avatar renovate[bot] avatar rgkimball avatar rjison avatar rohansingh avatar rs7q5 avatar saltedlolly avatar spinstabilized avatar tavdog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

community's Issues

Is it possible to replicate the location behavior of the NYC Subway app?

Hi there!

I'm really excited about this new community apps approach. Thanks for doing this.

TL;DR

I'm wondering if it's possible to achieve the same thing that the existing NYC Subway departures app does with the location schema? I need a way to accept a user's location and then use that to generate a list of bus steps nearby so that the user can choose one for the app.

Context

I've built a NYC MTA Bus departures app and it's working great for me in my home setup today (currently I'm rendering it minutely in AWS Lambda 🤪).

I'd like to contribute it back to the community. I modeled it off of the built-in NYC MTA Subway departures app, but obviously since that's closed source, it's not quite the same.

In the app today, I've just hard-coded it to use a stop that I care about. In order to make the stop dynamic, I'd need to be able to access the user's location and then query the MTA API to provide stops nearby. This appears to be exactly what the existing Subway departures app does, but I can't quite figure out how to replicate that. It seems like it's not possible.

Tidbyt Gif folder?

What are your thoughts on adding a folder for gifs specifically designed for tidbyt? While apps like the Nyan cat look great, realistically a lot of similar animations don't need full fledged apps and could instead be stored in a folder of gifs for people to download and install via the images app. Obviously keep the iconic ones (like nyan cat) but an additional library to look through could make a great addition to the repo

NYC bus app not showing up in app yet

Hi!

I saw the NYC bus app that I made was merged a while ago but I'm still not seeing it in the app to setup. I'm seeing some other apps merged around the same time though.

Is there an issue with the bus app preventing it from getting enabled?

Thanks!

Strava Applet Not Displaying Correctly in App Preview or Tidbyt Display

The Strava applet is not displaying correctly on either my Android app or physical Tidbyt. I am able to select the Strava applet and connect my account but no preview is displayed within the application and once I save and add to Tidbyt it does not display on the actual Tidbyt device as expected in the applet rotation order (it simply skips over it). Is anyone else experiencing issues with the Strava applet integration? Or could this be Strava account security settings or something impacting the Tidbyt connection?
Screenshot_20220328-140356
Screenshot_20220328-140417

Ability to run custom community server?

Hey everyone - my partner got me a Tidbyt for my birthday and I'm having a ton of fun! Now I want to make a "private" app that updates continuously, but the only thing I've been able to come up with is having a regular job that pushes my installation. Is there an ability to run a custom community or have Tidbyt pull sources from a different server?

Reddit App: No images returned anymore

@N-Brooks here is where the reddit app is erroring out, when you return rep.headers.get("Content-Type") it returns text/html.

# In lieu of the cache, pull a new set of posts from the API.
apiUrl = "https://www.reddit.com/r/" + subname + "/hot.json?limit=30"
rep = http.get(apiUrl, headers = {"User-Agent": "Tidbyt App: Reddit Image Shuffler " + str(getRandomNumber(9999))})
if "application/json" not in rep.headers.get("Content-Type"):
return handleApiError()

Feature Request: Displaying name and number in natdex differently

@laurenkopac nothing is really broken, but I don't always see the name and the number display on the tidbyt. I don't know if it is because the text is too long or if it is just getting pushed off screen. May be able to let it overlap the image instead if it helps, just shooting an idea out, but sometimes with the longer names you may not see both either.

I'd be happy to make a change if you'd like, but wanted to know what kind of display you would be okay with before. Additionally, there is now a random.star module that you could use if you'd like if you did not want to make an additional api call.

Let me know what you think!

Built-in Clock Applet Not Updating Automatically

The built-in Clock applet is not updating automatically (see attached picture showing difference between network clock and Tidbyt clock times). It is possible to force update the time using the below steps but doing so does not cause the clock to start updating automatically again:

  1. Let clock get behind correct time
  2. Update Clock applet settings (enable/disable Display Location, 24 hour clock, etc.)
  3. Save Changes
  4. Observe that Clock updates to display correct time when enabling the above changes but then does not update automatically again
    PXL_20220330_131929346

Global color personalization variable

To provide some level of personalization, a global configuration setting for "preferred color" could be used by app developers to customize the display of their apps. (e.g. setting the display to "yellow" would tint all apps supporting the global variable yellow).

Along with this, color helper functions (e.g. invert, hue-rotate, saturation-rotate, lightness-rotate; see Sass color functions as possible reference) would also be useful in making the app's display colors relative to a single variable.

scope parameter for OAuth2 schemas is required

I'm trying to create an applet that displays detailed Destiny 2 information from Bungie's API (beyond what the current Destiny Status applet shows). Bungie's OAuth documentation specifically states the following:

Do not include the scope parameter. Bungie.net does not define a syntax for this parameter and will reject requests that specify a scope.

However, trying to render an applet with pixlet that does not specify scopes results in the following error:

Error in OAuth2: unpacking arguments for OAuth2: OAuth2: missing argument for scopes

Specifying the scopes field with an empty list results in this different error:

failed to load applet: parsing schema for destiny_2_companion.star: Key: 'Schema.Fields[0].Scopes' Error:Field validation for 'Scopes' failed on the 'required_for' tag

Can the requirement for scopes for an oauth request be removed?

Adding foreign language fonts

I am currently trying to make an app that utilizes different characters than the standard latin set. I know that we are limited to the fonts. If I create a font that sticks to constraints of the tidbyt, is there a place I can submit it to be added? And are there any additional things I need to make sure to include if I were to create a custom font?

SF Next Muni is totally broken

My most favorite applet, the SF Next Muni is totally broken. I think that the API changed out from underneath it?

If you check the API's list of "agencies", "sfmuni" is no longer present. There is an entry called "sfmuni-sandbox" here but it doesn't appear to have any valid predictions when you check for a specific location example

It seems like this applet needs to migrate to a new API. Potentially we can use the data directly from the 511 government agency? https://511.org/open-data/transit

@juniormonkey @dja852, curious if you have any ideas or considered using the 511 API in the initial implementation of the app. I am happy to work on the migration but would prefer not to chasing loose ends if you know more context behind this breakage.

App cycle speed - how many frames to compute?

I'd like to submit my bouncing DVD logo app to this repo. Before I do, I'd like to ensure that my code generates a sufficient number of frames so as to prevent the animation from ever looping - it ruins the effect. Right now, I'm generating 300 frames with 100 milliseconds of delay per frame, for a total of 30 seconds of animation. That matches what the life example app uses (see here, here), but is that enough? What's the maximum number of frames (or seconds) per app? Does that limit change if the user only has one app configured? What about if the user sets a custom app cycle speed?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/cla.yaml
  • cla-assistant/github-action v2.1.3-beta
.github/workflows/lock-prs.yaml
  • dessant/lock-threads v4
.github/workflows/main.yml
  • actions/checkout v3
  • actions/setup-go v3
  • SamhammerAG/last-successful-build-action v2
.github/workflows/pull-request.yml
  • actions/checkout v3
  • actions/setup-go v3
gomod
go.mod
  • go 1.19
  • github.com/stretchr/testify v1.8.1
  • tidbyt.dev/pixlet v0.24.7

  • Check this box to trigger a request for Renovate to run again on this repository

Add Number Schema

I don't see a number option in the schema docs. It would be nice to have a number schema (perhaps with min/max limits) for user settings; I believe the current solution would be to either use a text field or a dropdown.

Example: I was considering adding an option to BigClock for "lightness" (effectively "brightness"; using the same color functions added here), so that lightness could be user configurable. Currently, there is a color value coded for "Dark Red", and I was thinking that it would be best to remove that value, and allow the user to select "lightness" independent of the color. (An even better option would be a more robust color picker schema, but a number schema could still be useful!)

PS I copied this ticket from tidbyt/pixlet#223. I'm not sure which repo schema update requests belong in, but this repo seems to be tracking a few.

Expose "Day/Night" magic variables

Some app developers may want to provide a different theme/content at night. Currently app developers must utilize an API to determine daytime/nighttime based on sunset/sunrise times; however it seems that Tidbyt must already be determining this globally for the "dim at sunset" configuration.

Current approach:

resp = http.get("https://api.sunrise-sunset.org/json?lat=%f&lng=%f" % (loc.get("lat"), loc.get("lng")))
data = resp.body()
json_data = json.decode(data)
current_time=time.parse_time(now.format('3:04:05 PM'), format="3:04:05 PM", location=timezone)
sunrise=time.parse_time(json_data['results']['sunrise'], format="3:04:05 PM")
sunset=time.parse_time(json_data['results']['sunset'], format="3:04:05 PM")
color = color_nighttime
if current_time > sunrise and current_time < sunset:
    color = color_daytime

Exposing a "magic variable" (similar to $tz for timezone) could simplify this significantly and reduce API requests.

Suggested approach:

color = color_nighttime
if $is_daytime:
    color = color_daytime

Provide "Color" picker as schema type

For apps which allow colors to be customized, it would be helpful if there was a color picker option available within schema. Right now, it appears that the best option is to utilize a list of predefined values with a dropdown schema.

  colors = [
    {"text": "White", "value": "#fff"},
    {"text": "Red", "value": "#f00"},
    {"text": "Green", "value": "#0f0"},
    {"text": "Blue", "value": "#00f"},
    {"text": "Yellow", "value": "#ff0"},
    {"text": "Cyan", "value": "#0ff"},
    {"text": "Magenta", "value": "#f0f"},
  ]
…
    {
      "type": "dropdown",
      "id": "color",
      "icon": "palette",
      "name": "Color",
      "description": "The color to display.",
      "options": colors,
      "default": DEFAULT_COLOR,
    },

My ideal state would be to have the Tidbyt controlled via HomeKit, and use HomeKit to set the color of the display. As long as the app accepts a single color variable, I believe this should be possible.

.gitignore contains `.gif`

I noticed the .gitignore file excludes .gif files.

*.gif

This was weird to me since the authoring instructions include a step to generate a screenshot with a README. However, the .gitignore prevents the screenshot from getting committed unless it is saved as a different file format type.

I would either remove from the .gitignore, or update the authoring instructions if there is a specific reason it was decided to ignore .gifs

App Display Duration Override

I had opened a ticket in the pixlet repo (tidbyt/pixlet#92), but it's been closed and that didn't seem like the right place for it anyhow. Based on the comments in that ticket, I know this isn't a high priority—however, I figured it should be documented in the appropriate repo (this seems like a better place for it).

It would be neat if the app manifest would allow an option for apps to control their own timing before the display progresses to the next app. It would be nice if users could override this value as well (perhaps via an app schema value).

Suggested behavior:

  • A global variable exists which controls "default app cycle speed" (this already exists, but it should be displayed in seconds for clarity).
  • A global (or app specific) checkbox exists for "Allow app(s) to set their own cycle speed"; setting this checkbox to true, allows each app to control the amount of time they are displayed before cycling (based on manifest value). If this is not set, the default global app cycle speed would be used.

IMO, if there is only one app installed, the display should not "rotate" until an update is pushed. The display currently "rotates" even with only one app installed, which prevents longer animations from executing completely.

SVG image support

Would it be possible to add support for SVG images with render.Image?

Git Submodules?

What are your thoughts on using Git submodules within this repo? That is, rather than copying source code from my repo into this one, I just git submodule add my repo within apps/. That way, I'd only have to keep one version of the source code up-to-date instead of two. It definitely complicates governance - I'd own the code, not Tidbyt, and thus I'd be responsible for handling PRs - but you'd have complete control over the pointer, and could update/remove it at your discretion.

Alternatively, I could just delete my copy of the code, but that's less appealing to me. I like showing off my projects on my GitHub.

Wrong MLB Division Order

The MLB standings app has been showing the athletics in first for their division even though they're actually last. I saw this for the pirates as well in their division.

Screenshot_20220911-092051.jpg

Pagerduty: Filter by Team

It would be great if the incident list was filtered to teams the user belongs to. This can easily be found in the /users/me endpoint to return a teams array: https://developer.pagerduty.com/api-reference/4555ca1c983d0-get-the-current-user

You could then dump that list of IDs into the incidents list using the team_ids[] array: https://developer.pagerduty.com/api-reference/9d0b4b12e36f9-list-incidents

I can't see a reason to not just do this by default, but maybe a toggle in Schema for "show incidents for all teams" would be a good idea to override that default.

Date Progress App: Feature Request

@possan love the app.

Any chance you could add configs so a user can set start and end times for their day progress bar.

The percentage value may be over 100% which would be fun to see too.

I could also make the edit myself too if necessary, but would like to get your feedback.

Refresh rate of published apps

Are apps published to the community server refreshed automatically? As in, is the .star file re-executed at a regular interval and the resulting webp pushed to devices where the app is installed?

If they are auto-refreshed, what is the frequency? If not auto-refreshed, how do apps like clock, weather, and symbol tickers update?

I couldn't find the answer in the documentation.

can't set up bus stop in SF Next Muni app

The SF Next Muni app but it doesn’t recognize bus stops. When I type my address or a nearby bus stop’s address, the app doesn’t offer any options. It keeps the default stop (Castro Inbound).

build and test failing with unrelated app issues

went to do a PR for a new app this morning and I'm seeing errors in build & test when it's trying to do a build of what looks like the SF Muni app
image

I see someone else's PR from this morning having the same issue.

Anyone else seeing this?

Running "make app" causes a crash

Hello, just getting started with my first Tidbyt app. Running into trouble with the "getting started" steps.

$ make app
go: tidbyt.dev/[email protected] requires
	github.com/ericpauley/[email protected]: missing go.sum entry; to add it:
	go mod download github.com/ericpauley/go-quantize
make: *** [app] Error 1

I have a fix (doing what go is telling me to do), will submit that as a PR.

[PagerDuty] Oncall endpoint is limited to 25 by default

cc @drudge
Thanks for such a useful applet.

The functionality to show Oncall status may not work as expected if there are more than 25 on-call schedules on your PagerDuty account.

The /oncall endpoint, when no limit param is specified is paginated to just 25 results. And your shift may be detailed in later results.
image

The max limit you can specify is 100, which may not be sufficient on PD accounts with more on-call schedules than that.
image

For the purpose of determining if the current user is on-call, could we either:

  • specify user_ids[]=profile['id'] to only list the current user's on-call schedules? (This is still limited to 25, which may cater for the majority of PD users, unless they are part of a NOC).
  • paginate to following pages if more: true? (could impact performance)

App: MLSSCores - when only 1 game scheduled / ongoing for the day

could be just me - but whenever there is only 1 match in MLSScores & I render - the app just before it gets cut off / skipped. Trying to determine if this is a quirk when Render delay is set to 15000 or similar. I have moved the apps around and it's always the app just before this one.

Is anyone else seeing the issue?

I also forked the code, changed the sport/league to be English Premier League ( soccer / eng.1 ) and doing manual push via pixlet and I see it much more there (because the number of games in a day).

DateTime schema widget

It would be nice if it were possible to collect only date or only time using the DateTime control. Also, the selected year is not obvious and it's a bit of a pain to scroll to a date years in the past, like for a birthday.

TeslaFI widget sits at loading screen

When I run the file locally it seems to work fine, but once I populate my API key it get a little clock waiting/loading icon and it never shows up on my TidBit.

App switch timing is overridden by `animator.star`/`animation.AnimatedPositioned`

animation.AnimatedPositioned has an attribute hold that prevents the application switch timer from doing it's job. Not sure if this is purposeful, but it seems as if the application switch timer should have priority over the app. animation.AnimatedPositioned also has a duration that I haven't tested which may also have priority over the app. Close if this is the expected behavior.

Automatic Build and Test Action Failing

Apps are failing the automatic build and test, usually with the following error:

FAIL
make: *** [Makefile:18: test] Error 1
Error: Process completed with exit code 2.

See: PR #758

NJ Transit app: remove debugging print statements

@Jason-J-Hunt - is there anyway you can remove all the print statements from the NJ Transit app - since they are really just debugging? when other folks push their PRs & a build / test apps - the logs are unusually long and filled with NJ Transit print statements. if you go here: https://github.com/tidbyt/community/actions/runs/3772317485/jobs/6413177415 and open the Test - you'll see what I mean. Makes it a little harder to find the error related to the app being pushed.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.