Add some basic documentation
- ID
93160b6- date
2024-06-18 21:22:39+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
93b5c3f- message
Add some basic documentation- changed files
3 files, 94 additions, 26 deletions
Changed files
CONTRIBUTING.md (0) → CONTRIBUTING.md (355)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..be23ab5
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,11 @@
+# CONTRIBUTING
+
+## Releasing a new version
+
+1. Bump the version number in `Cargo.toml`
+2. Create a new changelog entry for your version in `CHANGELOG.md`
+3. Commit your change
+4. Create a Git tag with your version number
+5. Push your new commit and Git tag to GitHub
+
+GitHub Actions will then build and release a new version of the CLI tool for you.
LICENSE.md (0) → LICENSE.md (1053)
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..b3d4b83
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,19 @@
+Copyright (c) 2024 Alex Chan
+
+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.
README.md (947) → README.md (1225)
diff --git a/README.md b/README.md
index aee1f63..e7655b9 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,64 @@
-________________________________________________________
-Executed in 162.99 millis fish external
- usr time 5.71 millis 0.20 millis 5.51 millis
- sys time 20.72 millis 1.10 millis 19.62 millis
-
-
-________________________________________________________
-Executed in 586.40 millis fish external
- usr time 103.64 millis 16.99 millis 86.65 millis
- sys time 52.21 millis 3.53 millis 48.69 millis
-
-
----
-
-No empty directories found
-
-________________________________________________________
-Executed in 87.29 millis fish external
- usr time 65.14 millis 69.00 micros 65.07 millis
- sys time 17.29 millis 718.00 micros 16.57 millis
-
-
-________________________________________________________
-Executed in 7.67 millis fish external
- usr time 2.29 millis 0.07 millis 2.22 millis
- sys time 3.77 millis 1.23 millis 2.54 millis
\ No newline at end of file
+# emptydir
+
+This tool looks for empty directories and deletes them.
+
+```console
+$ emptydir
+```
+
+More specifically, it deletes directories which are completely empty, or which only contain files/folders which I don't think are worth keeping (e.g. `.DS_Store`).
+
+
+
+
+
+## Installation
+
+You can download compiled binaries from the [GitHub releases](https://github.com/alexwlchan/emptydir/releases).
+
+Alternatively, you can install from source.
+You need Rust installed; I recommend using [Rustup].
+Then clone this repository and compile the code:
+
+```console
+$ git clone "https://github.com/alexwlchan/emptydir.git"
+$ cd emptydir
+$ cargo install --path .
+```
+
+[Rustup]: https://rustup.rs/
+
+
+
+
+
+## Usage
+
+Pass the path of the top-level directory you want to clean as a command-line argument, for example:
+
+```console
+$ emptydir ~/Desktop
+```
+
+It will print the path to every empty directory that it deletes:
+
+```
+$ mkdir -p ~/Desktop/foo/bar/baz
+$ emptydir ~/Desktop/
+/Users/alexwlchan/Desktop/foo/bar/baz
+/Users/alexwlchan/Desktop/foo/bar
+/Users/alexwlchan/Desktop/foo
+3 directories deleted
+```
+
+If you pass no arguments, it will look for empty directories in the current directory:
+
+```console
+$ emptydir
+```
+
+
+
+## License
+
+MIT.