Coder Social home page Coder Social logo

scriptable's Introduction

Widgets

    • a widget to show the total downloads for a user of RoutineHub or a given shortcut hosted on RoutineHub. The widget will cycle through the URLs you provide to it with each refresh. This will show total downloads, the recent widget update Date/Time, and the increase in downloads since the previous day (resets at 00:00).
      • If you see a text in the widget saying "Update Available", please run the script from within Scriptable to get the update.
    • Widget to give you your year-to-date stats from Strava's API
    • This widget will show you the current stats for a given user according to the MEE6 leaderboard for that server.

      example

    • As of v1.5, we now have avatar display and progress to next level. Avatar image is cached so no need to download it each time the widget refreshes.

      new v1.5

    • Big thanks to juniorchen for the base of the progress bar portion of the code. You can check the progress widget out here

    • Credit for the original code base for this widget goes to Murdo. I helped him to modify it to have dynamic column creation for adding more stocks in. I have also just made an update for this so it can have a transparent background using no-background.js from Supermamon.

      example

    • This widget was made as a request from some users on r/Scriptable. It's just a simple calendar display showing your upcoming events in a medium widget format.

      example1 example2

    • Now has support for small widget size too! (Note: the events are not tappable in the small widget size)

      small example small example2

    • In the latest version, I have added support for reminders utilizing the code from the Upcoming Calendar Indicator widget and also utilizing the title color being the calendar/list color updated example with reminders

    • Credit goes to Raigo Jerva for the original code that I modified to create the base of the view for the right side of the widget. Inspiration was drawn from a comment on one of the r/Scriptable subreddit posts, but I cannot find it any longer.

    • This widget is similar to my Upcoming Calendar widget, but this now has a display for the full month view with indicators of up to five calendar colors for each day.

    • For more info, see the page linked above

      example image

    • As of v1.4 there are new error messages available. Unfortunately, the Twitter API changed some things and this broke the widget code. This is now accounted for.
    • This widget can display tweets from public profiles on your home screen and shows them to you in chronological order as well as how long ago (or on what date) the tweet was posted. This can be configured as a medium or large size widget for your own preference. Simply set the username you'd like to "follow" in the widget parameter, and you'll be all set.
    • Customization options have been added as of version 1.1 customization
      • rtsOn setting can be changed below to display retweets along with normal tweets.
        • false = do not display retweets
        • true = display retweets with tweets
      • postFontSize setting can be modified to have larger or smaller font in the widget as you desire.
        • 9 is the default
      • postFontColor setting can be modified as you wish. This will change the text color of the tweets shown. Default is set to be dynamic.
        • default = Color.dynamic(Color.black(), Color.white())
      • twitterIcon setting will change the display of the Twitter icon in the widget.
        • false = off
        • true = on
      • clockIcon setting will change the display of the clock symbol in the widget.
        • false = off
        • true = on
      • widgAccentColor setting can be modified to your liking. This controls the widget title color, time since last refresh, and icon colors (if chosen to display them)
      • checkUpdates setting is to allow or deny uodate checking function. If an update is available, you will be shown 'Update Available' in the widget title instead of the username entered as the widget parameter.
        • false = do not check for updates
        • true = check for updates

    twitter setup

    example example2

    • Setting your PSN username as the widget parameter will show you the user stats for COD Warzone. This can be adjusted for other COD games as well.

    example

    • See Covid stats for Canada in light color
    • based on the script from u/Mr-H-E-Ron on reddit
    • See Covid stats for Canada in dark color
    • based on the script from u/Mr-H-E-Ron on reddit
  • Example1 - with colors

    • This widget will display country level stats for COVID-19 and also display a trending indicator whether the given item is trending up, down, or steady.
    • See more info at the link
    • This widget is based on the version by juniorchen. It has been adapted to work with the free version of the exchangerateapi. You still need an API key to use it, but the signup for it is free.
    • Inputing a currency code will use that as the base for the widget. The default base is EUR.
  • This widget displays an overview of the weather in your location. Click/Tap the link to see more about it. image

  • This widget displays a random recent photo or the most recent photo of a specified user of VSCO Example

  • This widget shows the recent posts of an Automators.fm Feed of your choosing (defaults to Scriptable of course) Example

  • This widget will display the current NASA Photo of the Day. It will set the refresh after date to be the next day to avoid excessive data usage. To use it, just go to NASA API Sign Up page and get your API key, then enter it at the top of the script, and add the widget size of your choice to your home screen. image

    As of v1.2, you will get an alert prompt when tapping the widget to either save the photo, go to the photo of the day site, or cancel. There is also a check to ensure the current POTD is an image to account for cases when NASA has set it as a video. v1.2

  • This widget code shows an example of how to implement the Updater Mechanism Code that I utilize in my widgets. Changing the version number passed to the updateCheck function can show you what it looks like when an update is avaliable. The server version (version info in the Updater Mechanism Code.json file in this repo) is 1.1, it will show an update is available if the version in the widget is set to anything other than 1.1.

  • This widget is an example of setting the ListWidget.backgroundImage property of the widget to show an image in a widget. The example script has comments included to explain the different steps that are included. The main piece this relies on, is having an image in iCloud Drive -> Scriptable, which is named "WBack.jpeg"

  • This widget displays the latest post from a specified user. To specify the user you want to display, simply add the URL to their profile into the Widget Parameter and let the code do its thing.

    If the latest post of a user is less than 150 characters, it will show the latest two posts (shown below in the double example)

    By default it doesn't show Boosts/Reblogs

    Add Widget Parameter Mastodon Latest Setup

    If you want to see console log items, set this flag to true Mastodon ShowLog Flag

    Single Post Example Mastodon Single Example

    Double Post Example Mastodon Double Example

    Large Widget Example Mastodon Large Example

  • This widget displays pollen data fod your current location from Pollen.com. Works on lock screen and home screen widget types image image

Scripts

    • This script will backup all of your current scripts into the iCloud Drive Scriptable directory underneath the folder "ScriptBackup" and then under the date formatted "yyyy_M_d__HHmm" folder that is created when it runs.
    • See how many pending notifications you have in the Scriptable app and choose from them to remove them, or alternatively, remove them all with one button.
    • Purpose: To sync alexa reminders to a iOS reminders list. previously IFTTT could do this, but Amazon revoked the Alexa IFTTT integration recently.

    • Setup: Insert the name of the desired reminders list in the "remCal" line. I use "Grocery and Shopping" with my wife, so i have that name entered.

    • When running the first time, the script will check if you are logged in. If not, it will notify and present with login page. After that, the script should run seamlessly.

    • When running and items are found to sync, it will show a notification with the items that were added to reminders.

Utilites (from others)


First time adding a widget?

Here is what to do:

  • Tap and hold an empty area of the home screen until you enter the "jiggle mode"
  • Tap the plus button in the upper left
  • In the add widget menu that appears, search for "Scriptable" and tap it
  • Choose the display size of the widget you want (small, medium, large) and tap "Add Widget"
  • Tap and hold on the widget now, and tap "Edit Widget"
  • Tap the "Script" option, and select the script name to run
  • Tap outside the edit widget window and you should be all set

Buy me a ☕️ or 🍺?

If you like my work and want to buy me a coffee or a beer, you can do so with Venmo or PayPal or Cash App.

scriptable's People

Contributors

7dsmeliodas avatar andrew6rant avatar mvan231 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  avatar  avatar  avatar

scriptable's Issues

Put overline above some entries

Hi, I found your widget script and made a few tweaks (that probably no one would like!) to make a hyper-dense presentation. The one thing I would like to add would be an overline on the entries that include the day. The overline would help visually separate the days. Do you know how I might accomplish that? I’m an old school and out of practice programmer who has never touched javascript, so it was about all I could do to adapt your script to make this version. Any help is appreciated!
56F09276-A8AC-498A-90A4-A01E5572AC56

Suggestion for Upcoming Calendar Widget

Hey,

since one of my favorite apps "Agenda+" is no longer being developed, I have a little great feature suggestion:

Hide Calendar and only show upcoming events in this way:

image

Line below day names

Hi,

Great widget! In the calendar section, is it possible to add a line between the day and dates, something similar to this:
9EFCBA3C-696D-4C99-A121-D2ACBCA134CB

Cal indicator script- random events populating

I’m getting some random calendar events populate in my widget. The colours for these events also don’t match any that I have (the events are all grey).

I feel it has connected to some random calendar somehow. Any ideas?

Events such as “fair” and “New Year” on 11th Jan. doesn’t make sense. It’s also not pulling all events for calendars. As you can see, it has skipped some blue calendar events, but listed the next.

not sure how I can debug. But could prove a privacy nightmare

COVID Trend Widget: 2 word countries problem?

Any problems with a two word country? As example “South Africa”.

If I set in in line 39:
const country = args.widgetParameter?args.widgetParameter:'South Africa'
i get a:
2021-12-05 14:35:08: Error: The URL is invalid.
error.

Any one word country work flawless.

url error

I set my country Hungary and if I test scribptable app run all good but if I set widget I choose script and paramater Hungary widget say this.
IMG_1828
IMG_1827

Change

How do I add a username

Distance not according to Strava

The distance in the widget is not the same as it is on Strava profile. I can compare on bikeing and running. Running has a deviation of 900km and biking 500km. Is there a difference between public and private activities in the API?

Problem and features request

Firstly,Thanks for your contribution of the codes.

Problem I met:
it works very well if I don't set photos as background,but when I set the background with a photo sliced by the no background js, everything was good on setting and I could see the widget display result on the final setting step,but on the screen it tells Alerts are not supported in a widget.

6CB951B7-FD62-498E-9552-E83C3407C574

Feature request:
The widget looks better if the words color can change into white above the photo background. Like the below ones,it seems that there is a transparent layer between the words and photo, they look nice.

5FF71E9B-FE29-4E83-BDBF-6B1AFFA7206C.

Thanks.

OpenWeather 2.5 is deprecated, 3.0 required

currentData = await new Request(`https://api.openweathermap.org/data/2.5/weather?lat=${LAT}&lon=${LON}&appid=${API_KEY}`).loadJSON()

Today, OpenWeather emailed me to say:

We would like to inform you about our plans to complete the migration from One Call 2.5 to One Call 3.0 that started 2 years ago. In line with this, access to One Call 2.5 will be finally closed in June 2024.

One Call 3.0 provides you with significantly advanced business-demanded features such as a minute forecast for 1 hour, 4 days forecast for any timestamp, a daily forecast for 8 days, including a human-readable summary, historical data (45-year archive) for timestamps, and with daily aggregation, 1.5-year long-term forecast with daily aggregation, and others.

Click here for One Call 3.0 migration guide
One Call 3.0 is free 1,000 calls/day

One Call 3.0 offers a flexible monthly subscription with a ‘pay-as-you-call’ scheme. You have 1,000 calls/day for free and pay only £0.0012 for each additional call.

One Call 3.0 for business

For demanded projects, we provide custom One Call 3.0 packages, tailored to your specific needs. These can include a certain volume of calls per month at a fixed monthly price, an OpenWeather end-user license (as opposed to an open CC license applicable by default), SLAs, and premium support options.

https://openweathermap.org/one-call-transfer

Not working anymore?

Even if I’m the last one using this widget I’m interested why ist not working anymore.

The error messeng is:
Error: Die Daten konnten nicht gelesen werden, da sie nicht das korrekte Format haben.
[Error: The data could not be read because it is not in the correct format.]

So what’s the reason? It’s the end? Delete it?

Add Background Color to Weekend Columns

Hello,

Excellent widget! Is it possible to add a background color to the weekend dates and change the font color of the day names, like the example below?

B6B8CF0D-B6A4-4E24-BCFA-5AB3DC30BE09

> No, I‘m talking about the events you can see. Sorry that was not clear to understand. Would be nice to see the events of the next view weeks (i. e. 14 days).

No, I‘m talking about the events you can see. Sorry that was not clear to understand. Would be nice to see the events of the next view weeks (i. e. 14 days).
84B33D3C-97EE-43B2-8E34-CDBBFE4DE2D4

The answer to my question then is, yes, not, no.

You're looking to have additional functionality for a large size widget added. That view looks interesting. I'll see what I can do

Originally posted by @mvan231 in #3 (comment)

Store set-up settings between updates

Is there a way of storing the menu settings between updates, so the whole menu doesn't have to be reran between each update? I have seen settings stored in iCloud or Reminders app for example for shortcuts.

Running the whole menu between each update is a bit annoying. Even if the menu could astrix current setting whilst running, would be a big help - for example (yes*/no) meaning yes was selected last time. Meaning the same options could quickly be selected when running the setup. Any new options wouldn't have an astrix so the question could be read thoroughly before selecting an option.

Also making "update" standing out on the widget would be beneficial. Maybe in red/yellow to stand out.

Great work on the updates! My most-frequently used widget by far!

Alexa to Reminders Access.js quits with an error

Unfortunately, the script quits with an error. Do you have any tips on what could be wrong?

IMG_3842

Log says:

2024-05-18 13:59:23: index of "Sign in"
is -1
2024-05-18 13:59:23: logged in
2024-05-18 13:59:23: /private/var/mobile/
¡ Library/Mobile Documents/
iCloud~dk~simonbs~Scriptable/Documents/ lastCreatedDateTime.txt
2024-05-18 13:59:23: lastDate is 0
2024-05-18 13:59:26: Error: Die Daten konnten nicht gelesen werden, da sie nicht das korrekte Format haben.

Not able to check users with an underscore

When trying to set the widget with a user that has an underscore, there's an error:
2022-01-20 09:44:59: Error on line 151:25: TypeError: undefined is not an object (evaluating 'json[0].user')

Where line 151 has url of username set to anything that has an underscore:
url = 'CNAC_GN' //'ps5uknews'

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.