parse_ios.Rd
Creates a data frame from an exported 'WhatsApp' chat log containing one row per message
and a column for DateTime when the message was send, name of the sender and body of the message. Only works as an intermediary function
called from within parse_chat
parse_ios(
chatlog,
newline_indicator = "\n",
media_omitted = "<media omitted>",
media_indicator = "^<attached:\\s(.)*?\\.(.)*?>$",
sent_location = paste0("location: (?=https:\\/\\/maps\\.google\\.com\\/",
"\\?q=\\d\\d.\\d{6}\\,\\d\\.\\d{6})"),
live_location = "^live location shared$",
datetime_indicator = paste("(?!^)(?=\\[((\\d{2}\\.\\d{2}\\.\\d{2})|",
"(\\d{1,2}\\/\\d{1,2}\\/\\d{2})),\\s\\d{1,2}\\:\\d{2}((\\:\\d{2}\\",
"s(?i:(pm|am)))|(\\s(?i:(pm|am)))|(\\:\\d{2}\\])|(\\:\\d{2})|(\\s))\\])",
sep = ""),
newline_replace = " start_newline ",
media_replace = " media_omitted ",
foursquare_loc = "^.*: https://foursquare.com/v/.*$"
)
'WhatsApp' chat preprocessed by parse_chat
Character string defining character for newline indicators. Default is a Unicode newline.
Character string inserted by 'WhatsApp' instead of file names when not exporting media.
Character string for detecting media and file attachments.
Regex for detecting auto generated messages for locations shared via chat.
Regex for detecting auto generated messages for locations shared via chat.
Regex for detecting the DateTime indicator at the beginning of each message.
Replacement string for a newline character in parsed message. Default is " start_newline ".
Replacement string for omitted media files. Default is " media_omitted ".
Regex for detecting sent Locations as FourSquare Links.
A data frame containing the timestamp, name of the sender and message body
ParsedChat <- parse_ios("[29.01.18, 23:33:00] Alice: Hello?\\n [29.01.18, 23:45:01] Bob: Hello")