diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 3c4b536..138d616 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.1.46 +version = 0.1.47 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index 2ba2d9b..4ff679e 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: guan -Version: 0.1.46 +Version: 0.1.47 Summary: An open source python package Home-page: https://py.guanjihuan.com Author: guanjihuan diff --git a/PyPI/src/guan/data_processing.py b/PyPI/src/guan/data_processing.py index f2fd742..6c1f25d 100644 --- a/PyPI/src/guan/data_processing.py +++ b/PyPI/src/guan/data_processing.py @@ -646,7 +646,20 @@ def print_array_with_index(array, show_index=1, index_type=0): import guan guan.statistics_of_guan_package() -# 读取文件夹中某个文件类型的所有文本文件 +# 获取目录中的所有文件名 +def get_all_filenames_in_directory(directory='./', file_format=None): + import os + file_list = [] + for root, dirs, files in os.walk(directory): + for i0 in range(len(files)): + if file_format == None: + file_list.append(files[i0]) + else: + if file_format in files[i0]: + file_list.append(files[i0]) + return file_list + +# 读取文件夹中某种文本文件类型的文件路径和内容 def read_text_files_in_directory(directory='./', file_format='.md'): import os file_list = []