1
0
Fork 0
Commit graph

400 commits

Author SHA1 Message Date
Matthew Holt
9dd00b724c
Use limited decimal precision for decision to reprocess coordinates
Coordinates are arbitrary precision floats, so it is silly to compare, say, 35.320366666667 against 35.320367 and have them not be equal. I have yet to test this, but it should speed up importing duplicate location points since it will skip coordinates that are within about 1 meter of each other.
2025-05-21 15:45:16 -06:00
Matthew Holt
65268b5af9
Fix import job resumption 2025-05-21 12:22:43 -06:00
Matthew Holt
d0d76473fa
Relate sidecar motion pics from Google Photos; fix related entity display on item page
- Somehow I totally forgot to relate sidecar motion photos in Google Photos. (They don't use sidecars on Google phones.)

- Item page now displays entities in the picture even without face coordinates
2025-05-20 11:35:15 -06:00
Matthew Holt
d268486f55
Several import fixes; metadata merging
- Quick unit tests for a function related to Google Takeout archives
- We now combine existing metadata with new according to the update policy, instead of either writing all or none of incoming metadata. This merging happens before the DB update query and is a bit of a special case as the policy is applied per-key.
- Special handling for corrupted timestamp in Google Photos data. This is a singular case I haven't observed more of, but seems like a reasonable heuristic. There might be thousands more out there, who knows.
- Fix job creation time (milliseconds)
- Hopefully make repeated imports faster by skipping duplicate items more intelligently based on update policies.
2025-05-19 12:47:18 -06:00
Matthew Holt
571d469a96 Fix some dashboard charts with future data
Also improve bubble size scaling on the bubble plot
2025-05-17 17:18:41 -06:00
Matthew Holt
952057f1b5
Update profile picture in corner when entity 1 gets new picture
Including when entity 1 is merged into
2025-05-17 16:58:03 -06:00
Matthew Holt
bdf3cc5636
whatsapp: Remove RetrievalKey
Probably not needed in this case
2025-05-17 16:51:11 -06:00
Matthew Holt
4090a09186
twitter: Gracefully skip missing media files
I guess the archives they export are incomplete. The import should continue.
2025-05-16 22:05:40 -06:00
Matthew Holt
9caa54dce9
Ability to filter by existence of relation (or lack thereof)
This is useful on the gallery page where we do NOT want to show motion pictures. We will also need to block motion pictures from being displayed as separate items on other UI views when they do show non-root items.
2025-05-16 17:35:54 -06:00
Matthew Holt
3e311d99c3
Sort data sources in import planner; rename some DS
The sorting can help imports go faster if we put DB-heavy sources first, when the database is still small.

The data source names were also standardized to use snake_case like most other word-IDs in the app.
2025-05-16 11:10:23 -06:00
Matthew Holt
0d26c6eb31 Fix several bugs
- Obfuscation mode enabled would set a fake phone number in smsbackuprestore's DS options, which led to bad data. Now, the UI does not auto-fill that value. But that means we need...

- SMS Backup & Restore: Phone number can now be inferred from repo owner in the backend, if ds opt phone number is empty. This works even with obfuscation enabled.

- Aborting a scheduled job before it starts now stays aborted. (Unless you manually restart it.)

- Added a data validation error modal for DS options on the import page. For now, if smsbackuprestore has no phone number set, and the timeline repo owner doesn't have a phone number, an error will be shown.
2025-05-15 16:53:35 -06:00
Matthew Holt
4838dbd7d3
Huh, gofmt failed me 2025-05-15 13:59:20 -06:00
Matthew Holt
812cfad74d
Modernize a few lines of code 2025-05-15 13:56:30 -06:00
Matthew Holt
cedfb68fe9
Allow resuming failed jobs 2025-05-15 07:53:15 -06:00
Matthew Holt
ac794cb5f3
Fix unnecessary item updating
Ignore empty/zero-value metadata keys, and consider time+zone separately since they are stored separately in the DB.
2025-05-15 06:35:56 -06:00
Matthew Holt
3960415d97
Exclude null dates in chart queries
Fixes surprise nulls that cause errors
2025-05-14 14:57:37 -06:00
Matthew Holt
6a10d23a7c
Fix: timestamps, coordinate precision, map loading
- Timestamp year cannot be > 9999 (JSON serialization panics)
- Lat/lon now considered equivalent after a certain decimal point, since not all sources have high precision (we choose 5 decimal points for now, or about 1.1 meters)
- Map style must be loaded before source is added, apparently (got this error once)
2025-05-14 14:41:08 -06:00
Matthew Holt
02d9434131
vcard: Initialize metadata map to avoid panic 2025-05-14 08:31:34 -06:00
Matthew Holt
360e131fff
Recover panics during jobs/imports, and support base64 pics from vCard 2025-05-14 08:29:37 -06:00
Matthew Holt
ae647fadaa
Fix the mysteriously disappearing slow loader
I think
2025-05-13 13:31:06 -06:00
Matthew Holt
17f660ae8b
applephotos: Minor fix to recognition 2025-05-13 11:35:03 -06:00
Matthew Holt
e9fc2eb022
Couple of bug fixes 2025-05-12 20:05:19 -06:00
Matthew Holt
c8bbe58358
The default repo folder name should probably be capitalized 2025-05-12 19:40:48 -06:00
Matthew Holt
2cecd5347d
Allow selecting current folder in setup picker 2025-05-12 18:42:11 -06:00
Matthew Holt
f3f4f1bc22
Use same name obfuscation for related entities as standalone entities 2025-05-12 15:56:14 -06:00
Matthew Holt
da7b7251d8
go.mod: Fix linker error in upstream ebitengine
see https://github.com/golang/go/issues/73617
2025-05-12 14:36:09 -06:00
Matthew Holt
3978b71ed0
Make Save Settings work on import page 2025-05-12 13:24:29 -06:00
Matthew Holt
874be1a9ca
Add UI for unique constraints and item update preferences 2025-05-12 12:34:48 -06:00
Matthew Holt
ae3a5d02b0
Field update preferences allow more control over item updates 2025-05-09 10:04:03 -06:00
JP Hastings-Edrei
855a0a702b
whatsapp: Fix tests & metadata keys (#88)
Well this is embarrassing, I forgot to actually test the metadata _and_ the keys emitted weren't correct!
2025-05-07 11:22:41 -06:00
JP Hastings-Edrei
2407333482
Add WhatsApp importer (#79)
* Add WhatsApp importer

A first pass at importing WhatsApp chat exports.

Some open questions:
- Do we want to import context messages ("you deleted this message")?
- In WhatsApp its possible to have groups with the same participants but a different group name. Is it possible to tag a conversation with a "group name" in Timelinize? If not, this may end up with different conversations being interleaved.
- Is it safe to assume the current location for timezone analysis on import? WhatsApp exports use timezoneless timestamps, which (I've confirmed manually) are just "what the time would have been where you are now" (for me, messages sent in summer are in BST, and in winter are GMT)

Annoying quirks of the export format we should find good ways to communicate to users:
- Any caption text sent with an attachment isn't exported by WhatsApp. (The text is lost and unavailable to Timelinize — I've opened a bug with Meta, for all the good that'll do)
- If there are silent members of a group chat, their presence isn't recorded in the data WhatsApp exports

Todo:
- I _think_ it's safe to assume there's only ever one attachment per message, this would change & simplify the way I parse attachment lines. I'll keep exploring my own exports to identify if this is reasonable.

* Include polls & locations in tests

Polls are currently ignored, but I'll move them to being imported as a message, or as some special datatype, after discussion.

* Add text formatting examples, and show they're not processed

* Fix lint issues

* WhatsApp: Add Retrieval keys to messages

The key on the message isn't perfect, as it'll change if the person exporting their chat history has changed the name of one of the participants between exports (this would mean that participant's name would be different between exports, and their retrieval key would be different).

This seems as close as we can get without exported IDs though.

(I can't find a good way to test that the retrieval key is set properly)

* WhatsApp: Polls, Locations, Metadata

- Correctly parses attachments (even those which have been omitted, as not being available on the device that performed the export)
- Parses Polls (only in English, for now), including adding metadata for the Poll
- Extracts location metadata (Foursquare ID for named locations, or Lat/Long)
- Adds more test data to demonstrate other kinds of messages included in exports

* WhatsApp: Handle other locales

- 🤦‍♂️ The timestamp format changes based on the locale of the device performing the export — which makes accurate extraction of dates impossible between DD/MM/YYYY and MM/DD/YYYY dates. This parser will assume DD/MM/YYYY date if the last set of digits is 4 long. Perhaps we need an import option for "I'm using American dates"?
- Swaps the Poll scraping structure to allow for the localised words used when the exporting phone is set to other locales (eg. OPCIÓN instead of OPTION)
- Added a chat line test fixture to illustrate this (though normally the entire file would only ever be in a single locale)

* WhatsApp: Correct Poll Structure & fix parsing

I had incorrect POLL lines in the test fixtures; this commit fixes them, and the importer so it can read them properly.

* Use snake case for datasource name

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

* WhatsApp: Be cautious with matching

Be slightly less confident with matching `_chat.txt` files as WhatsApp exports!

* WhatsApp: Fix lint errors

Fix magic number linting errors

* WhatsApp: swap metadata namespaces

Switch to using "Pin" instead of "Location" to more accurately describe what's being tagged with the metadata.

---------

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2025-05-07 09:21:39 -06:00
Matthew Holt
2dc7387901
iphone: Make CameraRoll optional 2025-05-06 18:00:02 -06:00
Matthew Holt
56e16e33a7
Make Apple Photos importable from both Mac and iPhone
Also a couple minor UI fixes.

And a minor but important addition to the contributing guidelines.
2025-05-06 17:54:36 -06:00
Matthew Holt
4633061631
Show detected faces on hover in sidebar 2025-05-05 21:40:23 -06:00
Matthew Holt
c374a7ccf7
Highlight entities in pictures! (from Apple Photos)
This is a very temporary PoC.
2025-05-05 17:37:32 -06:00
Matthew Holt
ffc8ad6f51
applephotos: Preserve a lot more metadata about people in photos
Also infer owner entity from DB if necessary, very cool!

Also fix a couple minor bugs
2025-05-05 14:48:54 -06:00
Matthew Holt
a62f4aa05a
applephotos: Initial commit of Apple Photos data source
Still a WIP, but mostly there!
2025-05-05 12:07:13 -06:00
Matthew Holt
ba4635cf7e
Fix data file handling
It wasn't updated properly with the big pipeline refactor
2025-05-04 13:28:20 -06:00
Matthew Holt
55f7feaa21
Better support for application/ogg
See https://github.com/timelinize/timelinize/pull/79#issuecomment-2848707939
2025-05-03 15:32:59 -06:00
Matthew Holt
15c55f0a8f
Improve pause/unpause behavior 2025-05-02 08:55:27 -06:00
Matthew Holt
72c8ede971
More improvements/fixes to thumbnail jobs 2025-05-01 22:18:50 -06:00
Matthew Holt
3d2222fce2
Fix thumbnail job size count and paging; other minor fixes
Including one fix for a panic introduced by obfuscated logging during processing
2025-05-01 11:15:13 -06:00
Matthew Holt
ad259a08ab
Minor UI tweaks 2025-04-29 10:13:18 -06:00
Matthew Holt
a0b3bcc2bb
Fix the look of alerts/toasts with Tabler 1.1/1.2 changes 2025-04-28 21:28:37 -06:00
Matthew Holt
914f24f6a6
Move calls to pythonServerReady 2025-04-28 21:08:16 -06:00
Matthew Holt
98069ee66b
Health check for python server
This ensures that searches and embedding jobs don't run before it has fully loaded, since loading models can take a while
2025-04-28 17:33:40 -06:00
Matthew Holt
25712e7c61
Fix thumbnail job size counts 2025-04-28 10:26:59 -06:00
Matthew Holt
38c89f2b0a
Only prepare finished graph log if needful; fix obfuscation bug 2025-04-27 07:49:34 -06:00
Matthew Holt
e760b594e0
Sigh, fix linter 2025-04-25 22:07:19 -06:00
Matthew Holt
e0d5bdb67c
Obfuscate entity names a little more intelligently 2025-04-25 22:06:09 -06:00