Skip to content

Commit 68ca817

Browse files
authored
Merge pull request #13 from FoamyGuy/csv_file_screenshots
adding support CSV file type in screenshots
2 parents dc90e59 + c7427da commit 68ca817

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.10"
1720
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
repos:
66
- repo: https://github.com/python/black
7-
rev: 20.8b1
7+
rev: 22.3.0
88
hooks:
99
- id: black
1010
- repo: https://github.com/fsfe/reuse-tool

create_requirement_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import click
1616
from PIL import Image, ImageDraw, ImageFont
17+
from get_imports import SHOWN_FILETYPES
1718

1819
from get_imports import (
1920
get_libs_for_project,
@@ -36,8 +37,6 @@
3637
TEXT_COLOR = "#B0B0B0"
3738
HIDDEN_TEXT_COLOR = "#808080"
3839

39-
SHOWN_FILETYPES = ["py", "mpy", "bmp", "pcf", "bdf", "wav", "mp3", "mid", "json", "txt"]
40-
4140
f = open("latest_bundle_data.json", "r")
4241
bundle_data = json.load(f)
4342
f.close()
@@ -73,6 +72,7 @@ def asset_path(asset_name):
7372
"mid": file_music_icon,
7473
"pcf": file_font_icon,
7574
"bdf": file_font_icon,
75+
"csv": file_empty_icon,
7676
"json": file_icon,
7777
"license": file_empty_icon,
7878
}

get_imports.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,27 @@
1212
import findimports
1313
import requests
1414

15+
1516
BUNDLE_DATA = "latest_bundle_data.json"
1617
BUNDLE_TAG = "latest_bundle_tag.json"
1718

1819
LEARN_GUIDE_REPO = os.environ.get(
1920
"LEARN_GUIDE_REPO", "../Adafruit_Learning_System_Guides/"
2021
)
2122

22-
SHOWN_FILETYPES = ["py", "mpy", "bmp", "pcf", "bdf", "wav", "mp3", "mid", "json", "txt"]
23+
SHOWN_FILETYPES = [
24+
"py",
25+
"mpy",
26+
"bmp",
27+
"pcf",
28+
"bdf",
29+
"wav",
30+
"mp3",
31+
"mid",
32+
"json",
33+
"txt",
34+
"csv",
35+
]
2336
SHOWN_FILETYPES_EXAMPLE = [s for s in SHOWN_FILETYPES if s != "py"]
2437

2538

0 commit comments

Comments
 (0)