{"id":13620904,"url":"https://github.com/xaizek/zograscope","last_synced_at":"2025-08-20T10:31:34.932Z","repository":{"id":55604465,"uuid":"111816506","full_name":"xaizek/zograscope","owner":"xaizek","description":"Mainly a syntax-aware diff that also provides a number of additional tools.","archived":false,"fork":false,"pushed_at":"2024-07-07T07:41:32.000Z","size":3707,"stargazers_count":51,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-10T07:21:23.559Z","etag":null,"topics":["agpl","agplv3","c","command-line-app","command-line-tool","command-line-tools","cpp","cpp11","diff","diffing","make","makefile","qt","qt5","qt5-gui","syntax-aware"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xaizek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2017-11-23T14:04:24.000Z","updated_at":"2024-08-18T08:50:16.000Z","dependencies_parsed_at":"2023-02-07T18:46:03.550Z","dependency_job_id":"d7e61b32-5ea3-4769-9860-759f61cab36b","html_url":"https://github.com/xaizek/zograscope","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaizek%2Fzograscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaizek%2Fzograscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaizek%2Fzograscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaizek%2Fzograscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xaizek","download_url":"https://codeload.github.com/xaizek/zograscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230415317,"owners_count":18222158,"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":["agpl","agplv3","c","command-line-app","command-line-tool","command-line-tools","cpp","cpp11","diff","diffing","make","makefile","qt","qt5","qt5-gui","syntax-aware"],"created_at":"2024-08-01T21:01:00.558Z","updated_at":"2024-12-19T10:08:58.589Z","avatar_url":"https://github.com/xaizek.png","language":"C++","funding_links":[],"categories":["C++","Source Code"],"sub_categories":["Semantic Diffs"],"readme":"**zograscope**, _2017 - 2024_\n\n![Screenshot](data/examples/c/screenshot.png)\n\n**Clone recursively, there are submodules:**\n\n```bash\ngit clone --recursive https://github.com/xaizek/zograscope.git\n```\n\n1. [Description](#description) ([Status](#status);\n                                [Supported languages](#supported-languages);\n                                [Configuration](#configuration))\n2. [Tools](#tools)\n3. [Building and Installing](#building-and-installing)\n   ([Dependencies](#dependencies))\n4. [Documentation](#documentation)\n5. [License](#license)\n6. [Credits](#credits)\n   ([References](#references))\n\n## Name ##\n\n\"A zograscope is an optical device for enhancing the sense of depth perception\nfrom a flat picture.\" ([wiki][wiki-zograscope])\n\n## Description ##\n\n`zograscope` is built around syntax-aware diff and includes a number of\nadditional tools.\n\nThe nature of syntax-aware diff requires knowledge of structure of the code,\nwhich can be used to build other simple tools that can benefit from this\ninformation.  Competing with real language front-ends in the level of accuracy\nis not possible, but making some things that are one step further than regular\ntext-processing utilities seems feasible and the result might be even more\npractical than some of the more elaborate tools which end up requiring\ncomplicated setup process.\n\n### Status ###\n\nThe project is work in progress, but is useful in its current state.\n\nCode isn't perfect and isn't extensively documented as initial version was more\nof an experiment, but this situation gets better.\n\n## Documentation ##\n\nSee the [manual page](./docs/zograscope.md).\n\n## Tools ##\n\n### [zs-diff](tools/diff/README.md) ###\n\nA terminal-based syntax-aware diff.\n\n### [zs-find](tools/find/README.md) ###\n\nGrep-like tool that finds elements of source code structure.\n\n### [zs-gdiff](tools/gdiff/README.md) ###\n\nA Qt5 GUI version of syntax-aware diff.\n\n### [zs-hi](tools/hi/README.md) ###\n\nSimple syntax highlighter for xterm-256color palette.\n\n### [zs-stats](tools/stats/README.md) ###\n\nCounter of lines of code.\n\n### [zs-tui](tools/tui/README.md) ###\n\nTUI interface with underdefined scope of functionality.\n\n## Building and Installing ##\n\n```bash\n# if Qt5 is available (use `qmake` if it corresponds to Qt5 on your machine)\necho 'QT5_PROG := qmake-qt5' \u003e\u003e config.mk\n# if libgit2 is present\necho 'HAVE_LIBGIT2 := yes'   \u003e\u003e config.mk\n# if libsrcml is present\necho 'HAVE_LIBSRCML := yes'  \u003e\u003e config.mk\n# if cursesw is present\necho 'HAVE_CURSESW := yes'   \u003e\u003e config.mk\n\nmake release check\n```\n\nThis will build release version and run tests.  The executables will be named\n`release/zs-*`.\n\nThere is no data, so just making them available in the `$PATH` will work.\nHowever, it's possible to install conventionally (`/usr` prefix by default):\n\n```\nmake install\n```\n\n`DESTDIR` and `PREFIX` can be set to modify destination location.  On invoking\n`make uninstall` same values of these values should be specified.\n\n### Dependencies ###\n\n* [GNU Make][make]\n* C++11-capable compiler (GCC 4.9 has some issues, GCC 5.3 works fine)\n* [flex][flex]\n* [GNU Bison][bison] v3+\n* [Boost][boost], tested with 1.58, but older versions might work too\n* (optional, run- or build-time, for C++) [srcml][srcml] (v0.9.5 and v1.0.0 were\n  tested)\n* (optional, for `gdiff` tool) [qt5][qt5]\n* (optional, for `gdiff` tool) [libgit2][libgit2]\n* (optional, for `tui` tool) [curses][curses] with support of wide characters\n* (optional) [pandoc][pandoc] for regenerating man pages\n\n#### For Debian-based distributions ####\n\nIf you are using Debian or one of its derivatives, you can install the\ndependencies as follows:\n\n```bash\n# install make and build tools\nsudo apt install -y build-essential\n# installing dependencies\nsudo apt install -y libboost-filesystem-dev libboost-iostreams-dev\nsudo apt install -y libboost-program-options-dev libboost-system-dev\nsudo apt install -y libarchive13\nsudo apt install -y bison flex\n# installing srcml\nwget http://131.123.42.38/lmcrs/beta/srcML-Ubuntu18.04.deb\nsudo apt install ./srcML-Ubuntu18.04.deb\n```\n\nYou can also check out the [CI build script](data/appveyor/ubuntu.sh) in case\ndependencies change in the future.\n\n## License ##\n\n![AGPLv3](data/agplv3.png)\n\nVersion 3 of the GNU Affero General Public License.\n\n## Credits ##\n\n[dtl library][dtl] is used for finding edit distance.\n\n[pmr implementation][pmr] from C++17 with a small addition is employed for\ncustom allocators.\n\n[TinyXML2][tinyxml2] is used for parsing XML.\n\n[tree-sitter][tree-sitter] is used for parsing of some languages.\n\n[Catch2][catch] is used for tests.\n\n### References ###\n\n[Change Distilling: Tree Differencing for Fine-Grained Source Code Change\nExtraction][cd].\nBeat Fluri, Michael Würsch, Martin Pinzger, and Harald C. Gall.\n2007.\n\n[Change Detection in Hierarchically Structured Information][hier].\nSudarshan Chawathe, Hector Garcia-molina and Jennifer Widom.\n1996.\n\n[Simple fast algorithms for the editing distance between trees and related\nproblems][ted].\nKaizhong Zhang and Dennis Shasha.\n1989.\n\n[wiki-zograscope]: https://en.wikipedia.org/wiki/Zograscope\n\n[make]: https://www.gnu.org/software/make/\n[flex]: https://github.com/westes/flex\n[bison]: https://www.gnu.org/software/bison/\n[boost]: http://www.boost.org/\n[srcml]: http://www.srcml.org/\n[qt5]: https://www.qt.io/\n[libgit2]: https://libgit2.org/\n[curses]: https://en.wikipedia.org/wiki/Curses_(programming_library)\n[pandoc]: https://pandoc.org/\n\n[dtl]: https://github.com/cubicdaiya/dtl\n[pmr]: https://github.com/phalpern/CppCon2017Code\n[tinyxml2]: https://github.com/leethomason/tinyxml2\n[tree-sitter]: https://tree-sitter.github.io/\n[catch]: https://github.com/catchorg/Catch2\n\n[cd]: http://www.merlin.uzh.ch/publication/show/2531\n[hier]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.9224\n[ted]: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.460.5601\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaizek%2Fzograscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxaizek%2Fzograscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaizek%2Fzograscope/lists"}