36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/mangos/update.rb', line 36
def process
puts "Processing books...\n"
@new_books = 0
@updated_books = 0
@skipped_books = 0
@deleted_books = 0
paths = all_paths
paths.each_with_index do |p, i|
$stdout.write "\rProcessing #{i + 1} of #{paths.length} (#{(((i + 1) / paths.length.to_f) * 100.0).round}%)"
$stdout.flush
process_path(p)
end
process_deleted
puts "\nProcessed #{@new_books} new books, updated #{@updated_books} existing books, removed #{@deleted_books} deleted books, and skipped #{@skipped_books} books"
end
|