mirror of
https://github.com/marvinscham/marvinscham.git
synced 2025-12-06 18:20:46 +01:00
Formatting touchups
This commit is contained in:
24
README.md
24
README.md
@@ -61,13 +61,31 @@ Located in Baden-Württemberg, Germany <img height="16px" src="https://marvinsch
|
|||||||
|
|
||||||
## 📊 30-day breakdown
|
## 📊 30-day breakdown
|
||||||
|
|
||||||
|
```
|
||||||
|
wiha-tool 17:48 ██████████████████---------------------- 45%
|
||||||
|
masterychart 11:56 ████████████---------------------------- 30%
|
||||||
|
marvinscham 5:36 █████----------------------------------- 14%
|
||||||
|
disenchanter 2:05 ██-------------------------------------- 5%
|
||||||
|
bibtex-oss 1:05 █--------------------------------------- 2%
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
JavaScript 8:47 █████████------------------------------- 22%
|
||||||
|
Python 7:54 ████████-------------------------------- 20%
|
||||||
|
PHP 5:44 █████----------------------------------- 14%
|
||||||
|
YAML 4:00 ████------------------------------------ 10%
|
||||||
|
HTML 3:53 ███------------------------------------- 9%
|
||||||
|
```
|
||||||
|
|
||||||
## 📓 Latest blog posts
|
## 📓 Latest blog posts
|
||||||
|
|
||||||
|
|
||||||
|
- [ Splitting MIDI Controller Input](https://blog.marvinscham.de/splitting-midi/)
|
||||||
|
|
||||||
|
- [ (DE) DKIM mit Strato SMTP und Cloudflare DNS](https://blog.marvinscham.de/dkim-strato-cloudflare/)
|
||||||
|
|
||||||
|
- [ About Mastery Chart](https://blog.marvinscham.de/about-mastery-chart/)
|
||||||
|
|
||||||
|
|
||||||
## 🦉 Duolingo progress
|
## 🦉 Duolingo progress
|
||||||
|
|
||||||
@@ -85,4 +103,4 @@ Located in Baden-Württemberg, Germany <img height="16px" src="https://marvinsch
|
|||||||
|
|
||||||
------------
|
------------
|
||||||
|
|
||||||
<p align="center">Last update: Friday, 3 May 07:04 CEST</p>
|
<p align="center">Last update: Friday, 3 May 07:28 CEST</p>
|
||||||
@@ -13,9 +13,9 @@ import requests
|
|||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
# Constants for the progress bar
|
# Constants for the progress bar
|
||||||
MAX_BAR_LENGTH = 30
|
MAX_BAR_LENGTH = 40
|
||||||
BAR_CHAR = '█'
|
BAR_CHAR = '█'
|
||||||
EMPTY_BAR_CHAR = '░'
|
EMPTY_BAR_CHAR = '-'
|
||||||
|
|
||||||
|
|
||||||
def hex_to_rgb(hex_color):
|
def hex_to_rgb(hex_color):
|
||||||
@@ -40,6 +40,22 @@ def calc_darkness_bias(obj, threshold):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def seconds_to_string(seconds):
|
||||||
|
days = seconds // 86400
|
||||||
|
remaining_seconds = seconds % 86400
|
||||||
|
hours = remaining_seconds // 3600
|
||||||
|
remaining_minutes = (remaining_seconds % 3600) // 60
|
||||||
|
|
||||||
|
time_string = ""
|
||||||
|
if days > 0:
|
||||||
|
time_string += f"{days}:{hours:02}"
|
||||||
|
else:
|
||||||
|
time_string += f"{hours}"
|
||||||
|
time_string += f":{remaining_minutes:02}"
|
||||||
|
|
||||||
|
return time_string
|
||||||
|
|
||||||
|
|
||||||
resource_dir = os.path.join(os.path.dirname(
|
resource_dir = os.path.join(os.path.dirname(
|
||||||
os.path.abspath(__file__)), "resources")
|
os.path.abspath(__file__)), "resources")
|
||||||
env = Environment(loader=FileSystemLoader(resource_dir))
|
env = Environment(loader=FileSystemLoader(resource_dir))
|
||||||
@@ -94,8 +110,8 @@ try:
|
|||||||
max_lang_len = max(len(entry["key"]) for entry in lang_list)
|
max_lang_len = max(len(entry["key"]) for entry in lang_list)
|
||||||
max_key_len = max(max_name_len, max_lang_len)
|
max_key_len = max(max_name_len, max_lang_len)
|
||||||
|
|
||||||
max_proj_time_len = max(len(str(datetime.timedelta(seconds=entry["total"]))) for entry in project_list)
|
max_proj_time_len = max(len(seconds_to_string(entry["total"])) for entry in project_list)
|
||||||
max_lang_time_len = max(len(str(datetime.timedelta(seconds=entry["total"]))) for entry in lang_list)
|
max_lang_time_len = max(len(seconds_to_string(entry["total"])) for entry in lang_list)
|
||||||
max_total_len = max(max_proj_time_len, max_lang_time_len)
|
max_total_len = max(max_proj_time_len, max_lang_time_len)
|
||||||
|
|
||||||
waka_projects += "```\n"
|
waka_projects += "```\n"
|
||||||
@@ -105,9 +121,9 @@ try:
|
|||||||
percentage_str = str(int((project["total"] / total_duration * 100))) + "%"
|
percentage_str = str(int((project["total"] / total_duration * 100))) + "%"
|
||||||
|
|
||||||
waka_projects += f"{project['key']:<{max_key_len}} "
|
waka_projects += f"{project['key']:<{max_key_len}} "
|
||||||
waka_projects += f"{str(datetime.timedelta(seconds=project["total"])):>{max_total_len}} "
|
waka_projects += f"{seconds_to_string(project["total"]):>{max_total_len}} "
|
||||||
waka_projects += f"{progress_bar} "
|
waka_projects += f"{progress_bar} "
|
||||||
waka_projects += f"{percentage_str:>4}\n"
|
waka_projects += f"{percentage_str:>3}\n"
|
||||||
waka_projects += "```"
|
waka_projects += "```"
|
||||||
|
|
||||||
waka_langs += "```\n"
|
waka_langs += "```\n"
|
||||||
@@ -117,9 +133,9 @@ try:
|
|||||||
percentage_str = str(int((lang["total"] / total_duration * 100))) + "%"
|
percentage_str = str(int((lang["total"] / total_duration * 100))) + "%"
|
||||||
|
|
||||||
waka_langs += f"{lang['key']:<{max_key_len}} "
|
waka_langs += f"{lang['key']:<{max_key_len}} "
|
||||||
waka_langs += f"{str(datetime.timedelta(seconds=lang["total"])):>{max_total_len}} "
|
waka_langs += f"{seconds_to_string(lang["total"]):>{max_total_len}} "
|
||||||
waka_langs += f"{progress_bar} "
|
waka_langs += f"{progress_bar} "
|
||||||
waka_langs += f"{percentage_str:>4}\n"
|
waka_langs += f"{percentage_str:>3}\n"
|
||||||
waka_langs += "```"
|
waka_langs += "```"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
waka_projects = ""
|
waka_projects = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user