Skip to content

Instantly share code, notes, and snippets.

@kazu0620
kazu0620 / parse.rb
Created October 7, 2020 14:25
KindleでExportしたハイライトを整形する
File.open("./words.html"){|f|
f.each_line do |line|
match = line.match(/<div class='noteText'>(.+)<\/h3>/)
if match !=nil
puts match[1]
.gsub(":", "")
.gsub(".", "")
.gsub(")", "")
.gsub("”", "")
.gsub("—", "")
@kazu0620
kazu0620 / unused_image_cleaner.rb
Last active January 31, 2017 06:55
使ってない画像を削除するやつ
#!/usr/bin/env ruby
ASSET_DIR = ""
SOURCE_DIR = ""
ASSET_SUFFIX = ".imageset"
# Util
class String
def numeric?
Integer(self)
true