https://github.com/mustafadalga/project-file-saver
Project File Saver
https://github.com/mustafadalga/project-file-saver
bash bash-script code-export file-saver folder-scanner project-archiver project-backup project-export
Last synced: about 2 months ago
JSON representation
Project File Saver
- Host: GitHub
- URL: https://github.com/mustafadalga/project-file-saver
- Owner: mustafadalga
- License: gpl-3.0
- Created: 2023-05-12T08:05:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T08:29:07.000Z (about 3 years ago)
- Last Synced: 2026-01-23T14:56:22.592Z (5 months ago)
- Topics: bash, bash-script, code-export, file-saver, folder-scanner, project-archiver, project-backup, project-export
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project File Saver
This script saves the content of all project files to a single output file. It supports specifying output file name, ignoring specific files and folders, and scanning nested directories.
## Table of Contents
- [Features](#features)
- [Usage](#usage)
- [Prerequisites](#prerequisites)
- [Examples](#examples)
- [License](#license)
## Features
1. Save all project files content to an output file.
2. Exclude current bash script file.
3. Get output file name with `--output filename.md` argument.
4. Get ignored files and folders with `--ignore` argument.
5. Script scans all project files, including nested folders and files.
6. If the user does not define the `--output` file name, the default file name is "data.txt".
## Usage
### Prerequisites
To make the `save.sh` script executable on your computer, you need to set the executable permission for the file. You can do this using the `chmod` command. Here's how:
```sh
chmod +x save.sh
```
## Examples
#### Example 1: Save all project files as `data.txt`
This command will run the script without specifying any ignored files or output file name. The script will use the default output file name, `data.txt`.
```sh
test@computer % ./save.sh
```
#### Example 2: Save all project files as `my_data.md`
This command will run the script and specify an output file name, `my_data.md`.
```sh
test@computer % ./save.sh --output my_data.md
```
#### Example 3: Save all files except `__test__` folder and `package-lock.json` as `summarize.md`
This command will run the script, ignoring the `__test__` folder and `package-lock.json` file. The output file will be named `summarize.md`.
```sh
test@computer % ./save.sh --ignore __test__ package-lock.json --output summarize.md
```
#### Example 4: Save all files except specified files and folders as `placeholder_documentation.md`
This command will run the script, ignoring `node_modules`, `package.json`, `webpack.config.js`, `src`, `__tests__`, `package-lock.json`, and `LICENSE`. The output file will be named `placeholder_documentation.md`.
```sh
test@computer % ./save.sh --ignore node_modules package.json webpack.config.js src __tests__ package-lock.json LICENSE --output placeholder_documentation.md
```
## License
[](https://github.com/mustafadalga/project-file-saver/blob/main/LICENSE)