Bugzilla – Attachment 7174 Details for
Bug 7143
Bug for tracking changes to the about page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[NOT TO APPLY]Patch for comparing about with history
patch.txt (text/plain), 4.07 KB, created by
Marcel de Rooy
on 2012-01-16 14:21:34 UTC
(
hide
)
Description:
[NOT TO APPLY]Patch for comparing about with history
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2012-01-16 14:21:34 UTC
Size:
4.07 KB
patch
obsolete
>From 3ee821e84f1c91ef0de7968726c8756d83802a70 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 16 Jan 2012 15:15:09 +0100 >Subject: [PATCH] 7143 Comparing about/history >Content-Type: text/plain; charset="utf-8" > >--- > docs/comp_about.pl | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 119 insertions(+), 0 deletions(-) > create mode 100755 docs/comp_about.pl > >diff --git a/docs/comp_about.pl b/docs/comp_about.pl >new file mode 100755 >index 0000000..50afbb8 >--- /dev/null >+++ b/docs/comp_about.pl >@@ -0,0 +1,119 @@ >+#!/usr/bin/perl >+ >+# Copyright 2011 Rijksmuseum >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+# This script prints the names of all new developers in history.txt, not found >+# in about template (English version). >+ >+use strict; >+use warnings; >+ >+use utf8; >+use open OUT=>':utf8', ":std"; >+use Encode; >+ >+use constant HISTORY => '../docs/history.txt'; >+use constant ABOUT_T => '../koha-tmpl/intranet-tmpl/prog/en/modules/about.tt'; >+ >+my ($fh_about, $fh_history, $about_cont, $about_cont2, $lastnum); >+ >+#------------------------------------------------------------------------------- >+ >+init_vars(); >+show_new_committers(); >+exit_stuff(); >+ >+#------------------------------------------------------------------------------- >+ >+sub init_vars { >+ open $fh_about, '<:encoding(UTF-8)', ABOUT_T or die $!; >+ open $fh_history, '<:encoding(UTF-8)', HISTORY or die $!; >+ >+ my @a=<$fh_about>; >+ $about_cont= join '', @a; >+ if ($about_cont=~/id=\"team\"(.*)id=\"licenses\"/s ) { >+ $about_cont= $1; >+ } >+ else { >+ print "WARNING: Check about template for div ids\n"; >+ } >+ $about_cont2= $about_cont; >+ $about_cont2=~ tr/áéÃóúà èìòùäëïöü/aeiouaeiouaeiou/; #remove some diacritics >+} >+ >+sub show_new_committers { >+ my @lines= <$fh_history>; >+ >+ foreach(@lines) { >+ if(/becomes?.*(developer|committer)/) { >+ my $dev=extract_name($_); >+ check_developer($dev) if $dev; >+ } >+ } >+} >+ >+sub extract_name { >+ #get name from line >+ #format looks like date name becomes .. >+ my $line=shift; >+ if($line=~/^\w+\s+\d+\s+\d{4}\s+(.*)become\D+(\d+)/) { >+ my $found=$1; my $num=$2; >+ print "MISSING NUMBER: ".($lastnum+1)."\n" if $lastnum && $num>$lastnum+1 && $lastnum>5; #first five not all mentioned? >+ $lastnum=$num; >+ >+ #strip some garbage >+ $found=~s/\(.*\)//g; >+ $found=~s/narrowly beats Jane to//; >+ $found=~s/Katipo.s new developer//; >+ $found=~s/^\s+//; >+ $found=~s/\s+$//; >+ #print "$num $found\n"; >+ >+ return "$found"; >+ } >+ print 'NO MATCH:'.$line; >+} >+ >+sub check_developer { >+ my $dev= shift; >+ my $test; >+ >+ #skip some names >+ return if $dev=~/Polytechnic University|NCE|Koha production|Andy\?\?|doXulting|Gavin \?\?|Nicole Engard/; #tt lists Nicole C. Engard >+ >+ return if index(lc $about_cont,lc $dev) >=0; #lowercase >+ >+ #test removing some diacritics? >+ $test= $dev; >+ $test=~ tr/áéÃóúà èìòùäëïöü/aeiouaeiouaeiou/; >+ #return if index(lc $about_cont,lc $test) >=0; >+ return if index(lc $about_cont2, lc $test) >=0; >+ >+ #remove middle initials >+ #$test=$dev; >+ #$test=~s/(?<=\s)[A-Z]\.\s//; >+ #return if index(lc $about_cont,lc $test) >=0; >+ >+ print "MISSING DEV: $dev\n"; >+} >+ >+sub exit_stuff { >+ close $fh_about; >+ close $fh_history; >+} >+ >-- >1.6.0.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7143
:
6151
|
6152
|
7145
| 7174 |
7349
|
7350
|
7351
|
7352
|
7621
|
7623
|
7624
|
7625
|
7928
|
7929
|
7930
|
7931
|
8735
|
10401
|
10402
|
10679
|
10681
|
10689
|
10690
|
11143
|
11145
|
12156
|
12158
|
12751
|
12778
|
12805
|
13672
|
13674
|
13703
|
13725
|
13726
|
13732
|
14192
|
14272
|
14301
|
14302
|
14561
|
14759
|
17788
|
17793
|
17815
|
17816
|
18337
|
18565
|
19046
|
19453
|
19482
|
20711
|
20712
|
20788
|
20856
|
23057
|
23058
|
23059
|
23072
|
23073
|
23187
|
23188
|
23353
|
23357
|
23512
|
24211
|
24383
|
24424
|
24429
|
24444
|
26321
|
27078
|
28418
|
28789
|
29074
|
29181
|
29200
|
29213
|
29338
|
30056
|
30151
|
30155
|
30869
|
30870
|
30878
|
30879
|
30938
|
30939
|
31108
|
31109
|
31110
|
31111
|
31114
|
31115
|
31116
|
31117
|
31119
|
31120
|
31121
|
31122
|
31353
|
31358
|
31363
|
31364
|
32202
|
32207
|
32208
|
32209
|
32210
|
32256
|
32257
|
32258
|
32310
|
32313
|
32320
|
33624
|
33631
|
33647
|
34620
|
34624
|
34654
|
35102
|
35125
|
35167
|
35192
|
35193
|
35194
|
35348
|
35349
|
35350
|
35420
|
35434
|
35440
|
35441
|
35442
|
36541
|
36542
|
36543
|
36544
|
36661
|
36662
|
37892
|
37916
|
37919
|
39090
|
39091
|
39294
|
39295
|
39481
|
39482
|
39511
|
39592
|
39614
|
41190
|
41191
|
41206
|
41207
|
41300
|
41301
|
41322
|
41323
|
41925
|
41929
|
41930
|
41984
|
41985
|
44702
|
44781
|
44782
|
45613
|
45728
|
45729
|
45730
|
45828
|
45829
|
45832
|
46178
|
46240
|
46321
|
48330
|
48437
|
51055
|
51056
|
51070
|
51991
|
51992
|
51993
|
52042
|
52298
|
52299
|
52609
|
52627
|
52636
|
53099
|
53460
|
53461
|
53462
|
53467
|
53468
|
53469
|
55489
|
56093
|
56100
|
56101
|
56338
|
56340
|
56389
|
58850
|
58856
|
59216
|
59217
|
59218
|
59219
|
59260
|
59660
|
60448
|
61068
|
61157
|
68866
|
68867
|
68868
|
68869
|
68870
|
68871
|
68872
|
68873
|
69351
|
69602
|
69613
|
69909
|
69910
|
69953
|
69954
|
69955
|
69956
|
70772
|
70773
|
70774
|
70775
|
71226
|
71283
|
71531
|
72008
|
73094
|
73095
|
73586
|
73587
|
73588
|
74170
|
74544
|
75378
|
77595
|
77647
|
78474
|
78475
|
79111
|
79446
|
79909
|
81316
|
82358
|
82704
|
82725
|
82726
|
82744
|
84115
|
85160
|
85198
|
110907
|
112490
|
115559
|
115560
|
115697