Regex Quick Actions

by pan4ratte
5
4
3
2
1
Score: 52/100

Description

An Obsidian plugin, that allows you to create and quickly apply regex actions via command palette, context menus and hotkeys. Made for automation purposes.

Reviews

No reviews yet.

Stats

3
stars
1,189
downloads
0
forks
118
days
9
days
9
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
85
commits

Latest Version

9 days ago

Changelog

New features

  • Regex builder in the quick find/replace window. New "Regex", "Match case", "Whole word", "Line start" and "Line end" toggles let you set up the search even without knowing the syntax, and the "+" button by a field inserts ready-made regex pieces. The resulting regex and the number of matches in the note are shown under the fields.
  • Changelog inside the plugin. It can now be opened right in Obsidian with the "View changelog" command, and after an update a notice about the new version appears in the settings.

UI/UX enhancements and bug fixes

  • The general settings of the plugin are now united into one block.
  • Switching between the quick actions and sequences tabs is now animated.
  • The plugin name and description were removed from the top of the settings tab, following Obsidian's guidelines.

README file from

Github

Regex Quick Actions plugin

Features

1. Quick actions in every context

Create regex quick actions and run them from the command palette or with hotkeys. They can be applied to a single note as well as to every note in a chosen folder. Setting a default action is available too.

2. Prepare action sequences

Build chains of quick actions that run one after another. The actions in a sequence can be reordered, and the same action can be run any number of times in a row. Every saved sequence appears in the command palette and in the context menus of notes and folders.

3. Quick find/replace

The "Quick find/replace" command in the palette opens a window for a single, unsaved run of a regex command: type a regex, its flags and a replacement, and apply them to the open note.

You don't need to know regex syntax for this. The toggles under the fields let you search for plain text, match case, find whole words only, or only the start and end of a line. The "+" button by a field inserts ready-made pieces: any letter or digit, a repeat, a group, and in the replacement, the found text. The resulting regex and the number of matches show under the fields before you run it.

4. Actions applied to selected text only

An option in the settings makes actions and sequences apply not only to the whole file, but also to the text currently selected in a note.

5. Backup and restore

Export and import your quick actions and sequences to a file. Export is available on desktop only, because of the platform's limits.

6. Reverting the last executed action

The "Revert last quick action" command in the palette undoes the most recent run as a whole, including runs over several files or over a whole folder.

Installation

Option 1: Obsidian plugin store

  1. In Obsidian settings open the tab "Community plugins" and click "Browse" button.

  2. In the search bar type Regex Quick Actions, click on the result, then "Install" and "Enable" buttons.

Alternatively, you can install the plugin by following the link to the community website: https://community.obsidian.md/plugins/regex-quick-actions

Option 2: BRAT plugin

If you want to test beta-versions of the plugin or use previous versions, you can do that with BRAT plugin:

  1. Install BRAT plugin from the official Obsidian plugin store.

  2. In the BRAT settings, find the “Beta plugin list” section and click on the “Add beta plugin” button.

  3. In the window that appears, paste the link to the Regex Quick Actions plugin repository: https://github.com/pan4ratte/obsidian-regex-quick-actions

  4. Under “Select a version” choose the desired version and click the “Add plugin” button. The plugin will be automatically installed and will be ready to use.

About the Author

My name is Mark Ingrem and I am a Religious Studies scholar. Apart from my main area of study (Protestant Political Theology in Russia), I teach a university course called "Information Technologies in Scientific Research", which is based on my own unique program. This plugin helps me in my research and I use it in my teaching, along with the other plugins I develop, which you can find on my GitHub profile.

Hello to every student who came across this page!

Credits

Regex Quick Actions is a continuation of the idea of Regex Pipeline plugin. While the base of the code was borrowed from it, now every line is original. Still, cheers to the authors for the inspiration and for making a quick start of this project possible.