This file contains 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
#!/usr/bin/env ruby | |
cols = (ARGV[0] || 5).to_i - 1 | |
rows = (ARGV[1] || 9).to_i | |
begin | |
table = (0...rows).map do |i| | |
(0...cols).map { rand(2) }.join | |
end | |
end until table.join =~ /1/ |
This file contains 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
# | |
# This command was obsolete. see also https://github.com/tdtds/aozoragen | |
# | |
#!/usr/bin/env ruby | |
# -*- coding: utf-8; -*- | |
# | |
# usage: renzaburo2aozora <URL> | |
# URL: the index of a novel in renzaburo, only HTML version NOT Flash. | |
# |
This file contains 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
#!/bin/sh | |
src=`basename "$1" .pdf` | |
mkdir tmp | |
pdftk "${src}.pdf" dump_data output meta.txt | |
pdfimages "${src}.pdf" "tmp/${src}" | |
cd tmp |
This file contains 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
# | |
# This command was obsolete. see also https://github.com/tdtds/aozoragen | |
# | |
#!/usr/bin/env ruby | |
# -*- coding: utf-8; -*- | |
# | |
# Usage: making PDF for Kindle using Aozira-Kindle Servive. | |
# % ruby fate-zero1_to_aozora > fate1.txt | |
# % curl --data-urlencode [email protected] -d s=m -o fate1.pdf http://a2k.aill.org/download.cgi |
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8; -*- | |
# | |
# scraping internet.watch.impress.co.jp for Kindle | |
# | |
require 'nokogiri' | |
require 'open-uri' | |
require 'uri' | |
require 'ostruct' |
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8; -*- | |
# | |
# scraping nikkei.com for Kindle | |
# | |
require 'nokogiri' | |
require 'open-uri' | |
TOP = 'http://www.nikkei.com' |
This file contains 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
#!/usr/bin/ruby | |
# -*- coding: utf-8; -*- | |
# | |
require 'open-uri' | |
require 'nokogiri' | |
puts "魔王「この我のものとなれ、勇者よ」勇者「断る!」" | |
puts "橙乃ままれ" | |
puts "\n\n" |
This file contains 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
This project was moved to https://github.com/tdtds/kindlizer |
This file contains 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
# | |
# This command was obsolete. see also https://github.com/tdtds/aozoragen | |
# | |
#!/usr/bin/env ruby | |
# | |
# getting text from webmysteries.jp's novel. | |
# | |
require 'open-uri' | |
require 'nokogiri' |
This file contains 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
#!/bin/sh | |
# | |
# Copyright (c) 2010 Shinnosuke Suzuki <[email protected]> | |
# You can distribute this file under the GPL. | |
# | |
# Modified by TADA Tadashi <[email protected]> | |
# | |
FILE=$1 | |
if [ -z $FILE ]; then | |
echo usage: pdf2kindle PDFfile [top bottom left right] |