From b5956c4dc6b065d664908104d5fc6752a87e3364 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 Mar 2023 17:17:41 -0400 Subject: Add model and serd-sort utility With all the new functionality, the complexity of the serd-pipe command-line interface is starting to push the limits of available flags. So, instead of grafting on further options to control a model, this commit adds a new tool, serd-sort, which acts somewhat like a stripped-down serd-pipe that stores statements in a model in memory. This keeps the complexity (including the user-facing complexity) of any one tool down, since other more focused tools can be used for streaming tasks in a pipeline. In other words, abandon Swissarmyknifeism, take a page from the Unix philosophy, and try to expose the model functionality to the command-line in a dedicated focused tool. The model implementation is tested by using this tool to run a subset of the usual test suites, and a special suite to test statement sorting. --- tools/serd-filter.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'tools/serd-filter.c') diff --git a/tools/serd-filter.c b/tools/serd-filter.c index 01834e5a..70d7b68c 100644 --- a/tools/serd-filter.c +++ b/tools/serd-filter.c @@ -274,17 +274,7 @@ main(int argc, char** argv) char default_input[] = "-"; char* default_inputs[] = {default_input}; - Options opts = {{"", - NULL, - 4096U, - 1048576U, - {SERD_SYNTAX_EMPTY, 0U, false}, - {SERD_NQUADS, 0U, false}}, - NULL, - NULL, - NULL, - 0U, - false}; + Options opts = {serd_default_options(), NULL, NULL, NULL, 0U, false}; // Parse all command line options (which must precede inputs) SerdStatus st = SERD_SUCCESS; -- cgit v1.2.1