Changeset 87 in bookmarks for trunk/bkmk


Ignore:
Timestamp:
06/04/15 20:05:19 (9 years ago)
Author:
peter
Message:

issue #9: added a dump command to the bkmk command line tool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bkmk

    r86 r87  
    7373        load_bookmarks($src_file); 
    7474    }, 
     75 
     76    # bulk dumping 
     77    dump => sub { 
     78        my ($dump_file) = @_; 
     79        my $dump = [ map { $_->TO_JSON } @{ $bookmarks->get_bookmarks->results } ]; 
     80        $dump_file ? YAML::DumpFile($dump_file, $dump) : print Dump($dump); 
     81    }, 
    7582); 
    7683 
Note: See TracChangeset for help on using the changeset viewer.