Create your own plugin


  1. Fork this repository
  2. Create a folder to plugins/community in your fork. Use dashes to seperate words when naming this folder.
  3. In the folder you created, add a file index.ts
  4. Create a function within index.ts to that takes in the RequestReceiving requestsNOTE: The way Fleeting Notes sends requests is subject to change. This document will be updated accordingly. The Request object is an object from the Deno fetch library. When a slash command is called from a note, the note and some metadata will be sent to your function. In order to access this data, you'll need to convert the body into a JSON object. See how to do so below: var json = await request.json(); var metadata = json['metadata']; var note = json['note']; as a parameter and returns a ResponseSending responsesNOTE: The way Fleeting Notes handles responses is subject to change. This document will be updated accordingly. The Response object is an object from the Deno fetch library. If status code is 200: * AND response contains a note object, then the current note is updated to match the note object. var exampleNote = { "note": { "title": "new title", "content": "new content", "source": "new source", } } return new Response(JSON.stringify(exampleNote)); * AND response does not contain a no. For example:
export default (request: Request) : Response => {
  var exampleNote = {
    "note": {
      "title": "new title"
      "content": "new content",
      "source": "new source",
    }
  }
  return new Response(JSON.stringify(exampleNote));
}
  1. Test your plugin locallyTest your plugin locally1. Install deno 1. Within the folder you created for your plugin, create a file called webserver.ts and add the following lines to it. import { serve } from "https://deno.land/[email protected]/http/server.ts"; import myPlugin from "./index.ts" serve(myPlugin); 2. Now run the deno command to start the webserver deno run --allow-all webserver.ts 3. Once the webserver is up and running go to http://localhost:8000 to call the function you created in index.ts 3. Here is an example curl request to get to ensure it works as expected
  2. Create a pull request from your fork to the main repostory

See plugins/community/example for an up-to-date example.


Backlinks

Start HereIf you'd like to checkout how you can contribute to Fleeting Notes, how you can create your own plugin. Or you can look at the documentation on how to get started with contributing to the Fleeting Notes app and tackle an issue. Here is a list of guides that will be helpful to get started with contributing to the Fleeting Notes app. The fastest way to get started is to run the web build locally. Below is how you can do so. Run Fleeting Notes Locally on the web 1. Install flutter 1. Clone the Start HereWelcome to the official documentation for Fleeting Notes! Whether you're a beginner or a seasoned note-taker, this guide aims to help you understand how to effectively use Fleeting Notes to capture, organize, and manage your thoughts. Getting Started If you're new to Fleeting Notes, you've come to the right place! Get started by exploring the following essential topics: 1. Download and Setup Fleeting Notes: Your first step in joining the Fleeting Notes community. This section will guide you tStart hereWelcome to the Fleeting Notes Plugins Hub! Unlock the full potential of Fleeting Notes by integrating various plugins into your workflow. Whether you're looking for community-contributed enhancements or official add-ons, this is the place to find all the information you need. Official Plugins List Here's a quick rundown of the official plugins and what they offer: ChatGPT Plugin**: Utilize ChatGPT to converse with your notes and also adjust pre-defined prompts via metadata. Summarize SourceTest your plugin locally1. Install deno 1. Within the folder you created for your plugin, create a file called webserver.ts and add the following lines to it. import { serve } from "https://deno.land/[email protected]/http/server.ts"; import myPlugin from "./index.ts" serve(myPlugin); 2. Now run the deno command to start the webserver deno run --allow-all webserver.ts 3. Once the webserver is up and running go to http://localhost:8000 to call the function you created in index.ts 3. Here is an example curl request to get