BEGIN { # Mapping months to numbers months["Jan"]="01"; months["Feb"]="02"; months["Mar"]="03"; months["Apr"]="04"; months["May"]="05"; months["Jun"]="06"; months["Jul"]="07"; months["Aug"]="08"; months["Sep"]="09"; months["Oct"]="10"; months["Nov"]="11"; months["Dec"]="12"; firstentry=1; print ""; print ""; } /## ___E_X_T_E_R_N_A_L__C_A_P_S_U_L_E_S___/{exit;} NR < 32 { next; } /=>/{ sub("=>",""); n = split($0,field,"-"); # Output in ISO 8601 format sub("-" field[n] "$",""); split(field[n],date_part," "); day=date_part[1]; month=months[date_part[2]]; year=date_part[3]; updated=year "-" month "-" day "T00:00:00+00:00"; id=$1; $1=""; sub(" ",""); title=$0; if (firstentry == 0) { print ""; } print "" title ""; print ""; print "gemini://yasendfile.org/" id""; print ""updated""; print "Wim Stockmangemini@yasendfile.org"; if (firstentry == 0) { print ""; } else { print "Yet Another Gemini 2 Atom feed generator"; } firstentry=0; } END { print ""; }