{"id":15048020,"url":"https://github.com/tomzox/trowser","last_synced_at":"2025-07-14T06:03:18.897Z","repository":{"id":154044378,"uuid":"212526156","full_name":"tomzox/trowser","owner":"tomzox","description":"Trowser is a browser for large line-oriented text files, implemented in 3 alternate programming languages:  Tcl/Tk, Python and C++/Qt","archived":false,"fork":false,"pushed_at":"2023-08-06T14:11:13.000Z","size":2290,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-15T17:46:26.976Z","etag":null,"topics":["color-highlighter","cpp14","graphical-user-interface","less","python","qt5-gui","tcl","tcl-tk","text-browser","text-search","tkinter-gui","vim"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomzox.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,"zenodo":null}},"created_at":"2019-10-03T08:02:03.000Z","updated_at":"2024-10-21T06:06:27.000Z","dependencies_parsed_at":"2025-05-15T17:42:23.886Z","dependency_job_id":"b1a20f08-7d40-4021-a188-19078e732d65","html_url":"https://github.com/tomzox/trowser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tomzox/trowser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Ftrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Ftrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Ftrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Ftrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomzox","download_url":"https://codeload.github.com/tomzox/trowser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Ftrowser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265248747,"owners_count":23734302,"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":["color-highlighter","cpp14","graphical-user-interface","less","python","qt5-gui","tcl","tcl-tk","text-browser","text-search","tkinter-gui","vim"],"created_at":"2024-09-24T21:06:59.827Z","updated_at":"2025-07-14T06:03:18.888Z","avatar_url":"https://github.com/tomzox.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trowser\n\nTrowser is a browser for large line-oriented text files with color highlighting\nand a highly flexible search and cherry-picking window.  Trowser was developed\nas an alternative to tools such as \"less\" (UNIX) or \"Notepad++\" (Windows)\nwhen analyzing debug log/trace files\ncreated by other applications. Trowser integrates well with\n[GtestGui test-runner](http://github.com/tomzox/gtest_gui) as viewer for\ntext output of test applications using GoogleTest (GTest) framework.\n\nCompared to plain text viewers, trowser adds color highlighting, a persistent\nsearch history, graphical bookmarking and a separate search result window. The\nsearch window is especially designed to be main facility for performing trace\nanalysis: Using multiple consecutive searches, manual additions or removals,\nundo/redo and subtractive searches, it can be filled with a condensed view of\nthe trace file, holding only the lines relevant to the issue under analysis.\n\nTrowser has a graphical interface, but is designed to allow browsing via the\nkeyboard at least to the same extent as less. Key bindings and the cursor\npositioning concept are derived mainly from vim.\n\nNote: In this context \"line-oriented\" denotes that each line of text is\nconsidered a data unit.  Color highlighting (including search matches)\nwill always apply the highlight to the complete text line.\n\nDue to historical evolution, implementations of trowser are available in three\ndifferent programming languages: [Tcl/Tk](http://tcl.tk/),\n[Python](https://www.python.org/), and C++ using [Qt5](https://www.qt.io/).\nThe three versions are largely equivalent, however the C++/Qt version has best\nperformance, looks prettier and has a new \"column configuration\" dialog for the\nsearch list, thus it's recommended to use this version. Currently you'd have to\ncompile it yourself from the sources in the [src_qt/](src_qt/) sub-directory of\nthe repository. If you're not up to this, use one of the other versions which\ndon't need compilation (due to using interpreted languages).\n\n## Screenshots\n\n\u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-main.png\" ALT=\"screenshot main window\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-highlight.png\" ALT=\"screenshot highlighting editor dialog\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-search.png\" ALT=\"screenshot search/filter list window\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-custom_column.png\" ALT=\"screenshot custom column configuration dialog\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-bookmarks.png\" ALT=\"screenshot bookmarks list dialog\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-history.png\" ALT=\"screenshot search history dialog\" BORDER=\"10\" WIDTH=\"200\" /\u003e \u003cIMG ALIGN=\"center\" SRC=\"images/screenshot-qt-pipe.png\" ALT=\"screenshot loading from pipe\" BORDER=\"10\" WIDTH=\"200\" /\u003e\n\nThe screenshots, taken from the C++/Qt implementation, show some of the main features\n(click the images to see larger versions):\n\n\u003cUL\u003e\n\u003cLI\u003eThe first screenshot shows the main window with a text which has color\nhighlighting applied and an ongoing incremental search initiated via the\n\"Find\" toolbar at the bottom of the window.\n\n\u003cLI\u003eThe second screenshot shows the highlight pattern editor dialog (holding\nthe patterns used for the previous screenshot) at the top, and the mark-up\neditor sub-dialog at the bottom (which opens when double-clicking on any\n\"sample text\" in the list).\n\n\u003cLI\u003eThe third screenshot shows the search result list, populated by \"search\nall\" in the main window, or via the search highlight and history dialogues, or\nby manually inserting selected lines from the main window. In the example\nscreenshot, two lines are bookmarked and thus shown with a leading blue dot. The\n\"Date\" column is filled with content parsed from the document based on the\nconfiguration shown in the next screenshot.\n\n\u003cLI\u003eThe fourth screenshot shows the \"custom column configuration dialog\", which\nallows adding columns to the search list: In this example, it is used to extract\nthe sending date from an email for each line of the email that appears in the\nsearch list. The \"Test\" dialog shown at the bottom of the image allows debugging\nthe column configuration by showing results when running it on a selected line.\n\n\u003cLI\u003eThe fifth screenshot shows the bookmark list, which are lines that are\nindividually marked by the user and appear in special mark-up in the main\nwindow and search list.\n\n\u003cLI\u003eThe sixth screenshot shows the search history dialog (i.e. a list of\npreviously used search patterns) which can be used to quickly repeat one or\nmore previous searches.\n\n\u003cLI\u003eThe last screenshot shows the pipe load dialog which pops up when loading\ntext from standard input. This is used mainly for monitoring progress while\npiping output from another application directly into trowser.\n\u003c/UL\u003e\n\n## Documentation\n\nFor a detailed description of features please refer to the [manual page](doc/trowser.pod)\n\n## Rationale\n\ntrowser was developed for sifting through debug output files written\nby software under development. Such debug files can get very large;\nin the extreme, there could be a line of trace written for every\nentered function (e.g. documenting the call and actual parameters)\nand one more line every time a function is left. When debugging\ncomplex exceptions, it's often necessary to analyze several hundreds\nor thousands of lines of debug trace to understand the cause.\n\nSuch analysis usually start by first looking at top-level events\n(e.g. stimuli by the environment) and then digging down into the details.\ntrowser was developed to facilitate this process. Of course one could\nalso use standard tools such as \"grep\" or \"awk\" and \"less\" or \"vim\" to tackle\nthis task, but this way lots of repetitive manual hacking on the command\nline is required. For an every-day task, it seems worth to invest some\ntime into automating the process in a specialized tool.\n\nAdditionally, trowser has the capability to automatically parse data out\nof the trace file which can be included in custom columns of the search\nresults list. This can be used for example in traces for event-driven\napplications to show a common timestamp or ID for each trace line\ngenerated while processing the same event. If the pre-existing custom\nconfiguration doesn't allow your use-case, it is fairly straight-forward\nextending it by adding a new sub-class in `src_qt/parse_frame.cc`\n\nWith less than 9k lines of Tcl/Tk code, or 16k lines C++ respectively,\ntrowser still is a relatively small application (in large part thanks to\nthe powerful \"text\" widgets both Tk and Qt) so there's only a low barrier\nof getting familiar with the source code to allow extending or adapting\nthe functionality for your own needs.\n\n## Installing C++ version\n\nThe C++ version is only tested on Linux so far. Pre-requisite for building the\nC++ version is installing Qt5 developer packages (qtbase5-dev, qttools5-dev,\nqt5-default). On some platforms, you may additionally need package\n`libqt5serialport5-dev`.\n\nTo build the C++ version, change into sub-directory `src_qt`, then run\n`qmake` and then `make`. If all works well, an executable `build/trowser`\nis generated as a result. You can copy this executable file anywhere you want\nor just run it directly.\n\nUsage: Name the file to open on the command line, or \"-\" to read from a pipe.\n\nFirst steps when running trowser for the first time usually is selection of an\nappropriate font and configuring expressions for syntax highlighting under menu\n\"Search / Edit highlight patterns\". Then adjust the window and dialog sizes and\nlocations. trowser will remember these settings in its configuration file\nstored in `$HOME/.config/trowser/`.\n\n## Installing Tcl/Tk \u0026 Python versions\n\nThe Python variant is available as a package on\n[PyPi](https://pypi.org/project/trowser/)\n\nSoftware Requirements: trowser can be used on all platforms which are supported\nby either the Tcl/Tk or Python interpreters. This means all UNIX variants,\nLinux, Mac, and even MS Windows. On the other hand, this means a prerequisite\nis installing either [Tcl/Tk](http://tcl.tk/) (version 8.5 or later) or\n[Python](https://www.python.org/). The latter can be done semi-automatically\nwhen creating packages using the scripts described below.\n\ntrowser can be used without installation, if you copy the script simply in\nthe same directory as the files you want to open with it. Note trowser\nexpects to be given the name of the file you want to open on the command line.\n\nThe Python version is best installed using `pip3 install trowser`. This will\nautomatically download the latest release of the package from pypi.org (plus\ndependency \"appdirs\" on the Win32 platform) and install them.\n\nAlternatively, or if you want to install the latest code found here on GitHub,\nPython and Tcl/Tk versions can be installed as a system package if you're using\na Debian, Ubuntu or a compatible Linux distribution: You can create a Debian\npackage for using script `create_deb.sh` for Tcl/Tk, or using script\n`create_deb_py.sh` for Python respectively. The scripts will copy the required\nfiles into a local sub-directory `deb` and then create a package which can be\ninstalled using the generated package file. Example:\n\n```console\n    bash create_deb.sh\n    dpkg -i deb/trowser_1.3-3_all.deb\n```\n\nThe software is released under the\n[GNU General Public License, version 3](http://www.fsf.org/copyleft/gpl.html)\n\n## Troubleshooting (Tcl/Tk version)\n\nIf trowser fails to start or aborts with an interpreter error, you should\ncheck if Tcl/Tk is installed and has the required version by entering the\nfollowing command line in a terminal window (i.e. in a shell):\n\n```console\n    echo 'puts $tcl_patchLevel;exit' | wish\n```\nIn some Tcl/Tk installations \"wish\" as such may not exist, but instead the\nmajor and minor version are appended to the executable name (e.g.\"wish8.5\".)\nIn this case, change the third line in the trowser.tcl script file accordingly.\n\nCurrent version of trowser is tested against Tcl/Tk version 8.6, but it should\nalso still work with predecessor Tcl/Tk versions 8.5 and 8.4. If the above\ncommand returns an even older version, you'll have to upgrade your Tcl/Tk\nlibrary for using trowser. In Python, you can determine the version of\nunderlying Tcl/Tk simply by running `python -m tkinter`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomzox%2Ftrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomzox%2Ftrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomzox%2Ftrowser/lists"}