https://github.com/snivilised/agenor
🌀 concurrent directory walker
https://github.com/snivilised/agenor
directory-traversal directory-tree filesystem go golang golib i18n walk
Last synced: about 1 year ago
JSON representation
🌀 concurrent directory walker
- Host: GitHub
- URL: https://github.com/snivilised/agenor
- Owner: snivilised
- License: mit
- Created: 2024-04-29T12:13:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T13:28:38.000Z (over 1 year ago)
- Last Synced: 2025-02-08T03:41:22.710Z (over 1 year ago)
- Topics: directory-traversal, directory-tree, filesystem, go, golang, golib, i18n, walk
- Language: Go
- Homepage:
- Size: 904 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌀 agenor: ___rx observable concurrent directory walker___
[](https://commonflow.org)
[](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
[](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)
[](https://pkg.go.dev/github.com/snivilised/agenor)
[](https://goreportcard.com/report/github.com/snivilised/agenor)
[](https://coveralls.io/github/snivilised/agenor?branch=main&kill_cache=1)
[](https://github.com/snivilised/agenor/actions/workflows/ci-workflow.yml)
[](https://github.com/pre-commit/pre-commit)
[](https://www.conventionalcommits.org/)
## 🔰 Introduction
This project provides a directory walker in the same vein as the ___Walk___ in standard library ___filepath___, but provides many features in addition to the basic facility of simply navigating. These include, but not limited to the following:
- Comprehensive filtering with regex/glob patterns
- Resume, from a previous navigation that was prematurely terminated (typically via a ctrl-c interrupt), or cancellation via a context; this is particularly useful if the client program runs heavy IO bound tasks resulting in relatively long batch runs
- Hibernation, this allows for client defined action to be invoked for eligible file/folders encountered during navigation, when a particular condition occurs; as opposed to invoking the client action for every file/folder from the root onwards. The navigator starts off in a hibernated state, then when the condition occurs, the navigator awakens and begins invoking the client action for eligible nodes.
- Concurrent navigation implemented with a reactive model, using rx observables
- Compatibility with ___os.fs___ file system
- Ability to hook many aspects of the traversal process
## 📚 Usage
## 🎀 Features
- unit testing with [Ginkgo](https://onsi.github.io/ginkgo/)/[Gomega](https://onsi.github.io/gomega/)
- implemented with [🐍 Cobra](https://cobra.dev/) cli framework, assisted by [🐲 Cobrass](https://github.com/snivilised/cobrass)
- i18n with [go-i18n](https://github.com/nicksnyder/go-i18n)
- linting configuration and pre-commit hooks, (see: [linting-golang](https://freshman.tech/linting-golang/)).
- uses [💥 lo](https://github.com/samber/lo)
### 🌐 l10n Translations
This template has been setup to support localisation. The default language is `en-GB` with support for `en-US`. There is a translation file for `en-US` defined as __src/i18n/deploy/astrolib.active.en-US.json__. This is the initial translation for `en-US` that should be deployed with the app.
Make sure that the go-i18n package has been installed so that it can be invoked as cli, see [go-i18n](https://github.com/nicksnyder/go-i18n) for installation instructions.
To maintain localisation of the application, the user must take care to implement all steps to ensure translate-ability of all user facing messages. Whenever there is a need to add/change user facing messages including error messages, to maintain this state, the user must:
- define template struct (__xxxTemplData__) in __src/i18n/messages.go__ and corresponding __Message()__ method. All messages are defined here in the same location, simplifying the message extraction process as all extractable strings occur at the same place. Please see [go-i18n](https://github.com/nicksnyder/go-i18n) for all translation/pluralisation options and other regional sensitive content.
For more detailed workflow instructions relating to i18n, please see [i18n README](./resources/doc/i18n-README.md)
### 📨 Message Bus
- Contains an alternative version of [bus](https://github.com/mustafaturan/bus). The requirement for a bus implementation is based upon the need to create loosely coupled internal code. The original bus was designed with concurrency in mind so it uses locks to achieve thread safety. This aspect is surplus to requirements as all we need it for are synchronous scenarios, so it has been striped out.


