https://github.com/cleverdevil/Micropub.spoon
Hammerspoon spoon for Micropub publishing
https://github.com/cleverdevil/Micropub.spoon
hammerspoon indieweb macos micropub
Last synced: 11 months ago
JSON representation
Hammerspoon spoon for Micropub publishing
- Host: GitHub
- URL: https://github.com/cleverdevil/Micropub.spoon
- Owner: cleverdevil
- Created: 2018-02-21T19:25:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T19:29:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-07T05:06:21.338Z (11 months ago)
- Topics: hammerspoon, indieweb, macos, micropub
- Language: Lua
- Size: 1000 Bytes
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Micropub.spoon
Publish to a [Micropub](https://indieweb.org/Micropub) endpoint in Hammerspoon.
## Example
```lua
-- Micropub
hs.loadSpoon('Micropub')
spoon.Micropub.micropub_endpoint_url = 'https://example.com/micropub'
spoon.Micropub.micropub_token = 'XXXXXXXXXXXXXXXXXXXXXXX'
hs.hotkey.bind(hyper, 'p', function()
local btn, note = hs.dialog.textPrompt(
'New Note',
'Your note:',
'',
'Publish',
'Cancel'
)
if btn ~= 'Publish' then
return
end
spoon.Micropub:publishNote(note)
end)
```
The `publish` method accepts MF2 structured data as a lua table, if you want to
send across other data.