ShareShortcuts

Copy Between What

hunter9888x
Dupliquer « Copy Between What »

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 hunter9888x 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
63K
Enregistré
1
Actions
66
Catégorie
Utilities
Version
2.1
Langue
EN

Copy between a specific text or symbol

Then deletes the text or symbol between what was copied

Option to create a folder & option to save too

Adds one empty line between matches

& option to have no empty lines

However, when you specifically search for metacharacters such as .[{()\^$|?*+, you need to escape them with backslash \, so they can be recognized.

For example, if you need to find ., type \. in the search field.

Example: I specify

( on left side & ) on right side

(some text) than it would delete ( )

& save some text To a file

Created by me

Nouveautés

Version 2.1

Better version

Historique des versions
2.1 20 janv. 2020

Better version

2.0 6 janv. 2020

Adds empty line

1.0 6 janv. 2020

First release

Ce qu’il fait

66 actions
  1. Choose from Menu
    copy between what
  2. Choose from Menu
    both sides of text
  3. Ask for Input
    Look For what on left & right side of text
  4. Set Variable
    Both sides of text
  5. Get File
  6. Repeat with Each
  7. Get Name
  8. Set Variable
    Name
  9. Get Text from Input
  10. Set Variable
    Get text
  11. Match Text
  12. Text
  13. Set Name
  14. Choose from Menu
    both sides of text (save)
  15. Ask for Input
    Look For what on left & right side of text
  16. Set Variable
    Both sides of text
  17. Get File
  18. Repeat with Each
  19. Get Name
  20. Set Variable
    Name
  21. Get Text from Input
  22. Set Variable
    Get text
  23. Match Text
  24. Text
  25. Set Name
  26. Save File
  27. Stop This Shortcut
  28. Choose from Menu
    two different sides of text
  29. Ask for Input
    Look for what on left side of text
  30. Set Variable
    Left side of text
  31. Ask for Input
    Look for what on right side of text
  32. Set Variable
    Right side of text
  33. Get File
  34. Repeat with Each
  35. Get Name
  36. Set Variable
    Name
  37. Get Text from Input
  38. Set Variable
    Get text
  39. Match Text
  40. Text
  41. Set Name
  42. Choose from Menu
    two different sides of text (save)
  43. Ask for Input
    Look for what on left side of text
  44. Set Variable
    Left side of text
  45. Ask for Input
    Look for what on right side of text
  46. Set Variable
    Right side of text
  47. Get File
  48. Repeat with Each
  49. Get Name
  50. Set Variable
    Name
  51. Get Text from Input
  52. Set Variable
    Get text
  53. Match Text
  54. Text
  55. Set Name
  56. Save File
  57. Stop This Shortcut
  58. Choose from Menu
    create folder
  59. Ask for Input
    Set folder name to use
  60. Set Variable
    New folder
  61. Create Folder
  62. Show Result
  63. Stop This Shortcut
  64. Create Folder
  65. Save File
  66. Show Result

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/text'
#define color purple
#define glyph magicWandAlt


menu "copy between what " {
item "both sides of text":
	prompt("Look For what on left & right side of text")
	@BothSidesOfText
	const File = getFileFromFolder(, "")
	for _ in File {
		getName(@RepeatItem)
		@Name
		getText(@RepeatItem)
		@GetText
		containsText(@GetText, "\{@BothSidesOfText}.*\{@BothSidesOfText}")
		const Text = "{}"
		setName(Text, @Name)
	}
item "both sides of text (save)":
	prompt("Look For what on left & right side of text")
	@BothSidesOfText
	const File = getFile("")
	for _ in File {
		getName(@RepeatItem)
		@Name
		getText(@RepeatItem)
		@GetText
		containsText(@GetText, "\{@BothSidesOfText}.*\{@BothSidesOfText}")
		const Text = "{}"
		setName(Text, @Name)
	}
	const SavedFile = saveFilePrompt(RepeatResults)
	stop()
item "two different sides of text":
	prompt("Look for what on left side of text")
	@LeftSideOfText
	prompt("Look for what on right side of text")
	@RightSideOfText
	const File1 = getFile("")
	for _ in File1 {
		getName(@RepeatItem)
		@Name
		getText(@RepeatItem)
		@GetText
		containsText(@GetText, "\{@LeftSideOfText}.*\{@RightSideOfText}")
		const Text1 = "{}"
		setName(Text1, @Name)
	}
item "two different sides of text (save)":
	prompt("Look for what on left side of text")
	@LeftSideOfText
	prompt("Look for what on right side of text")
	@RightSideOfText
	const File1 = getFile("")
	for _ in File1 {
		getName(@RepeatItem)
		@Name
		getText(@RepeatItem)
		@GetText
		containsText(@GetText, "\{@LeftSideOfText}.*\{@RightSideOfText}")
		const Text1 = "{}"
		setName(Text1, @Name)
	}
	const SavedFile1 = saveFilePrompt(RepeatResults1)
	stop()
item "create folder":
	prompt("Set folder name to use")
	@NewFolder
	createFolder(@NewFolder)
	show("New folder is /Shortcuts/{@NewFolder}")
	stop()
}
createFolder("copy between what")
saveFile("copy between what", MenuResult, true)
show("In folder /Shortcuts/copy between what")
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é

Plus de hunter9888x

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité