This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from TimNekk/develop
Added output file support
- Loading branch information
Showing
12 changed files
with
110 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div align="center"> | ||
<h1>File Merger</h1> | ||
<p>CLI tool for merging files considering dependencies</p> | ||
<img src="https://cdn0.iconfinder.com/data/icons/file-58/512/merge-file-document-1024.png" height="300" alt="Logo"> | ||
</div> | ||
|
||
|
||
### Restrictions | ||
|
||
In order for this tool to find the dependencies, the files must contain a directive with the following format: | ||
|
||
require ‘relative/path/from/root’ | ||
|
||
In case of a circular dependency, the tool will print an error and exit. | ||
|
||
In case of a missing dependency, the tool will print a warning and continue. | ||
|
||
### Usage | ||
|
||
1. Run the application. | ||
2. Enter the path to the root directory. _(Can be relative or absolute)_ | ||
3. Enter the path to the output file. _(Can be relative or absolute)_ | ||
|
||
### Example | ||
|
||
To test the tool, you can use `example/` folder. It should work without any errors and warnings. | ||
|
||
1. Run the application. | ||
2. Type `example` | ||
3. Press enter. | ||
4. Type `output.txt` | ||
5. Press enter. | ||
|
||
The tool will print a mering order and create a file `output.txt` in the root directory with the merged content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. | ||
Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. | ||
Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. | ||
Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package timnekk.exceptions; | ||
|
||
public class DependenciesGettingException extends Exception { | ||
public DependenciesGettingException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package timnekk.exceptions; | ||
|
||
public class FileWritingException extends Exception { | ||
public FileWritingException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters