# macApp
A macOS .app information retriever for Python 3
# Installation
`pip install macApp --upgrade`
Works for Python >=3.1
# Usage
```python
>>> import macApp
>>> macApp.App(<path>)
'App Name'
# Example:
>>> VSCode = macApp.App("/Applications/Visual Studio Code - Insiders.app")
>>> VSCode.architectures
['arm64']
>>> VSCode.used_dates
['2020-12-24 08:00:00 +0000', '2020-12-24 23:00:00 +0000', '2020-12-25 23:00:00 +0000', '2020-12-26 23:00:00 +0000', '2020-12-27 23:00:00 +0000', '2020-12-28 23:00:00 +0000', '2020-12-29 23:00:00 +0000']
>>> VSCode.size
'276.41MB'
>>> VSCode.copyright
'Copyright (C) 2019 Microsoft. All rights reserved'
>>> VSCode.creation_date
'2020-12-16 00:00:00 +0000'
>>> VSCode.bundle_id
'com.microsoft.VSCodeInsiders'
>>> VSCode.bundle_id.vendor
'microsoft'
>>> VSCode.bundle_id.app
'VSCodeInsiders'
>>> VSCode.bundle_id.version
'1.53.0-insider'
>>> VSCode.bundle_id.version.major
1
>>> VSCode.as_dict
{'displayName': 'Visual Studio Code - Insiders.app', 'alternateNames': ['Visual Studio Code - Insiders.app'], 'category': 'public.app-category.developer-tools', 'categoryType': None, 'bundleID': {'id': 'com.microsoft.VSCodeInsiders', [...] 'minor': 53, 'patch': 0, 'other': None}}
```
# Methods
- kill(signal=None)
> Closes the app if running (is_running == True)
>> The 'signal' parameter is used specify a special signal used with `killall`
- relatives(starting_path=OPTIMIZEDPATH, no_warning=False)
> Searches for all of the files which might be related to the app
>> The 'starting_path' parameter is used specify which directory (folder) to start searching from
>> The 'no_warning' parameter is used specify if macApp should display warnings or not
>>> OPTIMIZEDPATH or macApp.utils.OptimizedPath() is a variable used to indicate relatives() that we want to search through predefined paths which are more likely to have files related to the app
- uninstall(starting_path=OPTIMIZEDPATH, no_warning=False)
> Moves all of the files found by relatives() to a folder and creates a report
>> 'starting_path' is the same as the one on relatives()
>> 'no_warning' is the same as the one on relatives()
# How does it work
macApp parses the result from the shell macOS built-in shell command `mdls` to retrieve information about the app
# Dependencies
This module uses one dependency to ensure that created reports are safely written to
- safeIO
# Credit
```
macApp by Anime no Sekai
© Anime no Sekai — 2020
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Animenosekai/macApp",
"name": "macApp",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "macOS,app,.app,python,file,mdls,bundle",
"author": "Anime no Sekai",
"author_email": "niichannomail@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/88/06/80a127bcf96bca984b4ffda1dce700c5cb5e54c7fefbeca6a82ce7c98041/macApp-1.1.tar.gz",
"platform": "",
"description": "# macApp\n A macOS .app information retriever for Python 3\n\n# Installation\n`pip install macApp --upgrade`\n\nWorks for Python >=3.1\n\n# Usage\n```python\n>>> import macApp\n>>> macApp.App(<path>)\n'App Name'\n# Example:\n>>> VSCode = macApp.App(\"/Applications/Visual Studio Code - Insiders.app\")\n>>> VSCode.architectures\n['arm64']\n>>> VSCode.used_dates\n['2020-12-24 08:00:00 +0000', '2020-12-24 23:00:00 +0000', '2020-12-25 23:00:00 +0000', '2020-12-26 23:00:00 +0000', '2020-12-27 23:00:00 +0000', '2020-12-28 23:00:00 +0000', '2020-12-29 23:00:00 +0000']\n>>> VSCode.size\n'276.41MB'\n>>> VSCode.copyright\n'Copyright (C) 2019 Microsoft. All rights reserved'\n>>> VSCode.creation_date\n'2020-12-16 00:00:00 +0000'\n>>> VSCode.bundle_id\n'com.microsoft.VSCodeInsiders'\n>>> VSCode.bundle_id.vendor\n'microsoft'\n>>> VSCode.bundle_id.app\n'VSCodeInsiders'\n>>> VSCode.bundle_id.version\n'1.53.0-insider'\n>>> VSCode.bundle_id.version.major\n1\n>>> VSCode.as_dict\n{'displayName': 'Visual Studio Code - Insiders.app', 'alternateNames': ['Visual Studio Code - Insiders.app'], 'category': 'public.app-category.developer-tools', 'categoryType': None, 'bundleID': {'id': 'com.microsoft.VSCodeInsiders', [...] 'minor': 53, 'patch': 0, 'other': None}}\n```\n\n# Methods\n- kill(signal=None)\n> Closes the app if running (is_running == True) \n>> The 'signal' parameter is used specify a special signal used with `killall`\n\n- relatives(starting_path=OPTIMIZEDPATH, no_warning=False)\n> Searches for all of the files which might be related to the app \n>> The 'starting_path' parameter is used specify which directory (folder) to start searching from \n>> The 'no_warning' parameter is used specify if macApp should display warnings or not \n>>> OPTIMIZEDPATH or macApp.utils.OptimizedPath() is a variable used to indicate relatives() that we want to search through predefined paths which are more likely to have files related to the app\n\n- uninstall(starting_path=OPTIMIZEDPATH, no_warning=False)\n> Moves all of the files found by relatives() to a folder and creates a report \n>> 'starting_path' is the same as the one on relatives() \n>> 'no_warning' is the same as the one on relatives()\n\n# How does it work\nmacApp parses the result from the shell macOS built-in shell command `mdls` to retrieve information about the app\n\n# Dependencies\nThis module uses one dependency to ensure that created reports are safely written to\n- safeIO\n\n# Credit\n```\nmacApp by Anime no Sekai\n\n\u00a9 Anime no Sekai \u2014\u00a02020\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A macOS .app information retriever for Python 3",
"version": "1.1",
"split_keywords": [
"macos",
"app",
".app",
"python",
"file",
"mdls",
"bundle"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "8f99817850c7aa078dbee3e852a5a3fb",
"sha256": "9b21cc22e0bd8ddf36c9e787a5d151212792dc0a20fe1c7b1dd63f3f80933f7e"
},
"downloads": -1,
"filename": "macApp-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8f99817850c7aa078dbee3e852a5a3fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9080,
"upload_time": "2020-12-30T23:50:16",
"upload_time_iso_8601": "2020-12-30T23:50:16.186094Z",
"url": "https://files.pythonhosted.org/packages/16/4a/d36f05edb01ba261e97b7e9f824658720fc3235929d18a35e47ca5d1d037/macApp-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "ec55ac7f61f285d0a8ed871d3a74b10f",
"sha256": "5c30ff5ce161a70ee2a695e888b277c7f819a8452ac5e1be8f75ef464f497125"
},
"downloads": -1,
"filename": "macApp-1.1.tar.gz",
"has_sig": false,
"md5_digest": "ec55ac7f61f285d0a8ed871d3a74b10f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8946,
"upload_time": "2020-12-30T23:50:17",
"upload_time_iso_8601": "2020-12-30T23:50:17.651293Z",
"url": "https://files.pythonhosted.org/packages/88/06/80a127bcf96bca984b4ffda1dce700c5cb5e54c7fefbeca6a82ce7c98041/macApp-1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-12-30 23:50:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": null,
"github_project": "Animenosekai",
"error": "Could not fetch GitHub repository",
"lcname": "macapp"
}