All Projects → producthunt → Sharemeow

producthunt / Sharemeow

Licence: mit
😻 text shots service

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Sharemeow

Wordle2Townscaper
Wordle2Townscaper is meant to convert Wordle tweets into Townscaper houses using yellow and green building blocks.
Stars: ✭ 64 (-64.44%)
Mutual labels:  emoji, twitter
Rrssb
RRSSB is a KNI Labs freebie crafted by @dbox and @joshuatuscan.
Stars: ✭ 3,443 (+1812.78%)
Mutual labels:  sharing, twitter
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+8.89%)
Mutual labels:  image, emoji
Twitter Text
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.
Stars: ✭ 2,627 (+1359.44%)
Mutual labels:  twitter, emoji
D3 Digest
SlackBot that watch channels looking for links and reactions, and generates digests based on those reactions
Stars: ✭ 15 (-91.67%)
Mutual labels:  twitter, emoji
Wdt Emoji Bundle
Slack like emoji picker with apple/ios, twitter/twemoji, google, emojione, facebook, messenger emoji support
Stars: ✭ 411 (+128.33%)
Mutual labels:  twitter, emoji
awesome-twitter-bots
A Curated Collection of the Best Twitter Bots 🤖
Stars: ✭ 99 (-45%)
Mutual labels:  emoji, twitter
Network Avatar Picker
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail
Stars: ✭ 74 (-58.89%)
Mutual labels:  image, twitter
Ultimate Metatags
A large snippet for your page's <head> that includes all the meta tags you'll need for OPTIMAL sharing and SEO. Extensive work has been put into ensuring you have the optimal images for the most important social media platforms.
Stars: ✭ 24 (-86.67%)
Mutual labels:  sharing, twitter
Um Twitteremojianalysis
Twitter Emoji Analysis
Stars: ✭ 6 (-96.67%)
Mutual labels:  twitter, emoji
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+495%)
Mutual labels:  image, twitter
Simplesharingbuttons
Share to Facebook, Twitter, Google+ and other social networks using simple HTML buttons.
Stars: ✭ 147 (-18.33%)
Mutual labels:  sharing, twitter
Emoji
💌 Find the emoji that echoes your mind.
Stars: ✭ 2,072 (+1051.11%)
Mutual labels:  emoji
Markdown Img Paste
一个可以快速粘贴剪贴板里的照片到markdown的插件,并且可以设置使用七牛存储照片。
Stars: ✭ 176 (-2.22%)
Mutual labels:  image
Emoji Ime Dictionary
日本語で絵文字入力をするための IME 追加辞書 📙 Google 日本語入力などで日本語から絵文字への変換を可能にする IME 拡張辞書です
Stars: ✭ 172 (-4.44%)
Mutual labels:  emoji
Twitter Video Downloader
Download Twitter video streams.
Stars: ✭ 172 (-4.44%)
Mutual labels:  twitter
Imageqt
数字图像处理——基于Qt 5.8.0
Stars: ✭ 177 (-1.67%)
Mutual labels:  image
Croperino
📷 A simple image cropping tool that provides gallery or camera help for Native Android (Java)
Stars: ✭ 176 (-2.22%)
Mutual labels:  image
React Native Image Marker
Add text or icon watermark to your images
Stars: ✭ 170 (-5.56%)
Mutual labels:  image
React Twitter Embed
Simplest way to add twitter widgets to your react project.
Stars: ✭ 171 (-5%)
Mutual labels:  twitter

ShareMeow

Build Status Code Climate Test Coverage Dependency Status

ShareMeow is a Ruby microservice (ooh ahh) for creating super shareable, tweetable, facebook-able images from your content 😻. You define a template (using HTML/CSS), pass it some parameters, and it will generate an image to you.

It's what we use at Product Hunt for making beautiful tweets like this:

ShareMeow Preview Image

Features:

  • Supports Emoji 💯😻✨
  • Custom fonts
  • Cachable images (throw cloudflare infront of it & you're good to go)
  • signed URLs via hmac digest

Getting Started

For a quick introduction to how to use ShareMeow, take a look at this excellent screencast by GoRails.

ShareMeow Screencast

The API

GET /v1/:encoded_params/:encoded_hmac_digest/image.jpg

This generates and returns a jpg.

Required params are determined by the image template you're using.

If you're using Ruby, you can use the ShareMeow Ruby Client for generating URLs easily.

If you'd rather not use the client. Here is an example of how to generate the URL in Ruby.

require 'base64'
require 'json'
require 'openssl'

json_params = { template: 'HelloWorld', message: 'Hello' }.to_json

encoded_params = Base64.urlsafe_encode64(json_params)
hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), 'your_secret_key', encoded_params)
hmac_digest = Base64.urlsafe_encode64([hmac].pack('H*'))

image_url = "https://your-share-meow.herokuapp.com/v1/#{ encoded_params }/#{ hmac_digest }/image.jpg"


# => "https://your-share-meow.herokuapp.com/v1/eyJ0ZW1wbGF0ZSI6IkhlbGxvV29ybGQiLCJtZXNzYWdlIjoiSGVsbG8ifQ==/-lgitNQmEs9NaiWyOCHeV137D80=/image.jpg"

Deploy

Deploy

Authentication 🔐

ShareMeow uses URLs signed with an HMAC signature to ensure that only people with a secret key are able to generate URLs with your service.

It works like this:

Convert your parameters to JSON. Then Base64 URL Safe encode them. There are libraries available to do this in all major languages.

# Ruby
params = { template: 'HelloWorld', message: 'Hello, World' }
json_params = params.to_json

encoded_params = Base64.urlsafe_encode64(json_params)

Then create the HMAC signature from the encoded params and your secret key. Finish by packing and base64 encoding the signature (we do this to keep the URL shorter)

hmac_signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), 'your_secret_key', encoded_params)
encoded_hmac = Base64.urlsafe_encode64([hmac_signature].pack('H*'))

When ShareMeow gets your request, it will recreate the HMAC signature using the encoded params/secret key. If it matches the signature you provided, it will generate the image. ⭐️

Templates

Take a look here for example templates: https://github.com/producthunt/ShareMeow/tree/master/app/image_templates.

Custom Fonts

Here is example css using a font from Google Fonts.

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Regular'), local('Roboto-Regular'), url(https://themes.googleusercontent.com/static/fonts/roboto/v10/2UX7WLTfW3W8TclTUvlFyQ.woff) format('woff');
}

Emoji ✨

If you'd like to render emoji, you can use the EmojiHelper in your templates. It converts both unicode emoji and GitHub/Slack (😄) style emoji to images. Can do this by overriding render_options.

# images_templates/your_template.rb
require 'app/emoji_helper'

module ImageTemplates
  class YourTemplate < Base
    def render_options
      @options[:content] = EmojiHelper.emojify(@options[:content])
      super
    end
  end
end

Development

After checking out the repo, run bundle install to install dependencies. Then, run rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Start the server: $ puma

Contributing ❤️

Want to make this better? Great! 😄

Bug reports and pull requests are welcome on GitHub at https://github.com/producthunt/ShareMeow. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].