ShareShortcuts

Shorten URL

My awesome URL Shortener was inspired by someone else's shortcut

jayes14
Создать форк «Shorten URL»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы jayes14 получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
38K
Сохранено
3
Действия
11
Категория
Utilities
Версия
1.1
Язык
EN

My awesome URL Shortener was inspired by someone else's shortcut.

Their shortcut lacked in the main functionality, but it made up for it with sloppy unnecessary steps, ultimately causing it to not function properly. (oops did I say that out loud.)

I cleaned it up making a version that also provides notifications for when the shortcut:

– cannot detect a URL input

– is successful in completing the shortening (automatically applied to your clipboard)

– shortcut has an error

Что нового

Версия 1.1

Upgraded to include Shortcuts Updater

История версий
1.1 27 сен 2022 г.

Upgraded to include Shortcuts Updater

1.0 27 сен 2022 г.

First release

Что делает

Действий: 11
  1. Text
  2. Get Contents of URL
    …
  3. Get Text from Input
  4. Copy to Clipboard
  5. Show Notification
    …
  6. Comment
    Successful – the shortened URL will come after STATUS. If it was unsuccessful – “Error” will come after STATUS. If you continuously keep running into an “Error” this can mean that you have more than a URL selected. (i.e. an entire cell in a table, w…
  7. Get My Shortcuts
  8. If
  9. Dictionary
  10. Run Shortcut
    Shortcuts Updater
  11. If

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/web'
#define color red
#define glyph shrinkArrow

const ContentsOfURL = fileRequest(, "GET")
const Text = getText(ContentsOfURL)
setClipboard(Text)
showNotification(Text, "SHORTEN URL STATUS:", false, Text)
/*
Successful – the shortened URL will come after STATUS.

If it was unsuccessful – “Error” will come after STATUS.
If you continuously keep running into an “Error” this can mean that you have more than a URL selected. (i.e. an entire cell in a table, will result in an error.)
*/
const MyShortcuts = getShortcuts()

if MyShortcuts['Name'] contains "Shortcuts Updater" {
	const Dictionary = {
		"Name": "Shorten URL",
		"ShareID": 2181,
		"Version": "1.1"
	}
	run("Shortcuts Updater", Dictionary)
} else {
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от jayes14

См. все

Вам также может понравиться

См. все
Реклама