{"id":16014719,"url":"https://github.com/pmonks/cljig","last_synced_at":"2025-04-05T02:42:58.328Z","repository":{"id":45749497,"uuid":"394785892","full_name":"pmonks/cljig","owner":"pmonks","description":"A little Clojure jig for discovering, evaluating, and prototyping 3rd party Clojure and Java libraries, for eventual use in your own project(s), all from the REPL.","archived":false,"fork":false,"pushed_at":"2024-01-17T19:23:17.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T11:11:19.635Z","etag":null,"topics":["clojure","jig","library-discovery","prototyping","repl"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/pmonks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2021-08-10T21:30:53.000Z","updated_at":"2022-01-09T01:41:35.000Z","dependencies_parsed_at":"2023-01-31T07:15:51.602Z","dependency_job_id":"f93836b1-711a-4afd-8e1d-a8de9d016359","html_url":"https://github.com/pmonks/cljig","commit_stats":{"total_commits":132,"total_committers":1,"mean_commits":132.0,"dds":0.0,"last_synced_commit":"5b51118dea3be47ad86183293226df1c5cf8d4bc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fcljig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fcljig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fcljig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fcljig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmonks","download_url":"https://codeload.github.com/pmonks/cljig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280181,"owners_count":20912965,"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":["clojure","jig","library-discovery","prototyping","repl"],"created_at":"2024-10-08T15:04:53.793Z","updated_at":"2025-04-05T02:42:58.310Z","avatar_url":"https://github.com/pmonks.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/pmonks/cljig/workflows/CI/badge.svg?branch=main)](https://github.com/pmonks/cljig/actions?query=workflow%3ACI+branch%3Amain) [![Dependencies](https://github.com/pmonks/cljig/workflows/dependencies/badge.svg?branch=main)](https://github.com/pmonks/cljig/actions?query=workflow%3Adependencies+branch%3Amain) [![Open Issues](https://img.shields.io/github/issues/pmonks/cljig.svg)](https://github.com/pmonks/cljig/issues) [![License](https://img.shields.io/github/license/pmonks/cljig.svg)](https://github.com/pmonks/cljig/blob/main/COPYING)\n\n# cljig\n\nA little Clojure [jig](https://en.wikipedia.org/wiki/Jig_(tool)) for discovering, evaluating, and prototyping 3rd party\nClojure and Java libraries, for eventual use in your own project(s), all from the REPL.\n\n**Important note: this started out as a little \"weekend experiment\" which quickly ran out of steam. These days you're better off looking at something like [babashka + add-deps](https://book.babashka.org/#babashkadeps) for a more comprehensive and battle-tested equivalent.**\n\n## Trying it Out\nClone the repo, then run:\n\n```shell\n$ clj -i init.clj -r\n```\n\nThis will load some useful namespaces, display some help, the drop you in a REPL, ready to explore.\n\n### Example\n```clojure\nuser=\u003e (web/search-github \"gravity\")\nnil\nuser=\u003e ; Browser opens, showing Clojure repositories on GitHub that match \"gravity\"\nuser=\u003e ; pmonks/gravity catches our eye...\nuser=\u003e (deps/search \"pmonks/gravity\" 10)\n{:deps {clj-commons/multigrep #:mvn{:version \"1.0.128\"}, org.clojars.pmonks/multigrep #:mvn{:version \"0.4.0\"}, com.github.pmonks/multigrep #:mvn{:version \"1.0.135\"}}}\nuser=\u003e ; Looks nice - let's load the library and have a play\nuser=\u003e (def mg-deps (deps/search \"multigrep\"))\n#'user/mg-deps\nuser=\u003e (deps/load-deps mg-deps)\nDownloading: clj-commons/multigrep/0.5.0/multigrep-0.5.0.pom from clojars\nDownloading: clj-commons/multigrep/0.5.0/multigrep-0.5.0.jar from clojars\n#object[clojure.core$future_call$reify__8477 0x4f9871a2 {:status :pending, :val nil}]\nuser=\u003e ; What namespaces does it offer?\nuser=\u003e (deps/nses mg-deps)\n#:clj-commons{multigrep {:mvn/version \"0.5.0\", :deps/manifest :mvn, :parents #{[]}, :paths [\"~/.m2/repository/clj-commons/multigrep/0.5.0/multigrep-0.5.0.jar\"], :nses [multigrep.core]}}\nuser=\u003e ; Lets make that a bit more readable...\nuser=\u003e (for [[k v] (deps/nses mg-deps)] [k (:nses v)])\n([clj-commons/multigrep [multigrep.core]])\nuser=\u003e ; Require the library's core namespace...\nuser=\u003e (require '[multigrep.core :as mg])\nnil\nuser=\u003e ; Pull up the namespace's docstrings\nuser=\u003e (docs/namespace 'multigrep.core)\n-------------------------\nmultigrep.core\nnil\n-------------------------\nmultigrep.core/grep\n([r f])\n  Returns a sequence of maps representing each of the matches of r (one or more regexes) in f (one or more things that can be read by clojure.io/reader).\n\nEach map in the sequence has these keys:\n  {\n    :file         ; the entry in f that matched\n    :line         ; text of the line that matched\n    :line-number  ; line-number of that line (note: 1 based)\n    :regex        ; the entry in r that matched\n    :re-seq       ; the output from re-seq for this line and this regex\n  }\n-------------------------\nmultigrep.core/greplace!\n([r s f] [r s f in-memory-threshold])\n  Applies r (a single regex) to f (one or more things that can be read by clojure.io/reader), substituting s (a string, or a function of one parameter (the match(es) from the regex) returning a string).\n\nReturns a sequence of maps representing each of the substitutions.  Each map in the sequence has these keys:\n  {\n    :file         ; the entry in f that matched\n    :line-number  ; line-number of the line that had one or more substitutions (note: 1 based)\n  }\n\nThe optional fourth parameter specifies at what file size processing should switch from in-memory to on-disk.  It defaults to 1MB.\nnil\nuser=\u003e ; Take the library for a spin...\nuser=\u003e (mg/grep #\"something\" \"/usr/share/dict/words\")\n({:file \"/usr/share/dict/words\", :line \"something\", :line-number 184879, :regex #\"something\", :re-seq (\"something\")} {:file \"/usr/share/dict/words\", :line \"somethingness\", :line-number 184880, :regex #\"something\", :re-seq (\"something\")} {:file \"/usr/share/dict/words\", :line \"undersomething\", :line-number 214685, :regex #\"something\", :re-seq (\"something\")})\nuser=\u003e ^D\n```\n\n## Contributor Information\n\n[GitHub project](https://github.com/pmonks/cljig)\n\n[Bug Tracker](https://github.com/pmonks/cljig/issues)\n\n## License\n\nCopyright © 2021 Peter Monks\n\nThis work is licensed under the [GNU Affero General Public License v3.0 or later](http://www.gnu.org/licenses/agpl-3.0.html).\nIf this is problematic for you or your employer, feel free to reach out.\n\nSPDX-License-Identifier: [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonks%2Fcljig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmonks%2Fcljig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonks%2Fcljig/lists"}