mirror of
https://agent.ghink.cloud/ghinknet/richka
synced 2024-12-27 11:23:27 +00:00
basic config
This commit is contained in:
parent
fafe488d1d
commit
b96a458952
5
.gitignore
vendored
5
.gitignore
vendored
@ -158,7 +158,7 @@ cython_debug/
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
.idea/
|
||||
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
@ -596,7 +596,8 @@ FodyWeavers.xsd
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
@ -1,3 +1,2 @@
|
||||
# Richka
|
||||
# Richka - Python Async Download Engine
|
||||
|
||||
Python Async Download Engine
|
1
richka/__init__.py
Normal file
1
richka/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .config import *
|
0
richka/__main__.py
Normal file
0
richka/__main__.py
Normal file
8
richka/__version__.py
Normal file
8
richka/__version__.py
Normal file
@ -0,0 +1,8 @@
|
||||
__title__ = "richka"
|
||||
__description__ = "Python Async Download Engine."
|
||||
__url__ = "https://github.com/ghinknet/richka"
|
||||
__version__ = '0.0.1'
|
||||
__author__ = "Ian Xia"
|
||||
__author_email__ = "xia@ghink.net"
|
||||
__license__ = "MIT"
|
||||
__copyright__ = "Copyright Ian Xia"
|
13
richka/config.py
Normal file
13
richka/config.py
Normal file
@ -0,0 +1,13 @@
|
||||
import richka
|
||||
|
||||
__VERSION = ("Alpha", 0, 0, 1)
|
||||
USER_AGENT = f"Richka{__VERSION[0]}/{__VERSION[1]}.{__VERSION[2]}.{__VERSION[3]}"
|
||||
HEADERS = {"user-agent": USER_AGENT}
|
||||
|
||||
def set_user_agent(user_agent: str) -> None:
|
||||
richka.USER_AGENT = user_agent
|
||||
richka.HEADERS["user-agent"] = user_agent
|
||||
|
||||
def set_headers(headers: dict) -> None:
|
||||
for key, value in headers.items():
|
||||
richka.HEADERS[key.lower()] = value
|
0
richka/core.py
Normal file
0
richka/core.py
Normal file
42
setup.py
Normal file
42
setup.py
Normal file
@ -0,0 +1,42 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
about = {}
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
with open(os.path.join(here, "richka", "__version__.py"), "r") as f:
|
||||
exec(f.read(), about)
|
||||
|
||||
with open("README.md", "r") as f:
|
||||
readme = f.read()
|
||||
|
||||
if sys.argv[-1] == "publish":
|
||||
os.system("python setup.py sdist bdist_wheel")
|
||||
os.system("twine upload dist/*")
|
||||
sys.exit()
|
||||
|
||||
setup(
|
||||
name=about["__title__"],
|
||||
version=about["__version__"],
|
||||
description=about["__description__"],
|
||||
packages=find_packages(),
|
||||
url=about["__url__"],
|
||||
license=about["__license__"],
|
||||
author=about["__author__"],
|
||||
author_email=about["__author_email__"],
|
||||
long_description_content_type="text/markdown",
|
||||
long_description=readme,
|
||||
install_requires=[
|
||||
],
|
||||
classifiers=[
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': ['richka=richka.__main__:main'],
|
||||
},
|
||||
package_data={'': ['README.md']},
|
||||
include_package_data=True,
|
||||
zip_safe=False)
|
Loading…
Reference in New Issue
Block a user