replace extract_existing with extract_candidates

master
melvin 2012-10-12 10:43:16 +08:00
parent de90d77067
commit dbf8fa19ca
3 changed files with 3 additions and 33 deletions

View File

@ -97,8 +97,8 @@ cards/existing_tokens_%.txt: $(wildcard release/Magarena/scripts/*.txt)
cards/existing_%.txt: cards/existing_scripts_%.txt cards/existing_tokens_%.txt
join -v1 -t"|" <(sort $(word 1,$^)) <(sort $(word 2,$^)) > $@
%_full.txt: %.txt cards/mtg-data.txt
awk -f scripts/extract_existing.awk $^ > $@
%_full.txt: scripts/extract_candidates.awk %.txt cards/mtg-data.txt
awk -f $^ | sed 's/\t/\n/g' > $@
cards/candidates_full.txt: scripts/extract_candidates.awk cards/scored_by_dec.tsv cards/unimplementable.tsv cards/mtg-data.txt
awk -f $^ | sort -rg | sed 's/\t/\n/g' > $@

View File

@ -11,7 +11,7 @@ FILENAME ~ /mtg-data/ {
}
if ($1 in found && !($1 in ignore)) {
print score[$1] "\t"
print "SCORE:"score[$1] "\t"
print "NOTE:"comment[$1] "\t"
print "NAME:"$1 "\t"
print "TEXT:" "\t"

View File

@ -1,30 +0,0 @@
BEGIN {
FS = "\t"
}
!(FILENAME ~ /mtg-data/) {
impl[$1] = 0
next
}
FILENAME ~ /mtg-data/ && $0 == "" {
getline
name = $1
if (name in impl) {
found[name] = 1
print ""
}
}
name in found {
print
}
END {
print "found " length(found) " cards" > "/dev/stderr"
for (i in impl) {
if (!(i in found)) {
print i " not found" > "/dev/stderr"
}
}
}