Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514· AnthropicHugging Face LMArena Human Preference 140K

Przekonwertuj kod obsidian dataview na skrypt DataCards. dataview TABLE author as…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-pro’s answer.
  1. User

    Przekonwertuj kod obsidian dataview na skrypt DataCards. dataview TABLE author as Author, ("![|100](" + cover + ")") as Cover, publishdate, category as Genre, file.ctime as Added, rating FROM "300 Bookshelf" WHERE author != null SORT file.ctime DESC LIMIT 10

  2. Claude Assistant

    Oto konwersja kodu Obsidian Dataview na skrypt DataCards:

    // DataCards script for books from "300 Bookshelf"
    dv.table(
        ["Author", "Cover", "Publish Date", "Genre", "Added", "Rating"],
        dv.pages('"300 Bookshelf"')
            .where(p => p.author != null)
            .sort(p => p.file.ctime, 'desc')
            .limit(10)
            .map(p => [
                p.author,
                `![|100](${p.cover})`,
                p.publishdate,
                p.category,
                p.file.ctime,
                p.rating
            ])
    );
    

    Główne różnice w konwersji:

    1. Składnia funkcyjna: DataCards używa metod JavaScript zamiast składni SQL-like
    2. Mapowanie kolumn: Dane są mapowane w tablicy zamiast definiowania aliasów w TABLE
    3. Filtrowanie: WHERE staje się metodą .where() z funkcją lambda
    4. Sortowanie: SORT to metoda .sort() z parametrem kierunku
    5. Limit: .limit() pozostaje podobny
    6. Cover image: Składnia Markdown dla obrazka jest zachowana w stringu

    Skrypt będzie wyświetlał tabelę z 10 najnowszymi książkami z folderu "300 Bookshelf", posortowanymi według daty dodania.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.