Skip to content

Instantly share code, notes, and snippets.

@ndiezel0
ndiezel0 / lang-to-yml.rb
Created September 13, 2018 16:02
Transforms cached data from https://github.com/grosser/i18n_data into yml file for immediate consuption by RoR's I18n.
require 'yaml'
base_code = 'en'
file = "languages-#{base_code.upcase}.txt"
data = Hash[base_code, Hash['language', {}]]
if File.exists?(file)
File.readlines(file, encoding: 'utf-8').each do |line|
code, translation = line.strip.split(';;', 2)
data[base_code]['language'][code.downcase] = translation
end
require 'formula'
class X264 < Formula
homepage "http://www.videolan.org/developers/x264.html"
# the latest commit on the stable branch
#url "https://git.videolan.org/git/x264.git", :revision => "ac7644073ac28d19c9cf048849bbcd515713e426"
#version "r2431"
url "http://git.videolan.org/git/x264.git", :revision => "e260ea549226ae29832d8bc0dcfd20cffc8cf248"
version "r2412"
head "http://git.videolan.org/git/x264.git"