update the mirrors page, have the script update the csv list with last status.
Andrew Lewman

Andrew Lewman commited on 2013-12-06 16:54:04
Zeige 2 geänderte Dateien mit 58 Einfügungen und 358 Löschungen.

... ...
@@ -16,23 +16,6 @@
16 16
     <td> - </td>
17 17
 </tr>
18 18
      
19
-<tr>
20
-
21
-         <td>DK</td>
22
-
23
-         <td>Zentrum der Gesundheit</td>
24
-
25
-         <td>Up to date</td>
26
-
27
-    <td> - </td>
28
-    <td><a href="http://tor.idnr.ws/dist/">http</a></td>
29
-    <td><a href="http://tor.idnr.ws/">http</a></td>
30
-    <td> - </td>
31
-    <td> - </td>
32
-    <td> - </td>
33
-    <td> - </td>
34
-</tr>
35
-     
36 19
 <tr>
37 20
 
38 21
          <td>NO</td>
... ...
@@ -358,17 +341,34 @@
358 341
      
359 342
 <tr>
360 343
 
361
-         <td>MX</td>
344
+         <td>LT</td>
362 345
 
363 346
          <td></td>
364 347
 
365 348
          <td>Up to date</td>
366 349
 
367 350
     <td> - </td>
368
-    <td><a href="http://fbnaia.homelinux.net/torproject/dist/">http</a></td>
369
-    <td><a href="http://fbnaia.homelinux.net/torproject/">http</a></td>
370
-    <td><a href="https://fbnaia.homelinux.net/torproject//dist/">https</a></td>
371
-    <td><a href="https://fbnaia.homelinux.net/torproject/">https</a></td>
351
+    <td><a href="http://tor.vesta.nu/dist/">http</a></td>
352
+    <td><a href="http://tor.vesta.nu/">http</a></td>
353
+    <td> - </td>
354
+    <td> - </td>
355
+    <td> - </td>
356
+    <td> - </td>
357
+</tr>
358
+     
359
+<tr>
360
+
361
+         <td>US</td>
362
+
363
+         <td>AskApache</td>
364
+
365
+         <td>Up to date</td>
366
+
367
+    <td> - </td>
368
+    <td><a href="http://tor.askapache.com/dist/">http</a></td>
369
+    <td><a href="http://tor.askapache.com/">http</a></td>
370
+    <td> - </td>
371
+    <td> - </td>
372 372
     <td> - </td>
373 373
     <td> - </td>
374 374
 </tr>
... ...
@@ -475,23 +475,6 @@
475 475
     <td> - </td>
476 476
 </tr>
477 477
      
478
-<tr>
479
-
480
-         <td>NL</td>
481
-
482
-         <td>Amorphis</td>
483
-
484
-         <td>Up to date</td>
485
-
486
-    <td> - </td>
487
-    <td><a href="http://tor.amorphis.eu/dist/">http</a></td>
488
-    <td><a href="http://tor.amorphis.eu/">http</a></td>
489
-    <td> - </td>
490
-    <td> - </td>
491
-    <td> - </td>
492
-    <td> - </td>
493
-</tr>
494
-     
495 478
 <tr>
496 479
 
497 480
          <td>US</td>
... ...
@@ -662,6 +645,23 @@
662 645
     <td><a href="rsync://creep.im/tor">rsync</a></td>
663 646
 </tr>
664 647
      
648
+<tr>
649
+
650
+         <td>US</td>
651
+
652
+         <td></td>
653
+
654
+         <td>Up to date</td>
655
+
656
+    <td><a href="ftp://mirrors.go-parts.com/tor/">ftp</a></td>
657
+    <td><a href="http://mirrors.go-parts.com/tor/dist/">http</a></td>
658
+    <td> - </td>
659
+    <td> - </td>
660
+    <td> - </td>
661
+    <td><a href="rsync://mirrors.go-parts.com/mirrors/tor/">rsync</a></td>
662
+    <td> - </td>
663
+</tr>
664
+     
665 665
 <tr>
666 666
 
667 667
          <td>DE</td>
... ...
@@ -730,23 +730,6 @@
730 730
     <td> - </td>
731 731
 </tr>
732 732
      
733
-<tr>
734
-
735
-         <td>SE</td>
736
-
737
-         <td>homosu</td>
738
-
739
-         <td>Up to date</td>
740
-
741
-    <td> - </td>
742
-    <td><a href="http://tor.homosu.net/dist/">http</a></td>
743
-    <td><a href="http://tor.homosu.net/">http</a></td>
744
-    <td> - </td>
745
-    <td> - </td>
746
-    <td> - </td>
747
-    <td> - </td>
748
-</tr>
749
-     
750 733
 <tr>
751 734
 
752 735
          <td>IS</td>
... ...
@@ -766,15 +749,15 @@
766 749
      
767 750
 <tr>
768 751
 
769
-         <td>ES</td>
752
+         <td>DK</td>
770 753
 
771
-         <td></td>
754
+         <td>Zentrum der Gesundheit</td>
772 755
 
773 756
          <td>Up to date</td>
774 757
 
775 758
     <td> - </td>
776
-    <td><a href="http://tor.zilog.es/dist/">http</a></td>
777
-    <td><a href="http://tor.zilog.es/">http</a></td>
759
+    <td><a href="http://tor.idnr.ws/dist/">http</a></td>
760
+    <td><a href="http://tor.idnr.ws/">http</a></td>
778 761
     <td> - </td>
779 762
     <td> - </td>
780 763
     <td> - </td>
... ...
@@ -783,15 +766,15 @@
783 766
      
784 767
 <tr>
785 768
 
786
-         <td>LT</td>
769
+         <td>NL</td>
787 770
 
788
-         <td></td>
771
+         <td>Amorphis</td>
789 772
 
790 773
          <td>Up to date</td>
791 774
 
792 775
     <td> - </td>
793
-    <td><a href="http://tor.vesta.nu/dist/">http</a></td>
794
-    <td><a href="http://tor.vesta.nu/">http</a></td>
776
+    <td><a href="http://tor.amorphis.eu/dist/">http</a></td>
777
+    <td><a href="http://tor.amorphis.eu/">http</a></td>
795 778
     <td> - </td>
796 779
     <td> - </td>
797 780
     <td> - </td>
... ...
@@ -800,253 +783,15 @@
800 783
      
801 784
 <tr>
802 785
 
803
-         <td>US</td>
786
+         <td>SE</td>
804 787
 
805
-         <td>AskApache</td>
788
+         <td>homosu</td>
806 789
 
807 790
          <td>Up to date</td>
808 791
 
809 792
     <td> - </td>
810
-    <td><a href="http://tor.askapache.com/dist/">http</a></td>
811
-    <td><a href="http://tor.askapache.com/">http</a></td>
812
-    <td> - </td>
813
-    <td> - </td>
814
-    <td> - </td>
815
-    <td> - </td>
816
-</tr>
817
-     
818
-<tr>
819
-
820
-         <td>US</td>
821
-
822
-         <td></td>
823
-
824
-         <td>Unknown</td>
825
-
826
-    <td> - </td>
827
-    <td><a href="http://tor.loritsu.com/dist/">http</a></td>
828
-    <td><a href="http://tor.loritsu.com/">http</a></td>
829
-    <td> - </td>
830
-    <td> - </td>
831
-    <td> - </td>
832
-    <td> - </td>
833
-</tr>
834
-     
835
-<tr>
836
-
837
-         <td>US</td>
838
-
839
-         <td></td>
840
-
841
-         <td>Unknown</td>
842
-
843
-    <td> - </td>
844
-    <td><a href="http://tor.mirrors.whitedholdings.org/dist/">http</a></td>
845
-    <td><a href="http://tor.mirrors.whitedholdings.org/">http</a></td>
846
-    <td><a href="https://tor.mirrors.whitedholdings.org/dist/">https</a></td>
847
-    <td><a href="https://tor.mirrors.whitedholdings.org/">https</a></td>
848
-    <td><a href="rsync://tor.mirrors.whitedholdings.org/tor-dist">rsync</a></td>
849
-    <td><a href="rsync://mirrors.whitedholdings.org/tor">rsync</a></td>
850
-</tr>
851
-     
852
-<tr>
853
-
854
-         <td>DE</td>
855
-
856
-         <td></td>
857
-
858
-         <td>Unknown</td>
859
-
860
-    <td> - </td>
861
-    <td><a href="http://tor.taskserver.de/dist/">http</a></td>
862
-    <td><a href="http://tor.taskserver.de/">http</a></td>
863
-    <td> - </td>
864
-    <td> - </td>
865
-    <td> - </td>
866
-    <td> - </td>
867
-</tr>
868
-     
869
-<tr>
870
-
871
-         <td>LU</td>
872
-
873
-         <td></td>
874
-
875
-         <td>Unknown</td>
876
-
877
-    <td> - </td>
878
-    <td><a href="http://torproject.adamas.ai/dist/">http</a></td>
879
-    <td><a href="http://torproject.adamas.ai/">http</a></td>
880
-    <td> - </td>
881
-    <td> - </td>
882
-    <td> - </td>
883
-    <td> - </td>
884
-</tr>
885
-     
886
-<tr>
887
-
888
-         <td>UA</td>
889
-
890
-         <td></td>
891
-
892
-         <td>Unknown</td>
893
-
894
-    <td> - </td>
895
-    <td><a href="http://torua.reactor-xg.kiev.ua/dist/">http</a></td>
896
-    <td><a href="http://torua.reactor-xg.kiev.ua/">http</a></td>
897
-    <td> - </td>
898
-    <td> - </td>
899
-    <td> - </td>
900
-    <td> - </td>
901
-</tr>
902
-     
903
-<tr>
904
-
905
-         <td>FR</td>
906
-
907
-         <td></td>
908
-
909
-         <td>Unknown</td>
910
-
911
-    <td> - </td>
912
-    <td><a href="http://37.187.0.127/tormirror/dist/">http</a></td>
913
-    <td><a href="http://37.187.0.127/tormirror/">http</a></td>
914
-    <td> - </td>
915
-    <td> - </td>
916
-    <td> - </td>
917
-    <td> - </td>
918
-</tr>
919
-     
920
-<tr>
921
-
922
-         <td>US</td>
923
-
924
-         <td></td>
925
-
926
-         <td>Unknown</td>
927
-
928
-    <td> - </td>
929
-    <td><a href="http://tor.minibofh.org/dist/">http</a></td>
930
-    <td><a href="http://tor.minibofh.org/">http</a></td>
931
-    <td> - </td>
932
-    <td> - </td>
933
-    <td> - </td>
934
-    <td> - </td>
935
-</tr>
936
-     
937
-<tr>
938
-
939
-         <td>UK</td>
940
-
941
-         <td></td>
942
-
943
-         <td>Unknown</td>
944
-
945
-    <td> - </td>
946
-    <td><a href="http://tor.mage.me.uk/dist/">http</a></td>
947
-    <td><a href="http://tor.mage.me.uk/">http</a></td>
948
-    <td> - </td>
949
-    <td> - </td>
950
-    <td> - </td>
951
-    <td> - </td>
952
-</tr>
953
-     
954
-<tr>
955
-
956
-         <td>DE</td>
957
-
958
-         <td>tor-mirror.de</td>
959
-
960
-         <td>Unknown</td>
961
-
962
-    <td> - </td>
963
-    <td><a href="http://tor-mirror.de/dist/">http</a></td>
964
-    <td><a href="http://tor-mirror.de/">http</a></td>
965
-    <td><a href="https://tor-mirror.de/dist/">https</a></td>
966
-    <td><a href="https://tor-mirror.de/">https</a></td>
967
-    <td> - </td>
968
-    <td> - </td>
969
-</tr>
970
-     
971
-<tr>
972
-
973
-         <td>DE</td>
974
-
975
-         <td>[[:bbs:]]</td>
976
-
977
-         <td>Unknown</td>
978
-
979
-    <td> - </td>
980
-    <td><a href="http://tor.blingblingsquad.net/dist/">http</a></td>
981
-    <td><a href="http://tor.blingblingsquad.net/">http</a></td>
982
-    <td><a href="https://tor.blingblingsquad.net/dist/">https</a></td>
983
-    <td><a href="https://tor.blingblingsquad.net/">https</a></td>
984
-    <td> - </td>
985
-    <td> - </td>
986
-</tr>
987
-     
988
-<tr>
989
-
990
-         <td>US</td>
991
-
992
-         <td></td>
993
-
994
-         <td>Unknown</td>
995
-
996
-    <td> - </td>
997
-    <td><a href="http://www.netgull.com/torproject/">http</a></td>
998
-    <td> - </td>
999
-    <td> - </td>
1000
-    <td> - </td>
1001
-    <td> - </td>
1002
-    <td> - </td>
1003
-</tr>
1004
-     
1005
-<tr>
1006
-
1007
-         <td>US</td>
1008
-
1009
-         <td>NW Linux</td>
1010
-
1011
-         <td>Unknown</td>
1012
-
1013
-    <td> - </td>
1014
-    <td><a href="http://torproject.nwlinux.us/dist/">http</a></td>
1015
-    <td><a href="http://torproject.nwlinux.us/">http</a></td>
1016
-    <td> - </td>
1017
-    <td> - </td>
1018
-    <td><a href="rsync://nwlinux.us/tor-dist">rsync</a></td>
1019
-    <td><a href="rsync://nwlinux.us/tor-web">rsync</a></td>
1020
-</tr>
1021
-     
1022
-<tr>
1023
-
1024
-         <td>NL</td>
1025
-
1026
-         <td></td>
1027
-
1028
-         <td>Unknown</td>
1029
-
1030
-    <td> - </td>
1031
-    <td> - </td>
1032
-    <td> - </td>
1033
-    <td><a href="https://www.coevoet.nl/tor/dist/">https</a></td>
1034
-    <td> - </td>
1035
-    <td> - </td>
1036
-    <td> - </td>
1037
-</tr>
1038
-     
1039
-<tr>
1040
-
1041
-         <td>FR</td>
1042
-
1043
-         <td>LazyTiger</td>
1044
-
1045
-         <td>Unknown</td>
1046
-
1047
-    <td> - </td>
1048
-    <td><a href="http://tor.taiga-san.net/dist/">http</a></td>
1049
-    <td><a href="http://tor.taiga-san.net/">http</a></td>
793
+    <td><a href="http://tor.homosu.net/dist/">http</a></td>
794
+    <td><a href="http://tor.homosu.net/">http</a></td>
1050 795
     <td> - </td>
1051 796
     <td> - </td>
1052 797
     <td> - </td>
... ...
@@ -1055,51 +800,17 @@
1055 800
      
1056 801
 <tr>
1057 802
 
1058
-         <td>EE</td>
803
+         <td>ES</td>
1059 804
 
1060 805
          <td></td>
1061 806
 
1062
-         <td>Unknown</td>
1063
-
1064
-    <td> - </td>
1065
-    <td><a href="http://tor.li/dist/">http</a></td>
1066
-    <td><a href="http://tor.li/">http</a></td>
1067
-    <td><a href="https://tor.li/dist/">https</a></td>
1068
-    <td><a href="https://tor.li/">https</a></td>
1069
-    <td> - </td>
1070
-    <td> - </td>
1071
-</tr>
1072
-     
1073
-<tr>
1074
-
1075
-         <td>US</td>
1076
-
1077
-         <td>Xpdm</td>
1078
-
1079
-         <td>Failed signature check</td>
807
+         <td>Up to date</td>
1080 808
 
1081 809
     <td> - </td>
1082
-    <td><a href="http://torproj.xpdm.us/dist/">http</a></td>
1083
-    <td><a href="http://torproj.xpdm.us/">http</a></td>
1084
-    <td><a href="https://torproj.xpdm.us/dist/">https</a></td>
1085
-    <td><a href="https://torproj.xpdm.us/">https</a></td>
1086
-    <td> - </td>
1087
-    <td> - </td>
1088
-</tr>
1089
-     
1090
-<tr>
1091
-
1092
-         <td>US</td>
1093
-
1094
-         <td></td>
1095
-
1096
-         <td>Failed signature check</td>
1097
-
1098
-    <td><a href="ftp://mirrors.go-parts.com/tor/">ftp</a></td>
1099
-    <td><a href="http://mirrors.go-parts.com/tor/dist/">http</a></td>
810
+    <td><a href="http://tor.zilog.es/dist/">http</a></td>
811
+    <td><a href="http://tor.zilog.es/">http</a></td>
1100 812
     <td> - </td>
1101 813
     <td> - </td>
1102 814
     <td> - </td>
1103
-    <td><a href="rsync://mirrors.go-parts.com/mirrors/tor/">rsync</a></td>
1104 815
     <td> - </td>
1105 816
 </tr>
... ...
@@ -121,7 +121,7 @@ sub LoadMirrors {
121 121
 
122 122
 sub DumpMirrors {
123 123
     my @m = @_;
124
-    open(CSV, ">", "tor-mirrors.csv") or die "Cannot open tor-mirrors.csv: $!";
124
+    open(CSV, ">", "include/tor-mirrors.csv") or die "Cannot open tor-mirrors.csv: $!";
125 125
     print CSV join(", ", @columns) . "\n";
126 126
     foreach my $server(@m) {
127 127
 	$server->{updateDate} = gmtime($server->{updateDate}) if ($server->{updateDate});
... ...
@@ -153,7 +153,7 @@ print "Using these files for sig matching:\n";
153 153
 print join("\n", keys %randomtorfiles);
154 154
 print "\n";
155 155
 
156
-# Adjust offical Tor time by out-of-date offset: number of days * seconds per day
156
+# Adjust official Tor time by out-of-date offset: number of days * seconds per day
157 157
 $tortime -= 1 * 172800;
158 158
 print "The official time for Tor is $tortime. \n";
159 159
 
... ...
@@ -184,15 +184,11 @@ for(my $server = 0; $server < scalar(@m); $server++) {
184 184
 
185 185
 sub PrintServer {
186 186
      my $server = shift;
187
-     my $time;
188
-     if ( $server->{updateDate} && $server->{sigMatched} ) { $time = "Up to date"; } 
189
-     elsif (!$server->{updateDate}) 			   { $time = "Unknown"; }
190
-     else 			    			   { $time = "Failed signature check"; }
191 187
 print OUT <<"END";
192 188
      \n<tr>\n
193 189
          <td>$server->{isoCC}</td>\n
194 190
          <td>$server->{orgName}</td>\n
195
-         <td>$time</td>\n
191
+         <td>Up to date</td>\n
196 192
 END
197 193
 
198 194
      my %prettyNames = (
... ...
@@ -224,13 +220,6 @@ open(OUT, "> $outFile") or die "Can't open $outFile: $!";
224 220
 foreach my $server ( sort { $b->{updateDate} <=> $a->{updateDate} } grep {$_->{updateDate} && $_->{updateDate} > $tortime && $_->{sigMatched}} @m ) {
225 221
     PrintServer($server);
226 222
 }
227
-foreach my $server ( grep {!$_->{updateDate}}  @m ) {
228
-    PrintServer($server);
229
-}
230
-foreach my $server ( grep {!$_->{sigMatched} && $_->{updateDate} && $_->{updateDate} > $tortime} @m ) {
231
-    PrintServer($server);
232
-}
233
-# That leaves those servers whose updateDate < torTime. Check the csv for those.
234 223
 
235 224
 DumpMirrors(@m);
236 225
 
237 226