ShareShortcuts

Send Page To Readeck

mooch
Fork “Send Page To Readeck”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så mooch får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
29K
Gemt
2
Handlinger
31
Kategori
API
Version
1.0
Sprog
EN

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

Nyheder

Version 1.0

First release

Versionshistorik
1.0 12. jan. 2024

First release

Hvad den gør

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

Vis som kode
Beta

Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.

#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()
}
}
Åbn i Cherri Playground Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ingen anmeldelser endnu. Vær den første!

Annonce

Du vil måske også kunne lide

Se alle
Annonce