]>
pere.pagekite.me Git - text-madewithcc.git/blob - fixup.rb
728b4f0bb491edcd397bcf31ee6adb4571255961
3 raise ArgumentError
, 'Source file not specified' if ARGV.size !
= 2
7 data=File
.open(srcfile
).readlines
.map
{|l
| l
.chomp!
}
9 data.map
{|lin
| lin
.gsub!
(/<span id="anchor-?\d*"><\/span
>/, '')}
11 # Join erroneously split paragraphs
12 ['At a minimum, a CC-',
15 'openness to fans remixing the game—give',
17 'both journal publishers and researchers. Figshare now provides',
18 'get the “network effect”—',
19 'access to scholarly books. For Frances, the current scholarly-',
22 'contributing to the open',
23 'doesn’t seem like it should be sung about',
24 'songwriter, and he has found a way to keep it interesting for',
25 'building trust is the top',
27 'authors and Shuttleworth; Mark remains incredibly proud of this',
28 'BY-SA and opting in others with collecting societies like',
29 'Cecilie Maria, Cedric Howe, Cefn Hoile,',
30 'Braddlee, Drew Spencer, Duncan',
31 'Elizabeth Holloway, Ellen Buecher, Ellen Kaye-',
34 at
= data.index
{|i
| i
== line
}
35 if !at
.nil? and data[at+
1] == ''
40 File
.open(dstfile
, 'w') {|f
| f
.puts
data.join("\n")}