
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
mapContentTool
is a command-line tool for mapping the structure of a directory, selecting files and folders interactively, and exporting the directory structure with selected file contents. The output can be saved as a .txt
(default) or .json
file. Additionally, the tool can be installed as a Python library to provide the map-content
command for direct usage.
.txt
format..json
format with a detailed structure.node_modules
, .git
).map-content
command directly.Install mapContentTool
as a Python package via pip:
pip install map-content-tool
python mapContentTool.py [directory] [options]
Or, after installation, use the standalone command:
map-content [directory] [options]
Option | Description | Default |
---|---|---|
[directory] | Root directory to scan. If not provided, the current directory is used. | Current directory |
-o, --output | Specify the output file. Supports .txt (default) and .json . | output.txt |
-e, --exclude | Space-separated list of directories to exclude from scanning. | node_modules , .git |
Basic Usage:
python mapContentTool.py
output.txt
.Specify an Output File:
python mapContentTool.py -o my_directory.json
my_directory.json
.Exclude Specific Directories:
python mapContentTool.py -e dist build
dist
and build
directories from the scan.Scan a Custom Directory:
python mapContentTool.py /path/to/directory
/path/to/directory
and outputs the structure to output.txt
.map-content
CommandBasic Usage:
map-content
output.txt
.Custom Directory:
map-content /path/to/directory
Exclude Specific Directories:
map-content -e dist build
Output as JSON:
map-content -o output.json
.txt
Format.txt
format retains the JSON-like structure for readability..json
Format{
"name": "root_folder",
"path": "/path/to/root_folder",
"type": "directory",
"items": [
{
"name": "subfolder1",
"path": "/path/to/root_folder/subfolder1",
"type": "directory",
"items": [
{
"name": "file1.txt",
"path": "/path/to/root_folder/subfolder1/file1.txt",
"type": "file",
"contents": "This is the content of file1.txt."
}
]
}
]
}
file_selector.log
.os
json
urwid
logging
sys
argparse
setuptools
pyperclip
.txt
the default output format..json
as an optional output format.map-content
standalone command via setuptools.For feature requests or bug reports, please contact the developer or create an issue in the repository.
FAQs
A tool to map directory contents and save output as TXT or JSON.
We found that map-content-tool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.