{ "info": { "author": "TamTam Research", "author_email": "jan.vlcinsky@tamtamresearch.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "==============================================\nRDS Utils: Utilities for playing with RDS data\n==============================================\n\nRDS Utils provide few commands for preprocessing RDS data in text files.\n\nFollowing commands are aviable:\n\n- `rds_cycle`: replay in cycle set of RDS files in rate 11.4 groups a second (timestamps updated).\n- `rds_concat`: concatenates RDS records from set of RDS files\n- `rds_sort`: sort names of RDS files according to timestamp in first RDS record\n\n.. contents:: Table of Content\n\nInstallation\n============\n\nInstall using `pip`. Best install into virtualenv.\n::\n\n $ pip install ttr.rdsutils\n\nFormat of RDS data\n==================\nThe RDS data are expected to have following format::\n\n 2406846391911698;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24060468E0CD522D;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 240624686E6F7374;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24060469E0CD5245;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 240634704080CD46;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406846391911698;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406046AE0CD4749;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24062469692E2043;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406046FE0CD4E41;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 2406846361A2AC00;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 24060468E0CD522D;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 2406246A68636574;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 2406846361A2AC00;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 24060469E0CD5245;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 240634700647CD46;31;40;92.6 MHz;2015-08-12T10:21:42Z\n\nThe format follows this pattern::\n \n ;;;;\n\nwhere:\n\n- ``: RDS data in hexa. May contain `*` in place, where content cannot be decoded.\n- ``: strength of signal.\n- ``: ??not sure, what is the meaning.\n- ``: Frequency on which we are receiving.\n- ``: Timestamp in ISO format expressed in UTC. Must follow\n `YYYY-MM-DDTHH:MM:SSZ` format. Using precission of whole seconds.\n\nBeside of lines in described format, other lines may appear. Utilities are\nusually taking the lines as they are and not doing any transformation of them.\n\nQuick start\n===========\n\nAssuming, you have couple of directories with RDS files and you want to create\none large RDS file for processing by RDSTMCCruncher, one would do::\n\n $ find . -name \"*.rds\" | rds_sort | rds_concat > big.rds\n\nOn MS Windows one would achive the same::\n\n $ dir -s -b *.rds | rds_sort | rds_concat > big.rds\n\nWould there be any time overlaps, problems would be printed to stderr and\nstatus code 1 would be returned.\n\nResulting file would contain all lines form all the listed RDS files and if\nthere are no time overlaps detected, all records woudl be sorted according to\nreported timestamp.\n\nOne could then process the RDS file, e.g. using command `RDSTMCCruncher` (this\nis out of scope of this package documentation).\n\nCommands\n========\n\nAccessing help for commands\n---------------------------\n\nAll provided commands provide help, when using with `--help` switch.\n\n\n`rds_cycle`: Cycle content of RDS files\n---------------------------------------\n\nHaving one or more RDS files, with `rds_cycle` one can start replaying the\ncontent in real pace with rate of 11.4 RDS groups a second. Typically, one\npipes the output to `zmqc` command and publish it on ZeroMQ PUB socket\n(RDSTMCCruncher is able to consume from such socket remotely).\n\nTo show command help::\n\n $ rds_cycle --help\n rds_cycle\n Usage:\n rds_cycle ...\n\n Reads RDS files in cycle and prints their lines in rate of\n 11.4 lines per second.\n\n All lines following RDS data pattern\n\n 2406046AE0CD4749;33;40;92.6 MHz;2015-08-12T10:36:31Z\n 24062469692E2043;33;40;92.6 MHz;2015-08-12T10:36:31Z\n 2406046FE0CD4E41;31;40;92.6 MHz;2015-08-12T10:36:32Z\n\n get timestamp updated to the current one.\n\n All other lines are printed unchanged.\n\nAssuming you have files `A.rds` and `B.rds`, replay them in following way::\n\n $ rds_cycle A.rds B.rds\n 2406046AE0CD4749;33;40;92.6 MHz;2015-08-12T10:36:31Z\n 24062469692E2043;33;40;92.6 MHz;2015-08-12T10:36:31Z\n 2406046FE0CD4E41;31;40;92.6 MHz;2015-08-12T10:36:32Z\n ....\n\nThe records appeare continually and files are cycled over and over, so to stop\nit, one must canceld te command.\n\nIf you want to publish the data to ZeroMQ socket on port 5555 on localhost (and\nassuming you have `zmqc` command installed), use the command as follows::\n\n $ rds_cycle A.rds B.rds|zmqc -b -w PUB \"tcp://*:5555\"\n\nYou may consume the stream from another console to see the records flowing::\n\n $ zmqc -c -r SUB tcp://localhost:5555\n 24060468E0CD522D;33;40;92.6 MHz;2015-08-12T19:02:35Z\n 240624686E6F7374;33;40;92.6 MHz;2015-08-12T19:02:35Z\n 24060469E0CD5245;33;40;92.6 MHz;2015-08-12T19:02:35Z\n 240634704080CD46;33;40;92.6 MHz;2015-08-12T19:02:36Z\n 2406846391911698;33;40;92.6 MHz;2015-08-12T19:02:36Z\n 2406046AE0CD4749;33;40;92.6 MHz;2015-08-12T19:02:36Z\n 24062469692E2043;33;40;92.6 MHz;2015-08-12T19:02:36Z\n ....\n\nThe timestamp of records shall show current time (expressed in UTC).\n\n\n`rds_sort`: Sort RDS files by time\n----------------------------------\n\nAssuming you have bunch of RDS files in one or more directories, `rds_sort`\nallows sorting the file names according to time expressed in first RDS record\nin each file. This is often intermediate step in creating larger RDS file (see\n`rds_concat` later on).\n\nCheck the help::\n\n $ rds_sort --help\n rds_sort - Sort RDS files by time of first RDS record\n Usage:\n rds_sort\n\n File names are given on stdin.\n\n List of sorted file names is printed to stdout.\n\n \"Age\" of the file is determined by reading the first valid RDS record in the\n file and using timestamp mentioned there.\n\n If there are two files having the same timestamp (which are expressed with\n precission of seconds) in the first RDS record, the command returns status 1.\n\n\n.. note:: File names are not specified as positional arguments, but on stdin.\n This is to allow processing large number of RDS files, where it would\n be easy to reach limits of command line argument number or total\n argument name. Using `stdin` instead allows sorting much more file names.\n\n\nAssuming you have a directory of RDS files named `rds`::\n\n $ ls rds/*.rds | rds_sort\n rawrds_2014-01-23T23-28-04Z\n rawrds_2014-01-24T00-28-06Z\n rawrds_2014-01-24T01-28-07Z\n rawrds_2014-01-24T02-28-08Z\n rawrds_2014-01-24T03-28-10Z\n rawrds_2014-01-24T04-28-11Z\n rawrds_2014-01-24T05-28-12Z\n rawrds_2014-01-24T06-28-14Z\n rawrds_2014-01-24T07-28-15Z\n rawrds_2014-01-24T08-28-16Z\n rawrds_2014-01-24T09-28-18Z\n\nNote, that if you have datetime encoded in file name, the task seems easy, but\nif you are not sure, `rds_sort` would deal even with randomly named files.\n\nOutput of `rds_sort` is usually piped into `rds_concat` or saved into a file to reuse in later calls\n\nOutput of `rds_sort` is usually piped into `rds_concat` or saved into a file to\nreuse in later calls.\n\n\n.. warning:: If there multiple files, reporting exactly the same second in\n first record, the command will complain to stderr, return status\n code 1, but will still print the result.\n\n`rds_concat`: Concatenate RDS records from set of RDS files\n-----------------------------------------------------------\n\nIt reads file names from stdin and prints to stdout all lines from all the files::\n\n $ rds_concat --help\n rds_concat - Concatenate RDS records from set of RDS files\n Usage:\n rds_concat\n\n File names are given on stdin.\n\n It reads file names from stdin and prints to stdout all lines from all the\n files.\n\n If there are timestamp overlaps (last record of last file reports later datetime\n than fist record in following file), warnings are printed to stderr and the\n command exists with exit code 1\n\nFirst, create list of files sorted from the olderst to the newest one (in\nregards to first RDS record datetime). Good option is using `rds_sort`. Pipe\nthe file names into `rds_concat` command::\n\n \n $ ls rds/*.rds | rds_sort | rds_concat\n 2406846391911698;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24060468E0CD522D;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 240624686E6F7374;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24060469E0CD5245;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 240634704080CD46;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406846391911698;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406046AE0CD4749;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 24062469692E2043;33;40;92.6 MHz;2015-08-12T10:21:41Z\n 2406046FE0CD4E41;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 2406846361A2AC00;31;40;92.6 MHz;2015-08-12T10:21:42Z\n 24060468E0CD522D;31;40;92.6 MHz;2015-08-12T10:21:42Z\n ....continued with records from all the files...\n\nIn case, there are time overlaps (typically last record of a file is newer than\nthe first of next one), program prints to stdout complains, exits with status\ncode 1, but proceeds with printing the records to stdout.\n\nRecords lacking usable timestamp are printed to the output too (without warning).\n\nTime overlaps inside of any RDS file are detected too.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://turbotmc.com", "keywords": "RDS\nRDS-TMC\nTurboTMC", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "ttr.rdsutils", "package_url": "https://pypi.org/project/ttr.rdsutils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ttr.rdsutils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://turbotmc.com" }, "release_url": "https://pypi.org/project/ttr.rdsutils/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Command line utilities for working with raw RDS data files", "version": "0.1.0" }, "last_serial": 1675824, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5b26d78db6ef020efc0895dcc9afdac4", "sha256": "5447c148d44fdc62a7db06343db1aa800bfb84bf0087071e79db4bf2237539c7" }, "downloads": -1, "filename": "ttr.rdsutils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5b26d78db6ef020efc0895dcc9afdac4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8451, "upload_time": "2015-08-13T10:55:45", "url": "https://files.pythonhosted.org/packages/f6/f2/8ce6c73e1ed5a1528ed7ac148197aa811b0b3b0d8ec955963cb463e26c5b/ttr.rdsutils-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b26d78db6ef020efc0895dcc9afdac4", "sha256": "5447c148d44fdc62a7db06343db1aa800bfb84bf0087071e79db4bf2237539c7" }, "downloads": -1, "filename": "ttr.rdsutils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5b26d78db6ef020efc0895dcc9afdac4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8451, "upload_time": "2015-08-13T10:55:45", "url": "https://files.pythonhosted.org/packages/f6/f2/8ce6c73e1ed5a1528ed7ac148197aa811b0b3b0d8ec955963cb463e26c5b/ttr.rdsutils-0.1.0.tar.gz" } ] }