File: parse_zzidmap.awk

package info (click to toggle)
jplephem 2.24%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: python: 2,071; awk: 18; sh: 12; makefile: 8
file content (23 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This script produces the names.py file.

BEGIN {
    print "# Standard SPICE target names (generated by parse_zzidmap.awk)."""
    print ""
    print "target_name_pairs = ["
}

/^ *BLTCOD/ {
    n=$NF
}

/^ *BLTNAM/ {
    sub("[^']*", "")
    gsub(/''/, "\\'")
    print "    (" n ", " $0 "),"
}

END {
    print "    ]"
    print ""
    print "target_names = dict(target_name_pairs)"
}