added some names to the list to backup
[feisty_meow.git] / scripts / archival / snarf_notes.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : snarf_notes                                                       #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 2000-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Produces an archive with any current notes from the user's home dir.     #
12 #                                                                             #
13 ###############################################################################
14 #  This program is free software; you can redistribute it and/or modify it    #
15 #  under the terms of the GNU General Public License as published by the Free #
16 #  Software Foundation; either version 2 of the License or (at your option)   #
17 #  any later version.  See: "http://www.gruntose.com/Info/GNU/GPL.html" for a #
18 #  version of the License.  Please send any updates to "fred@gruntose.com".   #
19 ###############################################################################
20
21 require "shared_snarfer.pl";
22
23 use Env qw(HOME);
24
25 &initialize_snarfer;
26
27 # get the number we use and increment it for the next use.
28 local($number) = &retrieve_number("aa_backup");
29
30 # variables for directory location to backup and the file to dump it in.
31 local($root) = "$HOME";
32 local($snarf_file_base) = &snarf_prefix("notes");
33 local($snarf_file) = &snarf_name($snarf_file_base, $number);
34
35 # store the archive number in the file for retrieval on the other side.
36 &backup_number("aa_backup", $snarf_file_base, $number);
37
38 ############################################################################
39
40 # get top level text files and other potentially important items...
41 &backup_files($snarf_file_base, $number, $root, ".", ("*.html", "*.txt", "makefile*"));
42
43 # gather any directories in our home that match these often recurring patterns.
44 &snarf_by_pattern($snarf_file_base, "$root", "crucial");
45 &snarf_by_pattern($snarf_file_base, "$root", "Documents");
46 &snarf_by_pattern($snarf_file_base, "$root", "idea");
47 &snarf_by_pattern($snarf_file_base, "$root", "issue");
48 &snarf_by_pattern($snarf_file_base, "$root", "list");
49 &snarf_by_pattern($snarf_file_base, "$root", "note");
50 &snarf_by_pattern($snarf_file_base, "$root", "nuage");
51 &snarf_by_pattern($snarf_file_base, "$root", "project");
52 &snarf_by_pattern($snarf_file_base, "$root", "task");
53 &snarf_by_pattern($snarf_file_base, "$root", "invention");
54
55 ############################################################################
56
57 # now rename the file so only the unpacker can access it.
58 &rename_archive($snarf_file);
59
60 exit 0;
61