Seeking an app or shortcut scheme for custom "quote of the day"

Over the years, I’ve collected many inspirational and instructional quotes that I’d like to appear randomly, preferably on my iPhone, or at least on my Mac. The App Store offers several that supply their quotes, but I want my own collection. I thought surely someone would have created something like this by now, but so far I haven’t found anything.

It would really be great to have my own quote of the day appear as one of the new Widgets.

If not via an app, could this be done with Shortcuts and a text file that contains one quote per line?

Anki can be used like this on macOS.

Here’s a quick scriptable script I wrote that may work.

const fm = FileManager.iCloud()
const docDir = fm.documentsDirectory()
const docs = fm.readString(`${docDir}/docs/ex.txt`)
let as_list = docs.split("\n").filter(l => l.length > 0 )

today_s_quote = as_list[Math.floor(Math.random() * as_list.length)]

// Set gradient background 
let startColor = new Color("#fbc2eb") 
let endColor = new Color("#a6c1ee") 
let gradient = new LinearGradient() 
gradient.colors = [startColor, endColor] 
gradient.locations = [0.0, 1]


let widget = new ListWidget()
let txt = widget.addText(`"${today_s_quote}"`)
txt.centerAlignText()
//txt.textColor = Color.white()
//txt.font = Font.largeTitle()
widget.useDefaultPadding()
widget.backgroundGradient = gradient
widget.presentMedium()

(I added a docs folder in the Scriptable iCloud folder and have a ex.txt I’m reading from line by line.

The cool thing is with the scriptable beta for Mac, this will work on iPhone, iPad, and Mac!

1 Like

This might do it. On iOS now, with macOS coming soon. It’s all about capturing highlights and quotes from books and delivering it back. Seems like a local only version of ReadWise.

I haven’t used it though, so I’m not sure how you’d go about getting your existing quotes into it.

Edit: I’m also not positive the widget cycles through quotes of if it just shows a static quote.

Edit 2: This bugged me so I installed it to test. It does do random highlights in the widget. The downside is your quotes need to be associated with a book. They can be random test pasted in, but will show as being from the associated book.

Thanks. I downloaded it a few weeks ago for memorizing, but I’ll check it out for this use.

I’m not familiar with Scriptable, but will soon start David’s Shortcuts course. Would this be run from a shortcut? I like the ease of getting my quotes into a text file, since they’re now individual rows in OmniOutliner.

I’m trying it with a custom book. Getting quotes in looks tedious, since you have to either print them out and photograph them one at a time, or copy/paste one at a time via its accessibility feature. I’d love to just feed it a text file. I’ll email the developer. Thanks!

It could be run from a shortcut but usually Scriptable is run on its own (for widgets).

1 Like

Found a new app geared around this, appears to have just launched. I don’t know if they have widgets yet.

Not only are there no widgets (yet), the menu’s blank. Apparently it’s still being developed, and all you can do is manually type in quotes and tag them. I’m surprised you could put something in the App Store that so much in the early stages of development. It looks promising, though, so I signed up for their communications.

Their pitch mentions quote-collectors that keep them in Notes, text files, paper notebooks, etc., so surely they’ll eventually provide a way to import quotes from text.

Thanks for telling me about it!

You can use Drafts, WidgetPack, and Shortcuts to do this without too much fuss (after you get it set up). I’ve been liking my system for months:

Finally getting the time to work on this, Dustin. I installed Scriptable on my iPhone and created a new script by pasting the script you posted. I also made a BBEdit file with three quotes, named ex.txt and put it in a Scriptable/docs folder on my iCloud Drive.

But when I run the script, I get “Exception Occurred, error on line 4:19 TypeError: null is not an object (evaluating ‘docs.split’)”

I’m sure I’ve missed something due to my ignorance!

I set a Scriptable widget to run this script… Is the idea that I’ll get a new quote showing on the widget whenever I tap it?

Thanks for your help,
Russell

It’s possible that the file is not yet downloaded. I did not account for this in the original code. You can adjust the top bit similar to this

const fm = FileManager.iCloud()
const docDir = fm.documentsDirectory()
const filePath = `${docDir}/docs/ex.txt`
if(!fm.isFileDownloaded(filePath)) {
	fm.downloadFileFromiCloud(filePath)
}
const docs = fm.readString(filePath)
let as_list = docs.split("\n").filter(l => l.length > 0 )

Looks like that fixed it. Thanks, Dustin!

1 Like

This app just came out today. It’s iOS only I believe.

Thanks for the heads-up. I wrote the dev to see if can import the quotes I’ve already amassed in a text file.