From f7b0bb5e6e5b41630451cfac5f573e702c4c1e4e6ffae6fa270e024b5d87d0a9 Mon Sep 17 00:00:00 2001 From: Michael Volz Date: Mon, 27 Jan 2025 17:45:54 +0100 Subject: [PATCH 1/3] elisp: Python script for manual testing of protocol --- elisp/test-jx.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 elisp/test-jx.py 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)) From 41158fbea01ad0d20a0fe395a5145a908aead598b5e81cde416219aca0596a32 Mon Sep 17 00:00:00 2001 From: Michael Volz Date: Mon, 27 Jan 2025 17:46:48 +0100 Subject: [PATCH 2/3] Project: Introduc top level gitignore for .direnv folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore 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 From aea51fccd821b5cf5de8b6961d5053852b0a26a8452bd5ba9904369255847dce Mon Sep 17 00:00:00 2001 From: Michael Volz Date: Mon, 27 Jan 2025 17:47:02 +0100 Subject: [PATCH 3/3] Project: Create flake.nix But it does not work because the git repository uses sha256 hashes which nix does not yet support. --- flake.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 flake.nix 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 + ]; + }; + }); + }; +}