Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Python wrapper around the docker container of rock-core/tools-pocolog2msgpack

License

Notifications You must be signed in to change notification settings

Urhengulas/python-procolog2msgpack

Repository files navigation

python-pocolog2msgpack

Python wrapper around the docker container of rock-core/tools-pocolog2msgpack

Table of content

about

This project provides a python interface for the pocolog2msgpack tool, to convert Rock's pocolog format to MessagePack.

dependencies

dependencies version
python 3.5+
docker 19.03+

getting started

  1. Install package from pip
    $ pip install pocolog2msgpack
  2. Write own converter
    from pocolog2msgpack import Converter
    
    base_path = "data/"
    conv = Converter(base_path=base_path)
    1. convert batch of files
      • convert all log-files in data/log/
      • resulting msg-files in same sub-dir, but under data/msg
      log_path = f"{base_path}/log/"
      
      conv.convert_batch(
      	base_path=log_path,
      	file_type="log",
      	cache=True,
      )
    2. convert single file
      • convert file data/log/poco.log
      • resulting msg-file in data/msg/poco.msg
      from pocolog2msgpack import X2YFile
      
      file = X2YFile(
      	file_name="data/poco.log",
      	file_type="log",
      )
      
      conv.convert(
      	log_2_msg_file = file,
      )

About

Python wrapper around the docker container of rock-core/tools-pocolog2msgpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published