Skip to content

Commit

Permalink
Add favicon.ico and update project title
Browse files Browse the repository at this point in the history
  • Loading branch information
SilkePilon committed Nov 23, 2023
1 parent 10da8b7 commit 57f3c3b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Binary file added assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion lodestone/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from rich.console import Console
import lodestone
from dotenv import load_dotenv
import requests

@click.command(context_settings={"ignore_unknown_options": True})
@click.option("--console", "-c", default=False, is_flag=True, help="Force the app to use the console")
Expand Down Expand Up @@ -103,8 +104,15 @@ def check_python_command():
with open(".env", "w") as f:
f.write(f"LODESTONE_USERNAME={username}\nLODESTONE_PASSWORD={password}")
print("Login details saved to .env file. You can change these at any time.")

if not os.path.isfile("favicon.ico"):
img_data = requests.get("https://github.com/the-lodestone-project/Lodestone/raw/main/assets/favicon.png").content
with open('favicon.png.jpg', 'wb') as handler:
handler.write(img_data)


try:
lodestone.ui.queue().launch(server_name=f"{host}", server_port=port, show_api=False, auth=(f'{os.environ["LODESTONE_USERNAME"]}', f'{os.environ["LODESTONE_PASSWORD"]}'), share=False, quiet=True)
lodestone.ui.queue().launch(server_name=f"{host}", server_port=port, show_api=False, auth=(f'{os.environ["LODESTONE_USERNAME"]}', f'{os.environ["LODESTONE_PASSWORD"]}'), share=False, quiet=True, favicon_path="favicon.png")
except OSError:
raise OSError(f"Port {port} is already in use!")

Expand Down
2 changes: 1 addition & 1 deletion lodestone/gradios.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def build_schematic(files, x, z):



with gr.Blocks(theme=gr.themes.Soft()) as ui:
with gr.Blocks(theme=gr.themes.Soft(), title="The Lodestone Project") as ui:
with gr.Tab("Bot Settings"):
# gr.Markdown(requests.get('https://raw.githubusercontent.com/the-lodestone-project/Lodestone/main/README.md').text)
# gr.Image("https://github.com/the-lodestone-project/Lodestone/blob/main/assets/logo.png?raw=true", min_width=2000)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lodestone"
version = "0.0.42"
version = "0.0.43"
description = "🤖 Create Minecraft bots with a powerful, stable, and high level Python API."
authors = [
{ name = "Silke Pilon", email = "[email protected]" },
Expand Down

0 comments on commit 57f3c3b

Please sign in to comment.