Skip to content

Commit

Permalink
[all][script][log] Promote scripting.rs from rust_scratch/tls
Browse files Browse the repository at this point in the history
Create 2 new crates:
- script
- log
  - support UnicodeString for output
  - update all calls to tracing::*() to work seamlessly with CustomEventFormatter
    across the entire r3bl codebase (especially r3bl_tui examples)

Reorganize all the existing crates as well, to ensure that
known duplicated functions are removed.
  • Loading branch information
nazmulidris committed Dec 18, 2024
1 parent 4cc1ab9 commit 9ce1d13
Show file tree
Hide file tree
Showing 59 changed files with 3,057 additions and 362 deletions.
50 changes: 50 additions & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions .idea/r3bl-open-core.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"Blackbox",
"BOOKM",
"boop",
"callsite",
"CBOR",
"chrono",
"cicd",
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
- [v0.0.3 2024-09-12](#v003-2024-09-12)
- [v0.0.2 2024-07-13](#v002-2024-07-13)
- [v0.0.1 2024-07-12](#v001-2024-07-12)
- [r3bl_log](#r3bl_log)
- [v_next_release_log](#v_next_release_r3bl_log)
- [r3bl_script](#r3bl_script)
- [v_next_release_script](#v_next_release_r3bl_script)
- [r3bl_terminal_async](#r3bl_terminal_async)
- [v0.6.0 2024-10-21](#v060-2024-10-21)
- [v0.5.7 2024-09-12](#v057-2024-09-12)
Expand Down Expand Up @@ -778,11 +782,20 @@ Changed:
replace them with doc comments that compile successfully.

- Added:
- `UnicodeString` now implements `std::fmt::Display`, so it is no longer necessary to
use `UnicodeString.string` to get to the underlying string. This is just more
ergonomic. This is added in `convert.rs`. More work needs to be done to introduce
different types for holding "width / height" aka "column / row counts", and "column /
row index". Currently there is a `Size` struct, and `Position` struct, but most of the
APIs don't really use one or another, they just use `ChUnit` directly.
- `lolcat_api` enhancements that now allow for an optional default style to be passed in
to `ColorWheel::lolcat_into_string` and `ColorWheel::colorize_into_string`, that will
be applied to the generated lolcat output.
- `convert_to_ansi_color_styles` module that adds the ability to convert a `TuiStyle`
into a `Vec` of `r3bl_ansi_term::Style`.
- `string_helpers.rs` has new utility functions to check whether a given string contains
any ANSI escape codes `contains_ansi_escape_sequence`. And to remove needless escaped
`\"` characters from a string `remove_escaped_quotes`.
- A new declarative macro `create_global_singleton!` that takes a struct (which must
implement `Default` trait) and allows it to be simply turned into a singleton.
- You can still use the struct directly. Or just use the supplied generated associated
Expand Down Expand Up @@ -986,6 +999,24 @@ links for this release: [crates.io](https://crates.io/crates/r3bl_test_fixtures)
crates in this monorepo to use them. These fixtures are migrated from `r3bl_terminal_async`
crate, where they were gestated, before being graduated for use by the entire monorepo.

## `r3bl_log`

### v_next_release_r3bl_log

This is the first release of this crate. It is a top level crate in the `r3bl-open-core`
that is meant to hold all the logging related functionality for all the other crates in
this monorepo. It uses `tracing` under the covers to provide structured logging. It also
provides a custom formatter that is a `tracing-subscriber` crate plugin.

## `r3bl_script`

### v_next_release_r3bl_script

This is the first release of this crate. It is a top level crate in the `r3bl-open-core`
that is meant to hold all the scripting related functionality for all the other crates in
this monorepo. It provides a way to run scripts in a safe and secure way, that is meant to
be a replacement for writing scripts in `fish` or `bash` or `nushell` syntax.

## `r3bl_terminal_async`

### v0.6.0 (2024-10-21)
Expand Down
Loading

0 comments on commit 9ce1d13

Please sign in to comment.