Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
spirometaxas committed Aug 30, 2023
1 parent 2879e06 commit 8372e48
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
@@ -1,2 +1,5 @@
# periodic-table-cli-py
[BETA] An interactive Periodic Table of Elements app for the console
# periodic-table-cli

[BETA] An interactive Periodic Table of Elements app for the console!

Under construction, check back soon!
Empty file added periodic_table_cli/__init__.py
Empty file.
40 changes: 40 additions & 0 deletions periodic_table_cli/cli.py
@@ -0,0 +1,40 @@
import sys

PERIODIC_TABLE = '\n'\
' 1 18 \n'\
' ╔═════╗ THE PERIODIC TABLE OF ELEMENTS ╔═════╗ \n'\
' 1 ║ 1 ║ ║ 2 ║ \n'\
' ║ H ║ 2 13 14 15 16 17 ║ He ║ \n'\
' ╠═════╬═════╗ ╔═════╦═════╦═════╦═════╦═════╬═════╣ \n'\
' 2 ║ 3 ║ 4 ║ ║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║ 10 ║ \n'\
' ║ Li ║ Be ║ ║ B ║ C ║ N ║ O ║ F ║ Ne ║ \n'\
' ╠═════╬═════╣ ╠═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' 3 ║ 11 ║ 12 ║ ║ 13 ║ 14 ║ 15 ║ 16 ║ 17 ║ 18 ║ \n'\
' ║ Na ║ Mg ║ 3 4 5 6 7 8 9 10 11 12 ║ Al ║ Si ║ P ║ S ║ Cl ║ Ar ║ \n'\
' ╠═════╬═════╬═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╬═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' 4 ║ 19 ║ 20 ║ 21 ║ 22 ║ 23 ║ 24 ║ 25 ║ 26 ║ 27 ║ 28 ║ 29 ║ 30 ║ 31 ║ 32 ║ 33 ║ 34 ║ 35 ║ 36 ║ \n'\
' ║ K ║ Ca ║ Sc ║ Ti ║ V ║ Cr ║ Mn ║ Fe ║ Co ║ Ni ║ Cu ║ Zn ║ Ga ║ Ge ║ As ║ Se ║ Br ║ Kr ║ \n'\
' ╠═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' 5 ║ 37 ║ 38 ║ 39 ║ 40 ║ 41 ║ 42 ║ 43 ║ 44 ║ 45 ║ 46 ║ 47 ║ 48 ║ 49 ║ 50 ║ 51 ║ 52 ║ 53 ║ 54 ║ \n'\
' ║ Rb ║ Sr ║ Y ║ Zr ║ Nb ║ Mo ║ Tc ║ Ru ║ Rh ║ Pd ║ Ag ║ Cd ║ In ║ Sn ║ Sb ║ Te ║ I ║ Xe ║ \n'\
' ╠═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' 6 ║ 55 ║ 56 ╟──┬──╢ 72 ║ 73 ║ 74 ║ 75 ║ 76 ║ 77 ║ 78 ║ 79 ║ 80 ║ 81 ║ 82 ║ 83 ║ 84 ║ 85 ║ 86 ║ \n'\
' ║ Cs ║ Ba ║ │ ║ Hf ║ Ta ║ W ║ Re ║ Os ║ Ir ║ Pt ║ Au ║ Hg ║ Tl ║ Pb ║ Bi ║ Po ║ At ║ Rn ║ \n'\
' ╠═════╬═════╣ │ ╠═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' 7 ║ 87 ║ 88 ╠══╪══╣ 104 ║ 105 ║ 106 ║ 107 ║ 108 ║ 109 ║ 110 ║ 111 ║ 112 ║ 113 ║ 114 ║ 115 ║ 116 ║ 117 ║ 118 ║ \n'\
' ║ Fr ║ Ra ║ │ ║ Rf ║ Db ║ Sg ║ Bh ║ Hs ║ Mt ║ Ds ║ Rg ║ Cn ║ Nh ║ Fl ║ Mc ║ Lv ║ Ts ║ Og ║ \n'\
' ╚═════╩═════╝ │ ╚═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╝ \n'\
' ┌────┘ \n'\
' │ ╔═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╦═════╗ \n'\
' ├─╢ 57 ║ 58 ║ 59 ║ 60 ║ 61 ║ 62 ║ 63 ║ 64 ║ 65 ║ 66 ║ 67 ║ 68 ║ 69 ║ 70 ║ 71 ║ \n'\
' │ ║ La ║ Ce ║ Pr ║ Nd ║ Pm ║ Sm ║ Eu ║ Gd ║ Tb ║ Dy ║ Ho ║ Er ║ Tm ║ Yb ║ Lu ║ \n'\
' │ ╠═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╬═════╣ \n'\
' ╘═╣ 89 ║ 90 ║ 91 ║ 92 ║ 93 ║ 94 ║ 95 ║ 96 ║ 97 ║ 98 ║ 99 ║ 100 ║ 101 ║ 102 ║ 103 ║ \n'\
' ║ Ac ║ Th ║ Pa ║ U ║ Np ║ Pu ║ Am ║ Cm ║ Bk ║ Cf ║ Es ║ Fm ║ Md ║ No ║ Lr ║ \n'\
' ╚═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╩═════╝ \n'

def main():
sys.stdout.write(PERIODIC_TABLE)

if __name__ == "__main__":
main()
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
35 changes: 35 additions & 0 deletions setup.py
@@ -0,0 +1,35 @@
from distutils.core import setup

def get_readme():
with open("README.md", encoding="utf8") as f:
return f.read()

setup(
name = 'periodic-table-cli',
packages = ['periodic_table_cli'],
version = '0.0.1',
license='MIT',
description = '[BETA] An interactive Periodic Table of Elements app for the console!',
long_description=get_readme(),
long_description_content_type="text/markdown",
author = 'Spiro Metaxas',
author_email = 'spirometaxas@outlook.com',
url = 'https://spirometaxas.com/projects/periodic-table-cli/',
download_url = 'https://github.com/spirometaxas/periodic-table-cli-py/archive/refs/tags/v0.0.1.tar.gz',
keywords = [ 'Periodic Table', 'Periodic Table of Elements', 'periodic', 'periodic-table-cli', 'Chemistry', 'elements', 'atoms', 'atomic', 'cli', 'console', 'terminal', 'shell', 'unicode' ],
entry_points={"console_scripts": ["periodic-table-cli=periodic_table_cli.cli:main"]},
classifiers=[
'Development Status :: 4 - Beta',

'Intended Audience :: Education',
'Intended Audience :: Science/Research',

'Topic :: Scientific/Engineering :: Chemistry',

'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
"Operating System :: OS Independent",
],
include_package_data=True,
python_requires='>=3.0',
)

0 comments on commit 8372e48

Please sign in to comment.