MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / main

Function main

utils/logo_utils.py:570–594  ·  view source on GitHub ↗

Example usage of LogoManager.

()

Source from the content-addressed store, hash-verified

568
569
570def 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
597def get_logo_dimensions(logo_path: str, target_height: float) -> Tuple[float, float]:

Callers 1

logo_utils.pyFile · 0.70

Calls 3

list_available_logosMethod · 0.95
get_logo_pathMethod · 0.95
LogoManagerClass · 0.70

Tested by

no test coverage detected