foundrytools-cli 1.1.13__tar.gz → 1.1.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {foundrytools_cli-1.1.13/foundrytools_cli.egg-info → foundrytools_cli-1.1.15}/PKG-INFO +2 -2
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_utils.py +28 -2
- foundrytools_cli-1.1.15/foundryToolsCLI/__init__.py +3 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15/foundrytools_cli.egg-info}/PKG-INFO +2 -2
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/requires.txt +1 -1
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/requirements.txt +1 -1
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/setup.py +1 -1
- foundrytools_cli-1.1.13/foundryToolsCLI/__init__.py +0 -3
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/LICENSE +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/MANIFEST.in +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/README.md +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_assistant.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_cff.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_converter.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_fix.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_hhea.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_metrics.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_name.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_os2.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_otf.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_post.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_print.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/CLI/ftcli_ttf.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/Font.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/VFont.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/UI.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/fonts_data.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/styles_mapping.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/constants.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/options.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/otf_to_ttf.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/sfnt_to_web.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/ttf_to_otf.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/variable_to_static.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/web_to_sfnt.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/printer/UI.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/printer/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/CFF_.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/OS_2.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/head.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/hhea.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/name.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/tables/post.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/__init__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/bits_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/cli_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/click_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/logger.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/otf_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/skia_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/text_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/timer.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/ttf_tools.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/__main__.py +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/SOURCES.txt +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/dependency_links.txt +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/entry_points.txt +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/not-zip-safe +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/top_level.txt +0 -0
- {foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foundrytools-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.15
|
|
4
4
|
Summary: A set of command line tools to inspect, manipulate and convert font files
|
|
5
5
|
Home-page: https://github.com/ftCLI/FoundryTools-CLI
|
|
6
6
|
Author: ftCLI
|
|
@@ -11,7 +11,7 @@ Requires-Python: >=3.9
|
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
13
|
Requires-Dist: afdko>=4.0.1
|
|
14
|
-
Requires-Dist: fonttools>=4.53.
|
|
14
|
+
Requires-Dist: fonttools>=4.53.1
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
17
|
Requires-Dist: cffsubr>=0.3.0
|
|
@@ -158,29 +158,45 @@ def del_table(
|
|
|
158
158
|
is_flag=True,
|
|
159
159
|
help="Appends the version string to the family folder.",
|
|
160
160
|
)
|
|
161
|
+
@click.option(
|
|
162
|
+
"-d",
|
|
163
|
+
"--delete-empty",
|
|
164
|
+
"delete_empty",
|
|
165
|
+
is_flag=True,
|
|
166
|
+
help="""
|
|
167
|
+
Delete empty folder.
|
|
168
|
+
|
|
169
|
+
This deletes empty folders that are the result of moving files to different folder, especially when using the recursive option.
|
|
170
|
+
""",
|
|
171
|
+
)
|
|
161
172
|
@add_file_or_path_argument()
|
|
173
|
+
@add_recursive_option()
|
|
162
174
|
@Timer(logger=logger.info)
|
|
163
175
|
def font_organizer(
|
|
164
176
|
input_path: Path,
|
|
165
177
|
sort_by_foundry: bool = False,
|
|
166
178
|
sort_by_extension: bool = False,
|
|
167
179
|
sort_by_version: bool = False,
|
|
180
|
+
recursive: bool = False,
|
|
181
|
+
delete_empty: bool = False,
|
|
168
182
|
):
|
|
169
183
|
"""
|
|
170
184
|
Sorts fonts in folders by family name and optionally by foundry, font revision and extension.
|
|
171
185
|
"""
|
|
172
|
-
fonts = get_fonts_in_path(input_path=input_path)
|
|
186
|
+
fonts = get_fonts_in_path(input_path=input_path, recursive=recursive)
|
|
173
187
|
if not initial_check_pass(fonts=fonts):
|
|
174
188
|
return
|
|
175
189
|
|
|
176
190
|
for font in fonts:
|
|
177
191
|
try:
|
|
178
192
|
file = Path(font.reader.file.name)
|
|
179
|
-
output_dir =
|
|
193
|
+
output_dir = input_path
|
|
194
|
+
old_dir = file.parent
|
|
180
195
|
family_name = font.guess_family_name()
|
|
181
196
|
|
|
182
197
|
foundry = font.guess_foundry_name() if sort_by_foundry else None
|
|
183
198
|
if foundry:
|
|
199
|
+
foundry = foundry.strip()
|
|
184
200
|
output_dir = output_dir.joinpath(foundry)
|
|
185
201
|
|
|
186
202
|
version = f" v{round(font['head'].fontRevision, 3)}" if sort_by_version else None
|
|
@@ -196,11 +212,21 @@ def font_organizer(
|
|
|
196
212
|
output_dir = sanitize_filepath(output_dir, platform="auto")
|
|
197
213
|
output_dir.mkdir(parents=True, exist_ok=True)
|
|
198
214
|
|
|
215
|
+
if Path(makeOutputFileName(output_dir.joinpath(file.name), overWrite=True)) == file:
|
|
216
|
+
logger.skip(Logs.file_not_changed, file=file.name)
|
|
217
|
+
continue
|
|
218
|
+
|
|
199
219
|
target = Path(makeOutputFileName(output_dir.joinpath(file.name), overWrite=False))
|
|
200
220
|
file.rename(target=target)
|
|
201
221
|
|
|
202
222
|
logger.opt(colors=True).success(f"{file} <magenta>--></> <cyan>{target}</>")
|
|
203
223
|
|
|
224
|
+
if delete_empty:
|
|
225
|
+
while not any(old_dir.iterdir()):
|
|
226
|
+
old_dir.rmdir()
|
|
227
|
+
logger.opt(colors=True).success(f"{old_dir} <magenta>--></> <red>DELETED</>")
|
|
228
|
+
old_dir = old_dir.parent
|
|
229
|
+
|
|
204
230
|
except Exception as e:
|
|
205
231
|
logger.exception(e)
|
|
206
232
|
finally:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foundrytools-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.15
|
|
4
4
|
Summary: A set of command line tools to inspect, manipulate and convert font files
|
|
5
5
|
Home-page: https://github.com/ftCLI/FoundryTools-CLI
|
|
6
6
|
Author: ftCLI
|
|
@@ -11,7 +11,7 @@ Requires-Python: >=3.9
|
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
13
|
Requires-Dist: afdko>=4.0.1
|
|
14
|
-
Requires-Dist: fonttools>=4.53.
|
|
14
|
+
Requires-Dist: fonttools>=4.53.1
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
17
|
Requires-Dist: cffsubr>=0.3.0
|
|
@@ -18,7 +18,7 @@ def _get_requirements():
|
|
|
18
18
|
|
|
19
19
|
setuptools.setup(
|
|
20
20
|
name="foundrytools-cli",
|
|
21
|
-
version="1.1.
|
|
21
|
+
version="1.1.15",
|
|
22
22
|
description="A set of command line tools to inspect, manipulate and convert font files",
|
|
23
23
|
long_description=long_description,
|
|
24
24
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/__init__.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/fonts_data.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/assistant/styles_mapping.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/__init__.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/options.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/otf_to_ttf.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/sfnt_to_web.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/ttf_to_otf.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/converters/web_to_sfnt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/click_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.13 → foundrytools_cli-1.1.15}/foundrytools_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|