diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a673e78 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv/ \ No newline at end of file diff --git a/elisp/test-jx.py b/elisp/test-jx.py new file mode 100755 index 0000000..2e7522e --- /dev/null +++ b/elisp/test-jx.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import json +import sys + +def jx_ask(): + return None + +if __name__ == "__main__": + question1 = { + "command": "prompt", + "type": "string", + "prompt": "Enter your name: ", + } + print(json.dumps(question1)) + answer = input() + print(answer, file=sys.stderr) + + question2 = { + "command": "prompt", + "type": "string", + "prompt": "Please try again: ", + } + print(json.dumps(question2)) + answer = input() + print(answer, file=sys.stderr) + + success = { + "command": "success", + } + print(json.dumps(success)) diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8cce103 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + in + { + devShells = forAllSystems (system: { + default = nixpkgs.legacyPackages.${system}.mkShellNoCC { + packages = with nixpkgs.legacyPackages.${system}; [ + ruff + poetry + python + ]; + }; + }); + }; +}