notion-augment
v1.0.0
Published
Augment your [Notion](https://notion.so) databases on command, à la [Man-Computer Symbiosis](https://en.wikipedia.org/wiki/Man-Computer_Symbiosis).
Downloads
5
Readme
notion-augment
Augment your Notion databases on command, à la Man-Computer Symbiosis.
usage
const augment = require("notion-augment");
require("dotenv").config();
function concatenateTitle(arr) {
return arr.map((i) => i.text.content).join("");
}
augment(
{
token: process.env.NOTION_TOKEN,
database: process.env.NOTION_DATABASE_ID,
sorts: [],
},
(row) => {
const seed = concatenateTitle(row.properties.Seed.title);
const url = `https://hashpng.jordanscales.com/circles/685/360/${seed}.png`;
// https://developers.notion.com/reference/patch-page
return {
Art: {
files: [
{
type: "external",
name: `${seed}.png`,
external: { url },
},
],
},
};
}
);