From d8d16e652489a2becb80025e0eccc2d9d8534fcd Mon Sep 17 00:00:00 2001 From: ge Date: Tue, 27 Dec 2022 20:21:13 +0300 Subject: [PATCH] init --- .gitignore | 1 + Makefile | 12 +++++++++ bookmarks.dist.json | 12 +++++++++ index.html | 64 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 bookmarks.dist.json create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8335ffa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bookmarks.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8566f0d --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +JSON = bookmarks.json + +ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) +$(eval $(ARGS):;@:) + +insert: + cat $(JSON) | jq -r '.links |= . + [{"title": "$(ARGS)", "url": "https://$(ARGS)"}]' | tee $(JSON).new + mv $(JSON).new $(JSON) + +delete: + cat $(JSON) | jq 'del(.links[] | select(.title == "$(ARGS)"))' | tee $(JSON).new + mv $(JSON).new $(JSON) diff --git a/bookmarks.dist.json b/bookmarks.dist.json new file mode 100644 index 0000000..d15b479 --- /dev/null +++ b/bookmarks.dist.json @@ -0,0 +1,12 @@ +{ + "links": [ + { + "title": "git.nxhs.cloud", + "url": "https://git.nxhs.cloud" + }, + { + "title": "nixhacks.net", + "url": "https://nixhacks.net" + } + ] +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..6880239 --- /dev/null +++ b/index.html @@ -0,0 +1,64 @@ + + + + + + + + Homepage + + + +
+
+
+ + +