8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/kcfu/file_util.rb', line 8
def parse_file(path, options = {})
parser.parse_file(path).each do |import_clipping|
existed_clippings = parse_export_file(export_file_path(import_clipping))
next unless not_clipped_before?(existed_clippings, import_clipping)
existed_clippings << import_clipping
sorted_clippings = existed_clippings.sort { |x, y| x.added_on <=> y.added_on }
save_clipping_to_file(export_file_path(import_clipping), sorted_clippings)
end
conver_markdown(path) if options[:convert] == :markdown
end
|