### Makes strings compatible for "adb shell input text ..."
#### The string escape functions use numba under the hood - that means the first run is very slow (compile time)
##### pip install adbescapes
```python
from adbescapes import ADBInputEscaped
adb_path = "C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"
deviceserial = "localhost:5555"
adbk = ADBInputEscaped(adb_path=adb_path, deviceserial=deviceserial)
adbk.connect_to_device()
adbk.activate_debug()
adbk.escape_text_and_send(
"'ąćęłń'\tóśźż\nĄĆĘŁŃÓŚŹŻ\n\"Junto à Estação de \nCarcavelos;\"" "äöüÄÖÜß",
respect_german_letters=False,
exit_keys="ctrl+x",
)
adbk.escape_text_and_send_with_delay(
"""
"Müller\n&Ärger,ändern,\nKüche,Übung, Köchin, Öl\ngroß
""",
delay=(0.01, 0.2),
respect_german_letters=True,
exit_keys="ctrl+x",
)
debug output:
input text \'aceln\'\ \ \ \ oszz
input keyevent 66
input text ACELNOSZZ
input keyevent 66
input text \"Junto\ a\ Estacao\ de\
input keyevent 66
input text Carcavelos\;\"aouAOUb
input keyevent 66
input keyevent 66
sleep 0.072
input text \
sleep 0.103
input text \
sleep 0.109
input text \
sleep 0.066
input text \
sleep 0.159
input text \"
sleep 0.134
input text M
....
```
![Result](https://github.com/hansalemaos/screenshots/raw/main/adboutput2.png)
![Debug](https://github.com/hansalemaos/screenshots/raw/main/adboutput1.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/adbescapes",
"name": "adbescapes",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adb,keyboard,escape",
"author": "Johannes Fischer",
"author_email": "<aulasparticularesdealemaosp@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d7/53/4647919a54e44ef83022393a83a9723a8b42ef1d86cd5d71bdcce915d928/adbescapes-0.10.tar.gz",
"platform": null,
"description": "\n### Makes strings compatible for \"adb shell input text ...\"\n\n\n\n\n\n#### The string escape functions use numba under the hood - that means the first run is very slow (compile time)\n\n\n\n\n\n##### pip install adbescapes\n\n\n\n```python\n\n\n\nfrom adbescapes import ADBInputEscaped\n\n\n\nadb_path = \"C:\\\\Users\\\\Gamer\\\\AppData\\\\Local\\\\Android\\\\Sdk\\\\platform-tools\\\\adb.exe\"\n\ndeviceserial = \"localhost:5555\"\n\nadbk = ADBInputEscaped(adb_path=adb_path, deviceserial=deviceserial)\n\nadbk.connect_to_device()\n\nadbk.activate_debug()\n\nadbk.escape_text_and_send(\n\n \"'\u0105\u0107\u0119\u0142\u0144'\\t\u00f3\u015b\u017a\u017c\\n\u0104\u0106\u0118\u0141\u0143\u00d3\u015a\u0179\u017b\\n\\\"Junto \u00e0 Esta\u00e7\u00e3o de \\nCarcavelos;\\\"\" \"\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\",\n\n respect_german_letters=False,\n\n exit_keys=\"ctrl+x\",\n\n)\n\n\n\nadbk.escape_text_and_send_with_delay(\n\n \"\"\"\n\n\n\n \"M\u00fcller\\n&\u00c4rger,\u00e4ndern,\\nK\u00fcche,\u00dcbung, K\u00f6chin, \u00d6l\\ngro\u00df \n\n\n\n \"\"\",\n\n delay=(0.01, 0.2),\n\n respect_german_letters=True,\n\n exit_keys=\"ctrl+x\",\n\n)\n\n\n\n\n\n\n\ndebug output:\n\n\n\ninput text \\'aceln\\'\\ \\ \\ \\ oszz\n\ninput keyevent 66\n\ninput text ACELNOSZZ\n\ninput keyevent 66\n\ninput text \\\"Junto\\ a\\ Estacao\\ de\\ \n\ninput keyevent 66\n\ninput text Carcavelos\\;\\\"aouAOUb\n\ninput keyevent 66\n\ninput keyevent 66\n\nsleep 0.072\n\ninput text \\ \n\nsleep 0.103\n\ninput text \\ \n\nsleep 0.109\n\ninput text \\ \n\nsleep 0.066\n\ninput text \\ \n\nsleep 0.159\n\ninput text \\\"\n\nsleep 0.134\n\ninput text M\n\n\n\n....\n\n\n\n```\n\n\n\n![Result](https://github.com/hansalemaos/screenshots/raw/main/adboutput2.png)\n\n\n\n\n\n![Debug](https://github.com/hansalemaos/screenshots/raw/main/adboutput1.png)\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Makes strings compatible for adb shell input text ...",
"version": "0.10",
"split_keywords": [
"adb",
"keyboard",
"escape"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a84ae13c48887f0c8433a2342bc39b2ec00840b7853e589b96b947ca1086cbff",
"md5": "75a2a11a18fb38a7fd1bbf6d349bdfdd",
"sha256": "5ff017a9521ae09039d2c3d1579869877ad6e45c6715e8f157ee8d631eb2b676"
},
"downloads": -1,
"filename": "adbescapes-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "75a2a11a18fb38a7fd1bbf6d349bdfdd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6041,
"upload_time": "2023-02-21T05:09:51",
"upload_time_iso_8601": "2023-02-21T05:09:51.586312Z",
"url": "https://files.pythonhosted.org/packages/a8/4a/e13c48887f0c8433a2342bc39b2ec00840b7853e589b96b947ca1086cbff/adbescapes-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d7534647919a54e44ef83022393a83a9723a8b42ef1d86cd5d71bdcce915d928",
"md5": "9d2053ea7057c8f7410caebec44fe6f6",
"sha256": "befbc07e1a5cfa1a3c52fa3ebbbc3caf6a0d25b0f8916dd48b363d0ac0ed554b"
},
"downloads": -1,
"filename": "adbescapes-0.10.tar.gz",
"has_sig": false,
"md5_digest": "9d2053ea7057c8f7410caebec44fe6f6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5054,
"upload_time": "2023-02-21T05:09:53",
"upload_time_iso_8601": "2023-02-21T05:09:53.199474Z",
"url": "https://files.pythonhosted.org/packages/d7/53/4647919a54e44ef83022393a83a9723a8b42ef1d86cd5d71bdcce915d928/adbescapes-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-21 05:09:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "hansalemaos",
"github_project": "adbescapes",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "charchef",
"specs": []
},
{
"name": "subprocess_print_and_capture",
"specs": []
}
],
"lcname": "adbescapes"
}