INTRO: aredn_info.py does two things: 1. It reads all sysinfo.json?link_info=1&hosts=1 pages available on a given network and 2. creates output files that synthesize the information. Some limitations: * Some nodes have old firmwares with API version 1.0 or 1.1. In these cases some information about the nodes is not available. * Currently, the API mixes Nodes with LAN Hostnames. To save some time trying to download a non-existent page from a LAN Hostname, I added a lan_hostnames.txt file with a list of known LAN Hostnames to ignore. The script will NOT crash if it tries to reach a LAN Hostname, but it will try to download it for 30 seconds before giving up. See https://arednmesh.readthedocs.io/en/latest/arednHow-toGuides/devtools.html for details of the API used. CHANGE LOG: * v2023.11.28 - Updated syntax to modern formatted string literals. * v2023.11.21 - Added an alternative script_path for use on Windows. * v2023.11.14 - Fixed a minor bug to ensure that num_of_threads is an integer. * v2023.11.13 - Fixed minor bug where some of the connections in the Diagrams_Net.txt file were duplicated resulting in nodes with two lines in the diagram. The issue was that I had the api_v as the forth element of topo and topo_inv, which meant that the condition if tuple in topo_inv[0:i] wasn't catching duplicates if they had different API versions. - Added input() functions a the beginning so user can enter a different starting node than va7fi-hapac3-1 and a number of concurrent downloads. - Added a line at the top of Diagrams_Net.txt and Topology_List.txt with the number of nodes and connections found. * v2023.11.12 - Re-wrote the whole thing from scratch to use the json files from the API instead of scraping the html - Renamed it aredn_info.py and consolidated all the code under one file. - Still a few things to cleanup and add, but it's functional and much faster than the previous versions. - Note that some information might be missing if the API version <= 1.1 * v2023.10.28b - Removed urls[] list so that the code is more general. * v2023.10.28a - Modified read_pages.py so that it can read the new layout of the Mesh Status page. - Fixed a small bug in read_pages.py where code was expecting plural neibhors and nodes instead of neibhor* and node* (lines 175 and 179) - Also updated my node URL on lines 39 and 40 * v2021.12.20 - Broke the code into different files. * v2021.12.16: - Code cleanup. No new features. * v2021.12.14: - Set maximum number of concurrent threads to 30 to optimize the speed. - This version can take less than 10 seconds to process 85 stations. - Added two csv output pages. * v2021.12.13: - Code cleanup. No new features. * v2021.12.10: - Uses threading to download all status pages into pages[]. - It increased the speed by a factor of 5 to 10. * v2021.12.05: - Uses a list nodes2[] to organize information, which can then easily be formatted different ways. - Added format for diagrams.net and re-wrote flowchart.fun - Added Human Readable output list. * v2021.11.12: - First working draft. - Takes about 3 minutes to process 85 stations.