Skip to content

cleverdevil/Micropub.spoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Micropub.spoon

Publish to a Micropub endpoint in Hammerspoon.

Example

-- 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.

About

Hammerspoon spoon for Micropub publishing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages