Clippings Backup Taio Action

Updated 10122023-235131


Social

I've been using Taio more heavily as a go-to clipboard manager lately - especially on iPhone - because of [recent changes to Paste I probably shouldn't start talking about,] so I've finally gotten around to whipping up a few of the actions I've needed to get to for a while.

first up is Clippings Backup - which does exactly what it says, remarkably quickly. https://extratone.blog/2023/10/13/clippings-backup-taio.html



Clippings Backup Action
Clippings Backup Action

Metadata

Action Description

Backs up all clippings content - merged in a single text file - at [iCloud Storage]/clippings.md.

Description

This action uses the Get Clippings action step to return the content of all clippings, which is then counted by lines and backed up (by default) in the root of one's iCloud Drive storage for Taio as clippings.md. (iCloud Drive/Taio/Editor/clippings.md) Before finishing, the actions displays the number of lines it has backed up.

Video Demo


Source

{
	"actions": [
		{
			"type": "@clips.get-text",
			"parameters": {
				"mode": 1
			}
		},
		{
			"type": "@flow.set-variable",
			"parameters": {
				"value": {
					"value": "$",
					"tokens": [
						{
							"location": 0,
							"value": "@input"
						}
					]
				},
				"name": {
					"value": "clippings"
				}
			}
		},
		{
			"type": "@text.count",
			"parameters": {
				"mode": 0,
				"text": {
					"value": "$",
					"tokens": [
						{
							"location": 0,
							"value": "clippings"
						}
					]
				}
			}
		},
		{
			"type": "@flow.set-variable",
			"parameters": {
				"value": {
					"value": "$",
					"tokens": [
						{
							"location": 0,
							"value": "@input"
						}
					]
				},
				"name": {
					"value": "count"
				}
			}
		},
		{
			"type": "@editor.new",
			"parameters": {
				"location": 2,
				"openInEditor": false,
				"filename": {
					"value": "clippings.md"
				},
				"text": {
					"value": "$",
					"tokens": [
						{
							"location": 0,
							"value": "clippings"
						}
					]
				},
				"overwriteIfExists": true
			}
		},
		{
			"type": "@ui.toast",
			"parameters": {
				"style": 0,
				"waitUntilDone": false,
				"title": {
					"value": "$ Clippings Backed Up",
					"tokens": [
						{
							"location": 0,
							"value": "count"
						}
					]
				}
			}
		}
	],
	"buildVersion": 1,
	"name": "Clippings Backup",
	"clientMinVersion": 1,
	"summary": "Backs up all clippings content - merged in a single text file - at [iCloud Storage]/clippings.md.",
	"icon": {
		"glyph": "externaldrive.badge.checkmark",
		"color": "#10ADC0"
	},
	"clientVersion": 1222
}