Last active
August 5, 2019 19:16
-
-
Save quanganhdo/9fa96538f3c49436603aa3bf1de9e4c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| puts <<HERE | |
| <!DOCTYPE html> | |
| <html> | |
| <!--So long and thanks for all the fish--> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>Pocket Export</title> | |
| </head> | |
| <body> | |
| <h1>History</h1> | |
| <ul> | |
| HERE | |
| episodes = JSON.parse(File.read('castro-history.json')) | |
| episodes.each do |episode| | |
| puts <<HERE | |
| <li><a href="#{episode['url']}" time_added="#{episode['lastPlayed'].to_s.split('.')[0]}" tags="castro#{episode['starred'] == 1 ? ',castro-starred' : ''}">#{episode['name']} · #{episode['title']}</a></li> | |
| HERE | |
| end | |
| puts <<HERE | |
| </ul> | |
| </body> | |
| </html> | |
| HERE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment