Skip to main content
Glama
clippy_output.py762 B
#!/usr/bin/env python3 """ Prints output of a Clippy compilation and exits non-zero if appropriate. """ import argparse import os import sys def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "clippy_txt", help="The file from a Clippy compilation with its output") return parser.parse_args() def main() -> int: args = parse_args() # If output is empty, there are no errors/warnings and we can exit `0` if os.path.getsize(args.clippy_txt) == 0: return 0 # Otherwise print output and exit non-zero with open(args.clippy_txt, encoding="utf-8") as f: print(f.read()) return 1 if __name__ == "__main__": sys.exit(main())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server