ShareShortcuts

Send Page To Readeck

mooch
Fork “Send Page To Readeck”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so mooch gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
29K
Saved
2
Actions
31
Category
API
Version
1.0
Language
EN

Sends a page to a self-hosted Readeck instance and offers option to read article immediately or download an ePub copy.

What's New

Version 1.0

First release

Version History
1.0 Jan 12, 2024

First release

What it does

31 actions
  1. Comment
    Set your base url below - e.g https://readeck.example.com (no forward slash)
  2. Text
  3. Comment
    Set your API key
  4. Text
  5. URL
    …/api/bookmarks
  6. Get Contents of URL
    …
  7. Get Dictionary from Input
  8. Get Dictionary Value
  9. Set Variable
    Status
  10. If
  11. Choose from Menu
    🙌 Article saved!
  12. Choose from Menu
    ⬇️ Download ePub
  13. Get Contents of URL
    …
  14. Get Item from List
  15. Get Dictionary Value
  16. URL
    …/…/article.epub
  17. Wait
  18. Get Contents of URL
    …
  19. Open File
  20. Stop This Shortcut
  21. Choose from Menu
    📖 Read now
  22. Get Contents of URL
    …
  23. Get Item from List
  24. Get Dictionary Value
  25. URL
    …/bookmarks/…
  26. Wait
  27. Open URLs
  28. Stop This Shortcut
  29. If
  30. Show Alert
  31. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/web'
#define color blue
#define glyph bookmark

// Set your base url below - e.g https://readeck.example.com (no forward slash)

// Set your API key

url("{}/api/bookmarks")
const ContentsOfURL = jsonRequest(, "POST", {
	"url": "{ShortcutInput}"
}, {
	"Authorization": "Bearer {}",
	"accept": "application/json",
	"content-type": "application/json"
})
const Dictionary = getDictionary(ContentsOfURL)
@Status = Dictionary['status']

if @Status == 202 {
	menu "🙌  Article saved!" {
	item "⬇️ Download ePub":
		const ContentsOfURL1 = jsonRequest(, "GET", {
			"url": "{ShortcutInput}"
		}, {
			"Authorization": "Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5cHR0NkZodVRmV1FhRTk4YnFwSkhHIn0.qO2VRjrw3FeWold7XRIzQOs_l4eoUnOgpUS6Rx7KSGANd9c6qmHdbCXQ8rTAJb790SavjYMJlxa0LF5EF40nAQ",
			"accept": "application/json",
			"content-type": "application/json"
		})
		const ItemFromList = getListItem(ContentsOfURL1, 0)
		url("{}/{}/article.epub")
		wait(3)
		const ContentsOfURL2 = jsonRequest(, "GET", {
			"url": "{ShortcutInput}"
		}, {
			"Authorization": "Bearer {}",
			"accept": "application/epub+zip"
		})
		openFile(ContentsOfURL2, false)
		stop()
	item "📖 Read now":
		const ContentsOfURL3 = jsonRequest(, "GET", {
			"url": "{ShortcutInput}"
		}, {
			"Authorization": "Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5cHR0NkZodVRmV1FhRTk4YnFwSkhHIn0.qO2VRjrw3FeWold7XRIzQOs_l4eoUnOgpUS6Rx7KSGANd9c6qmHdbCXQ8rTAJb790SavjYMJlxa0LF5EF40nAQ",
			"accept": "application/json",
			"content-type": "application/json"
		})
		const ItemFromList1 = getListItem(ContentsOfURL3, 0)
		const URL = url("{}/bookmarks/{}")
		wait(3)
		openURL(URL)
		stop()
	}
} else {
	confirm("Something went wrong.")
	stop()
}
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

You Might Also Like

See All
Advertisement