Skip to content

Commit

Permalink
create export directories if they don't exist, add dood to contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
mightbesimon committed Dec 31, 2023
1 parent 1ac3848 commit 89b804e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: mkdir file-icons product-icons
- run: mkdir -p file-icons product-icons
- run: python3 -m translate
- uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
{
"label": "export",
"type": "shell",
"command": "mkdir -p file-icons; mkdir -p product-icons; python3 -m translate",
"command": [
"mkdir -p file-icons product-icons\n",
"python3 -m translate",
],
"group": {
"kind": "build",
"isDefault": true,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Other: [ πŸ—‘ 🐞 βš™οΈ πŸ”’/πŸ”“ πŸ’¬ πŸ’‘ ]
- [theowiik](https://github.com/theowiik)
- [String Max](https://github.com/String10)
- [Abiud Cantu](https://github.com/Abiud)
- [dood](https://github.com/itsamedood)
- πŸ€·β€β™€οΈ - the gitignore lady
- πŸ‘‰ you? πŸ‘ˆ

Expand Down
6 changes: 6 additions & 0 deletions translate/emoji_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import List
from pathlib import Path
from .models import IconType, ReferenceItem, IconItem

################################################################
Expand Down Expand Up @@ -60,6 +61,11 @@ def update_readme(self, filename:str=...) -> EmojiMapper:
raise NotImplemented

def export_icon_theme(self, filename:str) -> EmojiMapper:
Path(filename).parent.mkdir(
parents=True,
exist_ok=True,
)

with open(filename, 'w') as file:
file.write(self.icon_theme())

Expand Down

1 comment on commit 89b804e

@mightbesimon
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added @itsamedood to contributors

Please sign in to comment.