Example usage of LogoManager.
()
| 568 | |
| 569 | |
| 570 | def main(): |
| 571 | """Example usage of LogoManager.""" |
| 572 | # Initialize manager |
| 573 | manager = LogoManager() |
| 574 | |
| 575 | # List available logos |
| 576 | available = manager.list_available_logos() |
| 577 | print("Available logos:") |
| 578 | for category, items in available.items(): |
| 579 | if items: |
| 580 | print(f"\n{category}: {', '.join(items)}") |
| 581 | |
| 582 | # Example: Get a conference logo with fuzzy matching |
| 583 | test_names = ["NeurIPS", "neurips 2024", "NIPS", "neural information"] |
| 584 | for name in test_names: |
| 585 | logo_path = manager.get_logo_path(name, "conference") |
| 586 | if logo_path: |
| 587 | print(f"\nLogo for '{name}' -> {logo_path}") |
| 588 | |
| 589 | # Example: Test institute matching |
| 590 | test_institutes = ["MIT", "Massachusetts Institute of Technology", "Stanford University", "stanford"] |
| 591 | for inst in test_institutes: |
| 592 | logo_path = manager.get_logo_path(inst, "institute") |
| 593 | if logo_path: |
| 594 | print(f"\nLogo for '{inst}' -> {logo_path}") |
| 595 | |
| 596 | |
| 597 | def get_logo_dimensions(logo_path: str, target_height: float) -> Tuple[float, float]: |
no test coverage detected