This commit is contained in:
Mateusz Pstrucha committed 2022-07-07 22:12:33 +02:00
1 parent 2154403dc1
commit 5abe57e56a
64 files changed
+2481 -203

No files matched your search

+4 -1
View File
@@ -1,2 +1,5 @@
node_modules/
build/
build/
dist/
ts/lorem.ts
yarn-error.log
+4
View File
@@ -0,0 +1,4 @@
{
"search.useGlobalIgnoreFiles": true,
}
+13
View File
@@ -0,0 +1,13 @@
# messenger-archive
An explorer for exported Facebook Messenger messages
# development
`yarn build` runs only webpack
`yarn start` runs electron on built bundle
`yarn dev` builds and runs project
`web` runs only React in a dev server
+25 -16
View File
@@ -1,26 +1,35 @@
import { BrowserWindow, dialog, ipcMain } from 'electron'
import { scan } from '../ts'
// import { scan } from '../ts'
import { Convos, scan } from '../ts'
import { readFileSync } from 'fs'
let listeners = (mainWindow: BrowserWindow) => {
let events = {
'get-paths': (_, message) => {
dialog
.showOpenDialog({
properties: ['openDirectory', 'multiSelections'],
})
.then(data => {
mainWindow.webContents.send('add-paths', data)
})
},
'scan': (_, { paths }: { paths: string[] }) => {
scan(paths, {}, (...progress) => {
mainWindow.webContents.send('update-progress', progress)
let events = {}
for (const chanel in events) ipcMain.on(chanel, events[chanel])
let handles = {
'get-paths': async e => {
return await dialog.showOpenDialog({
properties: ['openDirectory', 'multiSelections'],
})
},
'scan': async (e, { paths }) => {
return await scan(paths, {}, (...progress) => {
mainWindow.webContents.send('update-progress', progress)
}).then(convosIds => {
mainWindow.webContents.send('update-convos-ids', convosIds)
return convosIds
})
},
'get-convo': async (e, id) => {
if (id in Convos) return JSON.stringify(Convos[id])
else return null
},
}
for (const chanel in events) ipcMain.on(chanel, events[chanel])
for (const chanel in handles) ipcMain.handle(chanel, handles[chanel])
}
export default listeners
+1 -6
View File
@@ -1,12 +1,7 @@
import { app, BrowserWindow } from 'electron'
import * as path from 'path'
import * as url from 'url'
import path from 'path'
import listeners from './listeners'
import zip from 'node-zip'
console.log(zip)
let mainWindow: Electron.BrowserWindow | null
function createWindow() {
+6 -2
View File
@@ -1,6 +1,6 @@
import { contextBridge, ipcRenderer } from 'electron'
export const api = {
export const events = {
send: (channel: string, data?: any) => ipcRenderer.send(channel, data),
on: (channel: string, callback: (data: any) => void) => {
@@ -11,4 +11,8 @@ export const api = {
ipcRenderer.removeListener(channel, callback),
}
contextBridge.exposeInMainWorld('Main', api)
contextBridge.exposeInMainWorld('events', events)
export const invoke = ipcRenderer.invoke
contextBridge.exposeInMainWorld('invoke', invoke)
+10 -1
View File
@@ -4,7 +4,11 @@
"description": "",
"main": "build/electron.js",
"scripts": {
"start": "yarn webpack && yarn electron . --trace-warnings"
"build": "yarn webpack",
"start": "yarn electron . --trace-warnings --inspect",
"dev": "yarn build --mode development && yarn start",
"web": "yarn webpack-dev-server --config react.webpack.config.js",
"dist": "# TODO: add electron-builder and github actions config"
},
"author": "Mateusz Pstrucha",
"license": "ISC",
@@ -27,11 +31,16 @@
"dependencies": {
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"chart.js": "^3.8.0",
"css-loader": "^6.7.1",
"date-fns": "^2.28.0",
"file-loader": "^6.2.0",
"fuse.js": "^6.6.2",
"node-loader": "^2.0.0",
"node-zip": "^1.1.1",
"react": "^18.2.0",
"react-chartjs-2": "^4.2.0",
"react-date-range": "^1.4.0",
"react-dom": "^18.2.0",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
+50
View File
@@ -0,0 +1,50 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: 'development',
entry: __dirname + '/src/index.tsx',
target: 'web',
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
module: {
rules: [
{
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.(png|jpe?g|gif)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
},
},
],
},
output: {
path: __dirname + '/build',
filename: 'react.js',
},
plugins: [
new HtmlWebpackPlugin({
template: './public/index.html',
}),
],
}
+3 -2
View File
@@ -1,8 +1,9 @@
import { api } from '../../electron/preload'
import { events, invoke } from '../../electron/preload'
declare global {
// eslint-disable-next-line
interface Window {
Main: typeof api
events: typeof events
invoke: typeof invoke
}
}
+39
View File
@@ -0,0 +1,39 @@
import Convo from '../ts/Convo'
import PartialConvo from './PartialConvo'
export function chunkRange(
convo: Convo,
at: number,
[before, after]: [number, number]
) {
function getKeys() {
let keys: [number, string][] = []
for (const sender in convo.messages) {
let tooLate = 0
for (const time in convo.messages[sender]) {
keys.push([parseInt(time), sender])
if (parseInt(time) > at) tooLate++
if (tooLate >= after) break
}
}
return keys.sort(([a], [b]) => a - b)
}
let keys = getKeys()
let middle = keys.findIndex(([time]) => time == at)
keys = keys.slice(middle > before ? middle - before : 0, middle + after + 1)
return [keys.at(0)?.[0], keys.at(-1)?.[0] ?? at] as [number, number]
}
export default (
convo: Convo,
at: number,
[before, after]: [number, number]
) => {
return new PartialConvo(convo, chunkRange(convo, at, [before, after]))
}
+4
View File
@@ -0,0 +1,4 @@
import { createContext } from 'react'
import Convo from '../../ts/Convo'
export default createContext([] as { id: Convo['id']; title: Convo['title'] }[])
+7
View File
@@ -0,0 +1,7 @@
import { createContext } from 'react'
import Convo from '../../ts/Convo'
export default createContext<[[Convo | null, any], [[number, number], any]]>([
[null, undefined],
[[0, Infinity], undefined],
])
+65 -29
View File
@@ -1,47 +1,83 @@
import { createContext, useContext, useState } from 'react'
import { createContext, useContext, useEffect, useState } from 'react'
import Browse from './components/Browse/Browse'
import ConvoSelector from './components/ConvoSelector/ConvoSelector'
import Media from './components/Media/Media'
import Search from './components/Search/Search'
import Stats from './components/Stats/Stats'
import Intro from './components/Intro/Intro'
import Menu from './components/Menu/Menu'
import contextCurrentConvo from './Contexts/contextCurrentConvo'
import contextConvos from './Contexts/contextConvos'
import { dateToUnixExtended } from './PartialConvo'
import Convo from '../ts/Convo'
import './index.css'
const contextPane = createContext('')
function Pane({ children, id }: any) {
const pane = useContext(contextPane)
const pane = useContext(contextPane)
console.log(id, pane)
return (
<div className="pane" style={{ display: pane == id ? 'initial' : 'none' }}>
{children}
</div>
)
return (
<div
className="pane"
style={{ display: pane == id ? 'initial' : 'none' }}
>
{children}
</div>
)
}
function Main() {
const [pane, setPane] = useState('import')
export default function Main() {
const [pane, setPane] = useState('selector'),
[convos, setConvos] = useState([])
// const panes: { [id: string]: JSX.Element } = {
// import: <Intro />,
// scanner: <Scanner />,
// }
const [currentConvo, setCurrentConvo] = useState<Convo | null>(null)
return (
<div>
{/* {pane == 'intro' && }
let [range, setRange] = useState<[number, number]>([
dateToUnixExtended(new Date()) - 1.296e13,
dateToUnixExtended(new Date()),
])
{pane == 'scanning' && } */}
useEffect(() => {
// TODO: check if there are any already scanned convos
window.events.on('update-convos-ids', convos => setConvos(convos))
}, [])
<Menu setPane={id => setPane(id)} />
async function changeConvo(id: string) {
let data = await window.invoke('get-convo', id)
data = JSON.parse(data)
setCurrentConvo(data)
}
<div className="container">
<contextPane.Provider value={pane}>
<Pane id="import" children={<Intro />} />
</contextPane.Provider>
</div>
</div>
)
return (
<div>
<Menu setPane={id => setPane(id)} initial={pane} />
<div className="container">
<contextConvos.Provider value={convos}>
<contextCurrentConvo.Provider
value={[
[currentConvo, changeConvo],
[range, setRange],
]}
>
<contextPane.Provider value={pane}>
<Pane id="convo" children={<Browse />} />
<Pane id="media" children={<Media />} />
<Pane id="search" children={<Search />} />
<Pane id="stats" children={<Stats />} />
<Pane id="import" children={<Intro />} />
<Pane id="selector" children={<ConvoSelector />} />
{/* TODO: settings */}
</contextPane.Provider>
</contextCurrentConvo.Provider>
</contextConvos.Provider>
</div>
</div>
)
}
export default Main
+35
View File
@@ -0,0 +1,35 @@
import Convo from '../ts/Convo'
import Message from '../ts/Message'
export function dateToUnixExtended(date: Date) {
return date.getTime() * 1e3
}
export default class PartialConvo {
from: number
to: number
messages: Message[]
count: number
constructor(convo: Convo, [from, to]: [number, number]) {
this.from = from
this.to = to
this.messages = []
let temp = {}
for (const sender in convo.messages)
for (const time in convo.messages[sender]) {
let t = parseInt(time)
if (t >= from && t <= to) temp[time] = convo.messages[sender][time]
}
for (let time of Object.keys(temp).sort(
(a, b) => parseInt(a) - parseInt(b)
))
this.messages.push(temp[time])
this.count = this.messages.length
}
}
+182
View File
@@ -0,0 +1,182 @@
import { useContext, useEffect, useState } from 'react'
import Convo from '../../../ts/Convo'
import Message from '../../../ts/Message'
import { messageMedia } from '../../../ts/types/takeout'
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
import PartialConvo from '../../PartialConvo'
import './browse.sass'
function Media({ type, contents }: { type: string; contents: messageMedia[] }) {
// TODO: add image preview
return (
<div className={'media ' + type}>
{{
photos: contents.map(p => (
<img key={p.uri} src={'file://' + p.uri} />
)),
gifs: contents.map(g => (
<img key={g.uri} src={'file://' + g.uri} />
)),
videos: contents.map(v => (
<video controls>
<source src={v.uri} />
</video>
)),
audios: contents.map(a => (
<audio controls>
<source src={a.uri} />
</audio>
)),
}[type] ?? (
<span>
{type}: {JSON.stringify(contents)}
</span>
)}
</div>
)
}
function MessageBubble({
message: { sender, content, time, media, unsent, sticker, reactions },
convo,
type,
init,
close,
reactions: hasReactions,
highlight,
}: {
message: Message
convo: Convo
type: 'first' | 'middle' | 'last' | 'alone'
init: boolean
close: boolean
reactions: boolean
highlight: boolean
}) {
let date = new Date(time / 1e3)
return (
<div
className={[
'message',
sender == convo.owner && 'self',
type,
init && 'init',
close && 'close',
unsent && 'unsent',
media && 'media',
sticker && 'sticker',
hasReactions && 'reactions',
highlight && 'highlight',
]
.filter(c => c)
.join(' ')}
data-time={date.toLocaleString()}
data-media={media && Object.keys(media)}
title={date.toISOString()}
>
<div className="sender">{sender}</div>
<div className="content">
{content}
{media && (
<div className="media">
{Object.entries(media).map(([type, contents]) => (
<Media key={type} type={type} contents={contents} />
))}
</div>
)}
{sticker && <img src={'file://' + sticker} />}
{reactions && (
<div className="reactions">
{reactions.map(({ reaction, actor }) => (
<span key={actor} title={actor}>
{reaction}
</span>
))}
</div>
)}
</div>
</div>
)
}
export function Chat({
range,
goto,
}: {
range: [number, number]
goto?: number
}) {
const [[currentConvo]] = useContext(contextCurrentConvo)
const [partial, setPartial] = useState<PartialConvo>()
useEffect(() => {
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
}, [currentConvo, range])
useEffect(() => {
document
.querySelector<HTMLElement>('.browse .message.highlight')
?.scrollIntoView({
behavior: 'smooth',
})
})
return (
(partial && currentConvo && (
<div className="browse">
<div className="timestamp">
{/* TODO: add expand range buttons */}⇊{' '}
{new Date(range[0] / 1e3).toLocaleString()} ⇊
</div>
{partial.messages.slice(0, 500).map((m, i, all) => (
<MessageBubble
key={m.time}
message={m}
convo={currentConvo}
type={
m.sender == all[i - 1]?.sender
? m.sender == all[i + 1]?.sender
? 'middle'
: 'last'
: m.sender == all[i + 1]?.sender
? 'first'
: 'alone'
}
init={m.time - all[i - 1]?.time > 9e8 || i == 0}
close={all[i + 1]?.time - m.time > 9e8}
reactions={!!m.reactions}
highlight={m.time == goto}
/>
))}
{partial.count < 1 && (
<div className="timestamp">
No messages in the selected range
</div>
)}
<div className="timestamp">
⇈ {new Date(range[1] / 1e3).toLocaleString()} ⇈
</div>
</div>
)) || <></>
)
}
export default function Browse() {
const [[currentConvo], [range]] = useContext(contextCurrentConvo)
const [partial, setPartial] = useState<PartialConvo>()
useEffect(() => {
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
}, [currentConvo, range])
return (
<>
{(partial && currentConvo && <Chat range={range} />) || (
<div className="timestamp">Select a conversation</div>
)}
</>
)
}
+154
View File
@@ -0,0 +1,154 @@
.browse
padding: 1em 1em 0 0
overflow-x: hidden
width: 100%
height: 100%
.timestamp
width: 100%
text-align: center
margin-bottom: 1em
text-decoration: underline
&:last-child
text-decoration: overline
.message
position: relative
margin: 2px
.sender
font-size: .8em
position: absolute
top: -1.3em
left: 1em
color: rgb(138, 141, 145)
.content
background: rgb(228, 230, 235)
display: inline-block
padding: 0.4em 0.8em
border-radius: 1em
color: rgb(5, 5, 5)
white-space: pre-line
word-break: break-word
max-width: 75%
text-align: left
position: relative
.reactions
position: absolute
right: 0
background-color: white
padding: .1em 0
border-radius: 1em
box-shadow: 0 0 2px 1px #0002
color: black
z-index: 2
span
cursor: help
padding: .1em 0.3em
&.reactions
margin-bottom: 1.2em
&.highlight
outline: 2px solid var(--color-secondary)
scroll-margin: 40vh
&.last, &.alone
margin-bottom: 2em
&.init
margin-top: 3em
&::before
content: attr(data-time)
color: #666
width: 100%
display: block
position: absolute
top: -2em
text-align: center
&.unsent .content:after
font-weight: bold
font-style: italic
content: 'Message Unsent'
&.media .content:after
content: attr(data-media)
&.sticker
img
width: 30vh
height: 30vh
.content .media
.photos img, .videos video
max-width: 50vw
max-height: 50vh
&.audios
background: unset
padding-left: unset
.message.self
text-align: right
.sender
left: unset
right: 1em
.content
color: white
background: var(--color-primary)
.reactions
right: unset
left: 0
.message.self
&.first .content
border-bottom-right-radius: 3px
&.middle .content
border-top-right-radius: 3px
border-bottom-right-radius: 3px
&.last .content
border-top-right-radius: 3px
&.middle, &.last
.sender
display: none
&.init .content
border-top-right-radius: 1em !important
&.close .content
border-bottom-right-radius: 1em !important
.message:not(.self)
&.first .content
border-bottom-left-radius: 3px
&.middle .content
border-top-left-radius: 3px
border-bottom-left-radius: 3px
&.last .content
border-top-left-radius: 3px
&.middle, &.last
.sender
display: none
&.init .content
border-top-left-radius: 1em !important
&.close .content
border-bottom-left-radius: 1em !important
// .message.self + .message:not(.self)
// color: red
// .content
// border-bottom-left-radius: 1em
@@ -0,0 +1,124 @@
import { useContext, useEffect, useState } from 'react'
import { DateRangePicker } from 'react-date-range'
import { dateToUnixExtended } from '../../PartialConvo'
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
import contextConvos from '../../Contexts/contextConvos'
import './convoselector.sass'
import 'react-date-range/dist/styles.css' // picker main style file
import 'react-date-range/dist/theme/default.css' // picker theme css file
function ConvoSelector() {
const convos = useContext(contextConvos),
[[currentConvo, setCurrentConvo], [range, setRange]] =
useContext(contextCurrentConvo)
const [picker, setPicker] = useState({
startDate: new Date(new Date().getTime() - 3.024e9),
endDate: new Date(),
key: 'selection',
})
useEffect(() => {
setRange([
dateToUnixExtended(picker.startDate),
dateToUnixExtended(picker.endDate) + 8.64e10,
])
}, [picker])
return (
<div className="selector">
<div className="select">
<span>Select an inbox: </span>
<select
onChange={({ target: { value } }) => setCurrentConvo(value)}
defaultValue={currentConvo?.id}
>
{convos
.sort((a, b) => a.title.localeCompare(b.title))
.map(c => (
<option key={c.id} value={c.id}>
{c.title}
</option>
))}
</select>
</div>
{currentConvo && (
<div className="preview">
<h2>{currentConvo.title}</h2>
<div className="desc">
<img src={currentConvo.image ?? ''} alt="photo unavailable" />
<table>
<tbody>
<tr>
<td>Title</td>
<td>{currentConvo.title}</td>
</tr>
<tr>
<td>Type</td>
<td>{currentConvo.type}</td>
</tr>
<tr>
<td>Category</td>
<td>{'inbox'}</td>
{/* TODO: pass category to convo from inbox */}
</tr>
<tr>
<td>First Message</td>
<td>
{new Date(
currentConvo.firstMessage / 1e3
).toLocaleString()}
</td>
</tr>
<tr>
<td>Last Message</td>
<td>
{new Date(
currentConvo.lastMessage / 1e3
).toLocaleString()}
</td>
</tr>
</tbody>
</table>
</div>
<h2>Members</h2>
<div className="members">
<ul>
{currentConvo.members.map(m => (
<li
key={m.name}
data-left={!m.participates}
data-self={m.self}
>
{m.name}
</li>
))}
</ul>
</div>
</div>
)}
{currentConvo && (
<div className="picker">
<h1>Select a range for displayed messages:</h1>
<DateRangePicker
onChange={item => setPicker(item.selection)}
showSelectionPreview={true}
moveRangeOnFirstSelection={false}
minDate={new Date(currentConvo.firstMessage / 1e3)}
maxDate={new Date(currentConvo.lastMessage / 1e3)}
ranges={[picker]}
direction="vertical"
/>
</div>
)}
</div>
)
}
export default ConvoSelector
@@ -0,0 +1,35 @@
.selector
.select
text-align: center
font-size: 1.5em
font-family: Monsterrat
padding-bottom: .5em
border-bottom: 1px solid gray
display: flex
span
width: 14em
select
font-size: .75em
width: 100%
.preview
.desc
display: flex
img
margin: .5em
width: 6em
height: 6em
text-align: center
display: inline-block
border: 1px solid black
border-radius: 3px
.members ul
li[data-self=true]
font-weight: bold
li[data-left=true]
text-decoration: line-through
+54 -46
View File
@@ -4,40 +4,43 @@ import Progress from '../Progress/Progress'
import './intro.sass'
type status = {
[step: string]: [string, number]
}
type status = [string, number]
function beginScan(paths: string[]) {
window.Main.send('scan', { paths })
}
const totalMasterParts = 4
function Intro() {
const [paths, setPaths] = useState(['/home/mathias/Desktop/messages']),
[status, setStatus] = useState({
main: ['Preparing', 50],
sub: ['Checking directories', 10],
} as status),
[log, addLog] = useState([] as any[])
const [paths, setPaths] = useState<string[]>([]),
[mainProgress, setMainProgress] = useState<status>([
'Waiting for paths',
0,
]),
[subProgress, setSubProgress] = useState<status>(['', 0]),
[log, addLog] = useState<any[]>([])
function beginScan(paths: string[]) {
window.invoke('scan', { paths }).then(convosIds => {
console.log(convosIds)
})
}
useEffect(() => {
window.Main.on('add-paths', ({ canceled, filePaths }) => {
!canceled &&
setPaths(prev => [
...prev,
...filePaths.filter(p => !prev.includes(p)),
])
})
window.Main.on('update-progress', (data: any) => {
console.log(data)
// setStatus(prev => ({ ...prev, ...data }))
addLog(prev => [...prev, data])
window.events.on('update-progress', ([level, message, status, err]) => {
if (level == 'main') setMainProgress([message, status])
if (level == 'sub') setSubProgress([message, status])
addLog(prev => [...prev, [level, message, status, err]])
})
}, [])
return (
<div className="intro">
<div
className="intro"
style={{
cursor:
mainProgress[1] > 0 && mainProgress[1] < totalMasterParts
? 'wait'
: 'default',
}}
>
<span className="header">Select paths to scan</span>
<p>
Add folders with <code>filtered_threads</code>,{' '}
@@ -47,13 +50,29 @@ function Intro() {
<div className="controls">
<Button
label="Open"
action={() => window.Main.send('get-paths')}
action={() =>
window.invoke('get-paths').then(({ canceled, filePaths }) => {
!canceled &&
setPaths(prev => [
...prev,
...filePaths.filter(p => !prev.includes(p)),
])
})
}
icon="plus-squared"
/>
</div>
<div className="paths">
{paths.map(p => (
<div key={p}>{p}</div>
{paths.map(path => (
<div key={path}>
{path}
<i
className="icon-cancel"
onClick={() =>
setPaths(prev => prev.filter(p => p != path))
}
></i>
</div>
))}
</div>
@@ -65,25 +84,14 @@ function Intro() {
/>
)}
{status.main && (
{log.length > 0 && (
<div className="bars">
<Progress label={status.main[0]} status={status.main[1]} />
<Progress label={status.sub[0]} status={status.sub[1]} />
{/* <div className="logs">
{log.map((l, i) => (
<div key={i}>
{Object.keys(l).map((k, j) => {
if (k == 'err')
return (
<span key={j}>
{l[k]?.message ?? l[k]?.code ?? l[k]}
</span>
)
else return `${k} ${l[k][0]} ${l[k][1]}%`
})}
</div>
))}
</div> */}
<Progress
label={mainProgress[0]}
steps={[mainProgress[1], totalMasterParts]}
/>
<Progress label={subProgress[0]} status={subProgress[1]} />
{/* TODO: display the logs */}
</div>
)}
</div>
+1 -9
View File
@@ -1,20 +1,13 @@
.intro
// position: fixed
top: 1em
right: 1em
bottom: 1em
left: 1em
// background-color: var(--color-ternary)
color: var(--color-dark)
padding: 1em
/* text-align: center; */
display: flex
flex-direction: column
align-items: center
backdrop-filter: blur(5px)
z-index: 3
border: 1px solid #06f5
border-radius: 0.5em
.header
font-size: 2em
@@ -40,7 +33,6 @@
div
width: 100%
// padding: .5em
background-color: #fff1
i
@@ -52,7 +44,7 @@
.bars
margin: 1em 0
width: 100%
width: 60%
.logs
font-family: 'Roboto Mono'
+130
View File
@@ -0,0 +1,130 @@
import { useContext, useEffect, useState } from 'react'
import Message from '../../../ts/Message'
import { messageMedia } from '../../../ts/types/takeout'
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
import PartialConvo from '../../PartialConvo'
import './media.sass'
function Entry({
type,
content,
message,
goto,
}: {
type: string
content: messageMedia
message: Message
goto: (number) => void
}) {
const [open, setOpen] = useState(false)
return (
<div className="entry" data-open={open}>
<div className="header" onClick={() => setOpen(o => !o)}>
{
{
photos: <i className="icon-picture"></i>,
gifs: <i className="icon-picture"></i>,
audios: <i className="icon-mic"></i>,
videos: <i className="icon-video"></i>,
files: <i className="icon-attach"></i>,
}[type]
}
{message.sender} &mdash;&nbsp;
{new Date(message.time / 1e3).toLocaleDateString()}
</div>
{open && (
<div className="preview">
{
{
photos: (
<img src={content.uri} alt="unable to load image" />
),
gifs: <img src={content.uri} alt="unable to load gif" />,
audios: (
<audio controls>
<source src={content.uri} />
</audio>
),
videos: (
<video controls>
<source src={content.uri} />
</video>
),
files: <i className="icon-attach"></i>,
}[type]
}
<div className="info">
<div>
Time: {new Date(message.time / 1e3).toLocaleTimeString()}
</div>
{content.creation_timestamp && (
<div>
Created:{' '}
{new Date(
content.creation_timestamp * 1e3
).toLocaleString()}
</div>
)}
<div></div>
<div></div>
{message.reactions && (
<div className="reactions">
Reactions:
{message.reactions.map(({ reaction, actor }) => (
<span title={actor}>{reaction}</span>
))}
</div>
)}
<div>
<a href="#" onClick={goto}>
Go to conversation
</a>
</div>
</div>
</div>
)}
</div>
)
}
function Preview() {
return <span>lmao</span>
}
// TODO: add optional grid view
export default function Media() {
const [[currentConvo], [range, setRange]] = useContext(contextCurrentConvo)
const [partial, setPartial] = useState<PartialConvo>()
useEffect(() => {
if (currentConvo) setPartial(new PartialConvo(currentConvo, range))
}, [currentConvo, range])
return (
<div className="media">
{partial &&
partial.messages
.filter(({ media }) => media)
.map(message =>
Object.entries(message.media!).map(([type, entries]) =>
entries.map(e => (
<Entry
key={e.uri}
type={type}
content={e}
message={message}
goto={() => {}} /* TODO: add goto in conversation feature */
/>
))
)
)
.flat()}
</div>
)
}
+40
View File
@@ -0,0 +1,40 @@
.media
.entry
padding: .5em
border-bottom: 1px solid gray
&[data-open=true] .header
border-bottom: 1px dashed gray
padding-bottom: 0.5em
.header
cursor: pointer
user-select: none
i
margin-right: .5em
.preview
display: flex
.info
padding: .5em
.reactions span
cursor: help
margin-left: .25em
padding: 0 2px
border-radius: 3px
& > :first-child
min-width: 6em
min-height: 6em
max-height: 75vh
max-width: 50%
img
margin: 0.5em
text-align: center
display: inline-block
border: 1px solid black
border-radius: 3px
+9 -8
View File
@@ -2,8 +2,14 @@ import { useState } from 'react'
import './menu.sass'
import icon from '../../../assets/icon.png'
function Menu({ setPane }: { setPane: (id: string) => void }) {
const [active, setActive] = useState('convo')
function Menu({
setPane,
initial,
}: {
setPane: (id: string) => void
initial: string
}) {
const [active, setActive] = useState(initial)
const options = [
['convo', 'chat-empty', 'View conversation'],
@@ -12,6 +18,7 @@ function Menu({ setPane }: { setPane: (id: string) => void }) {
['stats', 'chart-bar', 'View statistics'],
],
bottomOptions = [
['selector', 'th-list', 'Select conversation'],
['import', 'download', 'Import messages'],
['settings', 'cog-alt', 'Settings'],
]
@@ -22,10 +29,6 @@ function Menu({ setPane }: { setPane: (id: string) => void }) {
}
return (
// view convo
// search
// view media
// stats
<div className="menu">
<img src={icon} alt="" />
<div className="lists">
@@ -50,8 +53,6 @@ function Menu({ setPane }: { setPane: (id: string) => void }) {
onClick={() => change(id)}
></i>
))}
{/* <i className="icon-download import"></i>
<i className="icon-cog-alt settings"></i> */}
</div>
</div>
</div>
+26 -9
View File
@@ -1,14 +1,31 @@
import './progress.sass'
function Progress({ label, status }: { label: string; status: number }) {
return (
<div className="progress">
<span className="label">
{label} [{status}%]
</span>
<div className="status" style={{ width: `${status}%` }}></div>
</div>
)
function Progress({
label,
status,
steps,
}: {
label: string
status?: number
steps?: [number, number]
}) {
return (
<div className="progress">
<span className="label">
{label} [
{typeof status != 'undefined'
? `${status}%`
: steps
? `${steps[0]}/${steps[1]}`
: `?`}
]
</span>
<div
className="status"
style={{ width: `${status ?? (steps![0] / steps![1]) * 100}%` }}
></div>
</div>
)
}
export default Progress
-19
View File
@@ -1,19 +0,0 @@
import Progress from '../Progress/Progress'
import './scanner.sass'
function Scanner() {
// prepare
// scan for inboxes
// parsing inboxes
// parsing parts
return (
<div>
<div className="header">Processing messages</div>
<Progress label="main" status={50} />
<Progress label="sub" status={25} />
</div>
)
}
export default Scanner
-3
View File
@@ -1,3 +0,0 @@
.header
font-size: 2em
font-family: 'Roboto'
+108
View File
@@ -0,0 +1,108 @@
import Fuse from 'fuse.js'
import { useContext, useEffect, useState } from 'react'
import Convo from '../../../ts/Convo'
import Message from '../../../ts/Message'
import { chunkRange } from '../../ChunkConvo'
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
import PartialConvo from '../../PartialConvo'
import { Chat } from '../Browse/Browse'
import './search.sass'
function runSearch(convo: Convo, query: string, options: {}) {
let fullPartial = new PartialConvo(convo, [0, Infinity])
const fuse = new Fuse(fullPartial.messages, {
keys: ['content'],
...options,
})
return fuse.search(query)
}
export default function Search() {
const [[currentConvo]] = useContext(contextCurrentConvo)
let [query, setQuery] = useState(''),
[accuracy, setAccuracy] = useState(0.6),
[caseSensitive, setCaseSensitive] = useState(false),
[range, setRange] = useState<[number, number]>()
const [[results, n], setResults] = useState<
[Fuse.FuseResult<Message>[], number]
>([[], -1])
function search() {
setResults([
runSearch(currentConvo!, query, {
threshold: accuracy,
caseSensitive,
}),
0,
])
}
function browse(up: boolean) {
if (up) {
if (n < results.length - 1) setResults(([r, n]) => [r, ++n])
} else {
if (n > 0) setResults(([r, n]) => [r, --n])
}
}
useEffect(() => {
currentConvo &&
n != -1 &&
setRange(chunkRange(currentConvo, results[n].item.time, [6, 8]))
}, [results, n])
// TODO: add regex mode,
// enter to search and next,
// more search options
return (
<div className="search">
<div className="criteria">
Search criteria
<div>
<input
type="search"
name="query"
placeholder="Search query"
onChange={e => setQuery(e.target.value)}
/>
Case sensisite:{' '}
<input
type="checkbox"
name="case"
onChange={e => setCaseSensitive(e.target.checked)}
/>
<input
type="range"
name="accuracy"
min={0}
max={1}
step="0.025"
onChange={e => setAccuracy(parseInt(e.target.value))}
/>
<input
type="button"
value="Search"
onClick={() => currentConvo && search()}
/>
<input
type="button"
value="Previous"
onClick={() => browse(false)}
/>
<input type="button" value="Next" onClick={() => browse(true)} />
</div>
{n > -1 && <div>Results: {results.length}</div>}
</div>
<div>
{currentConvo && range && results.length > 0 && (
<Chat goto={results[n].item.time} range={range} />
)}
</div>
</div>
)
}
+7
View File
@@ -0,0 +1,7 @@
.search
.criteria
position: sticky
top: 0
z-index: 3
padding: .5em
backdrop-filter: blur(3px)
+97
View File
@@ -0,0 +1,97 @@
import 'chart.js/auto'
import { useContext, useEffect, useState } from 'react'
import contextCurrentConvo from '../../Contexts/contextCurrentConvo'
import './stats.sass'
import messagesPerDay from './messages-per-day'
import messagesPerMember from './messages-per-member'
// TODO: add missing renderers
const renderers = {
messagesPerDay,
messagesPerMember,
}
export default function Stats() {
const [[currentConvo]] = useContext(contextCurrentConvo)
const [statName, setStatName] = useState(''),
[chartStyle, setChartStyle] = useState('')
const [stacked, setStacked] = useState(true),
[year, setYear] = useState(new Date().getFullYear()) // TODO: add an input for this
useEffect(() => setChartStyle(''), [statName])
return (
<div className="stats">
<div className="settings">
<select onChange={e => setStatName(e.target.value)}>
<option value="">select a stat</option>
{Object.entries(renderers).map(([id, { label }]) => (
<option key={id} value={id}>
{label}
</option>
))}
</select>
{statName && (
<select onChange={e => setChartStyle(e.target.value)}>
<option value="">select a chart</option>
{Object.entries(renderers[statName])
.filter(([, renderer]) => typeof renderer == 'function')
.map(([id]) => (
<option key={id} value={id}>
{id}
</option>
))}
</select>
)}
{chartStyle && (
<div>
Stacked:&nbsp;
<input
type="checkbox"
defaultChecked={stacked}
onChange={e => setStacked(e.target.checked)}
/>
</div>
)}
</div>
<div className="view">
{currentConvo ? (
statName ? (
chartStyle ? (
currentConvo.stats[statName] ? (
renderers[statName][chartStyle] ? (
//
renderers[statName][chartStyle]({
// FIXME: charts often overflow offscreen
convo: currentConvo,
data: currentConvo.stats[statName],
options: [stacked, year],
})
) : (
<span>Selected chart is unavailable</span>
)
) : (
<span>Selected stat is unavailable</span>
)
) : (
<span>Select a chart</span>
)
) : (
<span>Select a stat</span>
)
) : (
<span>Select a conversation</span>
)}
</div>
</div>
)
}
+36
View File
@@ -0,0 +1,36 @@
import { Bar } from 'react-chartjs-2'
import {
hueFromString,
monthsLabels,
statRendererProps,
} from '../../../ts/types/Stat'
function bar({ data, convo, options: [stacked, year] }: statRendererProps) {
return (
<>
<h1>Messages per day</h1>
<div className="chart">
<Bar
about="asdf"
data={{
labels: monthsLabels.flat(),
datasets: convo.members.map(({ name }) => ({
label: name,
stack: stacked ? 'stack' : name,
data: data[name][year].flat(),
backgroundColor: `hsl(${hueFromString(
name
)}deg, 50%, 50%)`,
})),
}}
/>
</div>
</>
)
}
export default {
label: 'Messages per day',
desc: 'Number of messages sent by each member during a day',
bar,
}
@@ -0,0 +1,34 @@
import { Doughnut } from 'react-chartjs-2'
import { hueFromString, statRendererProps } from '../../../ts/types/Stat'
export function donut({ data }: statRendererProps) {
return (
<>
<h1>Messages per member</h1>
<div className="chart">
<Doughnut
about="asdf"
data={{
labels: Object.keys(data),
datasets: [
{
label: 'Messages',
data: Object.values(data),
backgroundColor: Object.keys(data).map(
n => `hsl(${hueFromString(n)}deg, 50%, 50%)`
),
},
],
}}
/>
</div>
</>
)
}
export default {
label: 'Messages per member',
desc: 'Total number of messages sent by each member',
donut,
}
View File
Whitespace-only changes.
+24
View File
@@ -65,6 +65,30 @@
"css": "download",
"code": 59396,
"src": "fontawesome"
},
{
"uid": "f805bb95d40c7ef2bc51b3d50d4f2e5c",
"css": "th-list",
"code": 59397,
"src": "fontawesome"
},
{
"uid": "872d9516df93eb6b776cc4d94bd97dac",
"css": "video",
"code": 59398,
"src": "fontawesome"
},
{
"uid": "0d6ab6194c0eddda2b8c9cedf2ab248e",
"css": "attach",
"code": 59399,
"src": "fontawesome"
},
{
"uid": "19c50c52858a81de58f9db488aba77bc",
"css": "mic",
"code": 61744,
"src": "fontawesome"
}
]
}
+4
View File
@@ -4,8 +4,12 @@
.icon-cog-alt:before { content: '\e802'; } /* '' */
.icon-cancel:before { content: '\e803'; } /* '' */
.icon-download:before { content: '\e804'; } /* '' */
.icon-th-list:before { content: '\e805'; } /* '' */
.icon-video:before { content: '\e806'; } /* '' */
.icon-attach:before { content: '\e807'; } /* '' */
.icon-spin2:before { content: '\e831'; } /* '' */
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
.icon-mic:before { content: '\f130'; } /* '' */
.icon-minus-squared:before { content: '\f146'; } /* '' */
.icon-search:before { content: '\f50d'; } /* '' */
+10 -6
View File
@@ -1,15 +1,15 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?11448678');
src: url('../font/fontello.eot?11448678#iefix') format('embedded-opentype'),
url('../font/fontello.svg?11448678#fontello') format('svg');
src: url('../font/fontello.eot?9879669');
src: url('../font/fontello.eot?9879669#iefix') format('embedded-opentype'),
url('../font/fontello.svg?9879669#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'fontello';
src: url('data:application/octet-stream;base64,d09GRgABAAAAABWUAA8AAAAAIuQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAARAAAAGA+I1c8Y21hcAAAAdgAAACUAAACFg6hmkNjdnQgAAACbAAAAAsAAAAOAAAAAGZwZ20AAAJ4AAAG7QAADgxiLvl6Z2FzcAAACWgAAAAIAAAACAAAABBnbHlmAAAJcAAACQUAAAw0T186gmhlYWQAABJ4AAAAMwAAADYhRWFxaGhlYQAAEqwAAAAgAAAAJAfAA+tobXR4AAASzAAAACkAAAAsKW3/7WxvY2EAABL4AAAAGAAAABgRGhOQbWF4cAAAExAAAAAgAAAAIAFsD0huYW1lAAATMAAAAXQAAALNzZ0ZGnBvc3QAABSkAAAAdAAAAJj2mzZ6cHJlcAAAFRgAAAB6AAAAnH62O7Z4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJ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EUEP7jDxQBFslIDhYWDkgOFgEU5kcPFAEWDkcPFAEW5EcPFgEUEEcOFhZn/RIlNDQlAu4lNAE2AAEAAP+0AxADCAA2AD1AOgACBQYFAgaAAAYEBQYEfgABAAMHAQNpAALine truncated
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
@@ -17,7 +17,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?11448678#fontello') format('svg');
src: url('../font/fontello.svg?9879669#fontello') format('svg');
}
}
*/
@@ -62,8 +62,12 @@
.icon-cog-alt:before { content: '\e802'; } /* '' */
.icon-cancel:before { content: '\e803'; } /* '' */
.icon-download:before { content: '\e804'; } /* '' */
.icon-th-list:before { content: '\e805'; } /* '' */
.icon-video:before { content: '\e806'; } /* '' */
.icon-attach:before { content: '\e807'; } /* '' */
.icon-spin2:before { content: '\e831'; } /* '' */
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
.icon-mic:before { content: '\f130'; } /* '' */
.icon-minus-squared:before { content: '\f146'; } /* '' */
.icon-search:before { content: '\f50d'; } /* '' */
+4
View File
@@ -4,8 +4,12 @@
.icon-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.icon-th-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-spin2 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e6;&nbsp;'); }
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fe;&nbsp;'); }
.icon-mic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf130;&nbsp;'); }
.icon-minus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf146;&nbsp;'); }
.icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf50d;&nbsp;'); }
+4
View File
@@ -15,8 +15,12 @@
.icon-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.icon-th-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-spin2 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e6;&nbsp;'); }
.icon-plus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fe;&nbsp;'); }
.icon-mic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf130;&nbsp;'); }
.icon-minus-squared { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf146;&nbsp;'); }
.icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf50d;&nbsp;'); }
+11 -7
View File
@@ -1,11 +1,11 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?69098526');
src: url('../font/fontello.eot?69098526#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?69098526') format('woff2'),
url('../font/fontello.woff?69098526') format('woff'),
url('../font/fontello.ttf?69098526') format('truetype'),
url('../font/fontello.svg?69098526#fontello') format('svg');
src: url('../font/fontello.eot?36294298');
src: url('../font/fontello.eot?36294298#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?36294298') format('woff2'),
url('../font/fontello.woff?36294298') format('woff'),
url('../font/fontello.ttf?36294298') format('truetype'),
url('../font/fontello.svg?36294298#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?69098526#fontello') format('svg');
src: url('../font/fontello.svg?36294298#fontello') format('svg');
}
}
*/
@@ -59,8 +59,12 @@
.icon-cog-alt:before { content: '\e802'; } /* '' */
.icon-cancel:before { content: '\e803'; } /* '' */
.icon-download:before { content: '\e804'; } /* '' */
.icon-th-list:before { content: '\e805'; } /* '' */
.icon-video:before { content: '\e806'; } /* '' */
.icon-attach:before { content: '\e807'; } /* '' */
.icon-spin2:before { content: '\e831'; } /* '' */
.icon-chat-empty:before { content: '\f0e6'; } /* '' */
.icon-plus-squared:before { content: '\f0fe'; } /* '' */
.icon-mic:before { content: '\f130'; } /* '' */
.icon-minus-squared:before { content: '\f146'; } /* '' */
.icon-search:before { content: '\f50d'; } /* '' */
+19 -5
View File
@@ -146,11 +146,11 @@
}
@font-face {
font-family: 'fontello';
src: url('./font/fontello.eot?40853709');
src: url('./font/fontello.eot?40853709#iefix') format('embedded-opentype'),
url('./font/fontello.woff?40853709') format('woff'),
url('./font/fontello.ttf?40853709') format('truetype'),
url('./font/fontello.svg?40853709#fontello') format('svg');
src: url('./font/fontello.eot?98707866');
src: url('./font/fontello.eot?98707866#iefix') format('embedded-opentype'),
url('./font/fontello.woff?98707866') format('woff'),
url('./font/fontello.ttf?98707866') format('truetype'),
url('./font/fontello.svg?98707866#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -228,6 +228,17 @@
<div class="span3" title="Code: 0xe804">
<i class="demo-icon icon-download">&#xe804;</i> <span class="i-name">icon-download</span><span class="i-code">0xe804</span>
</div>
<div class="span3" title="Code: 0xe805">
<i class="demo-icon icon-th-list">&#xe805;</i> <span class="i-name">icon-th-list</span><span class="i-code">0xe805</span>
</div>
<div class="span3" title="Code: 0xe806">
<i class="demo-icon icon-video">&#xe806;</i> <span class="i-name">icon-video</span><span class="i-code">0xe806</span>
</div>
<div class="span3" title="Code: 0xe807">
<i class="demo-icon icon-attach">&#xe807;</i> <span class="i-name">icon-attach</span><span class="i-code">0xe807</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe831">
<i class="demo-icon icon-spin2 animate-spin">&#xe831;</i> <span class="i-name">icon-spin2</span><span class="i-code">0xe831</span>
</div>
@@ -237,6 +248,9 @@
<div class="span3" title="Code: 0xf0fe">
<i class="demo-icon icon-plus-squared">&#xf0fe;</i> <span class="i-name">icon-plus-squared</span><span class="i-code">0xf0fe</span>
</div>
<div class="span3" title="Code: 0xf130">
<i class="demo-icon icon-mic">&#xf130;</i> <span class="i-name">icon-mic</span><span class="i-code">0xf130</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf146">
Binary file not shown.
+8
View File
@@ -16,12 +16,20 @@
<glyph glyph-name="download" unicode="&#xe804;" d="M714 100q0 15-10 25t-25 11-25-11-11-25 11-25 25-11 25 11 10 25z m143 0q0 15-10 25t-26 11-25-11-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-37t-38-16h-821q-23 0-38 16t-16 37v179q0 22 16 38t38 16h259l75-76q33-32 76-32t76 32l76 76h259q22 0 38-16t16-38z m-182 318q10-23-8-39l-250-250q-10-11-25-11t-25 11l-250 250q-17 16-8 39 10 21 33 21h143v250q0 15 11 25t25 11h143q14 0 25-11t10-25v-250h143q24 0 33-21z" horiz-adv-x="928.6" />
<glyph glyph-name="th-list" unicode="&#xe805;" d="M286 154v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37v108q0 22 16 38t38 15h178q23 0 38-15t16-38z m0 285v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38v107q0 23 16 38t38 16h178q23 0 38-16t16-38z m714-285v-108q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v108q0 22 16 38t38 15h535q23 0 38-15t16-38z m-714 571v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v107q0 22 16 38t38 16h178q23 0 38-16t16-38z m714-286v-107q0-22-16-38t-38-15h-535q-23 0-38 15t-16 38v107q0 23 16 38t38 16h535q23 0 38-16t16-38z m0 286v-107q0-22-16-38t-38-16h-535q-23 0-38 16t-16 38v107q0 22 16 38t38 16h535q23 0 38-16t16-38z" horiz-adv-x="1000" />
<glyph glyph-name="video" unicode="&#xe806;" d="M214-43v72q0 14-10 25t-25 10h-72q-14 0-25-10t-11-25v-72q0-14 11-25t25-11h72q14 0 25 11t10 25z m0 214v72q0 14-10 25t-25 11h-72q-14 0-25-11t-11-25v-72q0-14 11-25t25-10h72q14 0 25 10t10 25z m0 215v71q0 15-10 25t-25 11h-72q-14 0-25-11t-11-25v-71q0-15 11-25t25-11h72q14 0 25 11t10 25z m572-429v286q0 14-11 25t-25 11h-429q-14 0-25-11t-10-25v-286q0-14 10-25t25-11h429q15 0 25 11t11 25z m-572 643v71q0 15-10 26t-25 10h-72q-14 0-25-10t-11-26v-71q0-14 11-25t25-11h72q14 0 25 11t10 25z m786-643v72q0 14-11 25t-25 10h-71q-15 0-25-10t-11-25v-72q0-14 11-25t25-11h71q15 0 25 11t11 25z m-214 429v285q0 15-11 26t-25 10h-429q-14 0-25-10t-10-26v-285q0-15 10-25t25-11h429q15 0 25 11t11 25z m214-215v72q0 14-11 25t-25 11h-71q-15 0-25-11t-11-25v-72q0-14 11-25t25-10h71q15 0 25 10t11 25z m0 215v71q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-71q0-15 11-25t25-11h71q15 0 25 11t11 25z m0 214v71q0 15-11 26t-25 10h-71q-15 0-25-10t-11-26v-71q0-14 11-25t25-11h71q15 0 25 11t11 25z m71 89v-750q0-37-26-63t-63-26h-893q-36 0-63 26t-26 63v750q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
<glyph glyph-name="attach" unicode="&#xe807;" d="M784 77q0-65-45-109t-109-44q-75 0-131 55l-434 434q-63 64-63 151 0 89 62 150t150 62q88 0 152-63l338-338q5-5 5-12 0-9-17-26t-26-17q-7 0-12 5l-339 339q-44 43-101 43-59 0-100-42t-40-101q0-58 42-101l433-433q35-36 81-36 36 0 59 24t24 59q0 46-35 81l-325 324q-14 14-33 14-16 0-27-11t-11-27q0-18 14-33l229-228q6-6 6-13 0-9-18-26t-26-17q-6 0-12 5l-229 229q-35 34-35 83 0 46 32 78t77 32q49 0 84-35l324-325q56-54 56-131z" horiz-adv-x="785.7" />
<glyph glyph-name="spin2" unicode="&#xe831;" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="chat-empty" unicode="&#xf0e6;" d="M393 636q-85 0-160-29t-118-79-44-107q0-45 30-88t83-73l54-32-19-46q19 11 34 21l25 18 30-6q43-8 85-8 85 0 160 29t118 79 43 106-43 107-118 79-160 29z m0 71q106 0 197-38t143-104 53-144-53-143-143-104-197-38q-48 0-98 9-70-49-155-72-21-5-48-9h-2q-6 0-12 5t-6 12q-1 1-1 3t1 4 1 3l1 3t2 3 2 3 3 3 2 2q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125q0 78 53 144t143 104 197 38z m459-652q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-12-4q-28 4-48 9-86 23-156 72-50-9-98-9-151 0-263 74 32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128q0-67-40-126t-108-98z" horiz-adv-x="1000" />
<glyph glyph-name="plus-squared" unicode="&#xf0fe;" d="M714 314v72q0 14-10 25t-25 10h-179v179q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-179h-178q-15 0-25-10t-11-25v-72q0-14 11-25t25-10h178v-179q0-14 11-25t25-11h71q15 0 25 11t11 25v179h179q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
<glyph glyph-name="mic" unicode="&#xf130;" d="M643 457v-71q0-124-82-215t-204-104v-74h143q15 0 25-11t11-25-11-25-25-11h-357q-15 0-25 11t-11 25 11 25 25 11h143v74q-121 13-204 104t-82 215v71q0 15 11 25t25 11 25-11 10-25v-71q0-103 74-177t176-73 177 73 73 177v71q0 15 11 25t25 11 25-11 11-25z m-143 214v-285q0-74-52-126t-127-53-126 53-52 126v285q0 74 52 127t126 52 127-52 52-127z" horiz-adv-x="642.9" />
<glyph glyph-name="minus-squared" unicode="&#xf146;" d="M714 314v72q0 14-10 25t-25 10h-500q-15 0-25-10t-11-25v-72q0-14 11-25t25-10h500q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
<glyph glyph-name="search" unicode="&#xf50d;" d="M11 375q-23 87 0 173t87 150q48 49 110 74t128 25q65 0 127-25t110-74q52-52 77-119t21-137-36-132q28-8 49-29l174-173q35-35 35-85t-35-85q-35-35-85-35t-85 35l-173 174q-22 20-30 49-70-35-149-35-66 0-128 25t-110 73q-64 64-87 151z m101 86q0-93 65-158 66-65 159-65 92 0 157 65t66 158-66 158q-66 66-157 66-92 0-159-66-65-65-65-158z" horiz-adv-x="892.6" />

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
+44 -30
View File
@@ -2,55 +2,69 @@
@import url('fontello/css/fontello.css');
@font-face {
font-family: 'Lato';
src: url('fonts/Lato-Bold.ttf');
src: url('fonts/Lato-Italic.ttf');
src: url('fonts/Lato-Light.ttf');
src: url('fonts/Lato-Regular.ttf');
font-family: 'Lato';
src: url('fonts/Lato-Bold.ttf');
src: url('fonts/Lato-Italic.ttf');
src: url('fonts/Lato-Light.ttf');
src: url('fonts/Lato-Regular.ttf');
}
@font-face {
font-family: 'Monsterrat';
src: url('fonts/Montserrat-VariableFont_wght.ttf');
font-family: 'Monsterrat';
src: url('fonts/Montserrat-VariableFont_wght.ttf');
}
@font-face {
font-family: 'Roboto';
src: url('fonts/Roboto-Bold.ttf');
src: url('fonts/Roboto-Light.ttf');
src: url('fonts/Roboto-Medium.ttf');
src: url('fonts/Roboto-Thin.ttf');
font-family: 'Roboto';
src: url('fonts/Roboto-Bold.ttf');
src: url('fonts/Roboto-Light.ttf');
src: url('fonts/Roboto-Medium.ttf');
src: url('fonts/Roboto-Thin.ttf');
}
@font-face {
font-family: 'Roboto Mono';
src: url('fonts/RobotoMono-VariableFont_wght.ttf');
font-family: 'Roboto Mono';
src: url('fonts/RobotoMono-VariableFont_wght.ttf');
}
:root {
--color-primary: #006aff;
--color-secondary: #16bac5;
--color-ternary: #2b2d42;
--color-light: #efe9f4;
--color-dark: #171d1c;
--color-primary: #006aff;
--color-secondary: #16bac5;
--color-ternary: #2b2d42;
--color-light: #efe9f4;
--color-dark: #171d1c;
}
* {
box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Lato';
font-family: 'Lato';
background-blend-mode: luminosity;
background: url('./img/terrazzo.webp'),
linear-gradient(45deg, #a334fa, #0695ff);
}
.container {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 4.2rem;
background-blend-mode: luminosity;
background: url('./img/terrazzo.webp'),
linear-gradient(45deg, #a334fa, #0695ff);
padding: 0.5em;
position: fixed;
overflow-y: auto;
top: 0;
bottom: 0;
right: 0;
left: 4.2rem;
padding: 1em;
margin: 0.5em;
border: 1px solid #06f5;
border-radius: 0.5em;
backdrop-filter: blur(5px);
}
h1,
h2,
h3 {
font-family: Roboto;
border-bottom: 1px solid gray;
}
+17
View File
@@ -1,4 +1,21 @@
import { createRoot } from 'react-dom/client'
import lorem from '../ts/lorem'
import Main from './Main'
if (!window.events)
window.events = {
send: () => {},
on: () => {},
// @ts-ignore
off: () => {},
}
if (!window.invoke) {
window.invoke = async (chanel, data) => {
if (chanel == 'get-convo') return JSON.stringify(lorem?.[data]) ?? null
if (chanel == 'scan')
return Object.keys(lorem).map(id => ({ id, title: lorem[id].title }))
}
}
createRoot(document.getElementById('root')!).render(<Main />)
+189
View File
@@ -0,0 +1,189 @@
import utf8 from 'utf8'
import { join, normalize } from 'path'
import Inbox from './Inbox'
import Member from './Member'
import Message from './Message'
import messagesPerMember from './stats/messagesPerMember'
import wordsPerMember from './stats/wordsPerMember'
import messagesPerDay from './stats/messagesPerDay'
import messagesPerWeekday from './stats/messagesPerWeekday'
import mediaPerMember from './stats/mediaPerMember'
import messagesPerHour from './stats/messagesPerHour'
import mostUsedEmoji from './stats/mostUsedEmoji'
import mostUsedReactions from './stats/mostUsedReactions'
import mostUsedWords from './stats/mostUsedWords'
const statParsers = [
mediaPerMember,
messagesPerDay,
messagesPerHour,
messagesPerMember,
messagesPerWeekday,
mostUsedEmoji,
// FIXME: some inbox throws an error at ".used"
// mostUsedReactions,
mostUsedWords,
wordsPerMember,
]
export default class Convo {
id: string
owner: string
type: string
members: Member[]
firstMessage: number
lastMessage: number
getMember: (string) => Member | undefined
getOwner: () => Member | undefined
title: string
image?: string
left?: boolean
messages: {
[sender: string]: {
[timestamp: number]: Message
}
}
stats: {
[stat: string]: any
}
constructor(inboxes: Inbox[], owner: string) {
let prim = inboxes[0]
this.id = prim.id
this.owner = owner
this.type = prim.meta?.type!
this.getMember = (name: string) => this.members.find(m => m.name == name)
this.getOwner = () => this.getMember(owner)
!prim.meta!.participates && (this.left = true)
this.title = utf8.decode(prim.meta!.title)
prim.meta!.image &&
// make the path absolute
(this.image = normalize(
join(
prim.path,
'../../',
prim.meta!.image.uri.split('/').slice(1).join('/')
)
))
this.members = []
this.messages = {}
this.stats = {}
let seenMembers: string[] = [],
members: Member[] = [],
messages: typeof this.messages = {},
firstLastMessage: [number, number] = [Infinity, 0]
for (const inbox of inboxes) {
for (const message of inbox.messages) {
let m = new Message(message, inbox.path)
// find begining and end of messages
// FIXME: this could possibly have less impact on execution time,
// if its done after sorting the keys
if (m.time < firstLastMessage[0]) firstLastMessage[0] = m.time
if (m.time > firstLastMessage[1]) firstLastMessage[1] = m.time
// add new member
if (!seenMembers.includes(m.sender)) {
seenMembers.push(m.sender)
messages[m.sender] = {}
members.push(new Member(m.sender, true, m.time))
}
if (m.type?.endsWith('ubscribe'))
for (let { name: rawName } of message.users!) {
let participates = m.type == 'Subscribe',
name = utf8.decode(rawName)
if (!seenMembers.includes(name)) {
seenMembers.push(name)
messages[name] = {}
members.push(new Member(name, participates, m.time))
} else {
members
.find(member => member.name == name)
?.seen(participates, m.time)
}
}
messages[m.sender][m.time] = m
}
}
// sort keys in messages
for (let sender in messages) {
this.messages[sender] = Object.fromEntries(
Object.entries(messages[sender]).sort(
([a], [b]) => parseInt(a) - parseInt(b)
)
)
}
for (let member of members) {
// update the owner
if (member.name == owner) member.self = true
// update participation, based on the last (oldest) inbox.participates
// participates = false, points out that the member has sent a message before,
// but is no longer added to the conversation
if (!prim.meta?.participants.find(p => utf8.decode(p) == member.name))
member.participates = false
}
this.members = members
this.firstMessage = firstLastMessage[0]
this.lastMessage = firstLastMessage[1]
}
async runStats() {
let prev: { [id: string]: {} } = {}
// prepare results
statParsers.forEach(({ id, begin }) => (prev[id] = begin(this)))
// for every message run every stat
for (const sender in this.messages) {
for (const timestamp in this.messages[sender]) {
const message = this.messages[sender][timestamp]
for (let { id, every } of statParsers) {
prev[id] = await every(
message,
this.getMember(sender)!,
this,
prev[id],
prev
)
}
}
}
// cleanup the results
statParsers.forEach(
({ id, end }) => (prev[id] = end(this, prev[id], prev))
)
for (let id in prev) this.addStat(id, prev[id])
return
}
private addStat(id, data) {
this.stats[id] = data
}
}
+106
View File
@@ -0,0 +1,106 @@
import fs from 'fs'
import { join } from 'path'
import { message, messagesPart, messageWithMedia } from './types/takeout'
const inboxIdRegex = /_[^\/]*?$/,
inboxCatRegex = /\/([^\/])+\/[^\/]+$/,
messagePartRegex = /message_\d+\.json/
const scanDirs = [
'archived_threads',
'filtered_threads',
'inbox',
'message_requests',
]
export var findInboxes = (path: string): Promise<Inbox[]> =>
new Promise((resolve, reject) => {
if (!fs.existsSync(path)) return reject("Directory doesn't exist")
const availableDirs = fs
.readdirSync(path)
.filter(d => scanDirs.includes(d))
const inboxes: Inbox[] = []
for (let dir of availableDirs) {
for (let inbox of fs.readdirSync(join(path, dir))) {
inboxes.push(new Inbox(join(path, dir, inbox)))
}
}
resolve(inboxes)
})
export default class Inbox {
path: string
id: string
category: string
parts: string[]
messages: (message & messageWithMedia)[]
meta!: {
title: string
type: string
participants: string[]
participates: boolean
image?: { uri: string; created: number }
date: number
}
constructor(path: string) {
this.path = path
this.id = inboxIdRegex.exec(path)![0].slice(-10)
this.category = inboxCatRegex.exec(path)![0]
this.parts = []
this.messages = []
this.findParts()
}
private async findParts() {
if (this.parts.length != 0) return this.parts
const availableParts = fs
.readdirSync(this.path)
.filter(f => f.match(messagePartRegex))
this.parts.push(
...availableParts
.filter(p => !this.parts.includes(p))
.map(p => join(this.path, p))
)
return this.parts
}
async loadParts() {
if (this.messages.length != 0) return this.messages
let metas: typeof this.meta[] = []
for (let partPath of this.parts) {
let part: messagesPart = JSON.parse(
fs.readFileSync(partPath).toString()
)
metas.push({
title: part.title,
type: part.thread_type,
participants: part.participants.map(p => p.name),
participates: part.is_still_participant,
date: part.messages.at(-1)?.timestamp_ms ?? 0,
image: part.image && {
uri: part.image.uri,
created: part.image.creation_timestamp,
},
})
this.messages.push(...part.messages)
}
this.meta = metas.sort(({ date: a }, { date: b }) => a - b)[0]
return this.messages
}
}
+19
View File
@@ -0,0 +1,19 @@
export default class Member {
name: string
participates: boolean
lastSeen: number
self: boolean
constructor(name: string, participates = false, seen = 0) {
this.name = name
this.participates = participates
this.lastSeen = seen
this.self = false
}
seen(participates: boolean, time: number) {
if (time >= this.lastSeen) {
this.participates = participates
}
}
}
+115
View File
@@ -0,0 +1,115 @@
import utf8 from 'utf8'
import { join } from 'path'
import { message, messageMedia, messageWithMedia } from './types/takeout'
export default class Message {
sender: string
time: number
content: string
type?: string
unsent?: boolean
reactions?: {
reaction: string
actor: string
}[]
media?: {
[type: string]: messageMedia[]
}
share?: {
link?: string
share_text?: string
}
sticker?: string
call?: {
duration?: number
missed?: boolean
}
takenDown?: boolean
constructor(raw: message & messageWithMedia, sourceInboxPath: string) {
let rootInboxesPath =
'/' + sourceInboxPath.split('/').slice(0, -2).join('/')
this.sender = utf8.decode(raw.sender_name)
this.time = raw.timestamp_ms
this.content = utf8.decode(raw.content ?? '')
raw.is_unsent && (this.unsent = raw.is_unsent)
raw.type != 'Generic' && (this.type = raw.type)
raw.share && (this.share = raw.share)
raw.sticker &&
(this.sticker = join(
rootInboxesPath,
raw.sticker.uri.split('/').slice(1).join('/')
))
raw.is_taken_down && (this.takenDown = raw.is_taken_down)
raw.reactions &&
(this.reactions = raw.reactions.map(r => ({
actor: utf8.decode(r.actor),
reaction: utf8.decode(r.reaction),
})))
// NOTICE: ignoring raw.ip
var parseMediaPath = ({ uri, creation_timestamp }) => ({
uri: join(sourceInboxPath, uri.split('/').slice(3).join('/')),
creation_timestamp,
})
// media
if (
raw.photos ||
raw.audio_files ||
raw.files ||
raw.gifs ||
raw.videos
) {
this.media = {}
raw.photos && (this.media.photos = raw.photos.map(parseMediaPath))
raw.audio_files &&
(this.media.audios = raw.audio_files.map(parseMediaPath))
raw.files && (this.media.files = raw.files.map(parseMediaPath))
raw.gifs && (this.media.gifs = raw.gifs.map(parseMediaPath))
raw.videos && (this.media.videos = raw.videos.map(parseMediaPath))
}
if (raw.call_duration || raw.missed || raw.type == 'Call') {
this.call = {
duration: raw.call_duration,
missed: raw.missed,
}
}
this.extendTime()
}
extendTime() {
let stringTime = this.time.toString()
if (stringTime.length != 13) return
let total = 0
// sum all character codes
for (let c = 0; c < this.content.length; c++)
total += this.content.charCodeAt(c)
// limit to 3 digits
total %= 1000
// append to end of current timestamp
stringTime += total.toString().padStart(3, '0')
this.time = parseInt(stringTime)
}
}
+112 -2
View File
@@ -1,3 +1,113 @@
export function scan(paths: string[], options: any, contact: updateProgress) {
console.log(paths)
import utf8 from 'utf8'
import Convo from './Convo'
import Inbox, { findInboxes } from './Inbox'
function counter(n: number) {
return [n, 1]
}
function nextCounter(n: number, c: number) {
return Math.floor((c / n) * 100)
}
export const Convos = {}
export async function scan(
paths: string[],
options: any, // TODO: pass options from settings
contact: updateProgress
) {
contact('main', 'Getting files', 1)
contact('sub', 'Searching for inboxes', 0)
// give some time for the progress bar to render
await new Promise(r => setTimeout(r, 500))
// get all person_1234567890/ directories from selected paths,
// and initialize an Inbox for each
const inboxes = (
await Promise.all(paths.map(path => findInboxes(path)))
).flat()
let [partsN, partsC] = counter(inboxes.length)
for (let inbox of inboxes)
await inbox
.loadParts() // load all message_*.json files per Inbox
.then(() =>
contact('sub', 'Loading inboxes', nextCounter(partsN, partsC++))
)
// estimate the owner between all inboxes,
// by getting the most common participant
let owner = utf8.decode(
Object.entries(
inboxes
.filter(i => i.meta?.type == 'Regular') // ignore groups
.reduce((sum, { meta }) => {
// count participant occurrences
meta!.participants.forEach(p =>
sum[p] ? sum[p]++ : (sum[p] = 1)
)
return sum
}, {} as { [name: string]: number })
).reduce(
// reduce to the most common participant
([name, count], next) => (next[1] > count ? next : [name, count]),
['', 0]
)[0]
)
contact('main', 'Assembling conversations', 2)
contact('sub', 'Merging inboxes', 0)
const groupedInboxes: {
[id: string]: Inbox[]
} = {}
// group into arrays based on Inbox.id,
// this ensures no duplicates if,there are multiple parts with the same inbox
for (let inbox of inboxes) {
if (!groupedInboxes[inbox.id]) groupedInboxes[inbox.id] = []
groupedInboxes[inbox.id].push(inbox)
}
let [groupedN, groupedC] = counter(Object.keys(groupedInboxes).length)
const convos: Convo[] = []
// assign inbox(es) into convos
for (let id in groupedInboxes) {
contact('sub', 'Assigning messages', nextCounter(groupedN, groupedC++))
console.time(`join-${id}`) // internal assigning in Convo takes some time
convos.push(
new Convo( // sort inboxes chronologically
groupedInboxes[id].sort((a, b) => b.meta.date - a.meta.date),
owner
)
)
console.timeEnd(`join-${id}`)
}
contact('main', 'Generating statistics', 3)
let [convoN, convoC] = counter(convos.length)
for (let convo of convos) {
contact('sub', `Analyzing ${convo.title}`, nextCounter(convoN, convoC++))
console.time(`stats-${convo.id}`)
await convo.runStats()
console.timeEnd(`stats-${convo.id}`)
}
contact('main', 'Finished', 4)
contact('sub', 'All tasks ok', 100)
console.info('scan: ', Convos)
convos.forEach(c => (Convos[c.id] = c)) // rearrange to global exported object
return Object.keys(Convos).map(id => ({ id, title: Convos[id].title })) // pass only ids to renderer
}
+36
View File
@@ -0,0 +1,36 @@
import { prepStatResults, statParser } from '../types/Stat'
export default {
id: 'photosPerMember',
begin: ({ members }) =>
prepStatResults(members, () => ({
photos: 0,
videos: 0,
audios: 0,
files: 0,
gifs: 0,
stickers: 0,
})),
every: (message, member, convo, prev) => {
if ('sticker' in message) prev[member.name].stickers += 1
// FIXME: this probably can be done in 3 lines but i can't be bothered right now
if (message.media) {
if ('photos' in message.media)
prev[member.name].photos += message.media.photos.length
if ('videos' in message.media)
prev[member.name].videos += message.media.videos.length
if ('audios' in message.media)
prev[member.name].audios += message.media.audios.length
if ('files' in message.media)
prev[member.name].files += message.media.files.length
if ('gifs' in message.media)
prev[member.name].gifs += message.media.gifs.length
}
return prev
},
end: (convo, prev) => prev,
} as statParser
+33
View File
@@ -0,0 +1,33 @@
import { monthsEmpty, prepStatResults, statParser } from '../types/Stat'
export default {
id: 'messagesPerDay',
begin: ({ firstMessage, lastMessage, members }) => {
let firstYear = new Date(firstMessage / 1e3).getFullYear(),
lastYear = new Date(lastMessage / 1e3).getFullYear()
return prepStatResults(members, () => {
let prep: {
[year: string]: number[][]
} = {}
for (let i = firstYear; i <= lastYear; i++) {
prep[i] = monthsEmpty()
}
return prep
})
},
every: (message, member, convo, prev) => {
let date = new Date(message.time / 1e3),
y = date.getFullYear(),
m = date.getMonth(),
d = date.getDate()
prev[member.name][y][m][d - 1] += 1
return prev
},
end: (convo, prev) => prev,
} as statParser
+14
View File
@@ -0,0 +1,14 @@
import { prepStatResults, statParser } from '../types/Stat'
export default {
id: 'messagesPerHour',
begin: ({ members }) => prepStatResults(members, () => Array(24).fill(0)),
every: (message, member, convo, prev, other) => {
prev[member.name][new Date(message.time / 1e3).getHours()] += 1
return prev
},
end: (convo, prev, other) => prev,
} as statParser
+14
View File
@@ -0,0 +1,14 @@
import { prepStatResults, statParser } from '../types/Stat'
export default {
id: 'messagesPerMember',
begin: ({ members }) => prepStatResults(members, () => 0),
every: (message, member, convo, prev) => {
prev[member.name] += 1
return prev
},
end: (convo, prev) => prev,
} as statParser
+15
View File
@@ -0,0 +1,15 @@
import { prepStatResults, statParser } from '../types/Stat'
export default {
id: 'messagesPerWeekday',
begin: ({ members }) =>
prepStatResults(members, () => [0, 0, 0, 0, 0, 0, 0]),
every: (message, member, convo, prev) => {
prev[member.name][new Date(message.time / 1e3).getDay()] += 1
return prev
},
end: (convo, prev) => prev,
} as statParser
+32
View File
@@ -0,0 +1,32 @@
import {
prepStatResults,
sortObjectbyValueNumber,
statParser,
} from '../types/Stat'
const emojiPattern =
/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g
export default {
id: 'mostUsedEmoji',
begin: ({ members }) => prepStatResults(members, () => ({})),
every: (message, member, convo, prev) => {
if (message.content.length > 0) {
let emojis = message.content.match(emojiPattern)
if (emojis) {
emojis.forEach(
e => (prev[member.name][e] = (prev[member.name][e] + 1) | 1)
)
}
}
return prev
},
end: (convo, prev) => {
for (let name in prev) prev[name] = sortObjectbyValueNumber(prev[name])
return prev
},
} as statParser
+34
View File
@@ -0,0 +1,34 @@
import {
prepStatResults,
sortObjectbyValueNumber,
statParser,
} from '../types/Stat'
export default {
id: 'mostUsedReactions',
begin: ({ members }) =>
prepStatResults(members, () => ({ got: {}, used: {} })),
every: (message, member, convo, prev) => {
if (message.reactions) {
for (let { reaction, actor } of message.reactions) {
const got = prev[member.name].got,
used = prev[actor].used
got[reaction] = got[reaction] + 1 || 1
used[reaction] = used[reaction] + 1 || 1
}
}
return prev
},
end: (convo, prev) => {
for (let { name } of convo.members) {
prev[name].got = sortObjectbyValueNumber(prev[name].got)
prev[name].used = sortObjectbyValueNumber(prev[name].used)
}
return prev
},
} as statParser
+26
View File
@@ -0,0 +1,26 @@
import {
prepStatResults,
sortObjectbyValueNumber,
statParser,
} from '../types/Stat'
export default {
id: 'mostUsedWords',
begin: ({ members }) => prepStatResults(members, () => ({})),
every: (message, member, convo, prev) => {
if (message.content.length > 0)
message.content.split(' ').forEach(word => {
if (prev[member.name][word]) prev[member.name][word] += 1
else prev[member.name][word] = 1
})
return prev
},
end: (convo, prev) => {
for (let name in prev) prev[name] = sortObjectbyValueNumber(prev[name])
return prev
},
} as statParser
+15
View File
@@ -0,0 +1,15 @@
import { prepStatResults, statParser } from '../types/Stat'
export default {
id: 'wordsPerMember',
begin: ({ members }) => prepStatResults(members, () => 0),
every: (message, member, convo, prev) => {
if (message.content.length > 0)
prev[member.name] += message.content.split(' ').length
return prev
},
end: (convo, prev) => prev,
} as statParser
+81
View File
@@ -0,0 +1,81 @@
import Convo from '../Convo'
import Member from '../Member'
import Message from '../Message'
export type statParser = {
id: string
begin: (convo: Convo) => any
every: (
message: Message,
member: Member,
convo: Convo,
previous: any,
others: any
) => any
end: (convo: Convo, previous: any, others: any) => any
}
// TODO: add a function for groups with more uniform hue spread
export function hueFromString(s: string) {
// TODO: offset character codes closer to 0
return Array(...s).reduce((s, c) => s + c.charCodeAt(0), 0) % 360
}
export type statRendererProps = {
data: statParser
convo: Convo
options: [boolean, number]
}
export function prepStatResults(members: Member[], initial: () => any) {
let out: {
[memberName: string]: ReturnType<typeof initial>
} = {}
for (let { name } of members) {
out[name] = initial()
}
return out
}
export function nToMonthName(n: number) {
return [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
][n]
}
export const monthsEmpty = (): 0[][] => [
new Array(31).fill(0),
new Array(29).fill(0), // FIXME: this will cause problems
new Array(31).fill(0),
new Array(30).fill(0),
new Array(31).fill(0),
new Array(30).fill(0),
new Array(31).fill(0),
new Array(31).fill(0),
new Array(30).fill(0),
new Array(31).fill(0),
new Array(30).fill(0),
new Array(31).fill(0),
]
export const monthsLabels = monthsEmpty().map((days, m) =>
days.map((_, d) => `${nToMonthName(m)} ${d + 1}`)
)
// TODO: add option/function for asc/desc
export const sortObjectbyValueNumber = (o: { [key: string]: number }) =>
Object.fromEntries(Object.entries(o).sort(([, a], [, b]) => b - a))
+129
View File
@@ -0,0 +1,129 @@
export type timestampSeconds = number
export type timestampMs = number
export type unescapedString = string
export type messagesPart = {
title: unescapedString
thread_path: string
thread_type: string
participants: { name: unescapedString }[]
magic_words: []
messages: (message & messageWithMedia)[]
image?: {
uri: string
creation_timestamp: timestampSeconds
}
is_still_participant: boolean
joinable_mode: {
mode: number
link: string
}
}
export type message = {
sender_name: unescapedString
timestamp_ms: timestampMs
content?: unescapedString
type: string // 'Generic' | 'Call' | 'Share' | 'Subscribe' | 'Unsubscribe'
is_unsent: boolean
is_taken_down: boolean
bumped_message_metadata: {
bumped_message: unescapedString
is_bumped: boolean
}
call_duration?: number
missed?: boolean
ip?: string
reactions?: messageReaction[]
users?: { name: unescapedString }[]
share?: {
link?: string
share_text?: unescapedString
}
sticker?: {
uri: string
}
}
export type messageWithMedia = {
photos?: messageMedia[]
audio_files?: messageMedia[]
files?: messageMedia[]
gifs?: (messageMedia & { creation_timestamp: never })[]
videos?: (messageMedia & { thumbnail: { uri: string } })[]
[mediaType: string]: messageMedia[] | undefined
}
export type messageMedia = {
uri: string
creation_timestamp: number
}
export type messageReaction = {
reaction: unescapedString
actor: unescapedString
}
// all keys present in facebook takeouts
// "title":
// "thread_path":
// "thread_type":
// "participants":
// "name":
// "magic_words":
// "messages":
// "image":
// "is_still_participant":
// "joinable_mode":
// "link":
// "mode":
// "uri":
// "creation_timestamp":
// "sender_name":
// "timestamp_ms":
// "content":
// "type":
// "is_unsent":
// "is_taken_down":
// "bumped_message_metadata":
// "bumped_message":
// "is_bumped":
// "photos":
// "videos":
// "audio_files":
// "gifs":
// "files":
// "uri":
// "creation_timestamp":
// "thumbnail":
// "uri":
// "call_duration":
// "missed":
// "ip":
// "reactions":
// "reaction":
// "actor":
// "users":
// "name":
// "share":
// "link":
// "share_text":
// "sticker":
// "uri":
+1 -1
View File
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"lib": ["dom", "es2015", "es2016", "es2017"],
"allowJs": true,
+62 -1
View File
@@ -2199,6 +2199,11 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chart.js@^3.8.0:
version "3.8.0"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.8.0.tgz#c6c14c457b9dc3ce7f1514a59e9b262afd6f1a94"
integrity sha512-cr8xhrXjLIXVLOBZPkBZVF6NDeiVIrPLHcMhnON7UufudL+CNeRrD+wpYanswlm8NpudMdrt3CHoLMQMxJhHRg==
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
@@ -2239,6 +2244,11 @@ ci-info@^3.2.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128"
integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==
classnames@^2.2.6:
version "2.3.1"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e"
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==
clean-css@^5.2.2:
version "5.3.0"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.0.tgz#ad3d8238d5f3549e83d5f87205189494bc7cbb59"
@@ -2579,6 +2589,11 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
date-fns@^2.28.0:
version "2.28.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2"
integrity sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==
debug@2.6.9, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -3376,6 +3391,11 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
fuse.js@^6.6.2:
version "6.6.2"
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-6.6.2.tgz#fe463fed4b98c0226ac3da2856a415576dc9a111"
integrity sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==
galactus@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/galactus/-/galactus-0.2.1.tgz#cbed2d20a40c1f5679a35908e2b9415733e78db9"
@@ -4258,7 +4278,7 @@ log-symbols@^4.1.0:
chalk "^4.1.0"
is-unicode-supported "^0.1.0"
loose-envify@^1.1.0:
loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -5060,6 +5080,15 @@ promise-retry@^2.0.1:
err-code "^2.0.2"
retry "^0.12.0"
prop-types@15, prop-types@^15.7.2:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
dependencies:
loose-envify "^1.4.0"
object-assign "^4.1.1"
react-is "^16.13.1"
proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
@@ -5144,6 +5173,21 @@ rcedit@^3.0.1:
dependencies:
cross-spawn-windows-exe "^1.1.0"
react-chartjs-2@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/react-chartjs-2/-/react-chartjs-2-4.2.0.tgz#bc5693a8b161f125301cf28ab0fe980d7dce54aa"
integrity sha512-9Vm9Sg9XAKiR579/FnBkesofjW9goaaFLfS7XlGTzUJlWFZGSE6A/pBI6+i/bP3pobKZoFcWJdFnjShytToqXw==
react-date-range@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/react-date-range/-/react-date-range-1.4.0.tgz#d2073b85bdb4185e4dde288ce29198dd90074045"
integrity sha512-+9t0HyClbCqw1IhYbpWecjsiaftCeRN5cdhsi9v06YdimwyMR2yYHWcgVn3URwtN/txhqKpEZB6UX1fHpvK76w==
dependencies:
classnames "^2.2.6"
prop-types "^15.7.2"
react-list "^0.8.13"
shallow-equal "^1.2.1"
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
@@ -5152,6 +5196,18 @@ react-dom@^18.2.0:
loose-envify "^1.1.0"
scheduler "^0.23.0"
react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-list@^0.8.13:
version "0.8.17"
resolved "https://registry.yarnpkg.com/react-list/-/react-list-0.8.17.tgz#49f55af2797cfdf3974ad2188a191e0ee919d254"
integrity sha512-pgmzGi0G5uGrdHzMhgO7KR1wx5ZXVvI3SsJUmkblSAKtewIhMwbQiMuQiTE83ozo04BQJbe0r3WIWzSO0dR1xg==
dependencies:
prop-types "15"
react@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
@@ -5596,6 +5652,11 @@ shallow-clone@^3.0.0:
dependencies:
kind-of "^6.0.2"
shallow-equal@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da"
integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"