You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# GetClojure
2
2
3
3
Searchable Clojure examples programatically compiled from lots of scraping.
4
-
GetClojure extracts valid s-expressions from various locations, runs them in a
4
+
GetClojure extracts valid s-expressions from a set of logfiles, runs them in a
5
5
sandbox, and captures the value and output of every s-expression. The result is
6
6
then made searchable.
7
7
@@ -16,26 +16,33 @@ Go to [GetClojure](http://getclojure.org) and start searching.
16
16
| getclojure.config | Where any globally-necessary project configuration and functions live |
17
17
| getclojure.elastic | Houses configuration, query, and seeding from files for elasticsearch |
18
18
| getclojure.extract | Contains logic related to parsing clojure IRC logfiles and spitting out files for later consumption |
19
-
| getclojure.format | Logic for formatting s-expressions |
19
+
| getclojure.format | Logic for formatting and syntax highlighting s-expressions |
20
20
| getclojure.routes | Routes for the application |
21
+
| getclojure.seed | Runs the full ETL pipeline from logs to seeding elasticsearch |
21
22
| getclojure.server | The entrypoint for the server |
22
-
| getclojure.sexp | Logic related to running s-expressions: sandboxing via SCI, formatting and printing, and production of files for later consumption|
23
+
| getclojure.sexp | Logic related to running s-expressions: sandboxing via SCI|
23
24
| getclojure.util | Everyone has a junk drawer. This is ours. |
24
25
| getclojure.views.layout | Static HTML generation via Hiccup |
25
26
26
27
## Developers
27
28
28
29
In order to run locally in development mode you'll need to do the following:
29
30
30
-
*`pip install pygments`
31
-
*`docker-compose up -d`
31
+
*`pip install pygments`: There are a variety of options for keeping your python envs separate. virtualenv, pyenv, etc. Use whatever works for you. Note that you'll need python 3.X or later. In addition, a libpython file is required.
32
+
*`docker-compose up -d`: Runs elasticsearch.
32
33
* Download the [logs](https://www.dropbox.com/s/19yy3zn5nh8a1gr/clojure-irc-logs.tar.gz?dl=0) and extract them into the `resources/logs` directory.
33
-
* Capture the working expressions: `lein extract-sexp-input-file`. Grab a cup of coffee. This takes about 10min on my machine.
34
34
* Set the appropriate env vars in your `.envrc`. If you don't use [direnv](https://direnv.net/), you'll need to export `APP_ENV=development` and `INDEX_NAME=getclojure.`
35
-
* Run `lein gen-working-sexps`, `lein gen-formatted-sexps`, and finally `lein seed-elastic`.
35
+
* Run `lein seed-elastic-partial 25` to get the s-expressions found in the first 25 logfiles, or `lein seed-elastic-full` to run the entire pipeline across all local logfiles.
36
36
* Start the server: `lein ring server-headless`
37
37
* Visit [localhost:8080](http://localhost:8080) and search.
38
38
39
+
## Contributions
40
+
41
+
Contributions welcome. This project uses `lein test-refresh` for rerunning
42
+
tests. Run `lein test-refresh :all` to run all tests, including the integration
43
+
tests. If you have questions about contributing, please reach out to me on
44
+
Clojurians Slack (@devn) or Libera IRC (devn).
45
+
39
46
## Thanks
40
47
41
48
* To borkdude for providing so much great open source software to the Clojure community.
0 commit comments