{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":730296235,"defaultBranch":"main","name":"WhatsApp-Chat-HTML-Converter","ownerLogin":"jd2476","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-12-11T16:07:32.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6854342?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1702310853.908702","currentOid":""},"activityList":{"items":[{"before":"ac5211569462075f8d1f16f44b9662d552f5974a","after":"7b31e4cd3d7354a91fae85c8c30aefd37f9f081c","ref":"refs/heads/main","pushedAt":"2024-07-13T14:12:13.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update README.md\n\nclarified some points w.r.t. last update","shortMessageHtmlLink":"Update README.md"}},{"before":"9ac22f0ff8693c1214db35cfbfc8b2f7d6c741bb","after":"ac5211569462075f8d1f16f44b9662d552f5974a","ref":"refs/heads/main","pushedAt":"2024-07-13T14:09:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update whatsappChatToHTML.py\n\n- expanded time format detection\r\n- improved UX by\r\n - listing chat folders and user just needs to select folder number from list (script verifies that the subfolders have the chat export txt file)\r\n - listing chat members for user to select which user should be displayed as user (for right-aligning those chats)\r\n- I noticed that sometimes WhatsApp exports (at least on iOS) have some messages not sorted correctly according to timestamp — added sorting of chats by timestamp","shortMessageHtmlLink":"Update whatsappChatToHTML.py"}},{"before":"d90f407a97d3e712e051f85e908927710abc7982","after":"9ac22f0ff8693c1214db35cfbfc8b2f7d6c741bb","ref":"refs/heads/main","pushedAt":"2024-07-13T06:51:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update README.md\n\nCorrected markdown format for commented lines","shortMessageHtmlLink":"Update README.md"}},{"before":"d173d8a6a14d6c5bcba5f7587a24f84eb18dbc20","after":"d90f407a97d3e712e051f85e908927710abc7982","ref":"refs/heads/main","pushedAt":"2024-07-12T07:36:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"161aa8864bca37e37e2276ab43197f254d79e098","after":"d173d8a6a14d6c5bcba5f7587a24f84eb18dbc20","ref":"refs/heads/main","pushedAt":"2024-07-12T07:33:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update and rename whatsappChatToHTML_iOS.py to whatsappChatToHTML.py\n\nUpdated script to support both iOS and Android based on feedback. Key changes were date / time handling and folder / filename handling.\r\nReverted to original filename (dropped the \"_iOS\") since the script should support both iOS and Adnroid","shortMessageHtmlLink":"Update and rename whatsappChatToHTML_iOS.py to whatsappChatToHTML.py"}},{"before":"a10c884a2023ef3b0b231b9aa7a9c4bbb5c926ee","after":"161aa8864bca37e37e2276ab43197f254d79e098","ref":"refs/heads/main","pushedAt":"2024-07-12T06:53:04.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Rename whatsappChatToHTML.py to whatsappChatToHTML_iOS.py\n\nappended \"_iOS\" to filename to differentiate with Android script","shortMessageHtmlLink":"Rename whatsappChatToHTML.py to whatsappChatToHTML_iOS.py"}},{"before":"d3b41bd0b984f251474b5adb2765f181c3398cc9","after":"a10c884a2023ef3b0b231b9aa7a9c4bbb5c926ee","ref":"refs/heads/main","pushedAt":"2024-07-12T06:51:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update whatsappChatToHTML.py\n\nFinally got around to reviewing it. It didn't work for me for iOS (reviewing Android next). iOS script would return a bunch of errors that \"timestamp not detected\". \r\n\r\nUpdates step 1:\r\n- **Timestamp Detection**: The script first extracts all timestamps and attempts to determine the correct date format by checking each format against all timestamps.\r\n- **Processing Messages**: Once the correct format is determined, the script processes each message using this format.\r\n\r\nThis produced an html with media etc but it still had two issues\r\n- text encoding wasn't handled correctly (for Arabic for e.g.);\r\n- all messages were left-aligned whereas messages sent from \"me\" should be right-aligned\r\n\r\nUpdates step 2:\r\n**Meta Tag for UTF-8 Encoding**: Added to ensure that the HTML file uses UTF-8 encoding.\r\n**File Opening with UTF-8 Encoding**: Ensured that files are opened and written with UTF-8 encoding to properly handle non-Latin characters like Arabic.\r\n**Sender Detection**: Messages from you are identified by the presence of \".:\", and assigned the sender Me.\r\n**Alignment Class**: The alignment class is determined by whether the message is from you (me) or someone else (other).\r\n\r\nScript then worked so I just added a couple of things to make it more robust:\r\n**Path Traversal Protection**: Added os.path.abspath() and os.path.isdir() to validate and sanitize the user input for the subfolder path.\r\n**File Existence Check**: Added a check to ensure the chat file exists before proceeding.\r\n\r\nNot a developer and fully am developing this on ChatGPT!","shortMessageHtmlLink":"Update whatsappChatToHTML.py"}},{"before":"04413cc604952c166a28f0ab90b12858638a8797","after":"d3b41bd0b984f251474b5adb2765f181c3398cc9","ref":"refs/heads/main","pushedAt":"2023-12-14T17:24:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"10fce6e0e44123483f9bd54d59cfed0b3555024a","after":"04413cc604952c166a28f0ab90b12858638a8797","ref":"refs/heads/main","pushedAt":"2023-12-11T16:12:00.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Create whatsappChatToHTML.py","shortMessageHtmlLink":"Create whatsappChatToHTML.py"}},{"before":"970e75c21a4134d020896a44fcfcae58f001d5c9","after":"10fce6e0e44123483f9bd54d59cfed0b3555024a","ref":"refs/heads/main","pushedAt":"2023-12-11T16:10:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":null,"after":"970e75c21a4134d020896a44fcfcae58f001d5c9","ref":"refs/heads/main","pushedAt":"2023-12-11T16:07:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jd2476","name":"jd2476","path":"/jd2476","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6854342?s=80&v=4"},"commit":{"message":"Initial commit","shortMessageHtmlLink":"Initial commit"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEfpLZ-gA","startCursor":null,"endCursor":null}},"title":"Activity · jd2476/WhatsApp-Chat-HTML-Converter"}