Commit graph

72 commits

Author SHA1 Message Date
Bradley M. Kuhn
db9a80723f Rework address code to properly catch when multiple address appear
As previously written, only the first address was found.  The key is
that the Email::Address::XS library was misused previously.  Based on
what is returned by Mail::Header->header_hashref(), it's clear that
we should use Email::Address::XS->parse_email_groups() first to
extract all addresses first.
2023-06-03 11:01:14 -07:00
Bradley M. Kuhn
347e0d3113 The Mail::Header library apparently returns CC, never Cc. 2023-06-03 10:14:40 -07:00
Bradley M. Kuhn
cdcf26f8fa Correct UnixDate() call.
Arguments were out of order, first of all, but also we might as well
add a check to verify that if it's empty and put "N/A" there if
nothing is there.
2023-06-03 09:54:37 -07:00
Bradley M. Kuhn
ea04654b7f Convert copied text files to DOS \r\n format relying on Perl's -T
While it may not be ideal here to rely on Perl's -T, since the
`man perlfunc` says that -T uses heuristic, and maybe the better
option would be to call `/usr/bin/file` and parse its output to see
if such conversion is needed, this solution should be close enough.
2023-06-03 08:40:28 -07:00
Bradley M. Kuhn
3f0716c9f0 Improve move/copy/make_path error handling; switch move() ⇒ rename()
It turns out that File::Copy->move() does *not* follow POSIX mv's
semantics when doing `mv DIRECTORY_1 DIRECTORY_2`.  It's quite clear
that it will do somethine like `mv DIRECTORY_1/* DIRECTORY_2`.

As such, while I'd prefer not to use the system-dependent rename()
Perl function here, that has the semantics I want.

In the process, error handling for the clals to move(), copy() and
make_path are improved.  I thought autodie was catching these, but
it's not.
2023-06-03 08:40:18 -07:00
Bradley M. Kuhn
9da387af88 Numbering, moving, and copying for non-email files completed. 2023-06-03 07:56:39 -07:00
Bradley M. Kuhn
c2cadeaa6a Create function for generating next UPI number. 2023-06-03 07:55:53 -07:00
Bradley M. Kuhn
bf0fd2ab75 Correct designation output.
"PRIVILEGED" not "PRIVILEGE"

Make sure designation is in CSV file properly.
2023-06-03 07:54:59 -07:00
Bradley M. Kuhn
34b6ba4cb8 Delete stray note. 2023-06-03 07:54:27 -07:00
Bradley M. Kuhn
34e24a8a31 Use entirely different output hierarchy for privileged docs.
Since no privileged docs should go into the production, copy those
over to a completely different file hierarchy so when the production
is put into an archive file, those privileged documents are sure to
not be included.
2023-06-03 07:12:53 -07:00
Bradley M. Kuhn
eb37c59129 Begin work on handling of non-email files in the production. 2023-06-03 07:10:40 -07:00
Bradley M. Kuhn
beafad9259 Add field for the protective order designation on CSV output. 2023-06-03 07:10:13 -07:00
Bradley M. Kuhn
8fc1f5371f Better handling of UTF-8 subject lines & shorten file names
The UTF-8 strings, when not decoded from the MIME header in the
'Subject' field, were making very long file names.  Fix both the
UTF-8 strings to actually be decoded (which makes them shorter anyway
when processed here), but also set a 128 character limit on the
amount of the subject line of emails that go into the filenames.
2023-06-03 07:08:53 -07:00
Bradley M. Kuhn
111f569b9c Generate UPI number and copy over files. 2023-06-03 05:34:57 -07:00
Bradley M. Kuhn
4627b4e24d Basic support for creating the CSV files & names of maildir files 2023-06-02 22:52:45 -07:00
Bradley M. Kuhn
123dbd6018 Begin work on processing maildir files. 2023-06-02 21:48:27 -07:00
Bradley M. Kuhn
c845c825dd Add emacs compile variable. 2023-06-02 21:25:44 -07:00
Bradley M. Kuhn
5ec6214da2 Script at least properly setting up loops and finding right dirs 2023-06-02 21:14:14 -07:00
Bradley M. Kuhn
88260520a4 First start on script to number discovery. 2023-06-02 19:20:11 -07:00
Bradley M. Kuhn
ab33daa5d8 Create a separate comprehensive mode 2023-06-02 07:42:41 -07:00
Bradley M. Kuhn
cc10317ec7 Progress option and use of it. 2016-04-29 12:32:54 -07:00
Bradley M. Kuhn
675cd0a98b Working version of forking central commit.
Note that due to the fact that Git::Repository calls System::Command,
you have to be careful about when you install the child signal handler.

You only want it in the parent, after the parent has done its operations
with Git commands, and note that the child must also disable the handler.
2016-04-28 21:25:14 -07:00
Bradley M. Kuhn
1cb64afb40 Turn off child handler for now. 2016-04-28 20:54:31 -07:00
Bradley M. Kuhn
bb4c940b26 Proper support for attributing log message.
This change allows for proper use of a regex to find attributions made
in a log message.
2016-04-28 20:52:29 -07:00
Bradley M. Kuhn
2ae7968eee Rename to finishedOperations
change log to operations.
2016-04-28 20:50:48 -07:00
Bradley M. Kuhn
90466f78e4 Move fork processing code to earlier in file. 2016-04-28 20:35:20 -07:00
Bradley M. Kuhn
26edcca3a3 Separate this from arg parsing. 2016-04-28 20:35:10 -07:00
Bradley M. Kuhn
e22914f882 Basic central commit mode is working.
Note that I have to eval {} the git blame operation as it will return
errors if the file has disappeared by time of the central commit.
2016-04-28 20:32:53 -07:00
Bradley M. Kuhn
50d747db0f closing STDIN did something weird, don't do it. 2016-04-28 20:32:42 -07:00
Bradley M. Kuhn
0f7eae3318 Write rest of function to produce blame data. 2016-04-28 20:02:17 -07:00
Bradley M. Kuhn
edbbf4263c Add blame options. 2016-04-28 20:02:10 -07:00
Bradley M. Kuhn
91127ef7b4 use strict and warnings. 2016-04-28 19:59:24 -07:00
Bradley M. Kuhn
f550c60f26 declare this variable properly. 2016-04-28 19:59:14 -07:00
Bradley M. Kuhn
c215f6c218 Loop to fill files. 2016-04-28 19:47:54 -07:00
Bradley M. Kuhn
1174f0c910 Documentation on central commit mode. 2016-04-28 19:34:16 -07:00
Bradley M. Kuhn
0358ac23a0 Various improvements to get script working.
* Process command line arguments more appropriately.
 * Begin function to handle central commit solution.
 * ProcessCommit a bit documented and additional argument.
2016-04-28 19:33:18 -07:00
Bradley M. Kuhn
722551397d Various fixes to properly handle children.
The children/parent details were somewhat reversed.  This corrects it.
2016-04-28 18:52:07 -07:00
Bradley M. Kuhn
fe75b701e9 print to correct file handle. 2016-04-28 18:51:41 -07:00
Bradley M. Kuhn
e79b5e5a03 Correct hash key name. 2016-04-28 18:51:22 -07:00
Bradley M. Kuhn
696dae1e68 Initial infrastructure code for forking
Wrote the basics of the fork procedure for the process of doing the git
blame commands.

This is untested.
2016-04-28 18:33:48 -07:00
Bradley M. Kuhn
96a7c05dc6 Emacs lisp compile-command variable. 2016-04-28 16:01:13 -07:00
Bradley M. Kuhn
26104f38d9 Manifesto of the motivations & processes of script
Explain in detail the basic algorithm to be employed by this script, and
also point out its inherent flaws.
2016-04-28 15:57:01 -07:00
Bradley M. Kuhn
9ed0147eed Move print inside the if statement. 2016-04-28 15:22:55 -07:00
Bradley M. Kuhn
80da332beb Produce needed output by script.
Include some verbosity too.
2016-04-28 15:06:55 -07:00
Bradley M. Kuhn
214908d552 Add Lisp local variables for Emacs compilation. 2016-04-28 13:22:56 -07:00
Bradley M. Kuhn
248dd5bcd9 Began work on script to build list of commit ids 2016-04-28 12:51:58 -07:00
Bradley M. Kuhn
4c7c0775bd Rework script for new purpose. 2016-04-28 12:35:22 -07:00
Bradley M. Kuhn
c09715e5db I just made a copyrightable change to this file, update copyright notice. 2014-02-20 09:26:40 -05:00
Bradley M. Kuhn
e2b2aa4639 Print out in stdout what directories are being compared. 2014-02-20 09:26:29 -05:00
Bradley M. Kuhn
65cab7dfc0 Include a calculation and printing of total Lines 2014-02-15 14:25:08 -05:00