1 from setuptools import setup
5 pwd = os.path.abspath(os.path.dirname(__file__))
6 with open(os.path.join(pwd, "README.md"), encoding="utf-8") as f:
7 long_description = f.read()
13 except FileExistsError:
18 mkdir("/etc/lightcards/")
19 shutil.copyfile("./config.py", "/etc/lightcards/config.py")
21 xdg = os.environ.get("XDG_CONFIG_HOME")
22 home = os.path.expanduser("~")
25 mkdir(f"{xdg}/lightcards")
26 shutil.copyfile("./config.py", f"{xdg}/lightcards/config.py")
28 mkdir(f"{home}/.config/lightcards")
29 shutil.copyfile("./config.py", f"{home}/.config/lightcards/config.py")
35 description="Terminal flashcards from Markdown",
36 long_description=long_description,
37 long_description_content_type="text/markdown",
38 url="https://sr.ht/~armaan/lightcards",
39 author="Armaan Bhojwani",
40 author_email="me@armaanb.net",
42 packages=["lightcards"],
43 install_requires=["beautifulsoup4", "markdown"],
45 ("man/man1", ["man/lightcards.1"]),
46 ("man/man5", ["man/lightcards-config.5"]),
49 "console_scripts": ["lightcards=lightcards:main"],
52 "Intended Audience :: Education",
53 "Environment :: Console :: Curses",
54 "License :: OSI Approved :: MIT License",