Coder Social home page Coder Social logo

gustavojst / clid Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 198 KB

CLID is a program for downloading/uploading Google Drive files and folders from the terminal.

License: MIT License

Python 100.00%
api cli google-drive google-drive-api google-drive-api-python google-drive-api-v3 google-drive-downloader google-drive-uploader python python3

clid's Introduction

CLID

A simple, Python based program for downloading/uploading Google Drive files and folders directly from the terminal.

Python 3.10+ required. Windows/Linux compatible.

For the Portuguese (pt-BR) version of this README, click here.

Read the documentation for information on how to setup and use CLID.

Report Bug · Request Feature

Table of contents

About the project

CLID (short for CLI Drive) is a simple program whose main purpose is to download/upload files and folders, as well as calculating the size of folders, from Google Drive, using only the terminal.

CLID was made using the Google API Python client library for API communication with Google Drive, tqdm for the progress bars and gdrive_folder_size to help calculate the size of Google Drive folders.

The project idea came from a problem in sincronyzing a folder between my desktop computer and my laptop that I use to study. I was using Google Drive to sync it, but it was getting really repetitive doing it everyday (small repetitive tasks, like opening the browser, downloading the file, unziping it, replacing it... you get the idea). Because of that, I came up with the ideia of making a Python program/script that would handle most of the boring stuff for me, without even having to open my browser.

Cool story bro... but what can it do?

Here's a list of what CLID can and cannot do:

CLID can:

  • Download files and folders created/owned by you, or shared with you.
  • Upload files/folders.
  • Calculate a Google Drive folder size.
  • Export Google Workspace files to different formats when downloading.
  • Streamline the upload/download process by compressing/extracing folders when needed.
  • Handle duplicate files in your Google Drive or local system when uploading/downloading.

CLID can't:

  • Download multiple files/folders at a time.
  • Interact with Google Drive in any other way that is not one of the features already said above. That includes moving files to different places in Google Drive, sharing files/folders with others, changing the visibility settings for a file, or any other Google Drive feature.
  • Download files/folders that are not in the Drive's root directory (AKA main folder/page), with the exception of the files/folders shared with the user. You can, however, download a folder in the root directory, along with all its files and subfolders (no matter how deep the rabbit hole is).
  • Make coffee :( . Yet...

Limitations

  • Folder downloads are slower than file downloads. If you find it too slow, it's best to upload/download folders as a compressed file.
  • Downloads/uploads are made in chunks as to not load the user's system memory if the file is too big. The problem is that the Python API client for Google Drive is kinda slow at getting requests. To mitigate this and maintain efficiency, the size of each chunk is 100MB. Altough you can change this value in the code, doing so will result in slower downloads speeds.
  • Due to the 100MB chunk size mentioned above, progress bars will only update 100MB at a time, which may take some time depending on how fast your internet download speed is. If you change the chunk size, then the progress bar will update accordingly, but your download speed will descrease.
  • Only one file/folder can be downloaded at a time.
  • CLID can only download files that were shared with the user or that are in the Drive's root directory (AKA main folder/page). This means that if you want to download a file/folder that is inside another folder, you'll have to either you download the entire folder that's in the root directory, or download the file/folder you want outside CLID.

clid's People

Contributors

gustavojst avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clid's Issues

Guide should be updated to specify Python version requirement.

I was following the guide to install CLID. But there were some errors because I was using Python 2.7 on Ubuntu 18.04. I tried Python 3.9 but that too didn't work. Apparently there are some operations like ' | ' which only available on Python 3.10+. I think this information should be added to the guide for others like me.

Thanks for your work btw. It works great.

TLDR; A requirement should be added to the docs/guide.md to specify Python 3.10+ is required.

Aesthetic: Completion bar finishes before downloading everything

Thanks for this, it works like a charm <3
The only thing I found is that the completion bar shows 100% way earlier than the files appear in the selected folder. but if I leave it it finishes the download without problems. I'm downloading fairly large folders, this was 125GB with 100 files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.