{"id":23178430,"url":"https://github.com/bn-l/thsearch","last_synced_at":"2025-04-05T02:15:51.229Z","repository":{"id":65341518,"uuid":"589767866","full_name":"bn-l/thsearch","owner":"bn-l","description":"Content searching of documents (just for fun)","archived":false,"fork":false,"pushed_at":"2024-02-29T18:12:23.000Z","size":1035,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T10:24:19.889Z","etag":null,"topics":["csharp","grep"],"latest_commit_sha":null,"homepage":"","language":"C#","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/bn-l.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}},"created_at":"2023-01-16T22:16:02.000Z","updated_at":"2024-11-20T13:33:56.000Z","dependencies_parsed_at":"2024-02-29T19:29:24.801Z","dependency_job_id":"199d4530-84cf-49d6-af58-65c776ad5cfd","html_url":"https://github.com/bn-l/thsearch","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2Fthsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2Fthsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2Fthsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bn-l%2Fthsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bn-l","download_url":"https://codeload.github.com/bn-l/thsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276187,"owners_count":20912288,"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":["csharp","grep"],"created_at":"2024-12-18T07:11:07.774Z","updated_at":"2025-04-05T02:15:51.208Z","avatar_url":"https://github.com/bn-l.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"thsearch/Assets/logo2-1024.png\" alt=\"logo\" /\u003e\n\n# thsearch \n\n### 👉NEW!!!\n\nMultithreaded, just in time indexed, content search of files in specified folders. Like grep but faster and with the search results ranked. Support for indexing pdfs, epubs, html (or xml in general), mhtml (single file saved web page) and plain text.\n\n### Why?\n\nTo explore JIT indexing and the consumer / producer pattern in .net.\n\n### Usage\n\nCreate a txt file in the same location as thsearch.exe. This file can be name \"thsearch.txt\", which is the default search configuration and/or a custom name, like \"books.txt\"\n\nIn this file, on separate lines:\n\n- \\~ will specifiy the location of the sqlite database file created for the index (optional)\n- \\+ will include paths (searches all sub directories) ,\n- \\- to exclude,\n- \\# to exlcude a path if it contains this word\n- \\\u003e to specify the extensions you want.\n\n#### .\\thsearch.txt \n\n```\n+C:\\User\\Documents\n-E:\\Exclude\\me\\please\n#node_modules\n\u003e.txt\n\u003e.md\n\u003e.pdf\n\u003e.docx\n\u003e.html\n```\n\nCLI:\n\n```powershell\nthsearch.exe \u003csearch string\u003e [config file] [all]\n```\n\n- `search string`: the search query (enclosed in qoutes if more than one word)\n- `config file`: (optional) If specified looks for a txt file with this name in the same directory as the executable\n- `all`: (optional) Show all search results (shows 10 by default)\n\n\n\nFor example to search in books:\n\n```powershell\nthsearch wooster books\n```\n\n\n\n### Supported Formats\n\nthSearch uses various dotnet libraries to extract just the text from various formats. It supports:\n\n- epub, pdfs, html, plain text, mark down, mhtml\n\n\n\nTip 1: Add it to your path and any time you want to search your notes, etc, just open a terminal and type \"thsearch searchterm\"\n\nTip 2: Add it to windows antimalware exclusions (can build it from source—no trust needed) to increase performance.\n\n### Details\n\nGrep / content searching is expensive so the first step is to not waste time on irrelevant files. The power of thSearch is that you search only specific extensions and and locations.\n\nThe just-in-time indexing uses multiple threads, and a producer and consumer design to extract and stem documents so that, even for many large files, the indexing performance is acceptable. It also means that a background indexing task doesn't need to be maintained. The drawbacks are that initial searches and searches after many changes will be slow. Versus the speed of grep this is acceptable.\n\nThe stemming logic is written from scratch and uses no libraries. It makes use of spans to increase performance. \n\n### Platform\n\nWindows.\n\nSoon: Linux (for now need to build it on Linux manually)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbn-l%2Fthsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbn-l%2Fthsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbn-l%2Fthsearch/lists"}