{"id":22181004,"url":"https://github.com/easygithdev/svgtree","last_synced_at":"2025-03-24T19:16:26.797Z","repository":{"id":152648901,"uuid":"488523270","full_name":"EasyGithDev/SvgTree","owner":"EasyGithDev","description":"Display a binary tree with SVG","archived":false,"fork":false,"pushed_at":"2022-05-11T12:33:53.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T23:30:16.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/EasyGithDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-04T09:16:28.000Z","updated_at":"2022-05-04T09:33:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8b41496-5cc2-46f8-80ee-cf1f24cd4933","html_url":"https://github.com/EasyGithDev/SvgTree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FSvgTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FSvgTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FSvgTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FSvgTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyGithDev","download_url":"https://codeload.github.com/EasyGithDev/SvgTree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245334914,"owners_count":20598389,"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":[],"created_at":"2024-12-02T09:21:29.199Z","updated_at":"2025-03-24T19:16:26.773Z","avatar_url":"https://github.com/EasyGithDev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SvgTree\nDisplay a binary tree with SVG\n\nHere is a complete GO program which reads a document and produces an alphabetized list of words found therein together with the number of occurrences of each word. \n\nThe method keeps a binary tree of words such that the left descendant tree for each word has all the words lexicographically smaller than the given word, and the right descendant has all the larger words.\n\nBoth the insertion and the drawing routine are recursive. \n\nFinally, the program send the SVG associated with the tree to the browser to display.\n\n## Install\n\nSelect or create a folder :\n\n```sh\ncd myfloder\n```\n\nClone the project into your selected folder :\n\n```sh\ngit clone git@github.com:EasyGithDev/SvgTree.git svgtree\n```\n\nInstall the depencies to work with SVG :\n\n```sh\ncd svgtree\ngo mod init\ngo get github.com/ajstarks/svgo\n```\n\n## Run\n\nYou may execute the program with a short text as parameter :\n\n```sh\ngo run main.go this is time to said hello world one more time\n```\n\n![alt text](../assets/tree.svg?raw=true)\n\nIf you want display the words frequencies use the -d option like this : \n\n```sh\ngo run main.go -d=f this is time to said hello world one more time\n```\n\n![alt text](../assets/tree-f.svg?raw=true)\n\n\nIf you want display the node position use the -d option like this : \n\n```sh\ngo run main.go -d=p this is time to said hello world one more time\n```\n\n![alt text](../assets/tree-p.svg?raw=true)\n\n## Display the result\n\nOpen a web browser and enter the URL :\n\nhttp://localhost:8000/\n\n## Write the result\n\nYou can choose to generate a SGV file to save the result.\n\nYou must change the output like this :\n\n```sh\ngo run main.go -o=stdout this is time to said hello world one more time \u003e tree.svg\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygithdev%2Fsvgtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasygithdev%2Fsvgtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygithdev%2Fsvgtree/lists"}