{"action":"created","issue":{"url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/7","repository_url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower","labels_url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/7/comments","events_url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/7/events","html_url":"https://github.com/markjaniczak/ShinyChromeShower/issues/7","id":145090377,"number":7,"title":"Creating images through HTML templating","user":{"login":"markjaniczak","id":13617683,"avatar_url":"https://avatars.githubusercontent.com/u/13617683?v=3","gravatar_id":"","url":"https://api.github.com/users/markjaniczak","html_url":"https://github.com/markjaniczak","followers_url":"https://api.github.com/users/markjaniczak/followers","following_url":"https://api.github.com/users/markjaniczak/following{/other_user}","gists_url":"https://api.github.com/users/markjaniczak/gists{/gist_id}","starred_url":"https://api.github.com/users/markjaniczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markjaniczak/subscriptions","organizations_url":"https://api.github.com/users/markjaniczak/orgs","repos_url":"https://api.github.com/users/markjaniczak/repos","events_url":"https://api.github.com/users/markjaniczak/events{/privacy}","received_events_url":"https://api.github.com/users/markjaniczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-01T05:31:57Z","updated_at":"2016-04-01T09:31:01Z","closed_at":null,"body":"It would be much simpler and neater to create a HTML template with CSS formatting and insert the variables into that using something like jinja2. Images could be created using [this](http://wkhtmltopdf.org/index.html) project."},"comment":{"url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/comments/204327823","html_url":"https://github.com/markjaniczak/ShinyChromeShower/issues/7#issuecomment-204327823","issue_url":"https://api.github.com/repos/markjaniczak/ShinyChromeShower/issues/7","id":204327823,"user":{"login":"markjaniczak","id":13617683,"avatar_url":"https://avatars.githubusercontent.com/u/13617683?v=3","gravatar_id":"","url":"https://api.github.com/users/markjaniczak","html_url":"https://github.com/markjaniczak","followers_url":"https://api.github.com/users/markjaniczak/followers","following_url":"https://api.github.com/users/markjaniczak/following{/other_user}","gists_url":"https://api.github.com/users/markjaniczak/gists{/gist_id}","starred_url":"https://api.github.com/users/markjaniczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markjaniczak/subscriptions","organizations_url":"https://api.github.com/users/markjaniczak/orgs","repos_url":"https://api.github.com/users/markjaniczak/repos","events_url":"https://api.github.com/users/markjaniczak/events{/privacy}","received_events_url":"https://api.github.com/users/markjaniczak/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T09:31:01Z","updated_at":"2016-04-01T09:31:01Z","body":"The HTML looks okay when done like this. wkhtmltoimage doesn't produce good results though - the images lose a lot of quality and the css doesn't appear as intended.\r\n\r\n![test](https://cloud.githubusercontent.com/assets/13617683/14203215/feaa8674-f83f-11e5-96b3-fcb548ea5042.jpg)\r\n\r\n``` HTML\r\n<!doctype html>\r\n<html lang='en'>\r\n<head>\r\n  <meta charset=\"utf-8\">\r\n  <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>\r\n  <title>image template</title>\r\n  <body style=\"width: 1920px; height: 1080px; background-image: url(&quot;http://i.imgur.com/IrLkK6O.jpg&quot;);\r\n    background-size: cover; background-repeat: no-repeat;\r\n    background-position: center center; position: relative;\">\r\n    <p style=\"text-align: center; position: absolute; top: 50%; left: 50%;\r\n      font-family: 'Roboto', sans-serif; font-weight: 300; transform: translate(-50%, -50%);\r\n      color: white; font-size: 2em; -webkit-text-stroke: 1px black; -webkit-text-fill-color: white;\">\r\n        I base my purchases almost solely on user reviews, but I never review products myself.\r\n      </p>\r\n  </body>\r\n</head>\r\n</html>\r\n```"}}