1 # ===================================================================== 2 # genarch.rc: W-TW archive list generator applet front-end. 3 # 4 # Copyright (c) 2007,2008,2009,2010 Carlo Strozzi 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; version 2 dated June, 1991. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 # 19 # ===================================================================== 20 21 # ===================================================================== 22 # This program must be run after the group+cf has been read. 23 # ===================================================================== 24 25 ~ $'tbl_group.k_group' () && csaExit.fault 0041 tbl_group.k_group 26 ~ $tw_gstem () && csaExit.fault 0041 tw_gstem 27 28 csaIsFullPath --exits --quiet $genarch_pages || 29 csaExit.fault 0037 1 genarch_pages 30 31 csaIsFullPath --exits --quiet $genarch_out || 32 csaExit.fault 0037 1 genarch_out 33 34 # This view will be sorted on 'vtime', regardless of any ranking. 35 csaAwkCmd genArchives.awk 36 awktable -i $genarch_pages -- 'BEGIN{print "\001p_vtime\t\001p_descr"} 37 # Handle page expiration dates, accounting for older 38 # versions of page+dat which may lack that field. 39 p_etime/=1 { 40 # Set default expiration date. 41 if ($p_etime == "") $p_etime = "9999-12-31 23:59:59" 42 if ("'$CSA_TIME_ISO'" >= $p_etime && \ 43 $p_descr !~ /^ *-/) $p_descr = "-" $p_descr 44 } 45 # Handle explicit exclusions from static views first. 46 $p_descr ~ /^ *!/ {next} 47 # Exclude hidden/redirected pages. Redirections which are 48 # NOT to be excluded must be *immediately* preceeded by "+" . 49 {sub(/\+\(:redirect /,"(:+redirect ",$p_descr)} 50 $p_descr ~ /(^ *-|\(:redirect )/ {next} 51 {sub(/\(:\+redirect /,"(:redirect ",$p_descr)} 52 {sub(/^.*,/,"",$p_vtime); print $p_vtime,$p_descr}' | 53 sorttable -r | $CSA_RESULT > $genarch_out 54 55 csaStatus || csaExit.fault 0003 awktable/sorttable/AWK 56 57 CSA_STATUS = 0 # always recommended. 58 59 # End of program.