aboutsummaryrefslogtreecommitdiffstats
path: root/elisp/grocy.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/grocy.el')
-rw-r--r--elisp/grocy.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/elisp/grocy.el b/elisp/grocy.el
index 2129113..c974cb3 100644
--- a/elisp/grocy.el
+++ b/elisp/grocy.el
@@ -234,5 +234,22 @@ min_stock_amount: 0
default_best_before_days: -1"))
(grocy-buffer-yaml->json (current-buffer)))
+;; To do mass edit of things
+;; (grocy--request
+;; "objects/products"
+;; (lambda (_status)
+;; (goto-char url-http-end-of-headers)
+;; (let ((result (json-parse-buffer)))
+;; (with-current-buffer (get-buffer-create "products")
+;; (erase-buffer)
+;; (emacs-lisp-mode)
+;; (mapc
+;; (lambda (product)
+;; (-let (((&hash "id" "name" "product_group_id") product))
+;; (pp (list :id id :name name :product_group_id product_group_id) (current-buffer))
+;; ))
+;; result)
+;; (display-buffer (current-buffer))))))
+
(provide 'grocy)
;;; grocy.el ends here