{"id":19343787,"url":"https://github.com/tsv2013/algorithm","last_synced_at":"2025-02-24T09:18:12.729Z","repository":{"id":31880474,"uuid":"35448925","full_name":"tsv2013/algorithm","owner":"tsv2013","description":"Algorithm block diagram visualization and editing widget (jQuery+KnockoutJS)","archived":false,"fork":false,"pushed_at":"2018-11-23T12:59:07.000Z","size":275,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T13:07:51.436Z","etag":null,"topics":["algorithm","algorithm-block-diagram","algorithm-visualization-widget","block-diagram","javascript","knockoutjs","visualization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsv2013.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-11T20:41:29.000Z","updated_at":"2018-11-23T12:59:08.000Z","dependencies_parsed_at":"2022-08-30T20:01:00.775Z","dependency_job_id":null,"html_url":"https://github.com/tsv2013/algorithm","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsv2013%2Falgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsv2013%2Falgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsv2013%2Falgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsv2013%2Falgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsv2013","download_url":"https://codeload.github.com/tsv2013/algorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240449892,"owners_count":19803125,"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":["algorithm","algorithm-block-diagram","algorithm-visualization-widget","block-diagram","javascript","knockoutjs","visualization"],"created_at":"2024-11-10T03:39:23.630Z","updated_at":"2025-02-24T09:18:12.250Z","avatar_url":"https://github.com/tsv2013.png","language":"TypeScript","readme":"# tsvw-algorithm #\n\n[![Build Status](https://travis-ci.org/tsv2013/algorithm.svg)](https://travis-ci.org/tsv2013/algorithm) [![Coverage Status](https://coveralls.io/repos/tsv2013/algorithm/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/tsv2013/algorithm?branch=master) [![GitHub version](https://badge.fury.io/gh/tsv2013%2Falgorithm.svg)](http://badge.fury.io/gh/tsv2013%2Falgorithm) [![Bower version](https://badge.fury.io/bo/tsv-widget-algorithm.svg)](http://badge.fury.io/bo/tsv-widget-algorithm) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)\n\n## Algorithm block diagram visualization and editing widget (jQuery+KnockoutJS) ##\n## Live demo at: http://tsv2013.github.io/algorithm/ ##\n\n[![NPM](https://nodei.co/npm/tsvw-algorithm.png)](https://npmjs.org/package/tsvw-algorithm)\n\n\n##How to visualize algorithm block diagram\n\n1. **Add the following markup to your page:**\n\t```\n    \u003cdiv data-bind=\"algorithm: { value: algorithm }\"\u003e\u003c/div\u003e\n\t```\n\n2. **Define algorithm via JSON, for instance:**\n\t```\n    var model = {\n        algorithm: {\n            items: [\n                { id: 9, text: \"finish\" },\n                { id: 6, text: \"is condition true?\" },\n                { id: 3, text: \"block is in progress\", state: \"inprogress\" },\n                { id: 7, text: \"this block has a number\", num: 1 },\n                { id: 2, text: \"this is a simple block with a very very content string\" },\n                { id: 1, text: \"start\", comment: \"This is the start block.\" },\n                { id: 4, text: \"this block is completed\", state: \"completed\" },\n                { id: 5, text: \"an intermediate block\" },\n                { id: 8, text: \"pre-end simple block\" },\n            ],\n            transitions: [\n                { iid: 1, exit1: 2, exit2: null },\n                { iid: 2, exit1: 3, exit2: null },\n                { iid: 2, exit1: 5, exit2: null },\n                { iid: 3, exit1: 4, exit2: null },\n                { iid: 4, exit1: 6, exit2: null },\n                { iid: 5, exit1: 6, exit2: null },\n                { iid: 6, exit1: 7, exit2: 8 },\n                { iid: 7, exit1: 9, exit2: null },\n                { iid: 8, exit1: 9, exit2: null },\n            ]\n        }\n    };\n\t```\n\n3. **Bind model via KnockoutJS:**\n\t```\n    ko.applyBindings(model);\n\t```\n\n\n##How to modify algorithm block diagram\n\nWhile hovering mouse over algorithm blocks you will see control points to add blocks above and below, delete block and drag to link this block with other one.\n\n\n##Building tsvw-algorithm from sources\n\n 1. **Clone the repo from GitHub**  \n\t```\n\tgit clone https://github.com/tsv2013/algorithm.git\n\tcd algorithm\n\t```\n\n 2. **Acquire build dependencies.** Make sure you have [Node.js](http://nodejs.org/) installed on your workstation. This is only needed to _build_ algorithm from sources.  \n\t```\n\tnpm install -g karma-cli\n\tnpm install\n\t```\n\n 3. **Build the library**\n\t```\n\tnpm run build\n\t```\n\tAfter that you should have the library at 'dist' directory.\n\n 4. **Run unit tests**\n\t```\n\tkarma start\n\t```\n\tThis command will run unit tests usign [Karma](https://karma-runner.github.io/0.13/index.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsv2013%2Falgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsv2013%2Falgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsv2013%2Falgorithm/lists"}