lib/elephrame/mix/tracery.rb
def expand_and_post(text, *options)
      opts = Hash[*options]
      rules = opts.fetch(:rules, 'default')
      actually_post(@grammar[rules].flatten(text),
                    **opts.reject {|k|
                      k == :rules
                    })
    end
def expand_and_post(text, *options)
      opts = Hash[*options]
      rules = opts.fetch(:rules, 'default')
      actually_post(@grammar[rules].flatten(text),
                    **opts.reject {|k|
                      k == :rules
                    })
    end
a shortcut fuction for expanding text with tracery before posting

 @param text [String] the tracery text to expand before posting
 @param options [Hash] a hash of arguments to pass to post
 @option options rules [String] the grammar rules to load
 @option options visibility [String] visibility level
 @option options spoiler [String] text to use as content warning
 @option options reply_id [String] id of post to reply to
 @option options hide_media [Bool] should we hide media?
 @option options media [Array<String>] array of file paths