diff options
author | Jordan <me@jordan.im> | 2020-09-07 18:27:57 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2020-09-07 18:27:57 -0700 |
commit | 87c21d189f042876b544b248ce39e99c16f52b74 (patch) | |
tree | e690ad8eeada5b73386f073ddfe47c46cb6d6357 /tor-metrics/generate.py | |
parent | 6478c60879e0452392a5d3c00bdb047721a9b87e (diff) | |
download | allium-87c21d189f042876b544b248ce39e99c16f52b74.tar.gz allium-87c21d189f042876b544b248ce39e99c16f52b74.zip |
add more sorting options for family and network pages
Diffstat (limited to 'tor-metrics/generate.py')
-rwxr-xr-x | tor-metrics/generate.py | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/tor-metrics/generate.py b/tor-metrics/generate.py index 5be2220..26af5b2 100755 --- a/tor-metrics/generate.py +++ b/tor-metrics/generate.py @@ -22,10 +22,56 @@ if __name__ == '__main__': # generate relay HTML documents RELAY_SET.create_output_dir() - RELAY_SET.write_unsorted('index.html', is_index=True) - RELAY_SET.write_unsorted('all.html', is_index=False) - RELAY_SET.write_unsorted('families.html', is_index=False) - RELAY_SET.write_unsorted('networks.html', is_index=False) + RELAY_SET.write_misc( + template = 'index.html', + path = 'index.html', + path_prefix = './', + is_index = True, + ) + RELAY_SET.write_misc( + template = 'all.html', + path = 'misc/all.html' + ) + RELAY_SET.write_misc( + template = 'misc-families.html', + path = 'misc/families-by-bandwidth.html', + sorted_by = '1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-families.html', + path = 'misc/families-by-exit-count.html', + sorted_by = '1.exit_count,1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-families.html', + path = 'misc/families-by-middle-count.html', + sorted_by = '1.middle_count,1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-families.html', + path = 'misc/families-by-first-seen.html', + sorted_by = '1.first_seen,1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-networks.html', + path = 'misc/networks-by-bandwidth.html', + sorted_by = '1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-networks.html', + path = 'misc/networks-by-exit-count.html', + sorted_by = '1.exit_count,1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-networks.html', + path = 'misc/networks-by-middle-count.html', + sorted_by = '1.middle_count,1.bandwidth' + ) + RELAY_SET.write_misc( + template = 'misc-networks.html', + path = 'misc/networks-by-first-seen.html', + sorted_by = '1.first_seen,1.bandwidth' + ) RELAY_SET.write_pages_by_key('as') RELAY_SET.write_pages_by_key('contact') RELAY_SET.write_pages_by_key('country') |