Skip to content

Instantly share code, notes, and snippets.

@andrewmcodes
Created May 5, 2022 17:05
Show Gist options
  • Select an option

  • Save andrewmcodes/6267a3fdf50ac0869f7d52894ac8a7b2 to your computer and use it in GitHub Desktop.

Select an option

Save andrewmcodes/6267a3fdf50ac0869f7d52894ac8a7b2 to your computer and use it in GitHub Desktop.
Add dashboard in Obsidian with App note example

Requires Dataview and MetaEdit

Inbox

const { update } = this.app.plugins.plugins["metaedit"].api;
const { createButton } = app.plugins.plugins["buttons"];

dv.table(
  [
    "Image",
    "Note",
    "Link",
    "",
  ],
  dv
    .pages('"lib/apps"')
    .where((p) => p.status == "inbox")
    .map((p) => [
      "![image|64](" + p.image_url + ")",
      p.file.link,
      "**[" + "πŸ”— " + "App Store" + "](" + p.app_store_url + ")**",
      createButton({
        app,
        el: this.container,
        args: { name: "Move to Using" },
        clickOverride: {
          click: update,
          params: ["status", "using", p.file.path],
        },
      }),
    ])
);

Using

const { update } = this.app.plugins.plugins["metaedit"].api;
const { createButton } = app.plugins.plugins["buttons"];

dv.table(
  [
    "Image",
    "Note",
    "Link",
    "",
  ],
  dv
    .pages('"lib/apps"')
    .where((p) => p.status == "using")
    .map((p) => [
      "![image|64](" + p.image_url + ")",
      p.file.link,
      "**[" + "πŸ”— " + "App Store" + "](" + p.app_store_url + ")**",
      createButton({
        app,
        el: this.container,
        args: { name: "Archive" },
        clickOverride: {
          click: update,
          params: ["status", "archive", p.file.path],
        },
      }),
    ])
);

Archive

const { update } = this.app.plugins.plugins["metaedit"].api;
const { createButton } = app.plugins.plugins["buttons"];

dv.table(
  [
    "Image",
    "Note",
    "Link",
    "",
  ],
  dv
    .pages('"lib/apps"')
    .where((p) => p.status == "archive")
    .map((p) => [
      "![image|64](" + p.image_url + ")",
      p.file.link,
      "**[" + "πŸ”— " + "App Store" + "](" + p.app_store_url + ")**",
      createButton({
        app,
        el: this.container,
        args: { name: "Move to Using" },
        clickOverride: {
          click: update,
          params: ["status", "using", p.file.path],
        },
      }),
    ])
);
publish false
status using
name Obsidian - Connected Notes by Dynalist Inc. (https://apps.apple.com/us/app/obsidian-connected-notes/id1557175442?uo=4)
universal true
price Free
apple_store_id 1557175442
apple_store_url 1557175442
image_url https://is2-ssl.mzstatic.com/image/thumb/Purple116/v4/82/b1/7b/82b17b0c-caaa-6b6e-0017-22eb8c6b3206/source/512x512bb.png

Obsidian|256x256

[!METADATA]+ Type:: [[App]] Category:: [[Productivity]] Authors:: [[Dynalist Inc.]] Source:: [[App Store]] Links:: App Store, Apple Media Description:: Obsidian is a powerful knowledge base that works on top of a local folder of plain text Markdown files.

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment