Skip to content

Commit

Permalink
Add docstrings to pod functions + clean up scripting code.
Browse files Browse the repository at this point in the history
  • Loading branch information
rorokimdim committed May 4, 2023
1 parent df91de2 commit a568da8
Show file tree
Hide file tree
Showing 25 changed files with 506 additions and 552 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ We will need to first enter encryption-key for the source stash-file followed by
`stash` exposes a [bencode](https://en.wikipedia.org/wiki/Bencode) interface using [Babashka Pod Protocol](https://github.com/babashka/pods#the-protocol).

If you are familiar with [clojure](https://clojure.org/) or [babashka](https://github.com/borkdude/babashka),
see [babashka-example](https://github.com/rorokimdim/stash/tree/master/scripting-examples/babashka).
see [clojure-example](https://github.com/rorokimdim/stash/tree/master/scripting-examples/clojure).

Common-lisp folks see [common-lisp-example](https://github.com/rorokimdim/stash/tree/master/scripting-examples/common-lisp).

Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: stash
version: 0.3.2
version: 0.3.3
github: "rorokimdim/stash"
license: BSD3
author: "Amit Shrestha"
Expand Down
19 changes: 0 additions & 19 deletions scripting-examples/babashka/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions scripting-examples/babashka/deps.edn

This file was deleted.

14 changes: 0 additions & 14 deletions scripting-examples/babashka/repl

This file was deleted.

221 changes: 0 additions & 221 deletions scripting-examples/babashka/stash.clj

This file was deleted.

5 changes: 0 additions & 5 deletions scripting-examples/babashka/user.clj

This file was deleted.

File renamed without changes.
20 changes: 20 additions & 0 deletions scripting-examples/clojure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Demo

Assumes stash version 0.3.3 or higher.

Start a repl:

- babashka repl

```bash
./bb-repl
```

- clojure repl

```bash
./clj-repl
```

Use `(edit)` in the repl to open `user.clj` in your editor. When the editor
exits, the edited content will be loaded into the repl.
10 changes: 10 additions & 0 deletions scripting-examples/clojure/bb-repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

CLASSPATH=$(clojure -Spath)

if command -v rlwrap &> /dev/null
then
BABASHKA_PRELOADS='(load-file "stash.clj")' rlwrap -r -q '\"' -b "(){}[],^%#@\";:'" bb --classpath "$CLASSPATH" "$@"
else
BABASHKA_PRELOADS='(load-file "stash.clj")' bb --classpath "$CLASSPATH" "$@"
fi
3 changes: 3 additions & 0 deletions scripting-examples/clojure/clj-repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

clj -M -i stash.clj --repl
3 changes: 3 additions & 0 deletions scripting-examples/clojure/deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{:deps {org.clojars.rorokimdim/pp-grid {:mvn/version "0.1.17"}
babashka/babashka.pods {:mvn/version "0.2.0"}
babashka/fs {:mvn/version "0.3.17"}}}
Loading

0 comments on commit a568da8

Please sign in to comment.