No description
Find a file
2025-04-04 06:20:27 +08:00
.github/workflows chore: fix action 2023-11-16 00:54:43 +08:00
build chore: add action and update Obsidian API 2023-11-15 23:38:03 +08:00
docs docs: Update argument doc 2023-11-15 23:38:44 +08:00
.editorconfig feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
.eslintignore feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
.eslintrc feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
.gitignore chore: add action and update Obsidian API 2023-11-15 23:38:03 +08:00
.npmrc feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
constants.ts feat: support custom eval helper 2023-02-01 23:54:59 +08:00
dataclass.ts feat: support custom eval helper 2023-02-01 23:54:59 +08:00
esbuild.config.mjs feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
LICENSE docs: Add license 2022-11-23 05:30:09 +08:00
main.ts perf: add more log for performance check on regex 2025-04-04 06:15:13 +08:00
manifest.json build: bump version 2025-04-04 06:16:40 +08:00
package.json build: bump version 2025-04-04 06:16:40 +08:00
README.md docs: Update readme example 2025-04-04 06:20:27 +08:00
settings.ts feat: support custom eval helper 2023-02-01 23:54:59 +08:00
styles.css feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
tsconfig.json perf: add more log for performance check on regex 2025-04-04 06:15:13 +08:00
version-bump.mjs feat: Complete first version of aggregator 2022-11-23 04:59:05 +08:00
versions.json build: bump version 2025-04-04 06:16:40 +08:00
yarn.lock chore: add action and update Obsidian API 2023-11-15 23:38:03 +08:00

Obsidian Aggregator

This plugin helps you gather information from files, and make a summary in the file.

Although it is difficult to write the regular expression, once it's done, it will help you a lot.

Preview

A collection of blocks with a tag. Example1

example1-preview

A collection of annotator blocks with tags. Example2

example2-preview

A stat table that is generated from a folder with custom helper supported. Example3

example3-preview

Usage

Create a code block like this, and set the language to the aggregator. Then this plugin will find content based on RegExp and render the result with the template.

scope:
    - Current File
matches:
    - regex: '(?<=^>%%COMMENT%%\n)(?:(?!^>%%TAGS%%).*\n)+(?=^>%%TAGS%%\n>.*#[a-zA-Z0-9\_]+)'
      template: '{{{result.match.[0]}}}'

If you want to sort the results, you can specify the fields and orders like this.

scope:
    - Current File
    - Papers
matches:
    - regex: '^\w[^\#]*\#[a-zA-Z0-9\_]+\s*$'
      template: '{{{result.match.[0]}}}'
    - regex: '(?<=^>%%COMMENT%%\n)(?:(?!^>%%TAGS%%).*\n)+(?=^>%%TAGS%%\n>.*#[a-zA-Z0-9\_]+)'
      template: '{{{result.match.[0]}}}'
order:
    fields: filename, line
    orders: asc, asc

Argument Explain

Check out Arguments.md.

Example Usage

Check out docs for detailed examples.

Settings

Note the default join string is not empty. It's just the text area can not display \n\n.

File Indicator is a Handlebars template. Available data: file: TFile, index: number starts at 1.

See Also

obsidian-link-embed

Thanks