Skip to content

Example scripts generating output for Tana paste

License

Notifications You must be signed in to change notification settings

cheslip/tana-paste-raycast

 
 

Repository files navigation

Tana Paste examples for Raycast

Main repo: tanainc/tana-paste-examples

This repo is intended to show some examples on how to use Tana Paste with Raycast. The examples use Raycast's script commands to execute the scripts.

Raycast Setup

Configure tana-paste-examples directory in Raycast

prefs screenshot

  1. Open Raycast preferences (Cmd-Space followed by Cmd-,)
  2. Open "Script Commands" preferences (Extensions->Scripts->Script Commands)
  3. Click "Add Directories"
  4. Select your tana-paste-examples directory

Add Raycast comments to scripts

Once the directory is added, Raycast will automatically discover any commands containing Raycast-specific comments. These comments act as instructions, which tell Raycast the name of the script, the arguments, icons, etc.

See the scripts in this repo for examples on what the comment header looks like.

For example, see github.mjs

Start using Raycast with Tana Paste scripts

RSS example

NYT example feed: https://rss.nytimes.com/services/xml/rss/nyt/World.xml

Type rss to find the RSS command, and paste in an RSS feed URL: raycast rss

Output: raycast output

Press Cmd-Shift-C to copy to clipboard

Open Tana and paste result!

tana paste result

Example scripts that generate Tana Paste output

Tana Paste is a special text format that is parsed by Tana, and generates rich Tana structures when pasted normally. All text is preceded by %%tana%% to trigger this special functionality. More details about the format in the help center.

https://www.loom.com/share/6fd81ff1ab364acf9f448ffdedfeb57f

All these scripts are provided solely as examples/inspiration. Feel free to modify, or use as templates to explore other sources of data. If you have interesting improvements or new scripts, we welcome pull requests.

You can run these scripts normally to inspect the output, but we recommend piping to pbcopy on Mac or similar tools to put the text directly on the clipboard for use with Tana. These scripts an also be launched automatically by tools like Keyboard Maestro.

Scripts and usage

  • rss.mjs [URL to RSS feed]
    • Fetches top 3 items from an RSS feed
    • Notice that the URL must be to the actual RSS feed, the script does not "discover" the RSS feed URL from the website URL like many feed readers
    • image
  • github.mjs [organization][repo]
    • fetches five pull requests from the given org/repo
    • requires githubToken in config.js
    • many other kinds of data can be fetched with the Github API
    • image
  • twitter.mjs [tweet id]
    • fetches the tweet specified and some related tweets
    • requires Twitter token in config.js
    • image
  • hypothesis.mjs [webpage url]
    • fetches all your annotations/highlights for a given website from Hypothes.is (great "web clipper")
    • requires Hypothes.is token in config.js
    • image
  • retro.mjs
    • generates links to the daily node 7, 30, 90, 180, 360 days ago
    • also an automatic GMail search for emails you've written in the past - easy to remove if you don't want it
    • note that you can currently not click on inline date references in Tana to go to the corresponding date node, but that functionality is planned
    • image
  • zotero-translator-tana.js
    • can be moved to the Zotero/Translations folder, and used to copy bibliography elements out of Zotero into Tana
    • image
  • readwise.mjs [days (x)]
    • fetches highlights taken in the last x days from Readwise
    • image

External Scripts

About

Example scripts generating output for Tana paste

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%