# Combining contents of multiple files and folders into a single .md file.

User is asking you to combine one or more files and contents of folders into a single `*.md` file.
If the user does not provide the file, you should ask them where they want the data to be written.

User is interested in only the most important files and folders, so you have to make intelligent decisions about which files and folders to include given what the user is giving you. For example, python, typescript, markdown files and so on.

You don't have to read each file. You are free to list trees using bash commands to explore deeper and to find out if there are certain paths you'd like to exclude.

## Title of the `*.md` file:

Briefly write a short title and description of what contents are expected to be in the `*.md` file based on what files and folders the user is asking you to paste there. Do this unless the user asks you to not write anything of your own in there and just paste the contents as is.


## You can run the following terminal command:

```bash
python3 /Users/dimit/git/dim-4/utilities/code_copier/src/code_copier/copier.py --name <path-to-file-or-folder> --exclude <regex-to-exclude> --exclude <more-regex-to-exclude> # and so on
```

If the copier tools is not available, do not continue, tell the user what the issue is and how they want to proceed.

For example, if the folder contains `node_modules`, you will want to exclude all of those.


When you run this command, the contents are being copied into the clipboard only. So next command you need to run is to paste the contents into the `*md` file the user provided.

You should use terminal commands to paste the contents, not handwrite them. The contents should be appended one by one.


## Procedure: 

The procedure looks like this:

- You run the copier command to one target. Then you append what's in the clipboard into the `*md` file the user provided. You do not handwrite that clipboard in the `*md` file, you use terminal commands to paste it in. for macOS it can be `pbpaste > <path-to-file>` to paste. Append is `pbpaste >> <path-to-file>`.
- You repeat the process for each target.
