Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Sh | 6,316 | 216 | 16 days ago | 157 | June 18, 2023 | 96 | bsd-3-clause | Go | ||
A shell parser, formatter, and interpreter with bash support; includes shfmt | ||||||||||
Comby | 1,996 | 9 months ago | 62 | apache-2.0 | OCaml | |||||
A code rewrite tool for structural search and replace that supports ~every language. | ||||||||||
Core | 1,464 | 2 | 21 hours ago | 6 | January 30, 2015 | 85 | mit | TypeScript | ||
Open source Dota 2 data platform | ||||||||||
Typescript Eslint Parser | 919 | 6,923 | 1,999 | 5 years ago | 49 | January 18, 2019 | other | JavaScript | ||
An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code. | ||||||||||
Mail Parser | 311 | 14 | 20 | a year ago | 84 | February 26, 2021 | 16 | apache-2.0 | Python | |
Tokenizer for raw mails | ||||||||||
Spacy Api Docker | 246 | a year ago | 23 | mit | Python | |||||
spaCy REST API, wrapped in a Docker container. | ||||||||||
Rats | 241 | a month ago | 44 | agpl-3.0 | HTML | |||||
Movie Ratings Synchronization with Python | ||||||||||
Goose Parser | 222 | 1 | 6 | 5 years ago | 87 | April 17, 2019 | 3 | mit | JavaScript | |
Universal scraping tool, which allows you to extract data using multiple environments | ||||||||||
Black Widow | 168 | a year ago | 13 | June 17, 2022 | 2 | gpl-3.0 | Python | |||
GUI based offensive penetration testing tool (Open Source) | ||||||||||
Csharp Datatables Parser | 120 | 2 years ago | 9 | April 04, 2016 | C# | |||||
C# Serverside parser for the popuplar jQuery datatables plugin. |
A short example below shows how comby simplifies matching and rewriting compared to regex approaches like sed
.
Need help writing patterns or have other problems? Post them in Gitter.
brew install comby
bash <(curl -sL get-comby.netlify.app)
Other Linux distributions: The PCRE library is dynamically linked in the Ubuntu binary. For other distributions like Arch Linux, a fixup is needed: sudo ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
. On Fedora, use sudo ln -s /usr/lib64/libpcre.so /usr/lib64/libpcre.so.3
. Alternatively, consider building from source.
bash <(curl -sL get.comby.dev)
docker pull comby/comby
Running with docker on stdin
:
docker run -a stdin -a stdout -a stderr -i comby/comby '(:[emoji] hi)' 'bye :[emoji]' lisp -stdin <<< '(👋 hi)'
Sometimes, yes. But often, small changes and refactorings are complicated by nested expressions, comments, or strings. Consider the following C-like snippet. Say the challenge is to rewrite the two if
conditions to the value 1
. Can you write a regular expression that matches the contents of the two if condition expressions, and only those two? Feel free to share your pattern with @rvtond on Twitter.
if (fgets(line, 128, file_pointer) == Null) // 1) if (...) returns 0
return 0;
...
if (scanf("%d) %d", &x, &y) == 2) // 2) if (scanf("%d) %d", &x, &y) == 2) returns 0
return 0;
To match these with comby, all you need to write is if (:[condition])
, and specify one flag that this language is C-like. The replacement is if (1)
. See the live example.
Install opam. TL;DR do sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
Run this if you don't have OCaml installed (it bootstraps the OCaml compiler):
opam init
opam switch create 4.11.0 4.11.0
Run eval $(opam env)
Install OS dependencies:
Linux: sudo apt-get install autoconf libpcre3-dev pkg-config zlib1g-dev m4 libgmp-dev libev4 libsqlite3-dev
Mac: brew install pkg-config gmp pcre libev
Then install the library dependencies:
git clone https://github.com/comby-tools/comby
cd comby
opam install . --deps-only
make
make test
comby
on your PATH
by runningmake install