diff options
author | Oscar Najera <hi@oscarnajera.com> | 2024-10-23 00:12:35 +0200 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2024-10-23 00:12:35 +0200 |
commit | 27f00e1a25549b2a68ab882f218a97fa5368def3 (patch) | |
tree | a24fc9178890cc5a5b8f376ee9b53f984422984c | |
parent | e75ba059ab8bd87ff95247e4d958277f50fde3cd (diff) | |
download | dotfiles-27f00e1a25549b2a68ab882f218a97fa5368def3.tar.gz dotfiles-27f00e1a25549b2a68ab882f218a97fa5368def3.tar.bz2 dotfiles-27f00e1a25549b2a68ab882f218a97fa5368def3.zip |
grocy mass edit template fill
-rw-r--r-- | elisp/grocy.el | 17 |
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 |