From 33f5ef2e87967f739a5dfab88f47390353976667 Mon Sep 17 00:00:00 2001 From: traumschule Date: Wed, 19 Dec 2018 16:24:51 -0500 Subject: [PATCH 1/3] add press clips (#28900) --- press/en/press.wml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/press/en/press.wml b/press/en/press.wml index 717e0a8f..4a042c45 100644 --- a/press/en/press.wml +++ b/press/en/press.wml @@ -50,6 +50,27 @@ some of the significant Tor-related stories that have popped up.

+ +2018 Dec 18 +BoingBoing + +Charitable Giving Guide 2018 + + + +2018 Dec 10 +ZDNet + +Half of the Tor Project's funding now comes from the private sector + + + +2018 Dec 10 +CyberScoop + +"With new director, Tor seeks new funding sources and international growth" + + 2018 Nov 02 Motherboard From 29641222a4cceb7d8c82f80704db194a9b4285fb Mon Sep 17 00:00:00 2001 From: traumschule Date: Wed, 19 Dec 2018 16:26:14 -0500 Subject: [PATCH 2/3] press.pl: catch \r in csv, add debugging option --- press/press.pl | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/press/press.pl b/press/press.pl index 914edcee..e1e329db 100755 --- a/press/press.pl +++ b/press/press.pl @@ -6,38 +6,53 @@ #use HTML::Escape qw/escape_html/; my %pub; # save all publications +my $debug = 0; +sub debug { + my $msg = shift; + print "$msg\n" if $debug; +} sub parse_line { my $str = shift; + debug "Parsing:\n$str"; if ($str =~ /(\d+\/\d+\/\d+),([^,]+),(.+),(.+)/) { # magic regex :) my $time = Time::Piece->strptime($1, "%m/%d/%y"); # given format: MM/DD/YY my $date = $time->strftime("%Y %b %d"); chomp(my $source = $2); - $pub{$time->epoch} = "\n$date\n$source\n\n$3\n\n\n"; + $pub{$time->epoch} .= "\n$date\n$source\n\n$3\n\n\n"; + # TODO use uniqe keys to avoid .= + debug "Added: $pub{$time->epoch}" } } -unless (@ARGV) { print "Usage: $0 /path/to/csv/file > file\n"; exit 1; } +unless (@ARGV) { print "Usage: $0 [-d] /path/to/csv/file > file\n"; exit 1; } # parse all arguments (hopefully existing files) foreach my $arg (@ARGV) { chomp($arg); - if (-f $arg) { - # we are lucky, this looks like a file + debug "arg: $arg"; + if ($arg eq '-d') { + $debug++; + debug "Enabling debug output on request." + } elsif (-f "$arg") { + debug 'argument looks like a file.'; open my $fh, '<', $arg - or warn "Can't open '$arg': $!\n" and next; + or die "Can't open '$arg': $!\n"; + debug "Reading $arg."; foreach (<$fh>) { - parse_line $_; + # https://stackoverflow.com/questions/6373888/converting-newline-formatting-from-mac-to-windows + foreach my $line (split '\r', $_) { + parse_line $line; + } } - close $fh; + close $fh; debug "Finished reading $arg." } else { - # this is no file, let's assume we got piped a string to parse + debug 'argument is no file, assuming piped string.'; parse_line $arg; } } -# share our treasure with the world my $str = join '', map { $pub{$_} } reverse sort keys %pub; -if ($str) { print $str; } +debug "Generated final html string (". (scalar keys %pub) ." entries):"; +if ($str) { print "$str\nAdd above to press/en/press.wml.\n"; } else { print "Nothing found.\n"; exit 1; } -# TODO one day i want to able to update press/en/press.wml directly From dbd57010ed08d7fce13714b2697f6b09cd845063 Mon Sep 17 00:00:00 2001 From: traumschule Date: Tue, 15 Jan 2019 11:02:34 -0500 Subject: [PATCH 3/3] Add newest press clips (#28900) --- press/en/press.wml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/press/en/press.wml b/press/en/press.wml index 4a042c45..8463a550 100644 --- a/press/en/press.wml +++ b/press/en/press.wml @@ -50,6 +50,20 @@ some of the significant Tor-related stories that have popped up.

+ +2019 Jan 11 +TechCrunch + +Tor pulls in record donations as it lessens reliance on US government grants + + + +2019 Jan 01 +Wired + +Tor Is Easier Than Ever. Time to Give It a Try + + 2018 Dec 18 BoingBoing