53 Commits

Author SHA1 Message Date
Matthew Holt
b88c27ada5 Explain screenshot problem 2024-01-19 14:07:09 -07:00
Matthew Holt
294976339b Update readme with info about Timelinize 2024-01-19 11:53:40 -07:00
Matthew Holt
cf155164e2 Move nil check to different line (#7) 2021-01-26 15:49:36 -07:00
Matthew Holt
d29ddc309c Add nil check in GetLatest (fix #71) 2021-01-26 15:48:14 -07:00
Matthew Holt
41cce90c69 Add verbose mode (-v flag) (#24)
The central processor and Google Photos data sources now implement more verbose (but rudimentary) logging. We should probably switch to zap at some point.
2020-12-31 13:37:16 -07:00
Yang Su
0828cdb1df Remove accidental import
Added in a8c45a803d\#diff-546a80e82a79b4c124d58e0f3f6e9f6cc1def1ec55431c7d2de5b844ab7388c7R20
2020-12-28 08:29:51 -07:00
Matthew Holt
83ffabb56b Improve merge functionality, distinct from reprocessing
Also improvements to the CLI with regards to merge options.

Update docs.
2020-12-23 15:34:18 -07:00
Matthew Holt
39454ebc79 instagram: Update date format
Should fix #59, but I haven't tested it yet
2020-12-19 01:09:22 -07:00
Matthew Holt
6daa5cdf91 Update readme about merge options
Plus smol bug fix
2020-12-19 01:08:40 -07:00
Matthew Holt
6ef78cb0e9 Implement soft merge, configurable merge options
Timeliner has always had the ability to merge items: if reprocessing, new items would overwrite data from existing items with the same ID. Now, identical items can be merged, including a new mode called "soft merge" which works on items with different IDs that are similar enough to be considered identical.

For example, Google Photos can be downloaded via the API or imported via a Takeout archive. While the Takeout archive provides location metadata, unfortunately the Takeout archive does not provide IDs, so using both the API and Takeout would duplicate the entire library. Enabling soft merging will compare the timestamp and filename of each item and, if identical, consider them to be identical, and will combine them. Yay!

This also made it necessary to configure which values are preferred for certain fields, for example the old or new ID, the old or new data file, etc.

This is a big refactor and likely introduced some bugs but it worked in my initial, tired testing well after midnight.
2020-12-19 00:51:58 -07:00
Matthew Holt
c2d133223f googlephotos: Add support for Takeout archives
This is a very rough implementation that I only tested on a relatively small archive from Google Takeout (~1.7 GB).

It seems to work well enough but it has way less information than the API provides EXCEPT, QUITE NOTABLY, Takeout archives include location metadata and original file uploads!

Items in a Takeout archive do not have IDs, so this will not merge well with API-downloaded items. In fact, it could duplicate your entire library. Eek.

Use with caution, for now.
2020-12-03 19:38:30 -07:00
Matthew Holt
db2400aa2c Update readme with -start and -end flag docs 2020-12-03 17:30:12 -07:00
Matthew Holt
a8c45a803d Wrap checkpoints; add -start and -end flags
Checkpoints should only be resumed if the parameters of the command are the same; otherwise some providers return errors when trying to get "next page" using different parameters (Google Photos).

Also add -start and -end flags for get-all (and -end for get-latest) so that you can customize the date range of items to get, either by duration (relative) or date (absolute). This is useful, for example, when you want to only download items that are at least 10 days old (`-end "-240h"`).
2020-12-03 12:29:56 -07:00
Matthew Holt
2da15ad007 Simple, minor fixes 2020-12-02 16:03:53 -07:00
Matthew Holt
f232e44f46 go.mod: Update dependencies 2020-12-02 15:45:47 -07:00
Matthew Holt
b54071f008 Specify minimum Go version 2019-12-13 12:45:31 -07:00
joonas.fi
2b6f8e865e twitter: fix geo-tagged tweet type (#50)
* fix incorrect "coordinates as a string" type, remove deprecated "Geo" field

"Geo" and "Coordinates" fields have (lat,lng) in swapped order, therefore we
couldn't use the same structure ("tweetGeo") for them anyway - easier to remove
the deprecated field than to take this into account.

* add test for coordinate fix by decoding a "kitchen sink" API response
2019-12-10 16:36:53 -07:00
Andrey Kostakov
7bd76a1bb4 Show link to the auth page even if we couldn't open a browser. (#53)
* Show link to the auth page even if we couldn't open a browser.

In case if we couldn't open a browser using `xdg-open` (For
example xdg-utils can be not installed in the system) -- user will still able to
follow the link (copy-paste from the terminal) and obtain oauth code.

Message will look like this:
```
Can't open browser (exec: "xdg-open": executable file not found in $PATH: ). Please follow the link: https://accounts.google.com/o/oauth2
```

* Add line break.

Co-Authored-By: Matt Holt <mholt@users.noreply.github.com>
2019-12-08 12:56:50 -07:00
Fabian Wickborn
92ecec5647 Create Go module (#48) 2019-11-29 11:40:01 -07:00
Matt Holt
aa18250605 Create FUNDING.yml 2019-10-29 23:43:13 -06:00
Matthew Holt
bd699305db Add SMS Backup & Restore to readme 2019-07-14 14:57:31 -06:00
Matt Holt
221813d338 Merge pull request #47 from mholt/smsbackuprestore
Data source: smsbackuprestore
2019-07-14 14:40:40 -06:00
Matthew Holt
9aa8f6edf2 smsbackuprestore: Draw relations between participants in group messages 2019-07-14 14:36:41 -06:00
Matthew Holt
0bce38b5af Tidying up some github assets 2019-07-13 22:55:55 -06:00
Matthew Holt
3c3ade88d0 gmail: IncludeArchivedMedia option 2019-07-13 22:55:28 -06:00
Matthew Holt
5ab4d0796e Data source: smsbackuprestore - still WIP 2019-07-13 22:54:37 -06:00
Matthew Holt
b565c4a8e3 Improve issue template 2019-06-16 21:53:35 -06:00
Matthew Holt
932e065f6b Add issue template 2019-06-16 21:31:56 -06:00
Matthew Holt
528b9f947c googlephotos: Fix data source name 2019-06-16 17:09:31 -06:00
Matthew Holt
3284be8673 Add reauth subcommand, with docs for reauthenticating 2019-05-25 12:34:53 -06:00
Matthew Holt
c4e4ae7475 Disable keepalives when getting Oauth2 token
Otherwise authorizing multiple accounts results in hang for some reason
2019-03-05 18:22:58 -07:00
Matthew Holt
98441f0850 facebook: Fix looping over pages 2019-02-20 18:11:22 -07:00
Matthew Holt
4bbfd951dc Keep relationships unique
Bidirectional is not part of the unique constraints because I don't
think it's relevant when checking for uniqueness.
2019-02-20 14:13:09 -07:00
Matthew Holt
42fc84848d twitter: Add retweets/favorites counts to metadata 2019-02-20 12:59:09 -07:00
Matthew Holt
3b4d69befd googlephotos: Increase wait between retries
No particular reason; but if the connection is having trouble, best
to wait a little longer than too little time; we're not in a hurry.
2019-02-19 18:04:32 -07:00
Matthew Holt
7131f03fdb facebook: Implement API request retries 2019-02-19 18:03:50 -07:00
Matthew Holt
8fe18174ea Increase HTTP client timeout; other minor improvements
Some Facebook API calls take more than 30 seconds
2019-02-19 18:03:32 -07:00
Matthew Holt
dbe72445dc cmd: Add retry capabilities to get-all and get-latest commands 2019-02-18 17:49:10 -07:00
Matthew Holt
0d6724a3a2 twitter: Use int64 for compatibility with IDs on 32-bit/ARM systems. 2019-02-18 17:35:31 -07:00
Matthew Holt
c278fa6867 googlephotos: Fix panic if network request failed 2019-02-18 17:35:12 -07:00
Matthew Holt
e7b4c19be8 Add Instagram to the README 2019-02-17 00:43:17 -07:00
Matthew Holt
dafa8c76fb instagram: Add Instagram data source (archive files only) (closes #10) 2019-02-17 00:42:23 -07:00
Matthew Holt
c9c0a5c39a cmd: Change default config filename to timeliner.toml; update README 2019-02-16 18:25:51 -07:00
Matthew Holt
aed5ece054 Bug fixes, esp. related to re-running get-latest after interruption
Before these changes, get-latest would always go until the most recent
item downloaded from the given account. This potentially skips items
if get-latest was interrupted, then run again later, because get-latest
will stop once it finds the most recent item downloaded, usually one
of the first things downloaded.

So, this adds a cursor/marker to the DB for the account so that we know
which item ID was most recent as part of the last successful run; that
way, interrupted runs will not move the cursor, and thus no items will
be lost simply because get-latest was too naive to know that it should
keep scanning until an older timestamp.
2019-02-16 18:20:23 -07:00
Matthew Holt
aaf5e313a6 twitter: Finish implementing API support
TODO: Handle HTTP errors better, with retries
2019-02-16 18:17:11 -07:00
Matthew Holt
0401be2a7c twitter: Add preliminary support for the Twitter API as a data source
Plus several bug fixes
2019-02-10 23:50:27 -07:00
Matthew Holt
210323b773 Support two-legged OAuth2 flows ("client credentials")
By setting a token URL but not an auth URL, the credentials flow is
assumed to have a bearer token instead of needing an intermediate app
to authorize with.

Tested with a partial / PoC implementation of the Twitter API.
2019-02-07 18:18:02 -07:00
Matthew Holt
31eb10372c googlephotos: Implement HTTP retries 2019-01-21 11:04:58 -07:00
Matthew Holt
d4d16f50de Add Relica sponsor 2019-01-20 19:36:51 -07:00
Matthew Holt
bf20c21808 Expand and reorder readme sections 2019-01-20 01:46:41 -07:00