XMind
免费下载

Search for content across multiple mindmaps.

评论

3 条评论

  • Maarten den Heijer

    bust = busy :)

     

    0
    评论操作 固定链接
  • jaeger.anais03

    yes, do a command/control F, click on the setting ( or wheel - sorry, English is not my first language), and pick "current file"

    0
    评论操作 固定链接
  • Diego Losada

    This can be easily done by running a Python script that will search all the files in your current folder and subfolders and return the files containing the sentence and the number of times it was found. You can ask ChatGPT for steps on how to run this file:

    Command: python search.py "Replace with your text"

    File:

    import os
    import codecs
    import io
    import sys

    def search_for_keyword_in_file(file_path, keyword):
        try:
            with io.open(file_path, encoding='utf-8', errors='ignore') as f:
                FileFound = False
                count = 0
                for line in f:
                    if keyword in line:
                        FileFound = True
                        count += line.count(keyword)
            if FileFound:
                print(f'{file_path} {count}')
                           

        except (OSError, UnicodeDecodeError):
            #print(f"Error reading file: {file_path}")
            x=1

    def search_files_for_keyword(root_folder, keyword):
        for root, _, files in os.walk(root_folder):
            for file in files:
                file_path = os.path.join(root, file)
                search_for_keyword_in_file(file_path, keyword)

    if __name__ == '__main__':
        if len(sys.argv) != 2:
            print("Usage: python search.py <keyword>")
            sys.exit(1)

        current_folder = os.getcwd()
        keyword_to_search = sys.argv[1]
        search_files_for_keyword(current_folder, keyword_to_search)
    0
    评论操作 固定链接

请先登录再写评论。

由 Zendesk 提供技术支持