ShareShortcuts

getCharts

Get the charts you need

mythicalsn0w
Fork “getCharts”

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å mythicalsn0w 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
57K
Gemt
1
Handlinger
121
Kategori
Værktøjer
Version
2.371
Sprog
EN

Forhåndsvisning

Get the charts you need.

getCharts is a simple yet powerful Shortcut designed to make a flight simmer life easier by getting the latest airport charts they need in a few simple clicks.

Easy to use.

getCharts easy to use menu makes for a very quick way to get airport charts. Gone are the days of frantically searching on Google for outdated airport charts.

Nyheder

Version 2.371

- Fixed a bug where the shortcut would throw an error when it tries to restart (again)

Versionshistorik
2.371 7. aug. 2020

- Fixed a bug where the shortcut would throw an error when it tries to restart (again)

1.0 7. aug. 2020

First release

Hvad den gør

121 handlinger
  1. Comment
    getCharts by TiltedLandingGear Easy way to get airport charts. Changelog V2.3.7.1 - Fixed a bug where the shortcut would throw an error when it tries to restart (again) V2.3.7 - Improved iPad compatibility by playing a sound instead of vibrating whe…
  2. Text
  3. Add to Variable
  4. Text
  5. Add to Variable
  6. Get Device Details
  7. Add to Variable
  8. Text
  9. Add to Variable
  10. Get Contents of URL
    …
  11. Get Dictionary Value
  12. Add to Variable
  13. If
  14. Get Dictionary Value
  15. Add to Variable
  16. If
  17. Vibrate Device
  18. If
  19. Play Sound
  20. Text
  21. Show Alert
    Update available
  22. If
  23. Get File
  24. If
  25. Create Folder
  26. Get File
  27. Repeat with Each
  28. Get Name
  29. Text
  30. Add to Variable
  31. Repeat with Each
  32. Split Text
  33. Get Item from List
  34. Get Item from List
  35. Set Dictionary Value
  36. Set Variable
    dict
  37. Choose from Menu
    getCharts Menu
  38. Choose from Menu
    Download
  39. Ask for Input
    Airport ICAO Code
  40. Change Case
  41. Add to Variable
  42. If
  43. If
  44. Vibrate Device
  45. If
  46. Play Sound
  47. Show Alert
    Chart Already Downloaded
  48. If
  49. Vibrate Device
  50. If
  51. Play Sound
  52. Show Notification
    Downloading chart...
  53. Text
  54. Get Contents of URL
    …
  55. Save File
  56. Get Name
  57. If
  58. Delete Files
  59. Text
  60. Get Contents of URL
    …
  61. Save File
  62. If
  63. Delete Files
  64. If
  65. Vibrate Device
  66. If
  67. Play Sound
  68. Show Alert
    Not Found
  69. If
  70. Get File
  71. Open File
  72. If
  73. Vibrate Device
  74. If
  75. Play Sound
  76. Show Notification
    Chart downloaded
  77. If
  78. Get File
  79. Open File
  80. If
  81. Vibrate Device
  82. If
  83. Play Sound
  84. Show Notification
    Chart downloaded
  85. Choose from Menu
    View
  86. Get Dictionary Value
  87. Choose from List
  88. Get File
  89. Open File
  90. Choose from Menu
    Manage
  91. Get Dictionary Value
  92. Choose from List
  93. If
  94. Vibrate Device
  95. If
  96. Play Sound
  97. Show Alert
  98. Repeat with Each
  99. Split Text
  100. Get Item from List
  101. Get Item from List
  102. Get File
  103. Delete Files
  104. Choose from Menu
    Update
  105. If
  106. Text
  107. Choose from Menu
    …
  108. Choose from Menu
    Update
  109. Get Dictionary Value
  110. Match Text
  111. Text
  112. URL
    workflow://shortcuts/…
  113. Open URLs
  114. Choose from Menu
    Ignore
  115. Run Shortcut
  116. If
  117. Show Alert
    No update available
  118. Run Shortcut
  119. Choose from Menu
    About
  120. Show Alert
    About getCharts
  121. Run Shortcut

Vis som kode
Beta

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

#define mac false
#include 'actions/web'
#include 'actions/device'
#define color violet

/*
getCharts by TiltedLandingGear
Easy way to get airport charts.

Changelog
V2.3.7.1
- Fixed a bug where the shortcut would throw an error when it tries to restart (again)
V2.3.7
- Improved iPad compatibility by playing a sound instead of vibrating when the shortcut detects iPad as the device model
- Removed shortcut version in shortcut name
V2.3.6.2
- Fixed a bug where the shortcut would throw an error when it tries to restart
V2.3.6.1
- Closing about menu now restarts the shortcut instead of closing it
V2.3.6
- Added update checking on startup
V2.3.5
- Updating the shortcut now skips the iCloud screen
V2.3.4
- Shortcut automatically creates folder on first run
V2.3.3
- Replaced UpdateKit with embedded updater. That didn't last long did it?
V2.3.2.1
- Added alert when user doesn't have UpdateKit installed
V2.3.2
- Changed folder location
- Integrated UpdateKit
V2.3.1
- Added alert when trying to download a chart that is already downloaded
V2.3
- Added menu for managing downloaded charts
V2.2
- Added a new charts source
V2.1
- Added About page
- Optimizations
V2.0
- Added menu system for downloading and viewing downloaded charts
V1.0
- Initial release

*/
@version += "2.3.7.1"
@shortcutName += "getCharts"
getDeviceDetail("Device Model")
@deviceModel
@RoutineHubURL += "https://routinehub.co/api/v1/shortcuts/6121/versions/latest"
const ContentsOfURL = downloadURL(@RoutineHubURL)
@newVersion += ContentsOfURL['Version']

if @version != @newVersion {
	@notes += ContentsOfURL['Notes']
	if @deviceModel == "iPhone" {
		vibrate()
	} else {
		playSound(nil)
	}
	alert(, "Update available")
} else {
}
const File = getFile("getCharts/Charts/", false)

if !File {
	createFolder("getCharts/Charts")
}
const File1 = getFile("getCharts/Charts/", false)

for _ in File1 {
	getName(@RepeatItem)
	@fileList += "{}"
}

for _ in @fileList {
	const SplitText = splitText(@RepeatItem, ":")
	getListItems(SplitText, 0, 0)
	getListItems(SplitText, 0, 0)
	setValue(@dict)
	@dict
}

menu "getCharts Menu" {
item "Download":
	const ProvidedInput = prompt("Airport ICAO Code")
	uppercase(ProvidedInput)
	@ICAO
	if @fileList contains @ICAO {
		if @deviceModel == "iPhone" {
			vibrate()
		} else {
			playSound(nil)
		}
		alert("Chart for {@ICAO} has already been downloaded. Do you want to continue?", "Chart Already Downloaded")
	}
	if @deviceModel == "iPhone" {
		vibrate()
	} else {
		playSound(nil)
	}
	showNotification("Downloading chart...", false, @ICAO)
	const ContentsOfURL1 = downloadURL()
	const SavedFile = saveFile("getCharts/Charts/", ContentsOfURL1, true)
	const Name = getName(SavedFile)
	if Name contains "404" {
		deleteFiles(SavedFile)
		const ContentsOfURL2 = downloadURL()
		const SavedFile1 = saveFile("getCharts/Charts/", ContentsOfURL2, true)
		if SavedFile1['File Extension'] != "pdf" {
			deleteFiles(SavedFile1)
			if @deviceModel == "iPhone" {
				vibrate()
			} else {
				playSound(nil)
			}
			alert("Chart not available", "Not Found")
		} else {
			const File2 = getFile("getCharts/Charts/{@ICAO}.pdf")
			openFile(File2, false)
			if @deviceModel == "iPhone" {
				vibrate()
			} else {
				playSound(nil)
			}
			showNotification("Chart downloaded", false)
		}
	} else {
		const File3 = getFile("getCharts/Charts/{@ICAO}.pdf")
		openFile(File3, false)
		if @deviceModel == "iPhone" {
			vibrate()
		} else {
			playSound(nil)
		}
		showNotification("Chart downloaded", false)
	}
item "View":
	const DictionaryValue = getValue(@dict, "")
	chooseFromList(DictionaryValue, "Downloaded Charts")
	const File4 = getFile("getCharts/Charts/{}.pdf")
	openFile(File4, false)
item "Manage":
	const DictionaryValue1 = getValues(@dict)
	const ChosenItem = chooseFromList(DictionaryValue1, "Select Charts to Delete", true)
	if @deviceModel == "iPhone" {
		vibrate()
	} else {
		playSound(nil)
	}
	alert("Delete the selected files?", "")
	for _ in ChosenItem {
		const SplitText1 = splitText(@RepeatItem, ":")
		const ItemFromList = getListItems(SplitText1, 0, 0)
		getListItems(ItemFromList, 0, 0)
		const File5 = getFile("getCharts/Charts/{}.pdf")
		deleteFiles(File5)
	}
item "Update":
	if @version != @newVersion {
		menu  {
		item "Update":
			containsText(, "[^\/]+$")
			const URL = url("workflow://shortcuts/{}")
			openURL(URL)
		item "Ignore":
			run(@shortcutName, nil)
		}
	} else {
		alert("Latest version is already installed.", "No update available")
		runSelf()
	}
item "About":
	alert("getCharts V{@version}\nMade by TiltedLandingGear", "About getCharts")
	runSelf()
}
Å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