Skip to main content

A utility for recursively listing and saving the content of source code files

Project description

Files Lister

Files Lister is a Python utility designed to recursively list and save the content of source code files in a directory structure. It offers flexible options for including or excluding files based on various criteria, making it a handy tool for developers who need to manage and review project files efficiently.

Features

  • Recursively list files within directory structures
  • Option to include or exclude hidden files and directories
  • Filter files by specific extensions (e.g., .txt, .py)
  • Skip specified directories and file patterns
  • Output full or relative file paths
  • Save file contents to an output file

Installation

To install Files Lister, ensure you have Python 3.9 or later and pipx installed. You can install pipx via:

brew install pipx
pipx ensurepath

Then, install Files Lister:

pipx install files-lister

This will make the files-lister command available globally on your system.

Usage

To use Files Lister, execute the following command:

files-lister [OPTIONS]

Options:

-f, --files_and_dirs: File/directory or list of them to process (required)

-i, --include_hidden: Include hidden files and directories

-x, --include_extension: Include only files with specified extensions (e.g., '.txt' '.py')

-d, --skip_dirs: Additional directories to skip

-s, --skip_files: Files or file patterns to skip

-q, --quiet: Do not print output to console

--full_path: Print full path instead of relative path

Example Command:

To list all Python files in the current directory, excluding venv and build directories, and skipping init.py files:

files-lister -f "." -x ".py" -d "venv" "build" -s "__init__.py"

Output

The command generates a file named files_output in the current directory, containing the list of files and their contents.

License

Files Lister is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

files_lister-0.2.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

files_lister-0.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file files_lister-0.2.0.tar.gz.

File metadata

  • Download URL: files_lister-0.2.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for files_lister-0.2.0.tar.gz
Algorithm Hash digest
SHA256 188e4203e20a5483835909461994c037694e8b660292fd29c3f015d986945e47
MD5 e8fac8c08a8cb3006d58685439e8be2e
BLAKE2b-256 a13e1a77e52b6089b6525a12d1404b7991358905059c160a2656e28f2b3f6aca

See more details on using hashes here.

File details

Details for the file files_lister-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: files_lister-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for files_lister-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7355a8f8e62220f5b58c636d2c915fcd9f3c6cc35d79595f13d5bd7c92d911b4
MD5 e127d1bde2894c7422552f3c655c1b3e
BLAKE2b-256 bc258e9029e808c87d0c13933ca5ff9114bc99385e15d4c528eca2616b678505

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page