├── images
├── .DS_Store
├── Main Mockup.png
├── quotes
│ ├── .DS_Store
│ ├── QuotesConfig.png
│ ├── QuotesDisplay.png
│ ├── QuotesIphoneMockup.png
│ └── QuotesKanyeConfig.png
├── gitRepoPreview.png
├── insulter
│ ├── InsulterConfig.png
│ ├── InsulterDisplay.png
│ └── InsulterIPhoneMockup.png
├── periodicTable
│ ├── Periodic Table.png
│ ├── PeriodicTableConfig.png
│ ├── PeriodicTableDisplay.png
│ ├── PeroiodicTablePhone.png
│ ├── PeriodicTablePhoneMockup.png
│ └── iPhone Periodic Table Widget.png
├── notionIntegrations
│ ├── NotionxScriptable.png
│ └── re-reads
│ │ ├── NotionReReadsConfig.png
│ │ ├── NotionReReadsDisplay.png
│ │ └── notion-re-reads-mockup.png
├── RandomNumberFact
│ ├── RandomNumberFactConfig.png
│ ├── RandomNumberFactDisplay.png
│ └── randomNumberIphoneMockup.png
├── covidTrackerIndia
│ ├── CovidTrackerIndiaConfig.png
│ ├── covidTrackerIphoneMockup.png
│ └── Covid-tracker-display-image.png
├── covidTrackerIndiaV2
│ ├── CovidTrackerIndiav2Config.png
│ ├── CovidTrackerIndia-V2-display.png
│ └── covidTrackerIndiav2IphoneMockup.png
└── badges
│ ├── configurable.svg
│ ├── large-widget-badge.svg
│ ├── iOS-badge.svg
│ ├── medium-widget-badge.svg
│ ├── small-widget-badge.svg
│ └── scriptableBadge.svg
├── Notion Integrations
├── README.md
└── re-reads
│ ├── README.md
│ └── notion-re-reads.js
├── Insulter
├── README.md
└── Insulter.js
├── Covid Tracker - India
├── README.md
└── Covid Tracker India.js
├── Random Number Fact
├── README.md
└── Random Number Fact.js
├── Quotes
├── README.md
└── Quotes.js
├── Covid Tracker v2 - India
├── README.md
└── Covid Tracker India v2.js
├── Periodic Table
├── README.md
└── Periodic Table.js
└── README.md
/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/.DS_Store
--------------------------------------------------------------------------------
/images/Main Mockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/Main Mockup.png
--------------------------------------------------------------------------------
/images/quotes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/quotes/.DS_Store
--------------------------------------------------------------------------------
/images/gitRepoPreview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/gitRepoPreview.png
--------------------------------------------------------------------------------
/images/quotes/QuotesConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/quotes/QuotesConfig.png
--------------------------------------------------------------------------------
/images/quotes/QuotesDisplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/quotes/QuotesDisplay.png
--------------------------------------------------------------------------------
/images/insulter/InsulterConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/insulter/InsulterConfig.png
--------------------------------------------------------------------------------
/images/insulter/InsulterDisplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/insulter/InsulterDisplay.png
--------------------------------------------------------------------------------
/images/quotes/QuotesIphoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/quotes/QuotesIphoneMockup.png
--------------------------------------------------------------------------------
/images/quotes/QuotesKanyeConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/quotes/QuotesKanyeConfig.png
--------------------------------------------------------------------------------
/images/insulter/InsulterIPhoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/insulter/InsulterIPhoneMockup.png
--------------------------------------------------------------------------------
/images/periodicTable/Periodic Table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/Periodic Table.png
--------------------------------------------------------------------------------
/images/periodicTable/PeriodicTableConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/PeriodicTableConfig.png
--------------------------------------------------------------------------------
/images/periodicTable/PeriodicTableDisplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/PeriodicTableDisplay.png
--------------------------------------------------------------------------------
/images/periodicTable/PeroiodicTablePhone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/PeroiodicTablePhone.png
--------------------------------------------------------------------------------
/images/notionIntegrations/NotionxScriptable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/notionIntegrations/NotionxScriptable.png
--------------------------------------------------------------------------------
/images/RandomNumberFact/RandomNumberFactConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/RandomNumberFact/RandomNumberFactConfig.png
--------------------------------------------------------------------------------
/images/RandomNumberFact/RandomNumberFactDisplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/RandomNumberFact/RandomNumberFactDisplay.png
--------------------------------------------------------------------------------
/images/periodicTable/PeriodicTablePhoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/PeriodicTablePhoneMockup.png
--------------------------------------------------------------------------------
/images/RandomNumberFact/randomNumberIphoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/RandomNumberFact/randomNumberIphoneMockup.png
--------------------------------------------------------------------------------
/images/covidTrackerIndia/CovidTrackerIndiaConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndia/CovidTrackerIndiaConfig.png
--------------------------------------------------------------------------------
/images/covidTrackerIndia/covidTrackerIphoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndia/covidTrackerIphoneMockup.png
--------------------------------------------------------------------------------
/images/periodicTable/iPhone Periodic Table Widget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/periodicTable/iPhone Periodic Table Widget.png
--------------------------------------------------------------------------------
/images/covidTrackerIndia/Covid-tracker-display-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndia/Covid-tracker-display-image.png
--------------------------------------------------------------------------------
/images/covidTrackerIndiaV2/CovidTrackerIndiav2Config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndiaV2/CovidTrackerIndiav2Config.png
--------------------------------------------------------------------------------
/images/notionIntegrations/re-reads/NotionReReadsConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/notionIntegrations/re-reads/NotionReReadsConfig.png
--------------------------------------------------------------------------------
/images/covidTrackerIndiaV2/CovidTrackerIndia-V2-display.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndiaV2/CovidTrackerIndia-V2-display.png
--------------------------------------------------------------------------------
/images/notionIntegrations/re-reads/NotionReReadsDisplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/notionIntegrations/re-reads/NotionReReadsDisplay.png
--------------------------------------------------------------------------------
/images/notionIntegrations/re-reads/notion-re-reads-mockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/notionIntegrations/re-reads/notion-re-reads-mockup.png
--------------------------------------------------------------------------------
/images/covidTrackerIndiaV2/covidTrackerIndiav2IphoneMockup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dharmikumbhani/scriptable/HEAD/images/covidTrackerIndiaV2/covidTrackerIndiav2IphoneMockup.png
--------------------------------------------------------------------------------
/Notion Integrations/README.md:
--------------------------------------------------------------------------------
1 | # Notion x Scriptable Integrations
2 |
3 |
4 |
5 |
6 | ## Table of Contents
7 | - [❏ List of widgets](#-list-of-widgets)
8 | - [re-reads](#re-reads)
9 |
10 |
11 |
12 | ## [re-reads](https://github.com/dharmikumbhani/scriptable/tree/main/Notion%20Integrations/re-reads)
13 | 
14 |
15 | 
16 |
17 | Brings your re-reads (quotes, phrases, one liners from books you found while reading a book) to you **passively** instead of having to actively take time out and going through them.
18 |
--------------------------------------------------------------------------------
/images/badges/configurable.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/images/badges/large-widget-badge.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/images/badges/iOS-badge.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/Insulter/README.md:
--------------------------------------------------------------------------------
1 | ## Insulter - Widget
2 | Gives you a well deserved insult.
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | Even i am not sure why.
10 |
11 |
12 |
13 | ## 📖 How to use?
14 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
15 | 2. **Download** the [Insulter.js](./Insulter.js) script.
16 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
17 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
18 | 5. Select widget size (preferable medium widget) and click on **[+ Add widget]**
19 | 6. Configure the newly added widget as [given below](#️-configure).
20 |
21 |
22 |
23 | ## ⚙️ Configure
24 | **Long press** on the widget and click on **Edit Widget ⓘ**
25 |
26 | | Options | Defaults | Change to |
27 | | :------------- |:------------- |:-------------|
28 | | Script | Choose | Insulter|
29 | | While Interacting (optional) | Open App | Run Script |
30 | | Parameters | Text | NA |
31 |
32 | Like so:
33 |
34 |
35 |
36 |
37 |
38 | ## ✍️ Feedback
39 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
40 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
41 |
42 |
43 |
44 | ## 🔮 Future updates planned with this widget
45 | Based on response and other time based factors my current plan includes:
46 | - [ ] Delete this stupid widget.
47 |
48 |
49 |
50 | ## ⭐️ Other Credits:
51 | This widget uses the [Evil Insults](https://evilinsult.com) API which is an [open source](https://github.com/EvilInsultGenerator/) initiative.
52 |
53 |
54 |
55 | ---
56 |
57 | Made with 💙 for fun 😉 - DK
58 |
59 |
--------------------------------------------------------------------------------
/images/badges/medium-widget-badge.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/Covid Tracker - India/README.md:
--------------------------------------------------------------------------------
1 | ## Covid Tracker India - Widget
2 | Shows the latest number of newly confirmed cases and no of recovered patients from any state in India.
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | A perfect blend of boredom and fear of second wave lead to the creation of this.
10 |
11 |
12 |
13 | ## 📖 How to use?
14 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
15 | 2. **Download** the [Covid Tracker India.js](./Covid%20Tracker%20India.js) script.
16 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
17 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
18 | 5. Select widget size (preferable small widget) and click on **[+ Add widget]**
19 | 6. Configure the newly added widget as [given below](#️-configure).
20 |
21 |
22 |
23 | ## ⚙️ Configure
24 | **Long press** on the widget and click on **Edit Widget ⓘ**
25 |
26 | | Options | Defaults | Change to |
27 | | :------------- |:------------- |:-------------|
28 | | Script | Choose | Covid Tracker India|
29 | | While Interacting (optional) | Open App | Run Script |
30 | | Parameters | Text | State Code eg. "mh" for Maharashtra, "pb" for Punjab.defaults to maharashtra |
31 |
32 | Like so for Maharashtra:
33 |
34 |
35 |
36 |
37 |
38 | ## ✍️ Feedback
39 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
40 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
41 |
42 |
43 |
44 | ## 🔮 Future updates planned with this widget
45 | Based on response and other time based factors my current plan includes:
46 | - [ ] Add district wise support.
47 |
48 |
49 |
50 | ## ⭐️ Other Credits:
51 | This widget uses the [COVID19-India API](https://api.covid19india.org) which is an [open source](https://github.com/covid19india) initiative.
52 |
53 |
54 |
55 | ---
56 |
57 |
58 | Made with 💙 for fun 😉 - DK
59 |
60 |
--------------------------------------------------------------------------------
/Random Number Fact/README.md:
--------------------------------------------------------------------------------
1 | ## Random Number Fact - Widget
2 | This widget after every some interval randomly chooses a number and gives a facton that number:
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | I just came across scriptable and was intrigued by it. I have no idea about swift/objective-c but was working with javascript for quiet some time and thought this could be a great way to enter the realm of Automation and iOS development + i feel widgets are super cool!
10 |
11 |
12 |
13 | ## 📖 How to use?
14 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
15 | 2. **Download** the [Random Number Fact.js](./Random%20Number%20Fact.js) script.
16 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
17 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
18 | 5. Select widget size (preferable medium widget) and click on **[+ Add widget]**
19 | 6. Configure the newly added widget as [given below](#️-configure).
20 |
21 |
22 |
23 | ## ⚙️ Configure
24 | **Long press** on the widget and click on **Edit Widget ⓘ**
25 |
26 | | Options | Defaults | Change to |
27 | | :------------- |:------------- |:-------------|
28 | | Script | Choose | Random Number Fact|
29 | | While Interacting (optional) | Open App | Run Script |
30 | | Parameters | Text | NA |
31 |
32 | Like so:
33 |
34 |
35 |
36 |
37 |
38 | ## ✍️ Feedback
39 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
40 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
41 |
42 |
43 |
44 | ## 🔮 Future updates planned with this widget
45 | Based on response and other time based factors my current plan includes:
46 | - [ ] Adding other trivia given by numbersapi.
47 |
48 |
49 |
50 | ## ⭐️ Other Credits:
51 | This script uses the [numbersapi](http://numbersapi.com) made by or as they like to call it "Hacked up by" [David](http://david-hu.com/2012/03/05/announcing-numbers-api.html) and [Mack](http://mduan.com/).
52 |
53 |
54 |
55 |
56 | Made with 💙 for fun 😉 - DK
57 |
--------------------------------------------------------------------------------
/Quotes/README.md:
--------------------------------------------------------------------------------
1 | ## Quotes - Widget
2 | This widget after every some interval gets you an illuminating quote:
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | I just came across scriptable and was intrigued by it. I have no idea about swift/objective-c but was working with javascript for quiet some time and thought this could be a great way to enter the realm of Automation and iOS development + i feel widgets are super cool!
10 |
11 |
12 |
13 | ## 📖 How to use?
14 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
15 | 2. **Download** the [Quotes.js](./Quotes.js) script.
16 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
17 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
18 | 5. Select widget size (preferable medium widget) and click on **[+ Add widget]**
19 | 6. Configure the newly added widget as [given below](#️-configure).
20 |
21 |
22 |
23 | ## ⚙️ Configure
24 | **Long press** on the widget and click on **Edit Widget ⓘ**
25 |
26 | | Options | Defaults | Change to |
27 | | :------------- |:------------- |:-------------|
28 | | Script | Choose | Quotes|
29 | | While Interacting (optional) | Open App | Run Script |
30 | | Parameters | Text | "kanye" for quotes from Kanye West, "taylor" for quotes from Taylor Swift, defaults to "general" |
31 |
32 | Like so:
33 |
34 |
35 |
36 |
37 |
38 | ## ✍️ Feedback
39 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
40 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
41 |
42 |
43 |
44 | ## 🔮 Future updates planned with this widget
45 | Based on response and other time based factors my current plan includes:
46 | - [ ] Add other famous people on the list
47 |
48 |
49 |
50 | ## ⭐️ Other Credits:
51 | The General Quotes are presented to you with the help of [quotable](https://api.quotable.io) is used. For Kanye West quotes, [Kanye Rest](https://kanye.rest/) made by [Andrew Jazbec](https://github.com/ajzbc/kanye.rest) is used and for Taylor Swift quotes, [Taylor Rest](https://taylor.rest/) made by [Gilles](https://github.com/gillescoolen/taylor.rest) is used.
52 |
53 |
54 |
55 |
56 | Made with 💙 for fun 😉 - DK
57 |
58 |
--------------------------------------------------------------------------------
/Covid Tracker v2 - India/README.md:
--------------------------------------------------------------------------------
1 | ## Covid Tracker v2 India - Widget
2 | Displays the latest number of confirmed cases for any state in India along with a graph depicting the trend for the number of cases for the last 7 days.
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | After making the [first version](./../Covid%20Tracker%20-%20India) i was experimenting with other designs and figured this would make for a beautiful widget + the mathematics of programming the graph on the widget excited me; hence.
10 |
11 |
12 |
13 | ## 📖 How to use?
14 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
15 | 2. **Download** the [Covid Tracker India v2.js](./Covid%20Tracker%20India%20v2.js) script.
16 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
17 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
18 | 5. Select widget size (preferable small widget) and click on **[+ Add widget]**
19 | 6. Configure the newly added widget as [given below](#️-configure).
20 |
21 |
22 |
23 | ## ⚙️ Configure
24 | **Long press** on the widget and click on **Edit Widget**
25 |
26 | | Options | Defaults | Change to |
27 | | :------------- |:------------- |:-------------|
28 | | Script | Choose | Covid Tracker India v2|
29 | | While Interacting (optional) | Open App | Run Script |
30 | | Parameters | Text | State Code eg. "mh" for Maharashtra, "pb" for Punjab.defaults to maharashtra |
31 |
32 | Like so for Maharashtra:
33 |
34 |
35 |
36 |
37 |
38 | ## ✍️ Feedback
39 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
40 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
41 |
42 |
43 |
44 | ## 🔮 Future updates planned with this widget
45 | Based on response and other time based factors my current plan includes:
46 | - [ ] Add district vise support.
47 | - [ ] Experiment with linear gradient instead of a solid red (Once the needful functionality is added)
48 |
49 |
50 |
51 | ## ⭐️ Other Credits:
52 | This widget uses the [COVID19-India API](https://api.covid19india.org) which is an [open source](https://github.com/covid19india) initiative.
53 |
54 |
55 |
56 |
57 | Made with 💙 for fun 😉 - DK
58 |
59 |
--------------------------------------------------------------------------------
/Insulter/Insulter.js:
--------------------------------------------------------------------------------
1 | // Variables used by Scriptable.
2 | // These must be at the very top of the file. Do not edit.
3 | // icon-color: pink; icon-glyph: dizzy; share-sheet-inputs: plain-text;
4 |
5 | /* =======================================================
6 | Script Name : Insulter.js
7 | Author : dharmikumbhani201@gmail.com
8 | Version : 1.0.0
9 | Description :
10 | Get a well deserved insult
11 | Dependencies: N/A
12 | Actions :
13 | ======================================================= */
14 |
15 |
16 | //##################################################################
17 |
18 | //==============BASE URLS
19 |
20 | //--------GENERIC
21 | const GENERATE_RANDOM_INSULT = "https://evilinsult.com/generate_insult.php?lang=en&type=json";
22 |
23 | const FONT_SIZE_INSULT = 26;
24 | const FONT = Font.boldSystemFont(FONT_SIZE_INSULT);
25 |
26 | //==============COLORS
27 | const COLORS = {
28 | // bg: '#030E49',
29 | bg: '#F2F2F2',
30 | text: '#F20746'
31 | }
32 |
33 |
34 | const data = await fetchRandomInsult();
35 | const widget = createWidget(data);
36 | Script.setWidget(widget);
37 | Script.complete();
38 |
39 |
40 | async function fetchRandomInsult(){
41 | const urlToFetch = GENERATE_RANDOM_INSULT;
42 | const insult_JSON = await fetchJSON(`${urlToFetch}`);
43 | const insult = insult_JSON.insult;
44 | console.log(insult);
45 | return {insult}
46 | }
47 | /**
48 | * Make a REST request and return the response*
49 | * @param {*} url URL to make the request to
50 | * @param {*} headers Headers for the request
51 | */
52 | async function fetchJSON(url, headers) {
53 | try {
54 | console.log(`Fetching url: ${url}`);
55 | const request = new Request(url);
56 | // req.headers = headers;
57 | const response = await request.loadJSON();
58 | return response;
59 | } catch (error) {
60 | console.log(`Couldn't fetch ${url}`);
61 | }
62 | }
63 |
64 | //==========================
65 | // Creating Widget function
66 | //-----
67 | function createWidget(data) {
68 |
69 | console.log(`Creating widget with: ${JSON.stringify(data)}`);
70 | const widget = new ListWidget();
71 | widget.backgroundColor = new Color(COLORS.bg);
72 |
73 | widget.useDefaultPadding();
74 |
75 | //===STACK 1 - VERTICAL
76 | const insultVerticalStack = widget.addStack();
77 | insultVerticalStack.layoutVertically();
78 |
79 | //-------VSTACK - upper spacer
80 | insultVerticalStack.addSpacer();
81 |
82 | //-------VSTACK - insult
83 | // const upperCaseInsult = data.insult
84 | const insult = insultVerticalStack.addText(`${data.insult.toUpperCase()}`);
85 | insult.textColor = new Color(COLORS.text)
86 | insult.textOpacity = 1.0;
87 | insult.font = FONT;
88 | insult.centerAlignText();
89 | insult.minimumScaleFactor = 0.5
90 |
91 | //-------VSTACK - lower spacer
92 |
93 | insultVerticalStack.addSpacer();
94 | return widget;
95 | }
96 |
--------------------------------------------------------------------------------
/Periodic Table/README.md:
--------------------------------------------------------------------------------
1 | ## Periodic Table (Elements) - Widget
2 | This widget after every some interval randomly chooses one of 119 elements and displays useful information about it, things like:
3 | 1. Symbol,
4 | 2. Number (Z),
5 | 3. Atomic Mass (A),
6 | 4. Electron Affinity (Eₐ),
7 | 5. Phase
8 | - Solid - ❄️
9 | - Liquid - 💧
10 | - Gaseous - ♨️
11 | 6. Name of Element,
12 | 7. Short Summary on it and
13 | 8. Discovered By
14 |
15 |
16 |
17 |
18 |
19 | ## 🙇 Why i made this?
20 | > Widgets could be a great way to consume information passively
21 |
22 | And what better information than the one thats actually gonna be useful for your final Chemistry exam!
23 | I remember during my high school when i had to learn these elements; it was less of a memory and more of a scare. My teachers tried making us learn these elements using lots of acronyms but i still used to forget them; there were bloddy 118 of them during my time.
24 | A suggestion I got from my teacher was, take a big printout of the entire periodic table and stick it somewhere on the wall above your bed and spend 5 minutes reading through it before going off to sleep.
25 | Theoretically this suggestion was great but practically for me it proved quiet useless! I used to end up playing Call of Duty late at night with friends and sleep; spending the last 5 minutes before sleeping looking at the black mirror.
26 |
27 |
28 |
29 | ## 📖 How to use?
30 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
31 | 2. **Download** the [Periodic Table.js](./Periodic%20Table.js) script.
32 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
33 | 4. **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
34 | 5. Select widget size (preferable large widget) and click on **[+ Add widget]**
35 | 6. Configure the newly added widget as [given below](#️-configure).
36 |
37 |
38 |
39 | ## ⚙️ Configure
40 | **Long press** on the widget and click on **Edit Widget ⓘ**
41 |
42 | | Options | Defaults | Change to |
43 | | :------------- |:------------- |:-------------|
44 | | Script | Choose | Periodic Table|
45 | | While Interacting (optional) | Open App | Run Script |
46 | | Parameters | Text | NA |
47 |
48 | Like so:
49 |
50 |
51 |
52 |
53 |
54 | ## ✍️ Feedback
55 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
56 | widgets that can help us passively learn things should not be just limited to periodic tables; but to various other subjects as well, if you have any such idea in mind, feel free to reach out to me!
57 |
58 |
59 |
60 | ## 🔮 Future updates planned with this widget
61 | Based on response and other time based factors my current plan includes:
62 | - [ ] Change background color depending on light and dark mode
63 | - [ ] Loop through all the elements in order one after the other
64 | - [ ] Control the refresh rate, so one can set it to refresh element daily.
65 |
66 |
67 |
68 | ## ⭐️ Other Credits:
69 | This script uses the [periodic table json](https://github.com/Bowserinator/Periodic-Table-JSON) made by [Bowserinator](https://github.com/Bowserinator) as it's source.
70 |
71 |
72 |
73 | ---
74 |
75 |
76 | Made with 💙 for fun 😉 - DK
77 |
78 |
--------------------------------------------------------------------------------
/images/badges/small-widget-badge.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/Random Number Fact/Random Number Fact.js:
--------------------------------------------------------------------------------
1 | // Variables used by Scriptable.
2 | // These must be at the very top of the file. Do not edit.
3 | // icon-color: blue; icon-glyph: infinity;
4 |
5 | /* =======================================================
6 | Script Name : Random Number Fact.js
7 | Author : dharmikumbhani201@gmail.com
8 | Version : 1.0.0
9 | Description :
10 | Fact on a randomly generated number
11 | Dependencies: N/A
12 | Actions :
13 | ======================================================= */
14 |
15 |
16 | //##################################################################
17 |
18 | //==============BASE URLS
19 |
20 | const BASE_URL = "http://numbersapi.com"
21 |
22 | //===============Font name and sizes
23 | const FONT_NAME_NUMBER = 'Futura-CondensedExtraBold';
24 | const FONT_NAME_FACT = 'Futura-Medium';
25 | const FONT_SIZE_NUMBER = 42; //Bold
26 | const FONT_SIZE_FACT_TEXT = 16; //Regular
27 |
28 | //===============Colors
29 | const COLORS = {
30 | blackLG:{
31 | l: '#000000',
32 | r: '#676767'
33 | },
34 | purpleLG:{
35 | l: '#B448B2',
36 | r:'#FF6091'
37 | },
38 | blueLG:{
39 | l: '#0038FF',
40 | r:'#3EABFF'
41 | },
42 | textcolor: '#FFFFFF',
43 | }
44 |
45 |
46 | // Fetch data and create widget
47 | const data = await fetchRandomNumberFact();
48 | const widget = createWidget(data);
49 | Script.setWidget(widget);
50 | Script.complete();
51 |
52 |
53 | //==========================
54 | // Fetching Fact using Random Number Generator Function
55 | //-----
56 | async function fetchRandomNumberFact(){
57 | var randomNumber = getRandomIntInclusive(0,365)
58 | console.log(randomNumber)
59 |
60 | const fact = await fetchText(`${BASE_URL}/${randomNumber}`);
61 | // console.log(fact);
62 |
63 | var regex = new RegExp(".?"+ randomNumber + " ");
64 | // console.log(regex);
65 |
66 | const strippedFact = fact.replace(regex, "");
67 | console.log(strippedFact);
68 | return {
69 | randomNumber,
70 | strippedFact
71 | }
72 | }
73 |
74 | //==========================
75 | // Random Number Generator
76 | //-----
77 | function getRandomIntInclusive(min, max) {
78 | min = Math.ceil(min);
79 | max = Math.floor(max);
80 | return Math.floor(Math.random() * (max - min + 1) + min);
81 | //The maximum is inclusive and the minimum is inclusive
82 | }
83 |
84 | /**
85 | * Make a REST request and return the response for*
86 | * @param {*} url URL to make the request to
87 | * @param {*} headers Headers for the request
88 | */
89 | async function fetchText(url, headers) {
90 | try {
91 | console.log(`Fetching url: ${url}`);
92 | const request = new Request(url);
93 | // req.headers = headers;
94 | const response = await request.loadString();
95 | return response;
96 | } catch (error) {
97 | console.log(`Couldn't fetch ${url}`);
98 | }
99 | }
100 |
101 | //==========================
102 | // Creating Widget function
103 | //-----
104 | function createWidget(data) {
105 |
106 | console.log(`Creating widget with: ${JSON.stringify(data)}`);
107 |
108 | const widget = new ListWidget();
109 | const bgColor = new LinearGradient();
110 | bgColor.colors = [new Color(COLORS.purpleLG.l), new Color(COLORS.purpleLG.r)];
111 | bgColor.locations = [1.0, 0.0];
112 | bgColor.startPoint = new Point(1, 1);
113 | bgColor.endPont = new Point(0, 0);
114 | widget.backgroundGradient = bgColor;
115 | widget.setPadding(10, 15, 15, 10);
116 |
117 | const stack = widget.addStack();
118 | stack.layoutVertically();
119 | stack.spacing = 4;
120 | stack.size = new Size(320, 0);
121 |
122 | // Number Display Text
123 | const randomNumber = stack.addText(`${data.randomNumber}`);
124 | randomNumber.textColor = Color.white();
125 | randomNumber.textOpacity = 1.0;
126 | randomNumber.font = new Font(FONT_NAME_NUMBER, FONT_SIZE_NUMBER);
127 |
128 | // Fact Display Text
129 | const fact = stack.addText(`${data.strippedFact}`);
130 | fact.textColor = Color.white();
131 | fact.font = new Font(FONT_NAME_FACT, FONT_SIZE_FACT_TEXT);
132 |
133 | return widget;
134 | }
135 |
136 |
--------------------------------------------------------------------------------
/Notion Integrations/re-reads/README.md:
--------------------------------------------------------------------------------
1 | ## notion-re-reads Widget
2 | Brings your re-reads (quotes, phrases, one liners from books you found while reading a book) to you **passively** instead of having to actively take time out and going through them.
3 |
4 |
5 |
6 |
7 |
8 | ## 🙇 Why i made this?
9 | The list of profound quotes and phrases that i had come across was increasing daily and although i was diligent enough to type them down immediately in notion but was too lazy to find and schedule specific time for going through them.
10 | I needed a way where these re-reads would come to me instead me having to actively take time out to go through all of them.
11 | Hence this widget was made to passively, intermiddently and randomly get me a random re-read that i had typed down.
12 |
13 |
14 |
15 | ## 📖 How to use?
16 | 1. **Download** [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
17 | 2. **Download** the [notion-re-reads.js](./notion-re-reads.js) script.
18 | 3. **Transfer** the downloaded script to the "scriptable" folder on iCloud Drive which should have been created upon downloading of the app.
19 | 4. Go to [developers.notion](https://developers.notion.com) and click on **MY INTEGRATIONS**.
20 | 5. Create a **NEW INTEGRATION** copy the secrete token and paste it inside the double quotes for the variable name **BEARER_TOKEN** inside your notion-re-reads.js file.
21 | 6. Now go to the your notion page where you have all your re-reads and click on **SHARE** and **ADD** the recent integration you made by clicking on invite.
22 | 7. After adding the integration directly copy link to that page (or try: ⌘+L for mac) and paste it inside the double quotes of the variable **NOTION_LINK** inside your notion-re-reads.js file.
23 | 8. Now the final steps of adding the widget to your home screen:
24 |
25 | **Long press** anywhere to enter the "jiggle mode" and click on "**+**" sign present on the top left of your screen. **Scroll down** until you find the Scriptable app and click on it.
26 | 9. Select widget size (preferable large widget) and click on **[+ Add widget]**
27 | 10. Configure the newly added widget as [given below](#️-configure).
28 |
29 |
30 |
31 | ## ⚙️ Configure
32 | **Long press** on the widget and click on **Edit Widget ⓘ**
33 |
34 | Depending on the parameter the widget will display any of the selected type. i.e if you choose the parameter as "quote" then you will get a random quotes that is there in your notion page.
35 |
36 |
37 | | Options | Defaults | Change to |
38 | | :------------- |:------------- |:-------------|
39 | | Script | Choose | notion-re-reads|
40 | | While Interacting (optional) | Open App | Run Script |
41 | | Parameters (optional) | Text | "quote", "paragraph", "heading_1", "heading_2", "heading_3", "bulleted_list_item", "numbered_list_item", "to_do" |
42 |
43 | Like so:
44 |
45 |
46 |
47 |
48 |
49 | ## 👨🏻💻 How i use this in my workflow
50 | 1. While reading as soon as I come across something profound and feel it could be a great phrase to add it to my vocabulary, i immediately add it to my notion page as a quote.. I call that page Communications Development.
51 | 2. Thats it. Now i let the widget do its work and be rest assured that sometime in future i will surely read it again.
52 |
53 |
54 |
55 | ## ✍️ Feedback
56 | If you have any feature request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
57 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
58 |
59 |
60 |
61 | ## 🔮 Future updates planned with this widget
62 | Based on response and other time based factors my current plan includes:
63 | - [ ] Add Support for randomly selecting from multiple parameters types (quotes + bulleted_list_item, etc).
64 |
65 |
66 |
67 | ## ⭐️ Other Credits:
68 | This widget uses the [Notion](https://developers.notion.com) API.
69 |
70 |
71 |
72 | ---
73 |
74 | Made with 💙 for fun 😉 - DK
75 |
76 |
--------------------------------------------------------------------------------
/images/badges/scriptableBadge.svg:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Scriptable - scripts and widgets for iOS
2 | Collection of widgets and scripts made using scriptable app for iOS
3 |
4 |  
5 |
6 |
7 |
8 |
9 | Scriptable is an app that lets you add cool, lightweight widgets as well as automation to your apple devices.
10 |
11 |
12 |
13 | ## Table of Contents
14 | - [❏ List of widgets](#-list-of-widgets)
15 | - [Notion Integrations](#notion-integrations)
16 | - [Covid Tracker India](#covid-tracker-india)
17 | - [Covid Tracker India v2](#covid-tracker-india-v2)
18 | - [Insulter](#insulter)
19 | - [Periodic Table](#periodic-table)
20 | - [Quotes](#quotes)
21 | - [Random Number Fact](#random-number-fact)
22 | - [📖 How to use scriptable widgets?](#-how-to-use-scriptable-widgets)
23 | - [✍️ Feedback](#️-feedback)
24 |
25 |
26 |
27 | ## ❏ List of widgets
28 | ### [Notion Integrations](https://github.com/dharmikumbhani/scriptable/tree/main/Notion%20Integrations)
29 | 
30 |
31 |
32 |
33 | Scriptable widgets made using the Notion API.
34 |
35 | ⚠️ Due to recent [closure](https://blog.covid19india.org/2021/08/07/end/) of the covid tracker API, the following widgets might not work!
36 | ### [Covid Tracker India](https://github.com/dharmikumbhani/scriptable/tree/main/Covid%20Tracker%20-%20India)
37 | 
38 |
39 |
40 | 
41 |
42 | Shows the latest number of newly confirmed cases and no of revcovered patients from any state in India.
43 |
44 | ### [Covid Tracker India v2](https://github.com/dharmikumbhani/scriptable/tree/main/Covid%20Tracker%20v2%20-%20India)
45 | 
46 |
47 | 
48 |
49 | Displays the latest number of cofirmed cases for any state in India along with a graph depciting the trend for the number of cases for the last 7 days.
50 |
51 | ### [Insulter](https://github.com/dharmikumbhani/scriptable/tree/main/Insulter)
52 | 
53 |
54 | 
55 |
56 | Petty self explanatory - Gives you a well deserved insult.
57 |
58 | ### [Periodic Table](https://github.com/dharmikumbhani/scriptable/tree/main/Periodic%20Table)
59 | 
60 |
61 | 
62 |
63 | Get details about an element from the periodic table
64 |
65 | ### [Quotes](https://github.com/dharmikumbhani/scriptable/tree/main/Quotes)
66 | 
67 |
68 | 
69 |
70 | Shows a random quote from famous people like Alber Einstein, John Wolfgang von Goethe
71 |
72 | ### [Random Number Fact](https://github.com/dharmikumbhani/scriptable/tree/main/Random%20Number%20Fact)
73 | 
74 |
75 | 
76 |
77 | Well gives you a rather intresting fact adout a randomly generated number.
78 |
79 |
80 |
81 | ## 📖 How to use scriptable widgets?
82 | 1. Download the [scriptable app](https://apps.apple.com/in/app/scriptable/id1405459188).
83 | 2. Check if the scriptable folder is created have created a folder having the name "scriptable" in your iCloud drive.
84 | 3. Download the .js script of the respective widget and add it to that scriptable folder.
85 | 4. Long Press anywhere on screen, click on "+" icon, select scriptable app and click on add widget with the size depending on the widget you choose.
86 | 5. "**edit widget ⓘ**" by long pressing it to change the following configurations:
87 | | Options | Defaults | Change to |
88 | | ------------- |:------------- |:-------------|
89 | | Script | Choose | Select widget |
90 | | While Interacting (optional) | Open App | Run Script |
91 | | Parameters | Text | Configurable options, depending on widgets |
92 | 6. More info and configurable options (if any) are availble in the respective folders of widgets.
93 |
94 |
95 |
96 | ## ✍️ Feedback
97 | If you have any feature/widget request or feedback on this feel free to DM me on [Twitter](https://twitter.com/DharmiKumbhani) or mail me at
98 | widgets that can help us passively learn things should not be just limited to facts; but to various other domains as well, if you have any such idea in mind, feel free to reach out to me!
99 |
100 |
101 |
102 | ---
103 |
104 |