Git Product home page Git Product logo

autotag's Introduction

Auto Tag Mode

Automatically tag pages that exist in your graph!

When turned on, on block exit

  1. Links any exact match page references (full word, no partial matches)
  2. Aliases any case insensitive matches
  3. Creates links for natural language dates friday => [[July 15th, 2022]] (NOTE: Can be turned off in settings. Use carefully as this will change phrases like "today" and "now" to the daily note for today.)

Alt + i to turn on, or click the eye icon in the topbar.

Exclusions: Create an [[autotag-exclude]] page. Add pages you want to exclude (i.e., not be autotagged), in a comma-spaced list without [[ ]], as the first block on that page.

autotag-demo-video.mp4

Page Synonyms

This extension adds a new option to block context menus that says "Alias Page Synonyms". Right click a block and click on the option to replace all text in the block with a reference to its defined alias. To define aliases, go to the page and add an Aliases attribute. All values should be comma delimited.

For example, to have Tasks and task alias back to Task, create an Aliases attribute on the Task page. The page should have a block that displays Aliases:: Tasks, task.

These aliases could be used in the main autotagging feature mentioned above. To enable, head to your Roam Depot settings and toggle on the setting titled Process Alias.

The extension also works for selecting multiple blocks. When you highlight and right click multiple selected blocks, the "Alias Page Synonyms" will appear and perform the same operation as described above.

By default, the extensions replace synonyms using the [synonym](((page-uid))) format. To use the tags format instead ([synonym]([[Page Title]])), head to your Roam Depot settings and enable the setting titled Alias with Tags.

page-synonyms-720.mp4

Unlink Finder

This feature helps you find page references that haven’t been linked manually as opposed to automatically on each block exit as above. To enable, head to your Roam Depot settings for AutoTag and toggle on the setting titled Unlink Finder.

An X-shaped button will appear in the menu bar when this feature is activated. Clicking that button while on a page will highlight words on your screen matching each of these criteria:

image

You could then right click on a link and choose between a [[Reference Link]] or an [Alias Link]([[Alias Link]]). Here are how the 5 match types work:

  • Exact Match Type - These matches are case-sensitive, are a complete word, and are not already linked in a parent block.
  • Fuzzy Match Type - These matches are case-insensitive, are a complete word, and not already linked in a parent block
  • Partial Match Type - These matches are case-insensitive, only part of a word, and not already linked in a parent block.
  • Redundant Match Type - These matches are case-insensitive, can be any part of a word, and are already linked in the parent block
  • Alias Match Type - If you have any pages with an Aliases:: attribute, those aliases will be shown in Roam blue. These also have a tooltip (as mentioned above) that show the actual page name. Make sure you have CSS suggested so these tooltips work.

Demo

image

autotag's People

Contributors

dvargas92495 avatar panterarocks49 avatar mdroidian avatar

Stargazers

Leechael avatar Seijiro Ozawa  avatar Theresa Thoraldson avatar  avatar Greg avatar Lennart Klein avatar Jonny Dubowsky avatar xiantang avatar Kartik Arora avatar Camilo Luvino avatar Abhay Prasanna avatar

Watchers

 avatar

autotag's Issues

[Bug] Can't Turn off Alias with Tags

Hi,

If I have a page with an alias and Alias with Tags is turned on then when I write alias I get: [alias]([[page]]), which is expected.

However, when Alias with Tags is turned off I get [alias](((5vLdad6b1))), where ((5vLdad6b1)) is a block that doesn't exist.

My expectation (correct me if I am wrong) is that when Alias with Tags is turned off then when I write [[alias]] it should turn into [[page]] once I leave the block.

Thank you.

Feature request

I would like the ability to use natural language processing for dates but I don't want any auto tagging of pages. Thanks

auto tag-exclude doesn't work

I've created that page, added my word in the first block of that page but they are still tagged. Reloaded my graph, updated my graph, I don't know...
Bildschirmfoto 2022-08-13 um 08 20 58

Aliases

In the demo, you are able to define aliases in the [[philosophy]] page.

It looks like this can be done by including an aliases block in the first line of a given page.

I'm unable to get this functionality working. Was this feature removed?

Thanks!

Unlink Finder just straight up doesn't work for me

I have Unlink Finder enabled in my auto tag settings, and turned on and showed above. But it's just straight up not working for aliases or exact matches or anything like that. Any idea why? I included a screenshot below.

As shown below, "Containers" is an alias for the "Container" page and "Pods" for "Pod"
Screenshot 2023-11-14 at 12 36 06 PM

Excluding Namespaces

Hello there!

It would be great if there were a setting that would allow me to remove all namespace data from the tagging calculation.
I use Namespaces for pretty much everything, and at present it seems that autotag just won't find anything as a result.

For example 'Topic/Bioinformatics' won't get found if simply type 'bioinformatics'.
I understand that doing this while accounting for duplicates might be challenging, but it would be useful nonetheless.

Suggestions: Enabled on start & exclude specific pages

Auto-enabled on start
An option to always toggle the plugin automatically on when you "start" your graph (opposite of the current).

Exclude specific pages
An option to define specific pages which I don't want to get detected and tagged as pages.

Keep disabled

I've noticed that the plugin re-enables itself automatically after I've disabled it (probably after restart). Is there a way that this could remain disabled by default?

Thanks for an awesome plugin

Natural Language Dates Re-enabled When I Toggle Auto Tag Mode

I keep Natural Language Dates turned off because it converts simple words like "now" to dates. This is unhelpful for my workflow.

However, whenever I toggle the mode on and off (ie by clicking the eye icon), the extension starts transforming dates again. In the settings, the NL dates are still off, but the transformation happens anyway. I have to toggle them on and back off again to get the behavior I want.

Expected result: The NL dates behavior should remain the same after toggling auto tag mode off and back on again.

Feature request: tag once per page

like Wikipedia does, it would be nice to have a mode where autotag only adds 1 of each tag per page if a page is included multiple times. This would allow for connecting pages easily without cluttering the linked references section.

For example the output of a page containing the following text:
"Submersible is often used to differentiate from other underwater vessels known as submarines, in that submarines are fully self-sufficient craft"

would be:
"Submersible is often used to differentiate from other underwater vessels known as [[submarines]], in that submarines are fully self-sufficient craft"

rather than:
"Submersible is often used to differentiate from other underwater vessels known as [[submarines]], in that [[submarines]] are fully self-sufficient craft"

Feature Request: minimum autotag phrase length

I'd like to be able to set a preference for how many minimum words would result in an autotagged phrase.

My use case is this - I want autotagging on as a rule, but I have a lot of single-word pages in my graph and generally speaking I don't want those autotagged.

A trivial (and not true) example usecase.

I have a page named [[code]] and another one called [[code review]]. Generally speaking I don't want every mention of the word code to be autotagged - my graph would be laughable if every mention of that word was tied back to a page - i use that word in a lot of places that don't make sense to connect. But if i type code review I absolutely want all of those autotagged.

Various Performance Improvements on Unlink Finder

  • Often have to wait 10-20 seconds on pages with a lot of text
  • is it refreshing the search each time the page is edited? With the X activated, the extension seems to considerably slow down the editing of the page
  • fails to make the reference if the string doesn't start or end in a space, even though it is highlighted in green as an exact match. e.g. reality.
  • doesn't always appear on right click of the highlighted term
  • clicking the blue highlight and choosing "Link Using Alias" can the extension apply the alias to the whole string, not just the part containing the reference string. e.g. [emotions]([[emotion]]), not [emotion]([[emotion]])s

This plugin does not support Chinese.

I really like this plug-in, but this plug-in does not support Chinese. I usually use Chinese and English. Can you add support for Chinese? Thank you.

Synonyms triggering Process Alias with matching page portion

Synonyms (aka Aliases) that are the same as a portion of the page name retrigger Process Alias every time a user re-enters the block. Also sometimes multiple times on single instance.

Steps to reproduce on re-entry

Page: Cardizem Cartia Tiazac Diltiazem
Aliases:: Cardizem, Tiazac

  • Type [[Cardizem Cartia Tiazac Diltiazem]] or Tiazac
  • leave block
  • enter block

Steps to reproduce on single instance

Page: Cardizem Cartia Tiazac Diltiazem
Aliases:: Cardizem, Tiazac

  • Type Cardizem
  • leave block

Video

by Erick Aparicio: https://www.loom.com/share/750b395a027143c69b7bde5ff8f012d7

Feature Request: distinguish between ';now;' and ';today;'

As I mentioned elsewhere, the semicolon workaround for NLP dates is very useful and solves a few problems for me - enough so I could reenable the extension, so thanks for that!

Given that, I'd really love for ;now; to return the current date and time and ;today; to parse to just the date, instead of them both parsing to the same value.

Automatically processing Roam JS Page Synonyms does not work

Awesome plugin, thanks a lot! Everything is working great except the Alias Trigger for Page Synonyms. I've manually added the synonyms plugin from the roam js site as it isn't available at the Depot yet and checked that it works with right-click or Alt+A, but it won't be triggered on leaving the block.

Any ideas about what I'm doing wrong or what to check?

Feature Request: Don't Auto-Tag Inside Code Blocks

If I have auto-tag enabled and I try to edit a source code block (both single ` and triple ```), auto-tag attempts to convert the source code and language name into links. I would like to be able to disable this behavior so that no source code is converted into a link.

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.