Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new file operations mkdir, rename, delete and upload to drive service. #291

Merged
merged 5 commits into from
Aug 10, 2020

Conversation

ixs
Copy link
Contributor

@ixs ixs commented Aug 3, 2020

The drive service only supports the bare minimum right now, improve
this situation.

@ixs ixs force-pushed the drive_ops branch 2 times, most recently from 506eda2 to 7ddad55 Compare August 4, 2020 18:08
…vice.

The drive service only supports the bare minimum right now, improve
this situation.

Also support upload of new files to the iCloud Drive.
@ixs ixs changed the title Add new file operations mkdir, rename and delete to drive service. Add new file operations mkdir, rename, delete and upload to drive service. Aug 4, 2020
Copy link
Collaborator

@Quentame Quentame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice addition, thanks !

README.rst Outdated Show resolved Hide resolved
pyicloud/services/drive.py Outdated Show resolved Hide resolved
match = search(r"\bt=([^:]+)", cookie.value)
if not match:
if match is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not not ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because re.search will return None for "no match found" and I thought this way it is made explicit what we're checking for.

Copy link
Collaborator

@Quentame Quentame Aug 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not because it checks more.

pyicloud/services/drive.py Show resolved Hide resolved
pyicloud/services/drive.py Outdated Show resolved Hide resolved
pyicloud/services/drive.py Outdated Show resolved Hide resolved
pyicloud/services/drive.py Show resolved Hide resolved
Co-authored-by: Quentame <polletquentin74@me.com>
Copy link
Collaborator

@Quentame Quentame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still lost of "%s" % .

We should remove if of all services actually, in a new PR.

@ixs
Copy link
Contributor Author

ixs commented Aug 10, 2020

@Quentame okay, I think I got all the %s indirections now.

pyicloud/services/drive.py Outdated Show resolved Hide resolved
@Quentame
Copy link
Collaborator

A black formatting and we are ready to go ! 🎉

@ixs
Copy link
Contributor Author

ixs commented Aug 10, 2020

@Quentame done...

@ixs
Copy link
Contributor Author

ixs commented Aug 10, 2020

BTW: you might wanna have a look at https://github.com/ixs/iftp which is a ftp-styled frontend to icloud drive. I have a FUSE driver written locally, but it's not... perfect... yet...

@Quentame Quentame merged commit d87ab69 into picklepete:master Aug 10, 2020
@Quentame
Copy link
Collaborator

BTW: you might wanna have a look at https://github.com/ixs/iftp which is a ftp-styled frontend to icloud drive. I have a FUSE driver written locally, but it's not... perfect... yet...

Cooooool !
Maybe we can add it in our README in a section like "Used in", with the link.

I personally do in Home Assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants