-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Import from cli #237
WIP Import from cli #237
Conversation
I did not test this. @d7415 can you have a look ? |
Yeah, with the work that I'm planning, there should be no need for messing around with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have yet to test this. It's a very good start, but I think it needs to (eventually) handle album creation.
The function description makes clear that it flattens everything (although the --flatten
option may confuse matters) so I have no real objection to adding it in its current state once we've done some testing.
Going forward my suggestions (in rough order) would be:
- Create a new album for new photos (still flat)
- Support top-level albums based on directory names
- Choose a parent, to optionally create as a subalbum
- (Optionally) Copy directory structure into album structure.
There are definitely some UI/UX considerations for how to implement the user side of these.
The basics seem to be there though. Good work @Spotlight0xff!
if ($album_title != null) { | ||
$this->line('No album '.$album_title.' found. Try again.'); | ||
} | ||
$album_title = $this->ask('album to insert into (title)?'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're providing a list of IDs with the titles, wouldn't it be easier to ask for the ID? Also potentially less typing, less chance of special characters...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't think that titles need to be unique...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely! It was more for testing, not meant to be production-ready :)
public function handle() | ||
{ | ||
$directory = $this->argument('dir'); | ||
$flatten = $this->option('flatten'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, but unused.
I am also thinking if we could not re-use the following : https://github.com/LycheeOrg/Lychee-Laravel/blob/master/app/Http/Controllers/ImportController.php#L168 or so we don't have code duplication. |
Hey guys! Yeah this was written in order to allow me to sync my google photos to the lychee instance. Very cool that you found it and consider it to include it somehow though! |
FWIW, I'm working on a standalone CLI for lychee (both API versions supported) that allows uploading, tagging, searching, filtering, etc. of all photos in lychee. I will update the README with more info, but you can find the repo here: https://github.com/alex-phillips/lychee-cli |
Niiiice 馃槷 |
a8dd3c8
to
a2360ae
Compare
This has been fixed with #427 I believe. |
I found this lovely work by @Spotlight0xff 馃槂