~self-shelf-swap/bibliothek-project/shurf

« back to all changes in this revision

Viewing changes to the-crud-step/lib/Data/Cover/CoverTool.pm

  • Committer: Smonff
  • Date: 2012-06-13 10:29:46 UTC
  • Revision ID: seb.feugere@gmail.com-20120613102946-9kqeqcx0bwfvalpk
Some <li></li> typo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
use feature qw(say);
10
10
use Data::CURL::CurlRequester;
11
11
use Tools::DependanciesViewer;
 
12
use Cwd;
12
13
use version; our $VERSION = qv('0.02');
13
14
 
14
15
 
43
44
 
44
45
                # GIF blank file for no-cover book
45
46
                if ($cover_file =~ /GIF89./ ){
46
 
                        say "hello blank file !!!";
 
47
                        say "Hello blank file (no cover from Open Library)";
47
48
                } else {
48
49
                        &store_cover($cover_file, $book_id);
49
50
                }
70
71
        # DEBUG
71
72
        # print Dumper($cover_to_store);
72
73
 
73
 
        if ( $microlibrary::log_mode ){
74
 
                say "Going to save $book_id cover";
75
 
        }
76
 
 
77
74
        chdir "./View/cover/" || die ("--- chdir error \n");
 
75
        
 
76
        my $current_path = cwd();
 
77
 
 
78
        if ( $microlibrary::log_mode ){
 
79
                say "Going to save $book_id cover to $current_path";
 
80
        }
78
81
 
79
82
        my $file_for_cover_storage = new IO::File "> $book_id.jpg";
80
83
        # TODO V0.03