Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs [Golang] [Package] #34

Merged
merged 6 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions bannercli/banner.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package bannercli provides functionality to print different styles of banners
// to the terminal. These styles include binary representation and simple
// animation effects to enhance the visual presentation of CLI applications.
// # bannercli/banner.go
// Example usage:
//
// bannercli.PrintTypingBanner("ChatGPT Session Exporter", 100*time.Millisecond)
// # Example Usage
//
// Copyright (c) 2023 H0llyW00dzZ
// func main() {
// // ... existing code ...
//
// // Display a binary banner
// banner.PrintTypingBanner("ChatGPT Session Exporter", 100*time.Millisecond)
// // Optionally, display an typing animated banner
// banner.PrintAnimatedBanner("ChatGPT Session Exporter", 3, 200*time.Millisecond)
//
// // ... rest of your main function ...
// }
package bannercli

import (
Expand All @@ -18,8 +27,6 @@ import (
// PrintBinaryBanner prints a binary representation of a banner.
// Each character of the message is converted into its binary form.
// Spaces between words are widened to enhance readability.
//
// Copyright (c) 2023 H0llyW00dzZ
func PrintBinaryBanner(message string) {
banner := strings.ReplaceAll(message, " ", " ")
for _, char := range banner {
Expand All @@ -32,8 +39,6 @@ func PrintBinaryBanner(message string) {
// horizontally across the terminal. The animation repeats the number of times
// specified by the `repeat` parameter with a delay between each frame as
// specified by the `delay` parameter.
//
// Copyright (c) 2023 H0llyW00dzZ
func PrintAnimatedBanner(message string, repeat int, delay time.Duration) {
for r := 0; r < repeat; r++ {
for i := 0; i < len(message); i++ {
Expand All @@ -48,7 +53,7 @@ func PrintAnimatedBanner(message string, repeat int, delay time.Duration) {
//
// Each character appears sequentially with a delay, simulating a typing effect.
//
// Copyright (c) 2023 H0llyW00dzZ
// Note: This simulation typing just like a human would type.
func PrintTypingBanner(message string, delay time.Duration) {
for _, char := range message {
fmt.Printf("%c", char)
Expand Down
2 changes: 2 additions & 0 deletions exporter/session.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package exporter provides tools for extracting and converting chat session data
// from JSON files into various formats, such as CSV and JSON datasets.
//
Expand Down
2 changes: 2 additions & 0 deletions filesystem/file_system.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package filesystem provides an abstraction over the native file system operations.
//
// This allows for easy testing and mocking of file system interactions.
Expand Down
2 changes: 2 additions & 0 deletions filesystem/file_system_mock.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Below, the package filesystem (@file_system_mock.go) furnishes a mock implementation of the FileSystem
// interface intended for testing. It enables the monitoring of file operations and
// the emulation of file system interactions without real disk I/O, showcasing the
Expand Down
2 changes: 2 additions & 0 deletions interactivity/interactivity.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package interactivity provides functions to handle interactive command-line interfaces.
//
// It includes utilities for prompting users for confirmation and reading their input in a context-aware manner, which allows for graceful
Expand Down
2 changes: 2 additions & 0 deletions repairdata/repairdata.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package repairdata provides utilities for transforming JSON data from an old format to a new format.
//
// It specifically ensures that each session's modelConfig contains a 'systemprompt' field.
Expand Down
Loading