1
0

2 İşlemeler ead4158920 ... 096aefd339

Yazar SHA1 Mesaj Tarih
  Vadik Sirekanyan 096aefd339 Init 6 ay önce
  Vadik Sirekanyan ead4158920 Init 6 ay önce

+ 0 - 1
.gitignore

@@ -1,3 +1,2 @@
 /.gradle
-/.idea
 /build

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Vadik Sirekanyan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+Usage: todo [<options>] [<entry>]...
+
+Options:
+  -d, --delete=<ℕ>  Delete ℕ-th entry
+  -h, --history     Show deleted entries
+  --help            Show this message and exit

+ 2 - 2
src/commonMain/kotlin/org/sirekanyan/todo/files/FileSystem.kt

@@ -15,7 +15,7 @@ private val HomeDirectory: Path =
     }
 
 val TodoFile: Path =
-    Path(HomeDirectory, ".todo")
+    Path(HomeDirectory, "todo.txt")
 
 val HistoryFile: Path =
-    Path(HomeDirectory, ".todo.log")
+    Path(HomeDirectory, ".todo_history")

+ 1 - 0
src/commonMain/kotlin/org/sirekanyan/todo/files/Path.kt

@@ -9,6 +9,7 @@ import kotlinx.io.writeString
 private const val LineSeparator = "\n"
 
 fun Path.readEntries(): List<String> {
+    if (!CurrentFileSystem.exists(this)) return listOf()
     val content = CurrentFileSystem.source(this).buffered().use(Source::readString)
     return content.split(LineSeparator).filter(String::isNotBlank)
 }