Skip to content

Instantly share code, notes, and snippets.

View pilotmoon's full-sized avatar
🏠
Working from bed

Nick Moore pilotmoon

🏠
Working from bed
View GitHub Profile
@pilotmoon
pilotmoon / PopRichString+Markdown.m
Created January 21, 2023 17:41
Add formatting to NSAttributedString initilalized from Markdown
//
// PopRichString+Markdown.m
// Pop
//
// Created by Nicholas Moore on 29/11/2022.
//
#import "PopRichString+Markdown.h"
#import "NMKit.h"
#popclip
name: Iconify
identifier: com.pilotmoon.popclip.extension.iconify
description: Search icons on Iconify
popclip version: 4151
icon: iconify:simple-icons:iconify
app: { name: Iconify, link: https://icon-sets.iconify.design/ }
url: https://icon-sets.iconify.design/?query=***
#popclip
name: OpenStreetMap
identifier: com.pilotmoon.popclip.extension.openstreetmap
description: Search OpenStreetMap
popclip version: 4151
keywords: maps
icon: iconify:simple-icons:openstreetmap
url: https://www.openstreetmap.org/search?query=***
app: { name: OpenStreetMap, link: https://www.openstreetmap.org/ }
Reply to user requests for PopClip extension snippets, based on the examples in the cookbook enclosed in triple quotes (""") below.
Do not invent your own extension format or configuration keys, but instead closely follow the format in the examples.
As a test, reply with a snippet to search YouTube.
"""
# PopClip Extensions Cookbook
// #popclip
// name: Reformat Date
// icon: symbol:calendar
// description: Convert date to either DD-MMM-YYYY or YYYY-MM-DD.
// options:
// - { identifier: style-mmm, label: "DD-MMM-YYYY", type: boolean, icon: "monospaced square filled MMM" }
// - { identifier: style-iso, label: "YYYY-MM-DD", type: boolean, icon: "monospaced square filled ISO" }
// language: javascript
// module: true
//
// #popclip extension snippet to send text to Raycast
// name: Raycast
// identifier: com.pilotmoon.popclip.extension.raycast
// popclip version: 4151
// description: Activate Raycast with the selected text.
// icon: iconify:simple-icons:raycast
// app: { name: Raycast, link: https://www.raycast.com/ }
// language: javascript
popclip.performCommand("copy");
popclip.openUrl("raycast://");
// #popclip transform ip-10-248-153-153.ec2.internal to 10.248.153.153
// name: IPExtract
// language: javascript
// module: true
exports.regex = /(\d{1,3})-(\d{1,3})-(\d{1,3})-(\d{1,3})/;
exports.action = () => popclip.pasteText(popclip.input.regexResult.slice(1).join("."));
@pilotmoon
pilotmoon / submit-extension.md
Last active May 22, 2024 10:42
Submitting to the PopClip Extensions Directory from your own repo
author
Nick Moore

PopClip Directory Submission

All extensions on the directory need to be hosted as public repositories on GitHub.

The directory server downloads and stores your repository contents every time you create a git tag. It only does this once for every tag. This ensures that the contents served for a specific version can never change.

#popclip
name: Presearch
identifier: com.pilotmoon.popclip.extension.presearch
description: Search Presearch, the decentralized search engine.
icon: iconify:arcticons:presearch
popclip version: 4151
app: { name: Presearch, link: https://www.presearch.io/ }
url: https://presearch.com/search?q=***
#popclip
name: Icon Test!
icon: square rotate=90 filled 55
description: extension to test icon generation by the directory
identifier: com.pilotmoon.test-icon-55
action: {}