File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,6 @@ addopts = "-v"
20
20
21
21
[tool .uv ]
22
22
package = true
23
+
24
+ [project .scripts ]
25
+ specullm = " fip_tools.cli:main"
Original file line number Diff line number Diff line change 1
1
from .fip_list import get_all_fips , get_fips_by_status
2
2
from .fip import Fip
3
+ from .cli import main
Original file line number Diff line number Diff line change
1
+ import sys
2
+ from .fip_list import get_all_fips
3
+
4
+ def main ():
5
+ """Main entry point for specullm CLI"""
6
+ if len (sys .argv ) != 2 :
7
+ print ("Usage: specullm FIP_NUMBER" )
8
+ sys .exit (1 )
9
+
10
+ try :
11
+ fip_number = int (sys .argv [1 ])
12
+ except ValueError :
13
+ print (f"Error: '{ sys .argv [1 ]} ' is not a valid FIP number" )
14
+ sys .exit (1 )
15
+
16
+ # Find the requested FIP
17
+ fips = get_all_fips ()
18
+ matching_fips = [fip for fip in fips if fip .number == fip_number ]
19
+
20
+ if not matching_fips :
21
+ print (f"Error: FIP { fip_number } not found" )
22
+ sys .exit (1 )
23
+
24
+ # Print the FIP content
25
+ print (matching_fips [0 ].get_content ())
26
+
27
+ if __name__ == '__main__' :
28
+ main ()
You can’t perform that action at this time.
0 commit comments