disable plugins from context files

This commit is contained in:
randogoth 2023-06-09 01:42:05 +03:00
parent 3a8aaddae1
commit b593c18511
6 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,6 @@
config:
plugins:
- id3
id3:
types:
- .wav

View file

@ -2,4 +2,5 @@
tags:
- frrr
---
+ plugin for xattr
+ plugin for xattr
+ plugin for pdf

View file

@ -5,6 +5,9 @@ NAME = 'frontmatter'
TYPES = ['.md', '.txt', '.markdown', '.rst']
def reader(o):
if 'plugins' in o.config:
if NAME not in o.config['plugins']:
return
file = Path(o.path)
suffixes = TYPES
if NAME in o.config:

View file

@ -9,6 +9,9 @@ TYPES = ['.md', '.txt', '.py']
REGEX = r'\s*([@+]\w+|#\w+(?<!#//))'
def reader(o):
if 'plugins' in o.config:
if NAME not in o.config['plugins']:
return
file = Path(o.path)
suffixes = TYPES
if NAME in o.config:

View file

@ -7,6 +7,9 @@ TYPES = ['.mp3', '.wav', '.flac', '.ogg']
REGEX = r'\s*([@+]\w+|#\w+)'
def reader(o):
if 'plugins' in o.config:
if NAME not in o.config['plugins']:
return
file = Path(o.path)
suffixes = TYPES
if NAME in o.config:

View file

@ -29,6 +29,9 @@ def unzip_file(orig_file, tmp_dir):
return type[0]
def reader(o):
if 'plugins' in o.config:
if NAME not in o.config['plugins']:
return
file = Path(o.path)
suffixes = TYPES
if NAME in o.config: