diff --git a/data/tools.json b/data/tools.json
index c4bf01b..903ebeb 100644
--- a/data/tools.json
+++ b/data/tools.json
@@ -1,41 +1,41 @@
[
- "HTML5",
- "CSS3",
- "JavaScript",
- "PHP",
- "Java",
- "C",
- "Python",
- "GNU Bash",
+ "Android",
+ "Android Studio",
+ "Angular",
"Bootstrap",
"Bulma",
- "Symfony",
- "Angular",
- "Figma",
- "Git",
- "MariaDB",
- "MySQL",
- "PostgreSQL",
- "SQLite",
- "Android",
- "Linux",
- "Windows",
- "Insomnia",
- "JetBrains",
- "Visual Studio Code",
- "FileZilla",
+ "C",
+ "CSS3",
"Composer",
"DataGrip",
- "IntelliJIdea",
- "PyCharm",
- "Json",
- "diagrams.net",
- "Android Studio",
+ "Figma",
+ "FileZilla",
+ "GNU Bash",
+ "Git",
"GitHub",
"GitLab",
+ "HTML5",
"Handlebars.js",
- "Pug",
+ "Insomnia",
+ "IntelliJIdea",
+ "Java",
+ "JavaScript",
+ "JetBrains",
"Jinja",
+ "Json",
+ "Linux",
+ "MariaDB",
"Markdown",
- "PhpStorm"
-]
+ "MySQL",
+ "PHP",
+ "PhpStorm",
+ "PostgreSQL",
+ "Pug",
+ "PyCharm",
+ "Python",
+ "SQLite",
+ "Symfony",
+ "Visual Studio Code",
+ "Windows",
+ "diagrams.net"
+]
\ No newline at end of file
diff --git a/main.py b/main.py
index eca5993..dbb3d8d 100644
--- a/main.py
+++ b/main.py
@@ -1,10 +1,10 @@
# coding: utf-8
__author__ = "LucasVbr"
-__version__ = "3.0.0"
+__version__ = "3.0.3"
from Utils import *
-from src.FileUtils import getJsonData
+from src.FileUtils import getJsonData, setJsonData
from datetime import datetime
import pytz
@@ -14,8 +14,12 @@ if __name__ == "__main__":
configData = getJsonData(CONFIG_FILE)
data = getDataSubfiles(configData.get("data_files"))
+
+ toolList = data.get("tools")
+ toolList = list(dict.fromkeys(toolList)) # Remove duplicates
+
data["info"] = configData.get("info")
- data["tools"] = convertToolBadges(data.get("tools"))
+ data["tools"] = convertToolBadges(toolList)
data["weather"] = getWeather(data.get("info").get('city'))
data['today'] = datetime \
.today() \
@@ -27,3 +31,7 @@ if __name__ == "__main__":
configData.get("output_file"),
data
)
+
+ # Rewrite Tools (in order)
+ toolList.sort()
+ setJsonData("data/tools.json", toolList)
diff --git a/src/Badge.py b/src/Badge.py
index 0d1606e..d106cf5 100644
--- a/src/Badge.py
+++ b/src/Badge.py
@@ -30,17 +30,22 @@ class Badge:
icon = icons.get(self.name)
+ color_hue = Color(f'#{icon.hex}').get_hue()
+ color_hsl = (color_hue, 0.75, 0.5)
+ color = Color()
+ color.set_hsl(color_hsl)
+
try:
params = {
"label": "",
"message": icon.title,
- "color": f"#{icon.hex}",
+ "color": color,
"logo": icon.slug,
"logoColor": LOGO_COLOR
}
urlParams = urlencode(params)
self.url = f"{BASE_URL}?{urlParams}"
- self.color = Color(params["color"]).get_hue()
+ self.color = color_hue
except Exception:
pass # Let default values
diff --git a/src/FileUtils.py b/src/FileUtils.py
index fa68ea9..235b670 100644
--- a/src/FileUtils.py
+++ b/src/FileUtils.py
@@ -24,6 +24,10 @@ def getJsonData(filePath: str) -> str:
return data
+def setJsonData(filePath: str, content) -> None:
+ setFileData(filePath, json.dumps(content, indent=2))
+
+
def setFileData(filePath: str, content: str) -> None:
"""
Create a new File or replace it content if already exist
diff --git a/templates/index.md.jinja b/templates/index.md.jinja
index 7dae1f1..19d04a6 100644
--- a/templates/index.md.jinja
+++ b/templates/index.md.jinja
@@ -3,7 +3,7 @@
# Hello there ! {{ imageWithSize(data.info.hi_img) }}
I'm {{ data.info.name }}, a passionate developer from {{ imageWithSize(data.info.france_img) }} **{{ data.info.city }}, France**.
-
Currently, the weather is: **{{ data.weather.temperature }}°C** :thermometer:, **{{ data.weather.description }}** {% if data.weather.icon == "None" %}{{ data.weather.icon }}{% endif %}
+
Currently, the weather is: **{{ data.weather.temperature }}°C** :thermometer:, **{{ data.weather.description }}** {% if data.weather.icon != "None" %}{{ data.weather.icon }}{% endif %}
### I code with
{% for img in data.tools -%}