pariyatti / kosa

Digital library service
GNU Affero General Public License v3.0
8 stars 3 forks source link

Ingest TXT: Pali Word #38

Closed deobald closed 3 years ago

deobald commented 3 years ago

;; from pali_word/txt_job.clj — (old notes)

;; 1. lookup word by `:pali-word/pali`
;;    (a) lookup translation for the current language
;;    (b) add translation if (a) fails

;; 2. add word if (1) fails
;;    (a) lookup largest "looped" index
;;    (b) add "largest + 1" as index
;;        ...but if largest = nil, index is 0
;;    (c) download and attach audio

;; 3. daily job creates "published on today" cards at 00:00:00:
;;
;; (def looped-card-count 220)
;; (def days-since-epoch (t/days (t/between (t/epoch) (t/now))))
;; (def days-since-perl (- days-since-epoch 12902))
;; (def todays-word (mod days-since-perl looped-card-count))