|
| 1 | + |
| 2 | + |
| 3 | +<h1 align='center'>Text File Manager</h1> |
| 4 | +<p align='center'>Read and write text files.</p> |
| 5 | +<p align="center"> |
| 6 | + <a href="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/windows.yml"><img src="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/windows.yml/badge.svg" alt=""></a> |
| 7 | + <a href="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/macos.yml"><img src="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/macos.yml/badge.svg" alt=""></a> |
| 8 | + <a href="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/ubuntu.yml"><img src="https://github.com/wniemiec-io-java/text-file-manager/actions/workflows/ubuntu.yml/badge.svg" alt=""></a> |
| 9 | + <a href="https://codecov.io/gh/wniemiec-io-java/text-file-manager"><img src="https://codecov.io/gh/wniemiec-io-java/text-file-manager/branch/master/graph/badge.svg?token=R2SFS4SP86" alt="Coverage status"></a> |
| 10 | + <a href="http://java.oracle.com"><img src="https://img.shields.io/badge/java-11+-D0008F.svg" alt="Java compatibility"></a> |
| 11 | + <a href="https://mvnrepository.com/artifact/io.github.wniemiec-io-java/text-file-manager"><img src="https://img.shields.io/maven-central/v/io.github.wniemiec-io-java/text-file-manager" alt="Maven Central release"></a> |
| 12 | + <a href="https://github.com/wniemiec-io-java/text-file-manager/blob/master/LICENSE"><img src="https://img.shields.io/github/license/wniemiec-io-java/text-file-manager" alt="License"></a> |
| 13 | +</p> |
| 14 | +<hr /> |
| 15 | + |
| 16 | +## ❇ Introduction |
| 17 | +Text File Manager performs operations with text files simply and easily. |
| 18 | + |
| 19 | +## ❓ How to use |
| 20 | +1. Add one of the options below to the pom.xml file: |
| 21 | + |
| 22 | +#### Using Maven Central (recomended): |
| 23 | +``` |
| 24 | +<dependency> |
| 25 | + <groupId>io.github.wniemiec-io-java</groupId> |
| 26 | + <artifactId>text-file-manager</artifactId> |
| 27 | + <version>LATEST</version> |
| 28 | +</dependency> |
| 29 | +``` |
| 30 | + |
| 31 | +#### Using GitHub Packages: |
| 32 | +``` |
| 33 | +<dependency> |
| 34 | + <groupId>wniemiec.io.java</groupId> |
| 35 | + <artifactId>text-file-manager</artifactId> |
| 36 | + <version>LATEST</version> |
| 37 | +</dependency> |
| 38 | +``` |
| 39 | + |
| 40 | +2. Run |
| 41 | +``` |
| 42 | +$ mvn install |
| 43 | +``` |
| 44 | + |
| 45 | +3. Use it |
| 46 | +``` |
| 47 | +[...] |
| 48 | +
|
| 49 | +import wniemiec.io.java.TextFileManager; |
| 50 | +
|
| 51 | +[...] |
| 52 | +
|
| 53 | +List<String> content = List.of("hello", "world!"); |
| 54 | +Path targetFile = Path.of("example-file.txt"); |
| 55 | +
|
| 56 | +TextFileManager txtFileManager = new TextFileManager(targetFile, StandardCharsets.ISO_8859_1); |
| 57 | +txtFileManager.writeLines(content); |
| 58 | +
|
| 59 | +System.out.println( txtFileManager.readLines() ); |
| 60 | +
|
| 61 | +[...] |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | +## 📖 Documentation |
| 66 | +| Property |Parameter type|Return type|Description|Default parameter value| |
| 67 | +|----------------|-------------------------------|-----|------------------------|--------| |
| 68 | +|readLines |`void`|`List<String>`|Gets all lines from a file and puts them in a list| - | |
| 69 | +|writeLines |`lines: List<String>`|`void`|Writes all items in a string list to a file| - | |
| 70 | + |
| 71 | +## 🚩 Changelog |
| 72 | +Details about each version are documented in the [releases section](https://github.com/williamniemiec/wniemiec-io-java/text-file-manager/releases). |
| 73 | + |
| 74 | +## 🤝 Contribute! |
| 75 | +See the documentation on how you can contribute to the project [here](https://github.com/wniemiec-io-java/text-file-manager/blob/master/CONTRIBUTING.md). |
| 76 | + |
| 77 | +## 📁 Files |
| 78 | + |
| 79 | +### / |
| 80 | +| Name |Type|Description| |
| 81 | +|----------------|-------------------------------|-----------------------------| |
| 82 | +|dist |`Directory`|Released versions| |
| 83 | +|docs |`Directory`|Documentation files| |
| 84 | +|src |`Directory`| Source files| |
0 commit comments