Git Product home page Git Product logo

roam-toolkit's Introduction

Roam Toolkit - Roam force multiplier

Browser extension designed to improve your experience of using Roam Research


The development is supported by - a service that allows you to publish your Roam notes as a beautiful static website (digital garden)


WalkThrough

Watch the video

Document in the video

Installation

It's available in their respective extension stores for both Chrome & Firefox

Features

Date Manipulation

You can create dates using natural language:

Replace mode:

You can also increment or decrement dates:

  • While editing a block, press Ctrl-Alt-Up/Down to increment/decrement any date inside. If a block has multiple dates, place your cursor on the date.

Spaced Repetition

Implements SM2 Spaced repetition algorithm (Anki version) as described here: https://docs.ankiweb.net/#/faqs?id=what-spaced-repetition-algorithm-does-anki-use for Roam blocks.
Put a cursor inside the block and pres Ctrl+Shift+ [number between 1 and 4 signifying ease of remembering this card], and the plugin is going to reschedule the Block accordingly (tagging it with the appropriate date, and some metadata tags)

Watch the video for more details: Watch the video for details on how to use it

Live Preview of pages

Vim Style keyboard shortcuts

For more details, see the full video

Spatial Graph Sidebar

You can layout sidebar pages in a mind map (Full Video):

Use the keyboard to navigate. Also save and restore layouts with Ctrl+Shift+s/Ctrl+Shift+o:

Firefox isn't supported yet

Other Features

  1. Block actions: Delete, Duplicate, Copy Block Reference
  2. Task estimates

Contributing

See CONTRIBUTING.md for details on how to start contributing.

Running the development version

  1. Checkout the repository

  2. In terminal or command prompt run the following commands:

    npm install # Install dependencies
    npm run prod # Transpile the code

Load extension into the browser

Chrome

  1. Go to: chrome://extensions
  2. Toggle: "developer mode" on.
  3. Click on: "Load unpacked"
  4. Select the newly created folder "dist" from the project folder.
  5. That's it.

Firefox

  1. Go to: about:debugging
  2. Select: "Enable add-on debugging"
  3. Click on: "Load Temporary Add-on…"
  4. Open the newly created folder "dist" from the project folder, and choose the "manifest.json" file.
  5. That's it.

roam-toolkit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roam-toolkit's Issues

Generalize the `TODO` -> `DONE` pattern

what I mean is that I want to have an ability to press a shortcut and have the block transition between various "service" tags.

The example from the Roam itself is transition none -> todo -> done -> empty

Other potential examples would be toread -> reading -> read for books.

Consider integrating Roam ShowTime functionality

code: https://github.com/tfiers/RoamShowTime

Browser extension to show block creation & edit times on RoamResearch.com.

image

Author (@tfiers) in Slack:

Tomas Fiers  2 hours ago
@Joel Chan, I don't use roam-toolkit myself (hadn't had a need for any of its features yet) -- but I definitely see the value of having one go-to browser extension consolidating all external functionalities, which you can toggle on and off.
@Vladyslav Sitalo, my 'show time' plugin is MIT licensed, i.e. feel free to integrate with attribution.
I'm gonna keep my repo as is, as I like its light-weightness (one self-contained, relatively short javascript file, and no build tools or many dependencies). This I hope makes it easier for people to start hacking on the code for their own needs (edited) ```

Fuzzy date formats which don't work as expected

Fuzzy date is fantastic, but here are some examples which didn't do what I hoped they would. Format of the following is input followed by output.

  • start of next year [[April 7th, 2021]]
  • 2021 ;2021;
  • end of may [[May 1st, 2020]]
  • last may [[May 1st, 2020]]
  • 2 wk ;2 wk;
  • 1 mth ;1 mth;
  • jun 1 - 5 days [[June 1st, 2020]]
  • 1 jun -5 days [[April 12th, 2020]]

Increase / decrease of numbers, dates: ideas and discussion

Changing values +/- 1 with shortcuts.
Inspired by https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value

For dates it might include something more, for example add value after date and press some shortcut to calculate new date
[[January 29th, 2020]]+7d -> [[February 5th, 2020]]
[[January 29th, 2020]]-6d -> [[January 23rd, 2020]]
[[January 29th, 2020]]+3w -> [[February 19th, 2020]]
[[January 29th, 2020]]+4m -> [[May 29th, 2020]]

Or we can create separate feature for calculating dates.

Safari support

I know this is a nontrivial request, as it has a very different extension model, but I would love to see support for Safari. It is so much better on macOS than Chrome.

In support of this, and other potential integrations (e.g., the unofficial iOS app, as userscripts in site-specific browsers or Electron packages, as bookmarklets for use anywhere, etc.), it would be great to see much of this functionality organized into simple library modules, somewhat decoupled from the browser extension infrastructure.

Detailed Changelog on the Releases page

Till now the changes have been easy to follow (via slack/twitter etc.), but going forward I'd like to suggest detailed changelog, so that users can effortlessly get an idea of what's new in every update, which would allow them to quickly include those changes/improvements in their workflow.
Another optional feature, a notification dot/pop-up when a new update is launched detailing the changes as many users might not be daily Github visitors.

Could we add multiple CSS blocks

Would be really useful to have different CSS for different Roams, especially to distinguish your private from your public from any random one.

Consider hotkey libraries other than react-hotkeys

roam-toolkit currently uses https://github.com/greena13/react-hotkeys to listen to keys.

It works well for the most part, but various bugs made vim style bindings harder to implement:

Also, react-hotkeys is no longer actively maintained.

This deliverable here would be evaluating other options, and seeing how much there is to be gained by switching.

Other options:

https://github.com/ccampbell/mousetrap

  • Seems moderately/low activity? Decent number of old open issues

https://github.com/jaywcjlove/hotkeys

  • The API doesn't have key sequences built it
  • I personally find the DX of react-hotkeys a little more convenient.

Help maintain react-hotkeys

Roll our own hotkey library

How to call functions from console?

That would eliminate the need to add temporary shortcuts just to test stuff.

Can't seem to figure this out. Googling this mostly produce results for non-webpack extensions.

This describes sending messages between extension modules, but that sendMessage does nothing in the console, even inside the extension context.

Feature Request: Support for `enter` from within page title

Context

When editing a block, hitting enter (and/or return on a Mac) creates a new block, potentially splitting the current block if there's any text to the right of the cursor. For some reason, Roam doesn't exhibit the same behavior when hitting enter while editing the page title.

Proposal

Listen for enter keypresses and, if the current element is <h1>*, slice any text to the right of the cursor, create a new block at the top of the page, and, if applicable, paste the sliced text into the new block.

Live preview doesn't work for complex pages

If we take a page like [[[[new user]]s do not yet understand the vocabulary and grammar of the app]], then the hover preview works on [[new user]] but not on the overall page.

Live preview does not work for namespaced pages

Live preview, as pushed in the latest update is an incredible update to the roam toolkit, however, at the moment, the feature does not work for namespaced roam pages. i.e. Roam pages created in the format [[Namespace/ page name]] .

The key advantage of creating pages like this is that they export as folders.

(Edited): just dug into this a bit further, Roam allows for showing namespaced pages in 3 different ways, (switch between ways by hitting CTRL +C, CTRL+L).

  1. Full namespaced page expansion [[Namespace/ page name]]
  2. semi truncated page name [[N/ page name]] (rendered in green)
  3. truncated page name [[page name]] (rendered in green)

The live preview works for the first version of the page name, but not for the other two, this is obviously not a huge issue, but worth taking note of.

(see gif below)

roam_preview_4

Integrate Twitter & Hypothes.is extraction into the toolkit

@houshuang extracting roam compatible data from twitter/hypothesis

hopefully this will make it easier for other people to build similar integrations. + eventually when API is there this can ingest things directly to roam
also maybe we can have it authenticate with twitter properly. right now process is scary

@houshuang presumably we can do OAuth, which would greatly simplify credentials UX

I'd be happy with the "copy in roam format" functionality as a starting point (similar to what you have atm).

@dalmo3 https://github.com/dalmo3/hypothesis-to-bullets-chrome-extension

FuzzyDate support repeats & formatted output

  • Repeats - the FuzzyDate workflow currently supports generating the repeated dates, which I find rather useful.

  • Other improvement on that would be adding support for custom formats for expanded date (e.g. embedding it into the query)

Potential expansion syntax:

;fuzzy date:number of repeats:format;

It'd seem to be valuable to support per-configured formats.

Example format - {{query: {and: %d [[TODO]]}}}

Keyboard commands constraints

So the manifest defines some commands such as "default": "MacCtrl+Alt+Up".

The problem arose when I first tried to install the extension. As a Windows user

Failed to load extension

Invalid value for 'commands[1].default': MacCtrl+Alt+Down.

Sure enough, the docs say

  • Please note that on Mac 'Ctrl' is automatically converted to 'Command'. If you want 'Ctrl' instead, please specify 'MacCtrl' under "mac". Specifying 'MacCtrl' under "default" will cause the extension to be uninstallable.

So we need to have

                "default": "Ctrl+Alt+Up",
                "mac": "MacCtrl+Alt+Up"

But that still failed to load due to invalid command. To quote the docs again

Note: All key combinations must include either Ctrl* or Alt. Combinations that involve Ctrl+Alt are not permitted in order to avoid conflicts with the AltGr key

My final workaround was getting rid of the Alt altogether

                "default": "Ctrl+Up",
                "mac": "MacCtrl+Up"

I'm not suggesting those as the final shortcuts, even though the Ctrl+Up/Down behaviour in Roam can be achieved by Ctrl-Space anyway.

Firefox sees no problem with Ctrl+Alt, it's a Chrome thing.

Find all blocks that match provided regex

And show it as block references.

Query example

:q [:find ?content    :where 
[?x :block/string ?content] 
[(re-find #"\d{4}\.\d{1,2}" ?content)] 
]

Potentially also support that for arbitrary datalog

Fold/unfold stuff

I haven't looked in detail at how easy this would be to control, but I would love some better keyboard controls for folding and unfolding. Primarily unfold all (because currently imports are collapsed, which is very annoying), but also collapse all on the whole page. Same at the current block level (maybe collapse all children, expand all children, or collapse/expand current block up to the top level bullet, but not whole page).

Perhaps we can take inspiration from folding in Vim etc.

Feasible? Happy to help test etc.

Feature request: Lazy dates

Inspired by an email tool I used called Sanebox:
1d = in 1 day 2d = in 2 days (nd = in n days). If today is Wednesday, 1d would return Thursday.
1w, 2w, nw = in 1 week etc. If today is Wednesday, 1w would return next Wednesday.
1m, 2m, nm = in 1 month etc. If today is the 1st of the month, 1m would return the first of next month. Needs small additional logic for 30th, 31st, and leap years.
1y, 2y, ny = in 1 year etc. If today is 18 May 2020, 1y would return 18 May 2021. Needs small additional logic for leap years.

Keyboard shortcuts don't work until you remap them while developing

To Reproduce

  1. Start yarn run watch
  2. Introduce a new keyboard shortcut in the code
  3. Use the keyboard shortcut in Roam

Expected: The keyboard shortcut does something

Actual: The keyboard shortcut doesn't do anything

Workaround:

  1. Open up the setting popup, and then focus the newly introduced shortcut
  2. After the green checkmark appears, the keyboard shortcut will start working

SRS: ideas and discussion

What can we do with this feature to make it more configurable?

Bucket names

Should users be able to decide what name they use for their buckets/boxes pages?
[[Bucket 1]] vs #[[Bucket 1]] vs #box1 vs ...

Shortcuts

The idea behind the SRS is that you go forward, but you need to go back too if you couldn't answer. Should it be available by shortcut too? If yes, -1 or reset to first box, or both options? (personally I sometimes change to prev box, sometimes reset to first, depends of how important it is, how I feel about my answer, etc.)
I assume we all agree that shortcuts should be configurable by the user.

Reviews

Should there be some indication (red icon in top right?) that you have things to review? Or leave it for the user to track that via their daily notes?
Some additional layer/modal to review, similar to https://www.remnote.io/queue ?

SRS: Option to not schedule on weekends

I suggest adding an option to the config to not schedule repeats on weekends. I usually don't open Roam on weekends. (This might be too specific, if so I'm happy to just do it in my own fork).

Dynamic templates

15 hours ago
@vladyslav Sitalo and others, we really should get templates added to Roam Toolkit, since people are wasting a lot of time hacking all kinds of things. It shouldn’t be that hard… I guess one thing is just adding the config UI for adding templates and triggers (it could be a single daily template with a hard-coded trigger, but if we’re going to do it, we might as well do it correctly?) 🙂 The second thing is figuring out how to make the template dynamic - mainly with dates (anything else?)… I wonder if just letting people embed things like ;today; ;tomorrow; etc would be enough? This should also let you generate a weekly template with ;monday; ;tuesday; etc. And finally we need to insert it onto the page - I think we already have the ability to insert a bunch of blocks properly, but I would have to look at our code to see the exact procedure…
does this sound about right? Anyone want to share the work?

Vladyslav Sitalo 14 hours ago
I feel like there are a whole bunch of template languages out there, I think we should just integrate with one of them for dynamic templates

Stian Håklev 14 hours ago
Yeah, but we basically need to provide variables, and since we already have a built-in dynamic way of specifying dates (which is the only thing we can imagine people wanting to make dependent) we would want to reuse that I think

Vladyslav Sitalo 3 hours ago
I can envision all kind of substitutions.
name of the current date of the week
random number
polling things from some api
things you need to fill in on executing the template

Vladyslav Sitalo 3 hours ago
etc

Vladyslav Sitalo 2 hours ago
polling things from the Datalog using the js api

Stian Håklev 1 hour ago
Good points, although I think starting with date-related stuff and a random id would be a good beginning. (We could also have “link to a random page” if we can get that from Datalog somehow).

Keyboard shortcut to focus cursor

A keyboard shortcut to focus the cursor - possibly Command+Enter?

How it works currently:

  1. Search for a page using Command+U
  2. Select a page using arrow keys and Enter
  3. You have to use the mouse to click before you can start typing

How I'd like it to work:

  1. Search for a page using Command+U
  2. Select a page using arrow keys and Enter
  3. Begin typing using this keyboard shortcut.

FuzzyDate replace date

It'd be neat if optionally FuzzyDate can replace the date in the block (if it's the only one).

Syntax options

;r fuzzy date;
;* fuzzy date;

Need to harmonize with #29

Feature Request: Support for mobile browsers

Context
Roam is a very powerful online tool. Roam-toolkit makes it far more more powerful with spaced repetition and its other features. It could be an extremely mobile application as browser software is not very demanding on the computer.

Proposal
Port over Roam-toolkit extension to a mobile browser like firefox for android so it can be used with tablets. and other portable devices.

Opening external page in sidebar

This issue made me think that this is something that could possibly be done by this extension... Ideally I would like even the option of running the webpage through a readability filter, like this https://github.com/masukomi/arc90-readability (which would make webpages work much better in narrow formats). Not sure if this is possible with security features though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.