Convert a text file into a directory of MP3 files. Perfect for do-it-yourself robot audiobooks!
You will need the following dependencies from apt-get:
- espeak
- lame
Install them with:
require 'shellwords' | |
module Jekyll | |
class StylusConverter < Converter | |
safe true | |
def matches(ext) | |
ext =~ /\.styl/i | |
end | |
# Be sure to set the following in the `_config.yml`. | |
# | |
# markdown: rdiscount | |
# rdiscount: | |
# extensions: [generate_toc] | |
# | |
module Jekyll | |
class MarkdownConverter | |
def convert(content) | |
setup |
require 'term/ansicolor' | |
include Term::ANSIColor | |
dir = ARGV[0].gsub /\/$/, "" | |
def compile(d) | |
`(cd #{d} && g++ *.cpp)` # -Wall | |
return $? == 0 | |
end |
require 'shellwords' | |
module Jekyll | |
class StratusColorBlock < Liquid::Block | |
def initialize(tag_name, markup, tokens) | |
super | |
@lang = markup | |
end | |
def render(context) |
### | |
Allow the user to download a file or a directory as a _.tar.gz_ | |
compressed version. | |
### | |
fs = require "fs" | |
{exec} = require "child_process" | |
{resolve} = require "path" | |
# `callback` receives `(tarPath)` |
{ "fractus.autocomplete": "Control- " | |
, "file.recent.limit": 0 | |
, "save-on-blur": | |
[ "CSS" | |
, "Sass" | |
, "Stylus" | |
] | |
} |
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
var Domain = require('domain') | |
var inherits = require('util').inherits | |
var Logger = require('bunyan') | |
function Overdrive(options) { | |
Logger.call(this, options) |
function color(n) { | |
return '\u001b[38;5;' + n + 'm' | |
} | |
var clear_color = '\u001b[39m' | |
var str = "" | |
for (var i = 0; i < 256; i++) { | |
if (i && i % 32 === 0) str += "\n" | |
str += color(i) + "X" + clear_color |