I anticipate that this module may be used as a starting point for creating new programs rather then as a complete program in its own right. The functionality built into this code is selected with a view to testing the Haskell modules for handling RDF rather than for performing any particular application processing (though development as a tool with some broader utility is not ruled out).
With the following in ghci:
:m + Swish
:set prompt "swish> "
then we can run a Swish script (format described in Swish.RDF.SwishScript) by saying:
or convert a file from Turtle to NTriples format with:
runSwish "-ttl -i=foo.ttl -nt -o=foo.nt"ExitSuccess
You can also use
validateCommands by giving it the individual commands,
let Right cs = validateCommands ["-ttl", "-i=file1.ttl", "-c=file2.ttl"]
cs[SwishAction: -ttl,SwishAction: -i=file1.ttl,SwishAction: -c=file2.ttl]
st <- runSwishActions cs
stThe graphs do not compare as equal.
- data SwishStatus
- data SwishAction
- runSwish :: String -> IO ExitCode
- runSwishActions :: [SwishAction] -> IO SwishStatus
- displaySwishHelp :: IO ()
- splitArguments :: [String] -> ([String], [String])
- validateCommands :: [String] -> Either (String, SwishStatus) [SwishAction]
Status of the processor
graphs do not compare
input data problem (ie format/syntax)
data access error
command-line argument error
error executing a Swish script
Represent a Swish action. At present there is no way to create these
actions other than
Parse and run the given string as if given at the command line. The "quiet", "version" and "help" options are ignored.
Return any arguments that need processing immediately, namely the "help", "quiet" and "version" options.