mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-29 06:15:24 -04:00
🔧 ConfigProvider added in builder
This commit is contained in:
parent
3bdbf285b0
commit
f4d64e6ce6
8 changed files with 61 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
# Out Dir
|
# Out Dir
|
||||||
bitmaps
|
bitmaps
|
||||||
themes
|
themes
|
||||||
|
test.py
|
||||||
|
|
||||||
# Logs Files
|
# Logs Files
|
||||||
build.log
|
build.log
|
||||||
|
|
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
recursive-include builder/windows.inf
|
4
builder/__init__.py
Normal file
4
builder/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
__version__: str = "1.0.1"
|
32
builder/provider.py
Normal file
32
builder/provider.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
import builder
|
||||||
|
from os import path
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigProvider(object):
|
||||||
|
"""
|
||||||
|
Configure `Bibata` building process.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, bitmaps_dir: str, out_dir: str) -> None:
|
||||||
|
|
||||||
|
self._bitmaps_dir: str = bitmaps_dir
|
||||||
|
self._out_dir: str = out_dir
|
||||||
|
|
||||||
|
if (path.isdir(out_dir)):
|
||||||
|
shutil.rmtree(out_dir)
|
||||||
|
|
||||||
|
os.mkdir(out_dir)
|
||||||
|
|
||||||
|
def get_windows_script(self, theme_name: str, author: str) -> str:
|
||||||
|
|
||||||
|
with open(path.join(builder.__path__[0], "windows.inf")) as f:
|
||||||
|
data = f.read()
|
||||||
|
inf_content = data.replace(
|
||||||
|
"<inject_theme_name>", theme_name+" Cursors").replace("<inject_author_name>", author)
|
||||||
|
|
||||||
|
return inf_content
|
23
setup.py
Normal file
23
setup.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from builder import __version__
|
||||||
|
from setuptools import setup, find_namespace_packages
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="builder",
|
||||||
|
version=__version__,
|
||||||
|
description="Bibata theme builder 📦",
|
||||||
|
url="https://github.com/ful1e5/Bibata_Cursor/",
|
||||||
|
author="Kaiz Khatri",
|
||||||
|
author_email="kaizmandhu@gmail.com",
|
||||||
|
install_requires=["Pillow>=7.2.0", "clickgen>=1.1.7"],
|
||||||
|
packages=find_namespace_packages(include=['builder']),
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
],
|
||||||
|
python_requires=">=3.6",
|
||||||
|
include_package_data=True,
|
||||||
|
zip_safe=False,
|
||||||
|
)
|
Loading…
Add table
Add a link
Reference in a new issue