diff --git a/__pycache__/build.cpython-38.pyc b/__pycache__/build.cpython-38.pyc index 0d9f8c5..4601c85 100644 Binary files a/__pycache__/build.cpython-38.pyc and b/__pycache__/build.cpython-38.pyc differ diff --git a/build.py b/build.py index 16aa91f..7d0b7ef 100644 --- a/build.py +++ b/build.py @@ -1,9 +1,11 @@ def build(): import os - import editor as ed + from editor import edit + os.system("rm -rf package/dist") + os.system("mkdir package/dist") os.system("pip install --upgrade pip build twine") os.system("clear") - ed.edit() + edit() os.system("clear") print("Run these commands next: \n cd package\n python3 -m build\n python3 -m twine upload -r pypi dist/*") # __token__ diff --git a/main.py b/main.py index de2240d..494f17b 100644 --- a/main.py +++ b/main.py @@ -1,2 +1,6 @@ #from build import build -#build() \ No newline at end of file +#build() +import package.src.fkeycapture as fkey +print(fkey.get(5)) +while 1: + print(fkey.getnum()) \ No newline at end of file diff --git a/package/README.md b/package/README.md index 2d0e8f5..16c7f7b 100644 --- a/package/README.md +++ b/package/README.md @@ -4,8 +4,9 @@ This is a simple and easy to use package that allows you to capture individual k 1. (Default) Recive key as a string 2. Recive key as bytes #### How to Use: -1. from fkeycapture import get +1. from fkeycapture import get, getnum 2. Use it like this : get([number of keys to capture],[if you want bytes output, make this 'True']) -###### v.1.0.6: -Finally made the package usable. +3. To use the getnum method use like this: getnum([number of key to capture]) +###### v.1.0.7: +Added the getnum method diff --git a/package/dist/fkeycapture-1.0.6-py3-none-any.whl b/package/dist/fkeycapture-1.0.6-py3-none-any.whl deleted file mode 100644 index fd569f4..0000000 Binary files a/package/dist/fkeycapture-1.0.6-py3-none-any.whl and /dev/null differ diff --git a/package/dist/fkeycapture-1.0.6.tar.gz b/package/dist/fkeycapture-1.0.6.tar.gz deleted file mode 100644 index ee3296f..0000000 Binary files a/package/dist/fkeycapture-1.0.6.tar.gz and /dev/null differ diff --git a/package/setup.cfg b/package/setup.cfg index 059a9d5..dfc6682 100644 --- a/package/setup.cfg +++ b/package/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = fkeycapture -version = 1.0.6 +version = 1.0.7 author = Firepup650 author_email = firepyp650@gmail.com description = A way to capture keystrokes diff --git a/package/src/fkeycapture.egg-info/PKG-INFO b/package/src/fkeycapture.egg-info/PKG-INFO index 8c06f47..22239d0 100644 --- a/package/src/fkeycapture.egg-info/PKG-INFO +++ b/package/src/fkeycapture.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: fkeycapture -Version: 1.0.6 +Version: 1.0.7 Summary: A way to capture keystrokes Home-page: https://github.com/Alexander-Maples/fkeycapture Author: Firepup650 @@ -14,11 +14,12 @@ Description: # fkeycapture 1. (Default) Recive key as a string 2. Recive key as bytes #### How to Use: - 1. from fkeycapture import get + 1. from fkeycapture import get, getnum 2. Use it like this : get([number of keys to capture],[if you want bytes output, make this 'True']) - ###### v.1.0.6: - Finally made the package usable. + 3. To use the getnum method use like this: getnum([number of key to capture]) + ###### v.1.0.7: + Added the getnum method Platform: UNKNOWN Classifier: Programming Language :: Python :: 3 diff --git a/package/src/fkeycapture/__init__.py b/package/src/fkeycapture/__init__.py index 106e83c..27a7985 100644 --- a/package/src/fkeycapture/__init__.py +++ b/package/src/fkeycapture/__init__.py @@ -35,4 +35,14 @@ def get(keycount=1,bytes=False): getp2() if bytes == True: key = key.encode() + return key +def getnum(keycount=1): + internalcounter=0 + keys = [] + while internalcounter != keycount: + key = get() + if key == "0" or key == "1" or key == "2" or key == "3" or key == "4" or key == "5" or key == "6" or key == "7" or key == "8" or key == "9": + keys.append(key) + internalcounter += 1 + key = "".join(keys) return key \ No newline at end of file diff --git a/package/src/fkeycapture/__pycache__/__init__.cpython-38.pyc b/package/src/fkeycapture/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..9f556c8 Binary files /dev/null and b/package/src/fkeycapture/__pycache__/__init__.cpython-38.pyc differ