Skip to content

Commit

Permalink
Published readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sexfrance committed Oct 27, 2024
1 parent 239df88 commit b9510c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,37 +130,45 @@ This will display the ASCII art version of "LogMagix" in the center of the termi
Here’s an example showing both logging, loader, and the new `Home` class functionality:

```python
from logmagix import Logger, Loader, Home
from logmagix.logger import Logger, Loader, Home
# from logmagix import Logger, Loader
import time
import uuid

log = Logger(prefix="custom/log/prefix")
start_time = time.time()

# Log messages
log.success("Everything is running smoothly!")
log.warning("Watch out, something might happen!")
log.failure("Critical error occurred!")
log.info("System is working properly")
log.debug(f"The system uuid is {uuid.getnode()}")
log.message("Dad", f"How are you? I'm gonna come soon!", start=start_time, end=time.time())
log.question("How old are you? ")


# Use loader with custom prefix and context manager
with Loader(prefix="custom/loader/prefix", desc="Processing data..."):
time.sleep(5) # Simulate task
time.sleep(2) # Simulate task

# Use loader with custom prefix and start/stop methods
loader = Loader(prefix="custom/loader/prefix", desc="Saving files...", end="Done!", timeout=0.05).start()
time.sleep(5) # Simulate task
loader = Loader(prefix="custom/loader/prefix", desc="Saving files...", end="Done !", timeout=0.05).start()
time.sleep(2) # Simulate task
loader.stop()

# Display Home screen with ASCII art and welcome message

home_screen = Home(
text="LogMagix",
align="center",
adinfo1="discord.cyberious.xyz",
adinfo2="v1.0",
credits="Developed by sexfrance",
clear = False
credits="Developed by sexfrance"
)

home_screen.display()


log.success("Processing completed!")
```

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="logmagix",
version="1.0.6",
version="1.0.7",
packages=find_packages(),
install_requires=["colorama"],
author="Sexfrance",
Expand Down

0 comments on commit b9510c9

Please sign in to comment.