Skip to content

Commit

Permalink
Fix kg-core-help
Browse files Browse the repository at this point in the history
  • Loading branch information
cybermaggedon committed Nov 26, 2024
1 parent 887fafc commit 21807df
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
8 changes: 7 additions & 1 deletion trustgraph-cli/scripts/tg-dump-msgpack
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env python3

""
This utility reads a knowledge core in msgpack format and outputs its
contents in JSON form to standard output. This is useful only as a
diagnostic utility.
"""

import msgpack
import sys
import argparse
Expand All @@ -16,7 +22,7 @@ def run(input_file):
def main():

parser = argparse.ArgumentParser(
prog='tg-load-pdf',
prog='tg-dump-msgpack',
description=__doc__,
)

Expand Down
7 changes: 6 additions & 1 deletion trustgraph-cli/scripts/tg-load-kg-core
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env python3

"""This utility takes a knowledge core and loads it into a running TrustGraph
through the API. The knowledge core should be in msgpack format, which is the
default format produce by tg-save-kg-core.
"""

import aiohttp
import asyncio
import msgpack
Expand Down Expand Up @@ -133,7 +138,7 @@ async def run(**args):
async def main():

parser = argparse.ArgumentParser(
prog='tg-load-pdf',
prog='tg-load-kg-core',
description=__doc__,
)

Expand Down
11 changes: 10 additions & 1 deletion trustgraph-cli/scripts/tg-save-kg-core
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/usr/bin/env python3

"""
This utility connects to a running TrustGraph through the API and creates
a knowledge core from the data streaming through the processing queues.
For completeness of data, tg-save-kg-core should be initiated before data
loading takes place. The default output format, msgpack should be used.
JSON output format is also available - msgpack produces a more compact
representation, which is also more performant to load.
"""

import aiohttp
import asyncio
import msgpack
Expand Down Expand Up @@ -144,7 +153,7 @@ async def run(**args):
async def main():

parser = argparse.ArgumentParser(
prog='tg-load-pdf',
prog='tg-save-kg-core',
description=__doc__,
)

Expand Down

0 comments on commit 21807df

Please sign in to comment.