Code Monkey home page Code Monkey logo

folder2txt's Introduction

Folder2Txt

Convert folder file contents to text for use with large language models like ChatGPT, Claude, Gemini, etc.

Quick Documentation

To use Folder2Txt, simply run the following command with two parameters:

node folder2txt.js folder=<folder path> output=<output path>

Example:

node folder2txt.js folder=/c/git/folder2txt/ output=/c/public/output.txt

This will recursively process all files in the specified folder and its subfolders, writing the content to the specified output file.

Full Documentation

Language Selection

By default, Folder2Txt uses English for its output messages. To switch to Spanish, add the lang=es parameter to the command:

node folder2txt.js folder=<folder path> output=<output path> lang=es
node folder2txt.js folder=/c/git/folder2txt/ output=/c/public/out2.txt lang=es

Ignore Configuration

You can specify folders and files to ignore during processing by editing the ignore.json file. Use the ignore.example.json file as a template for adding entries.

Example ignore.json

{
  "folders": ["node_modules", ".git"],
  "files": [".DS_Store"]
}

Usage

  • folder: Path to the folder to be processed.
  • output: Path to the output file where the content will be written.
  • lang: (Optional) Language for output messages (default is English).

Example Execution

English Output

node folder2txt.js folder=/c/git/folder2txt/ output=/c/public/output.txt

Spanish Output

node folder2txt.js folder=/c/git/folder2txt/ output=/c/public/out2.txt lang=es

folder2txt's People

Contributors

katio avatar

Stargazers

leonardo orozco avatar Tom Hensel avatar Ricardo Trejos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.