chat-summary


Namechat-summary JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/samirg1/chat-summary
SummaryA tool to get an iMessage group chat summary for popular internet games.
upload_time2023-09-18 12:27:48
maintainer
docs_urlNone
authorSamir Gupta
requires_python>=3.10.0
licenseMIT
keywords summary wordle nerdle connections chat imessage
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # chat-summary

Use this library to get a summary of results of internet games (like Wordle) in a group chat.

![Tests](https://github.com/samirg1/ALTER-SMX-Tool/actions/workflows/tests.yml/badge.svg)
![python](https://img.shields.io/pypi/pyversions/chat-summary?logo=python)
![pypi](https://img.shields.io/pypi/v/chat-summary?logo=pypi)
![downloads](https://static.pepy.tech/badge/chat-summary)
![code style](https://img.shields.io/badge/code%20style-black-000000.svg)

### Requirements
- Only works on MacOS with iMessages
- Must have messages [stored in iCloud](https://support.apple.com/en-au/guide/messages/icht5b5d1e63/mac#:~:text=In%20the%20Messages%20app%20on,all%20of%20them%20to%20appear.) (or simply on Mac)
- Only works for group chats
- Having [contacts synced](https://support.apple.com/en-au/101336) to your Mac as well is not essential but allows for better viewage of results

### Installation
```
pip install chat-summary
```

### Usage
```
chat-summary user chat_name [options]
```

#### Options
- user (required): The name of the user with the messages
- chat_name (required): The name given to the messages group chat
- --silence-contacts: Silence the "unable to find contacts" error
- --send-message: Instead of printing the summary, send it directly back to the group chat
- '-C', '--Connections': Include the 'Connections' game in the results
- '-N', '--Nerdle': Include the 'Nerdle' game in the results
- '-W', '--Wordle': Include the 'Wordle' game in the results

### Output
For each game you opt-in to you will be shown an output like this:
```
🟨🟨🟨 {game} 🟨🟨🟨

COMPLETIONS ({n} days)
1. *********..{c}/{a}
2. *******....{c}/{a}
3. ******.....{c}/{a}
...

AVERAGE GUESSES
1. *********..{av}
2. *******....{av}
3. ******.....{av}
...
```
Where:
- {game} is the name of the game
- {n} is the total amount of {game}s between the first message with {game} and the last
- '******' are replaced by either the contact name or phone numbers of each group chat member (depending on whether contacts are available)
- {c} is the amount of {game}s this person has completed (won)
- {a} is the amount of {game}s this person has attempted
- {av} is the average amount of guesses this person used in a 'win' of {game}
- Completions are sorted from most completed ({c}) to least completed
- Average guesses are sorted from lowest to highest

If there are no messages for a particular game that you have opted-in to you will see something like this instead:
```
🟥 no '{game}' messages found 🟥
```
Where {game} is replaced by the game that there were no messages for. This will only be displayed in the terminal.

### Errors

- ```"user not found, user should be one of: ..."```
    - user parameter was invalid, check that you've spelt it correctly and that you are a valid user in the ```\Users``` directory
-  ```"could not connect to messages database, ensure you have the right permissions to access file"```
    - Ensure you have the right permissions to view the `chat.db` by going System Preferences > Security & Privacy > Full Disk Access and ensure that Terminal (or whatever you are using to run the script) is ticked
- ```"could not find stored messages, ensure you have signed in and uploaded iMessages to iCloud"```
    - Ensure there is a `chat.db` file in `\Users\{your user}\Library\Messages`, if not your messages are not stored locally on your Mac, try logging in to iMessage on your Mac and [uploading the messages to iCloud](https://support.apple.com/en-au/guide/messages/icht5b5d1e63/mac#:~:text=In%20the%20Messages%20app%20on,all%20of%20them%20to%20appear.)
- ```"chat name not found, should be one of: ..."```
    - you have entered an invalid chat_name argument that doesn't match up with any group chats you are currently in on iMessage
- ```"unable to find contacts"```
    - not a destructive error, means that the program could not find contacts that were stored on your computer, so instead of displaying people's names it will instead display their phone numbers in the summary, silence this warning with the `--silence-contacts` option
    - the program will look for a `'AddressBook-v22.abcddb'` file somewhere in `'/Users/{your user}/Library/Application Support/AddressBook/Sources'`
- ```"empty message, no message sent"```
    - you are attempting to send an empty message to the group chat, this usually occurs when you are using the `--send-message` flag and have either not opted-in to any of the games or no games were found in the messages
- ```"unable to send message to group chat"```
    - a subprocess error occured whilst sending the message
    - ensure you have access to `osascript` in your terminal and that the terminal has full access to files and to iMessage in your System Preferences

### Add your own!

If you have your own internet games that are similar to Wordle and are not currently supported [raise an issue](https://github.com/samirg1/chat-summary/issues/new?assignees=samirg1&labels=new-game&projects=&template=new-game.md&title=%5BNew+Game%5D)  and it will be implemented as soon as possible.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/samirg1/chat-summary",
    "name": "chat-summary",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": "",
    "keywords": "summary,wordle,nerdle,connections,chat,imessage",
    "author": "Samir Gupta",
    "author_email": "srgupta@bigpond.com",
    "download_url": "https://files.pythonhosted.org/packages/46/13/e931a07cc9b0f540cf35d46eb56c06d3dbdeeff46c8885fa33a290dff205/chat-summary-1.1.0.tar.gz",
    "platform": null,
    "description": "# chat-summary\n\nUse this library to get a summary of results of internet games (like Wordle) in a group chat.\n\n![Tests](https://github.com/samirg1/ALTER-SMX-Tool/actions/workflows/tests.yml/badge.svg)\n![python](https://img.shields.io/pypi/pyversions/chat-summary?logo=python)\n![pypi](https://img.shields.io/pypi/v/chat-summary?logo=pypi)\n![downloads](https://static.pepy.tech/badge/chat-summary)\n![code style](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n### Requirements\n- Only works on MacOS with iMessages\n- Must have messages [stored in iCloud](https://support.apple.com/en-au/guide/messages/icht5b5d1e63/mac#:~:text=In%20the%20Messages%20app%20on,all%20of%20them%20to%20appear.) (or simply on Mac)\n- Only works for group chats\n- Having [contacts synced](https://support.apple.com/en-au/101336) to your Mac as well is not essential but allows for better viewage of results\n\n### Installation\n```\npip install chat-summary\n```\n\n### Usage\n```\nchat-summary user chat_name [options]\n```\n\n#### Options\n- user (required): The name of the user with the messages\n- chat_name (required): The name given to the messages group chat\n- --silence-contacts: Silence the \"unable to find contacts\" error\n- --send-message: Instead of printing the summary, send it directly back to the group chat\n- '-C', '--Connections': Include the 'Connections' game in the results\n- '-N', '--Nerdle': Include the 'Nerdle' game in the results\n- '-W', '--Wordle': Include the 'Wordle' game in the results\n\n### Output\nFor each game you opt-in to you will be shown an output like this:\n```\n\ud83d\udfe8\ud83d\udfe8\ud83d\udfe8 {game} \ud83d\udfe8\ud83d\udfe8\ud83d\udfe8\n\nCOMPLETIONS ({n} days)\n1. *********..{c}/{a}\n2. *******....{c}/{a}\n3. ******.....{c}/{a}\n...\n\nAVERAGE GUESSES\n1. *********..{av}\n2. *******....{av}\n3. ******.....{av}\n...\n```\nWhere:\n- {game} is the name of the game\n- {n} is the total amount of {game}s between the first message with {game} and the last\n- '******' are replaced by either the contact name or phone numbers of each group chat member (depending on whether contacts are available)\n- {c} is the amount of {game}s this person has completed (won)\n- {a} is the amount of {game}s this person has attempted\n- {av} is the average amount of guesses this person used in a 'win' of {game}\n- Completions are sorted from most completed ({c}) to least completed\n- Average guesses are sorted from lowest to highest\n\nIf there are no messages for a particular game that you have opted-in to you will see something like this instead:\n```\n\ud83d\udfe5 no '{game}' messages found \ud83d\udfe5\n```\nWhere {game} is replaced by the game that there were no messages for. This will only be displayed in the terminal.\n\n### Errors\n\n- ```\"user not found, user should be one of: ...\"```\n    - user parameter was invalid, check that you've spelt it correctly and that you are a valid user in the ```\\Users``` directory\n-  ```\"could not connect to messages database, ensure you have the right permissions to access file\"```\n    - Ensure you have the right permissions to view the `chat.db` by going System Preferences > Security & Privacy > Full Disk Access and ensure that Terminal (or whatever you are using to run the script) is ticked\n- ```\"could not find stored messages, ensure you have signed in and uploaded iMessages to iCloud\"```\n    - Ensure there is a `chat.db` file in `\\Users\\{your user}\\Library\\Messages`, if not your messages are not stored locally on your Mac, try logging in to iMessage on your Mac and [uploading the messages to iCloud](https://support.apple.com/en-au/guide/messages/icht5b5d1e63/mac#:~:text=In%20the%20Messages%20app%20on,all%20of%20them%20to%20appear.)\n- ```\"chat name not found, should be one of: ...\"```\n    - you have entered an invalid chat_name argument that doesn't match up with any group chats you are currently in on iMessage\n- ```\"unable to find contacts\"```\n    - not a destructive error, means that the program could not find contacts that were stored on your computer, so instead of displaying people's names it will instead display their phone numbers in the summary, silence this warning with the `--silence-contacts` option\n    - the program will look for a `'AddressBook-v22.abcddb'` file somewhere in `'/Users/{your user}/Library/Application Support/AddressBook/Sources'`\n- ```\"empty message, no message sent\"```\n    - you are attempting to send an empty message to the group chat, this usually occurs when you are using the `--send-message` flag and have either not opted-in to any of the games or no games were found in the messages\n- ```\"unable to send message to group chat\"```\n    - a subprocess error occured whilst sending the message\n    - ensure you have access to `osascript` in your terminal and that the terminal has full access to files and to iMessage in your System Preferences\n\n### Add your own!\n\nIf you have your own internet games that are similar to Wordle and are not currently supported [raise an issue](https://github.com/samirg1/chat-summary/issues/new?assignees=samirg1&labels=new-game&projects=&template=new-game.md&title=%5BNew+Game%5D)  and it will be implemented as soon as possible.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to get an iMessage group chat summary for popular internet games.",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/samirg1/chat-summary"
    },
    "split_keywords": [
        "summary",
        "wordle",
        "nerdle",
        "connections",
        "chat",
        "imessage"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e48f65d9ebbe19fea93f68538e51955da81996e4622abedf9a1147b268bf313",
                "md5": "aa3a35b93ccaecff330d68f5a5a9a3ed",
                "sha256": "67be588f2f60cc97fd1755f78b598aa5d83ce7fa66cc96dec4450fb9820172e3"
            },
            "downloads": -1,
            "filename": "chat_summary-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa3a35b93ccaecff330d68f5a5a9a3ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 10948,
            "upload_time": "2023-09-18T12:27:46",
            "upload_time_iso_8601": "2023-09-18T12:27:46.916849Z",
            "url": "https://files.pythonhosted.org/packages/7e/48/f65d9ebbe19fea93f68538e51955da81996e4622abedf9a1147b268bf313/chat_summary-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4613e931a07cc9b0f540cf35d46eb56c06d3dbdeeff46c8885fa33a290dff205",
                "md5": "0d44a84604d7d0e6d64156a4d89f482c",
                "sha256": "d77a944676f6763e65cb708af7e4849ca9bdb50aa0f346b7437bcbc2496c59fd"
            },
            "downloads": -1,
            "filename": "chat-summary-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0d44a84604d7d0e6d64156a4d89f482c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 11141,
            "upload_time": "2023-09-18T12:27:48",
            "upload_time_iso_8601": "2023-09-18T12:27:48.399470Z",
            "url": "https://files.pythonhosted.org/packages/46/13/e931a07cc9b0f540cf35d46eb56c06d3dbdeeff46c8885fa33a290dff205/chat-summary-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-18 12:27:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "samirg1",
    "github_project": "chat-summary",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "chat-summary"
}
        
Elapsed time: 0.12223s