IgnisDa / ryot

Roll your own tracker!
https://ryot.io
GNU General Public License v3.0
1.86k stars 48 forks source link

Export to file #656

Closed emhl closed 6 months ago

emhl commented 6 months ago

I'd love to export my watch history on an automatic schedule. The most convenient way for me would be to specify a filesystem location (the local filesystem not s3) and a schedule in the app.

Getting the json data via curl would work as well, but it seems that the endpoints for that were removed in the v4 release. is it possible to do re-add them or provide an equivalent export option?

IgnisDa commented 6 months ago

You can use the graphql endpoint to deploy an export. The file will be daved to S3.

Will that work for you?

IgnisDa commented 6 months ago

Alternatively, you can also dump the database via a cron job.

emhl commented 6 months ago

You can use the graphql endpoint to deploy an export. The file will be daved to S3.

Will that work for you?

I don't really want to deploy a whole minio container just to save a few json files what's the reason that only s3 is supported as a file storage provider. and is it used for anything else than exports currently?

Alternatively, you can also dump the database via a cron job.

I'm already doing that to be able to roll back the database. :D but it would be nice to have the watch/read/listen histories backed up in a more easily readable format.

IgnisDa commented 6 months ago

what's the reason that only s3 is supported as a file storage provider.

S3 allows attaching custom metadata with files. That is a functionality I require, and I do not want to build it from scratch myself. My development time is precious.

and is it used for anything else than exports currently?

Yes, for creating custom media/exercises. Also uploading pictures in workouts.

IgnisDa commented 6 months ago

You can always use cloudflare R2 if you do not want to setup your own S3 instance.