quick note for plugins active_path.py

12 views
Skip to first unread message

HaveF HaveF

unread,
Aug 6, 2023, 5:23:49 AM8/6/23
to leo-editor

Hi, there,

I just wanted to share some difficulties and final solutions I encountered with this plugin, and if someone comes across it later, I hope to search for this result.

This plugin is a very useful plugin that can organize files in the form of Leo outline.

There is not much to say about the overall usage, except for one point, the regular expression, 're'. In the body section of the directory node, we can specify what is in the leo outline and what is not placed inside.

Per Folder file/folder inclusion and exclusion by adding flags to the body of an
active path folder (either ``@`` or ``/*/``), can include multiple ``inc=`` and
``exc=`` flags:

- ``excdirs`` - excludes all directories
- ``excfiles`` - excludes all files
- ``inc=`` - a single item or comma separated list of strings to include in the
  list of files/folders
- ``exc=`` - a single item or comma separated list of strings to exclude in the
  list of files/folders
- ``re`` - search using regular expressions (otherwise a case-sensitive 'in'
  comparison)

I tried several times and read the source code in general and finally got an idea of how 're' is used... It is a switch configuration item. Like:

exc=hello.csv

It is used to exclude 'hello.csv', if use re, it just means that the content after exc/inc will be parsed with regular expressions...

re
exc=hello\.csv
exc=^.*\.json$

Best regards,

HaveF

Reply all
Reply to author
Forward
0 new messages