Skip to content

Latest commit

 

History

History
188 lines (135 loc) · 8.18 KB

README.md

File metadata and controls

188 lines (135 loc) · 8.18 KB

Reddit User Widget for Scriptable

Widget which shows your Karma, Coin-Balance, Cakeday, Profile Image etc.



1.2 Update Notes (July 20th 2022)

  • Script Saves and pulls reddit login datas on device (~ iCloud/Scriptable/Reddit-Widget/LoginDatas.json)
  • Downloads once profile image & app icons to iCloud for less mobile data usage
  • Added 'Delete Menu ⌦' for Downloaded Files
  • added first / error widget for all sizes
  • Added unread messages badge for large widget, too!
  • Added the reddit web-favicon and ReSurfer (amazing reddit client, check it out) as icon option.
  • Added the option to use the web-browser instead of reddit, apollo or ReSurfer app (If you also have the reddit app installed, iOS will first open the reddit app instead of the browser)
  • Fixed bug where long karma numbers may displayed cutted off in the small-widget
  • Small design and functionality improvements

1.1 Update Notes (May 05th 2022)

  • Updated Function for calculating karma numbers (e.g. 1494 = 1.494K; 20567 = 20.57K; 1000000 = 1M etc.)
  • Added Feature notification Badge also for Medium Widget
  • Added selfupdate function1

Known Issues

  • Long usernames (up to 13 symbols) may not display correctly (Small-Widget)
  • Long usertitles may not be displayed correctly in conjunction with username (Medium-Widget)
  • and some small other bugs...

Next Update Includes

  • Push-Notifications when today is your Cakeday and new reached Karma score (25 point steps)

Widget Overview

Theme

The Widget has a Dynamic Gradient Background


First Run

When you add the widget but also saved your login datas (via script) youll get the Error/First Run Widget.
Open the Script an Enter your Datas from Reddit.


Happy Cakeday

Today is your Cakeday!? The widget will tell you subtly.


⚙️ SETUP

Create Personal Reddit App/Script

  1. Login to your Account and go to https://old.reddit.com/prefs/apps/

  2. Create new Personal Script

  1. Click Checkbox "script" and set a redirect uri (e.g. same as in the image)

  1. Create App

  2. Copy Client_ID & Client_Secret

  1. Config Script
const refreshInt = 90 //in minutes
const enableNotifications = true //PUSH NOTIFICATIONS ARE MAYBE IN THE NEXT UPDATE
const showNotifyBadge = true //all widget sizes
const showCoinBalance = true //small- & medium widget
const showUserTitle = true //medium- & large widget
const clientIcon = 'https' //small- & medium widget
const cornerRadiusProfileImg = 0 //Set this to +25 for a rounded Image
const urlScheme = 'https'
/*
APP URL-SCHEMES
Apollo = apollo,
Reddit = reddit,
ReSurfer = surfer,
Narwahl = narwahl,
Web-Browser = https
*/

Official Reddit API Guidelines: https://github.com/reddit-archive/reddit/wiki/OAuth2

Helper-Shortcut for downloading App-Icon-URLs from the App-Store: https://routinehub.co/shortcut/11635/


Run Script In App

By running the scirpt In App it will present a menu including Username, Total Karma, Coin Balance & Unread Inbox Count at the Top. You can choose one of the following three options in the sheet: Show small-, medium-, largewidget or open your profile in your standard Reddit-Client (Create Personal Reddit App/Script - 6. Config Script)

Delete Menu

Installing

Install Script

  1. Install Scriptable for iOS
  2. Copy each line of the Script or download this helper shortcut
  3. + Add new Script

  1. Paste it into the new Script
  2. Finish

Add Widget To Homescreen

  1. Go to your homescreen and long tab anywhere
  2. By tapping the + it will opens the gallery
  3. chose or search for scriptable
  4. Chose the widget-size and tap "Add Widget"
  5. Tap the widget and choose the script, then set "When Interacting" = "Run Script"
  6. Set the widget Parameters (if you want)
  7. Done

On First Run

It will Downloads and Save the Following Symbols at the directory "Reddit-Widget"

iCloud Drive/
├─ Scriptable/
│  ├─ Reddit-Widget/
│  │  ├─ karma.png
│  │  ├─ coins.png
│  │  ├─ cakedayApollo.png
│  │  ├─ cakedayConfetti.png
│  │  ├─ Apollo.png
│  │  ├─ Reddit.png
│  │  ├─ ReSurfer.png
│  │  ├─ https.png
│  │  ├─ profileIcon.png
---- alternative symbols ----
│  │  ├─ coins2.png
│  │  ├─ cakedayReddit.png

Footnotes

  1. Function is written by the amazing @mvan231 - Thx for your Support