Creo que hay algo que no estoy viendo aquí:

Tengo un diccionario de "ingredients" cada uno con un número asociado (en este caso negativos). Los transformo en un array y los ordeno por su valor numérico, pero no se me muestran ordenados:

const ingredients_list = Object.entries(ingredients)
.map(([name, value]) => ({name: name, value: value}))

dv.list(ingredients_list
.sort(i => -i.value)
.map(i => `**${i.name}:** ${i.value}`))

"dv.list" es para mostrar la lista en Obsidian (estoy usando DataView). Eso funciona bien, pero la lista que me muestra está desordenada, ya que deberían estar los valores ordenados ascendentemente pero están a su bola. Lo mismo ocurre si uso este bucle para mostrarlos:

for (i of ingredients_list.sort(i => -i.value)) {
dv.paragraph(`**${i.name}:** ${i.value}`)
}

Alguna idea? Seguro que es la tontería más gorda del mundo pero es que realmente no se me ocurre qué puede estar pasando D:

#javascript #Obsidian #DataView

Ahora mismo uso una plantillita para cada uno de los días, algo muy sencillo. En el alt está lo que tiene dentro. Tengo un enlace al cuaderno de bitácora que está vació (solo recibe un montón de enlaces) y tengo una query que monté una vez con #dataview y ya me olvidé.

Suelo poner los objetivos de lo que quiero hacer ese día (lo consiga o no) y las cosas que voy avanzando o notas relevantes que he hecho ese día.

@ecomba @techlifeweb It's funny, a few months ago I came up with the term "Obsidiots" to represent people who over-use the app. I proudly think of myself as one of them - despite not overusing it *yet*. One day I'm sure I will - that day will no doubt be the same day that I sit down and truly force myself into the deep end with #Dataview.
Я очень жду нового функционала #Bases в #Obsidian, но вдруг поняла, что всё равно не смогу использовать их на рабочем компьютере, потому что он застрял на Windows 8 и не сможет обновить Обсидиан до 1.9.
Думаю, не написать ли плагин, который будет брать синтаксис встроенных баз и рендерить их как таблицы #Dataview. Тогда я смогу использовать Bases дома и Dataview на работе, без необходимости создавать отдельные файлы.
@aldi80s A few of my favourite tools in #Obsidian are:
- The Journal plugin for making a new note every day. This can help greatly getting into the flow of entering things.
- Note Refactor plugin: To split out headings to their own notes, or to merge notes together
- #DataView plugin to quickly list notes with certain attributes (e.g. all movies above 90 min length that I watched for more than 50%). Some of this is now covered by the new "bases" feature.
It's funny — at first, the new #Bases in #Obsidian didn't seem all that useful to me, basically just a replacement for #Dataview. But over the past three days, I've been rewriting more and more of my Dataview queries using bases, and I'm really starting to like it.
@thomas_mathoi Gerade noch rechtzeitig! Ich war schon kurz davor, Join Tables mittels einer Sammlung von einzelnen Notes und #DataView zu emulieren 😅

Sometimes, figuring stuff out for myself in #ObsidianMD when using #dataview and #dataviewJS is super rewarding. Other times I just want to bonk my head against the desk repeatedly whilst chanting "I'm a numpty. I'm a numpty. I'm a numpty"

Today the numpty chant was brought on by simply trying tp sort a list of sections (each section heading is the name of one of the NPCs in my #dnd campaign planning vault) into alphabetic order.

Took me way too long to figure out and was litterally fixed by adding one word to my query.

Oh well, at least my NPC overview file is useable now.

I need a drink.