ShareShortcuts

Send Page To Readeck

mooch
Bifurcar “Send Page To Readeck”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que mooch reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
29K
Guardado
2
Acciones
31
Categoría
API
Versión
1.0
Idioma
EN

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

Novedades

Versión 1.0

First release

Historial de versiones
1.0 12 de ene. de 2024

First release

Qué hace

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

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#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()
}
}
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

También te puede gustar

Ver todo
Publicidad