npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dandori/ui

v0.0.25

Published

This repository is responsible for viewing your tasks which are generated by `@dandori/core` .

Downloads

8

Readme

dandori/ui

This repository is responsible for viewing your tasks which are generated by @dandori/core .

Installation

npm install @dandori/core @dandori/ui
yarn add @dandori/core @dandori/ui
pnpm add @dandori/core @dandori/ui

Usage

import generateDandoriTasks from '@dandori/core';
import { generateDandoriMiroCards } from "@dandori/ui";

const text = `
Today's My Tasks
* Send Email to John
* Send Email to Mary
* Report to Boss after sending emails
`;

const tasks = await generateDandoriTasks(text);
await generateDandoriMiroCards(tasks, {
  boardId: '1234567890',
});

Requirements

  • Please see @dandori/core before using @dandori/ui.
  • @dandori/ui depends on external APIs. You need to set EXTERNALAPP_API_KEY environment variables like MIRO_API_KEY .
  • @dandori/ui supports to load .env file. Please create .env file and set environment variables.

Supported External APIs

API

generateDandoriMiroCards

async function generateDandoriMiroCards(
  tasks: DandoriTask[],
  options?: GenerateDandoriMiroCardsOptions,
): Promise<void> {}

generateDandoriMiroCards creates miro cards from generateDandoriTasks result.

Parameters

tasks

The tasks which are generated by generateDandoriTasks of @dandori/core.

options
interface GenerateDandoriMiroCardsOptions {
  boardId?: string;
  isAppCard?: boolean;
  apiKey?: string;
}
  • boardId

The existing board id of miro.

You can get the board id from the miro url of the board.

For example, if the url is https://miro.com/app/board/1234567890/, the board id is 1234567890.

If not set, the new board is created.

  • isAppCard

default is false

If you set true , the cards are created as App cards.

  • apiKey

The api key of miro. You can also set MIRO_API_KEY environment variable instead of this option.

generateDandoriNotionPages

async function generateDandoriNotionPages(
  tasks: DandoriTask[],
  options?: GenerateDandoriNotionPagesOptions,
): Promise<void> {}

generateDandoriNotionTasks creates notion pages from generateDandoriTasks result.

Parameters

tasks

The tasks which are generated by generateDandoriTasks of @dandori/core.

options
interface GenerateDandoriNotionPagesOptions {
  databaseId: string;
  databasePropertiesMap?: DatabasePropertiesMap;
  apiKey?: string;
}
  • databaseId

The existing database id of notion.

You can get the database id from the notion url of the database.

For example, if the url is https://www.notion.so/myworkspace/1234567890?v=123, the database id is 1234567890.

  • databasePropertiesMap

default is { name: 'title' }

The map which key is defined by dandori and value is your notion database properties.

You can set the key like belows.

const databasePropertiesMap = {
  name: "",
  deadline: "",
  description: "",
  status: "",
  "status.todo": "",
  "status.doing": "",
  "status.done": "",
};
import generateDandoriTasks from '@dandori/core';
import { generateDandoriNotionPages } from "@dandori/ui";

const text = `
Today's My Tasks
* Send Email to John
* Send Email to Mary
* Report to Boss after sending emails
`;

const databasePropertiesMap = {
  status: "Status",
  "status.todo": "ToDo",
  "status.doing": "Doing",
  "status.done": "Done 🙌",
};

const tasks = await generateDandoriTasks(text);
await generateDandoriNotionPages(tasks, {
  databaseId: '1234567890',
  databasePropertiesMap,
});

This is an example. In this case, the output is like belows.

For more details about database properties, please see Notion API.

  • apiKey

The api key of notion. You can also set NOTION_API_KEY environment variable instead of this option.

generateDandoriTrelloCards

async function generateDandoriTrelloCards(
  tasks: DandoriTask[],
  options?: GenerateDandoriTrelloCardsOptions,
): Promise<void> {}

generateDandoriTrelloCards creates trello cards from generateDandoriTasks result.

Parameters

tasks

The tasks which are generated by generateDandoriTasks of @dandori/core.

options
interface GenerateDandoriTrelloCardsOptions {
  boardId: string;
  trelloListPropertiesMap?: TrelloListPropertiesMap;
  apiKey?: string;
  apiToken?: string;
}
  • boardId

The existing board id of trello.

You can get the board id from your trello url.

For example, if the url is https://trello.com/b/ABCDE/boardTitle, the board id is ABCDE.

  • trelloListPropertiesMap

The map which key is defined by dandori and value is your trello list properties.

You can set the key like belows.

const trelloListPropertiesMap = {
  "status.todo": "",
  "status.doing": "",
  "status.done": "",
};
import generateDandoriTasks from '@dandori/core';
import { generateDandoriTrelloCards } from "@dandori/ui";

const text = `
Today's My Tasks
* Send Email to John
* Send Email to Mary
* Report to Boss after sending emails
`;

const trelloListPropertiesMap = {
  "status.todo": "Todo",
  "status.doing": "Doing",
  "status.done": "Done",
};

const tasks = await generateDandoriTasks(text);
await generateDandoriNotionPages(tasks, {
  boardId: 'ABCDE',
  trelloListPropertiesMap,
});

This is an example. In this case, the output is like belows.

For more details about database properties, please see Notion API.

  • apiKey

The api key of trello. You can also set TRELLO_API_KEY environment variable instead of this option.

  • apiToken

The api token of trello which you can get through OAuth. You can also set TRELLO_API_TOKEN environment variable instead of this option.