Changeset View
Changeset View
Standalone View
Standalone View
tools/rhyne-wyse/bin/update-agora-reports
- This file was added.
| Property | Old Value | New Value |
|---|---|---|
| File Mode | null | 100755 |
| #!/usr/bin/env python3 | |||||
| # ------------------------------------------------------------- | |||||
| # Rhyne-Wise | |||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
| # Project: Nasqueron | |||||
| # Description: MediaWiki automated agent | |||||
| # License: BSD-2-Clause | |||||
| # ------------------------------------------------------------- | |||||
| import logging | |||||
| import sys | |||||
| from rhyne_wyse import client, config | |||||
| from rhyne_wyse.tasks.wiki import update_report | |||||
| # ------------------------------------------------------------- | |||||
| # Application entry point | |||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
| def run(): | |||||
| global_config = config.get_config() | |||||
| site = client.connect_to_site(global_config["wiki"]) | |||||
| for report in global_config.get("reports", []): | |||||
| try: | |||||
| update_report(site, logger, report) | |||||
| except Exception as e: | |||||
| title = report.get("report", "<report title missing>") | |||||
| logger.exception(f"[update_report] for report {title}: {e}", exc_info=e) | |||||
| if __name__ == "__main__": | |||||
| logger = logging.getLogger(__name__) | |||||
| logger.addHandler(logging.StreamHandler(sys.stderr)) | |||||
| logger.setLevel(logging.INFO) | |||||
| run() | |||||
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator