Tools for modeling links between files / URLs / etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
662 B

#!/usr/bin/env perl
=pod
=head1 NAME
mark-add - add files to the current set of marked files
=head1 SYNOPSIS
mark-add: stashes a filesystem path for use with other utilities
USAGE:
mark add path_to_mark
EXAMPLE:
mark add random.txt
cd ~/notes
mark mv
=head1 AUTHOR
Brennen Bearnes <bbearnes@gmail.com>
=cut
use warnings;
use strict;
use 5.10.0;
use App::MarkFiles;
use Cwd qw(cwd abs_path);
use Sys::Hostname;
my $dbh = App::MarkFiles::get_dbh();
my $sth = $dbh->prepare(q{
INSERT INTO marks (path, datetime) VALUES (?, datetime('now'))
});
foreach my $arg (@ARGV) {
my $path = abs_path($arg);
$sth->execute($path);
}