From f26c04de5f1ef3b415d0895df479483f45aefe56 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Thu, 30 May 2024 09:13:14 -0700 Subject: [PATCH] Add README.md for omnitrail-go - Overview of the omnitrail-go library, including its purpose and features. - Detailed features of File Plugin, Directory Plugin, and Posix Plugin. - Installation instructions using `go get`. - Usage examples for creating a new trail, adding files and directories, and generating ADG strings. - Testing instructions using `go test`. - Licensing information under the ApacheV2 License. - Contribution guidelines and acknowledgements to contributors and the open-source community. Signed-off-by: Frederick F. Kautz IV --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f0db76..4d6d337 100644 --- a/README.md +++ b/README.md @@ -1 +1,71 @@ -# omnitrail-go \ No newline at end of file +# omnitrail-go + +## Overview + +Omnitrail-go is a Go library designed to manage and track file and directory metadata, including permissions, ownership, and cryptographic hashes. It supports various plugins to handle different types of metadata and hashing algorithms. + +## Features + +- **File Plugin**: Computes SHA1, SHA256, and Gitoid hashes for files. +- **Directory Plugin**: Manages directory structures and computes Gitoid hashes for directories. +- **Posix Plugin**: Tracks POSIX file permissions, ownership, and size. + +## Installation + +To install the library, use the following command: + +```sh +go get github.com/yourusername/omnitrail-go +``` + +## Usage + +### Creating a New Trail + +To create a new trail, use the `NewTrail` function: + +```go +import "github.com/yourusername/omnitrail-go" + +trail := omnitrail.NewTrail() +``` + +### Adding Files and Directories + +To add files and directories to the trail, use the `Add` method: + +```go +err := trail.Add("/path/to/file_or_directory") +if err != nil { + log.Fatalf("Failed to add path: %v", err) +} +``` + +### Generating ADG Strings + +To generate ADG strings, use the `FormatADGString` function: + +```go +adgString := omnitrail.FormatADGString(trail) +fmt.Println(adgString) +``` + +## Testing + +To run the tests, use the following command: + +```sh +go test ./... +``` + +## License + +This project is licensed under the ApacheV2 License. See the [LICENSE](LICENSE) file for details. + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request for any changes. + +## Acknowledgements + +Special thanks to all contributors and the open-source community for their support.