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.1.2.tar.gz (21.4 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.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: files_lister-0.1.2.tar.gz
  • Upload date:
  • Size: 21.4 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.1.2.tar.gz
Algorithm Hash digest
SHA256 9e16371720b7bb2c7318ffa86aea2e5d9e8958ccf52f33c515d3a276e6f29873
MD5 9a18860b812f6172a6d6346c87e84953
BLAKE2b-256 4453191dd0872f15436e218833bb2e1e6ee9defe14a882c1a695a3e6fc666986

See more details on using hashes here.

File details

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

File metadata

  • Download URL: files_lister-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48a23872333fb568ad76548fa664df16c9e3046ddb0eb4bb84628db11d244bd9
MD5 21df2343f073916a8af599ee3c58b8b5
BLAKE2b-256 c3d0614acea1baf636cb087eae6f64997e291697526fc18fb6d70b39957274f2

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