{"id":21410103,"url":"https://github.com/recolude/rap","last_synced_at":"2025-06-25T04:43:57.382Z","repository":{"id":42707254,"uuid":"332540111","full_name":"recolude/rap","owner":"recolude","description":"Official format for time series data captured from 3D Engines.","archived":false,"fork":false,"pushed_at":"2023-05-14T21:56:34.000Z","size":294,"stargazers_count":12,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T21:51:32.183Z","etag":null,"topics":["3d","cli","golang","recording","unity3d"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/recolude.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-24T19:44:23.000Z","updated_at":"2023-07-19T13:44:51.000Z","dependencies_parsed_at":"2024-11-22T21:31:32.406Z","dependency_job_id":null,"html_url":"https://github.com/recolude/rap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/recolude/rap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recolude%2Frap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recolude%2Frap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recolude%2Frap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recolude%2Frap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recolude","download_url":"https://codeload.github.com/recolude/rap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recolude%2Frap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261807681,"owners_count":23212660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","cli","golang","recording","unity3d"],"created_at":"2024-11-22T17:37:33.977Z","updated_at":"2025-06-25T04:43:57.329Z","avatar_url":"https://github.com/recolude.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAP\n\n[![Build Status](https://travis-ci.com/recolude/rap.svg?branch=main)](https://travis-ci.com/recolude/rap) [![codecov](https://codecov.io/gh/recolude/rap/branch/main/graph/badge.svg?token=hOfjiGvwAj)](https://codecov.io/gh/recolude/rap)\n [![Go Report Card](https://goreportcard.com/badge/github.com/recolude/rap)](https://goreportcard.com/report/github.com/recolude/rap)\n\n**RAP is in Beta**\n\nRecolude's official recording file format. Ain't no kill like overkill.\n\n## Install\n\n```\ngit clone https://github.com/recolude/rap\ncd rap\ngo install ./cmd/rap-cli\n```\n\n## CLI Usage\n\n```\nNAME:\n   RAP CLI - Utils around recolude file format\n\nUSAGE:\n   rap-cli [global options] command [command options] [arguments...]\n\nVERSION:\n   1.0.0\n\nAUTHOR:\n   Eli Davis \u003celi@recolude.com\u003e\n\nCOMMANDS:\n   from-csv   Builds a recording from CSV\n   json       Transforms a file to json\n   summarize  Summarizes a file\n   upgrade    Upgrades a file from v1 to v2\n   help, h    Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help (default: false)\n   --version, -v  print the version (default: false)\n```\n\n## Building Recordings Programmatically\n\nWith this new library you can create your own recordings programmatically. The below example creates a recording of the sin wave and then writes it to disk.\n\n```golang\npackage main\n\nimport (\n\t\"math\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/recolude/rap/format\"\n\t\"github.com/recolude/rap/format/collection/position\"\n\t\"github.com/recolude/rap/format/encoding\"\n\tpositionEncoder \"github.com/recolude/rap/format/encoding/position\"\n\t\"github.com/recolude/rap/format/io\"\n\t\"github.com/recolude/rap/format/metadata\"\n)\n\nfunc main() {\n\titerations := 1000\n\tpositions := make([]position.Capture, iterations)\n\n\tstart := time.Now()\n\tfor i := 0; i \u003c iterations; i++ {\n\t\tcurrentTime := float64(i)\n\t\tpositions[i] = position.NewCapture(currentTime, 0, math.Sin(currentTime), 0)\n\t}\n\tduration := time.Since(start)\n\n\trec := format.NewRecording(\n\t\t\"\",\n\t\t\"Sin Wave Demo\",\n\t\t[]format.CaptureCollection{\n\t\t\tposition.NewCollection(\"Sin Wave\", positions),\n\t\t},\n\t\tnil,\n\t\tmetadata.NewBlock(map[string]metadata.Property{\n\t\t\t\"iterations\": metadata.NewIntProperty(iterations),\n\t\t\t\"benchmark\":  metadata.NewStringProperty(duration.String()),\n\t\t}),\n\t\tnil,\n\t\tnil,\n\t)\n\n\tf, _ := os.Create(\"sin demo.rap\")\n\trecordingWriter := io.NewWriter(\n\t\t[]encoding.Encoder{\n\t\t\tpositionEncoder.NewEncoder(positionEncoder.Oct24),\n\t\t},\n\t\ttrue,\n\t\tf,\n\t\tio.BST16,\n\t)\n\t// Writes a recording in 1,171 bytes\n\trecordingWriter.Write(rec)\n}\n\n```\n\n## Testing Locally\n\nYou need to generate mocks before you can run parts of the test suite.\n\n```\ngo generate ./...\n```\n\nThere are also benchmark(s)\n\n```\ngo test ./format/io -bench=. -cpuprofile cpu.prof\ngo tool pprof -svg cpu.prof \u003e cpu.svg\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecolude%2Frap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecolude%2Frap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecolude%2Frap/lists"}