From fd807bf1952073aff866bd0961ad6929e07da80d Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 17 Feb 2025 19:57:58 +0600 Subject: add daochai parser --- bin/fetch.fnl | 8 +++++--- bin/serve.fnl | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/fetch.fnl b/bin/fetch.fnl index 3b525d2..b632249 100644 --- a/bin/fetch.fnl +++ b/bin/fetch.fnl @@ -6,9 +6,12 @@ (local array (require :lib.array)) (local cache (require :lib.cache)) +(local {: must} (require :lib.utils)) + (local artoftea (require :parser.artoftea)) (local chaekshop (require :parser.chaekshop)) (local clubcha (require :parser.clubcha)) +(local daochai (require :parser.daochai)) (local gorkovchay (require :parser.gorkovchay)) (local ipuer (require :parser.ipuer)) (local kolokolnikovchai (require :parser.kolokolnikovchai)) @@ -16,7 +19,6 @@ (local ozchai (require :parser.ozchai)) (local suhexuan (require :parser.suhexuan)) (local tea108 (require :parser.tea108)) -(local {: must} (require :lib.utils)) (when _G.unpack (tset table :unpack _G.unpack)) @@ -164,8 +166,8 @@ FROM products;" [])) (must (luna.db.commit tx))) -(each [_ parser (pairs [gorkovchay moychay ozchai suhexuan ipuer artoftea - clubcha chaekshop kolokolnikovchai tea108])] + (each [_ parser (pairs [daochai gorkovchay moychay ozchai suhexuan ipuer + artoftea clubcha chaekshop kolokolnikovchai tea108])] (local products (parser.products)) (when (< 0 (# products)) ;; replace with with-tx diff --git a/bin/serve.fnl b/bin/serve.fnl index c442801..55f1ff0 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -492,7 +492,8 @@ :selected (if (= form.site val) "selected" nil)} (. (require (.. "parser." val)) :title)]) [:ozchai :suhexuan :kolokolnikovchai :tea108 :ipuer :clubcha - :artoftea :chaekshop :moychay :gorkovchay]))]] + :daochai :ozchai :chaekshop :artoftea :moychay + :gorkovchay]))]] [:div {} [:select {:name "sort"} [:option {:value ""} "~ Порядок ~"] -- cgit v1.2.3