ShareShortcuts

Send Page To Readeck

mooch
Dupliquer « Send Page To Readeck »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que mooch soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
29K
Enregistré
2
Actions
31
Catégorie
API
Version
1.0
Langue
EN

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

Nouveautés

Version 1.0

First release

Historique des versions
1.0 12 janv. 2024

First release

Ce qu’il fait

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

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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 = getRandomItem(ContentsOfURL3)
		const URL = url("{}/bookmarks/{}")
		wait(3)
		openURL(URL)
		stop()
	}
} else {
	confirm("Something went wrong.")
	stop()
}
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Ça pourrait aussi te plaire

Tout afficher
Publicité