mirror of
https://github.com/SqrtMinusOne/biome.git
synced 2025-12-10 14:35:13 +03:00
biome-query: add override-column-names
This commit is contained in:
parent
e1ab97b773
commit
fc52a2b7ac
1 changed files with 10 additions and 3 deletions
|
|
@ -73,6 +73,12 @@ The format is: (name latitude longitude)."
|
|||
(number :tag "Longitude")))
|
||||
:group 'biome)
|
||||
|
||||
(defcustom biome-query-override-column-names nil
|
||||
"Override column names for variables."
|
||||
:type '(repeat (cons
|
||||
(string :tag "Variable name")
|
||||
(string :tag "Column name"))))
|
||||
|
||||
(defconst biome-query-groups '("daily" "hourly" "minutely_15" "hourly")
|
||||
"Name of groups.
|
||||
|
||||
|
|
@ -163,7 +169,8 @@ disambiguations of parameters in `biome-api-data'."
|
|||
|
||||
KEY is the api key of the variable. VAR-NAMES is the output of
|
||||
`biome-query--get-var-names-cache'."
|
||||
(gethash key var-names
|
||||
(or (cdr (assoc key biome-query-override-column-names))
|
||||
(gethash key var-names)
|
||||
(capitalize (replace-regexp-in-string
|
||||
(regexp-quote "_") " " key))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue