@@ -261,6 +261,35 @@ def install(self, target: ODKEnvironment) -> None:
261261 dstfile .chmod (0o755 )
262262
263263
264+ class RdftabTool (Tool ):
265+ """Jim Balhoff's RDFTab tool."""
266+
267+ def __init__ (self ):
268+ Tool .__init__ (
269+ self ,
270+ "rdftab" ,
271+ "https://github.com/ontodev/rdftab.rs/releases/download/v0.1.1/rdftab-" ,
272+ )
273+
274+ def install (self , target : ODKEnvironment ) -> None :
275+ if target .system == "Linux" and target .machine == "x86_64" :
276+ self .source = self .source + "x86_64-unknown-linux-musl"
277+ elif target .system == "Darwin" and target .machine == "x86_64" :
278+ self .source = self .source + "x86_64-apple-darwin"
279+ elif target .system == "Darwin" and target .machine == "arm64" :
280+ # Jim does not provide a pre-built binary for arm64 macOS,
281+ # so we use our own
282+ self .source = "https://incenp.org/files/softs/rdftab/0.1/rdftab-0.1.1-aarch64-apple-darwin"
283+ else :
284+ raise Exception (
285+ f"Unsupported system/machine { target .system } /{ target .machine } "
286+ )
287+
288+ dstfile = self .get_final_location (target )
289+ self .download (dstfile )
290+ dstfile .chmod (0o755 )
291+
292+
264293class RobotPlugin (DownloadableFile ):
265294 """A file that is a plugin for ROBOT."""
266295
@@ -340,6 +369,7 @@ def __init__(self, target: Union[Path, str]):
340369 ),
341370 SqliteTool ("3.51.1" ),
342371 GithubTool ("2.83.1" ),
372+ RdftabTool (),
343373 RobotPlugin ("odk" , ODK_PLUGIN_SOURCE ),
344374 RobotPlugin ("sssom" , SSSOM_PLUGIN_SOURCE ),
345375 ResourceFile ("obo.epm.json" , OBO_EPM_SOURCE ),
0 commit comments