ShareShortcuts

Send Page To Readeck

mooch
„Send Page To Readeck“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit mooch die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
29K
Gesichert
2
Aktionen
31
Kategorie
API
Version
1.0
Sprache
EN

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

Neue Funktionen

Version 1.0

First release

Versionsverlauf
1.0 12. Jan 2024

First release

Was er macht

31 Aktionen
  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

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#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()
}
}
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

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

Werbung

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung