## Description The CLI sorts deleted photos to the bottom of the sync queue. When an album is synced, a photo is removed from the album and later re-added to the album (same name) and doing another sync the new file is added first and a new name is generated since the original filename is (still) taken. Afterwards the initial photo is deleted and the filename would be available. This leads to having a file, e.g. IMG_0001_1.JPG instead of the original filename IMG_0001.JPG despite the initial filename is no longer on disk and could have been used. This PR changes the sort order so that deleted files are first removed and afterwards new files are created. In this case all files where the filename is now available, but were taken, are named like they were uploaded.
Ente CLI
The Ente CLI is a Command Line Utility for exporting data from Ente. It also does a few more things, for example, you can use it to decrypt the export from Ente Auth.
Install
The easiest way is to download a pre-built binary from the GitHub releases.
You can also build these binaries yourself
./release.sh
Or you can build from source
go build -o "bin/ente" main.go
The generated binaries are standalone, static binaries with no dependencies. You can run them directly, or put them somewhere in your PATH.
There is also an option to use Docker.
Usage
Run the help command to see all available commands.
ente --help
Accounts
If you wish, you can add multiple accounts (your own and that of your family members) and export all data using this tool.
Add an account
ente account add
Note
ente account add
does not create new accounts, it just adds pre-existing accounts to the list of accounts that the CLI knows about so that you can use them for other actions.
List accounts
ente account list
Change export directory
ente account update --email email@domain.com --dir ~/photos
Export
Start export
ente export
CLI Docs
You can view more cli documents at docs. To update the docs, run the following command:
go run main.go docs
Docker
If you fancy Docker, you can also run the CLI within a container.
Configure
Modify the docker-compose.yml
and add volume. cli-data
volume is
mandatory, you can add more volumes for your export directory.
Build and run the container in detached mode
docker-compose up -d --build
Note that BuildKit is needed to build
this image. If you face this issue, a quick fix is to add DOCKER_BUILDKIT=1
in
front of the build command.
exec
into the container
docker-compose exec ente-cli /bin/sh -c "./ente-cli version"
docker-compose exec ente-cli /bin/sh -c "./ente-cli account add"