{ "info": { "author": "thealphadollar", "author_email": "shivam.cs.iit.kgp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "# GDrive_Sync\n\nThis repository contains scripts that make GDrive tasks easier using command line functions and PyDrive wrapper for Google Drive.\n\nGDrive_Sync aims at making life simpler when switching from Windows to Linux\n\nThis was developed with the aim to create a free and open source GDrive client to make things simpler and users won't\nneed to switch to other cloud file storing platforms or have to pay for commercial clients doing the same.\n\n## Operational Details\n\nGDrive_Sync asks for permission from your Google Drive account to carry out the essential operations as are mentioned later\nin the document.\n\nGDrive_Sync uses [PyDrive](https://github.com/googledrive/PyDrive) and [crontab](https://pypi.python.org/pypi/python-crontab) to interact with GDrive and Unix cron process manager respectively. It also requires \nroot permission for the \"-start\", \"-stop\" and \"-status\" argument since it needs to alter the CronTab files.\n\n[futurize](http://python-future.org/overview.html) library is used for the purpose of making the code compatible with both, python 2 and python 3. \n\n## Installation And Usage\n\nCurrent build works on Python 2 (Python 3 is supported but a [bug](https://github.com/thealphadollar/GDrive_Sync/issues/11) is there which does not allow connection to be established on systems using proxy).\n\n### Dependencies\nPlease install pip before moving on if you don't have python-pip
\n`sudo apt-get update`
\n`sudo apt-get install python-pip`
\n\nOnce pip is installed, download the below dependencies (you don't need to follow the below steps if using pip installation method).\n1. PyDrive
\n`pip2 install PyDrive`\n2. crontab
\n`pip2 install python-crontab`\n3. future
\n`pip2 install future`\n\n### Installing\nThe repository can be installed through pip or by manually cloning the repository. \n\n##### Using pip\n\n1. Use the below command to install drive_sync using pip2 (till [python3 bug](https://github.com/thealphadollar/GDrive_Sync/issues/11) is resolved)
\n`pip2 install drive_sync`
\nThis process also installs all the missing dependencies.\n2. Open the crontab editor in terminal,
\n`crontab -e`
\nand add the [following lines](https://superuser.com/questions/784252/crontab-and-binaries-in-usr-local-bin) to it.
\n`PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin`
\n`LD_LIBRARY_PATH=/usr/local/lib`\n3. To initiate the upload process from default directory.
\n`drive_sync -start`
\nThis will open a web browser if its the first launch of GDrive_Sync. Later it'll be used to start the process with previously\nassociated GAccount unless \"-reset\" is used.\n4. Now GDrive_Sync will be monitoring set upload/download folders. Use `-config` parameter to add/modify upload or download\ndirectory.\n5. To stop GDrive_Sync at any instance,
\n`drive_sync -stop`\n6. To know if GDrive_Sync is active,
\n`./gdrive_sync/main.py -status` \n\n##### Manual Cloning\n\n1. Clone the [repository](https://github.com/thealphadollar/GDrive_Sync.git),
\n`git clone https://github.com/thealphadollar/GDrive_Sync.git`\n2. Open the folder and give
\n`./gdrive_sync/main.py -start`
\nThis command adds `./gdrive_sync/main.py -start` to your cron jobs with periodicity of 5 minutes.\n3. A link will open asking for GDrive access; allow for all.\n4. Now GDrive_Sync will be monitoring set upload/download folders. Use `-config` parameter to add/modify upload or download\ndirectory.\n5. To stop GDrive_Sync at any instance,
\n`./gdrive_sync/main.py -stop`\n6. To know if GDrive_Sync is active,
\n`./gdrive_sync/main.py -status` \n\n### What Cron Script Does?\n\nThe code for this is present in `gdrive_sync/cron_handle.py`\n\n- Periodically checks (every 5 minutes) the upload folders for a file change.\n- If a new file is found which is not being uploaded by any other instance of the same function, it marks it as being uploaded\nand starts the upload process.\n- status.json in every folder is used to monitor the \"being_uploaded\" status of each file in the folder.\n- If Remove_Post_Upload is True in `config_dicts/config.json`, then the file is deleted post upload to GDrive. Otherwise, \nit is moved to the set download directory.\n- If Share_Link is True in `config_dicts/config.json` then a share link for each uploaded file is placed in the set download\ndirectory. \n- It is highly advisable to set your own download and upload directories.\n\n### Why Require GDrive Authentication?\n\nGDrive_Sync requires Google Drive full read and write access. \n\nIt asks for \"https://www.googleapis.com/auth/drive\" which translates to,
\n\"Full, permissive scope to access all of a user's files, excluding the Application Data folder. Request this scope only when it is strictly necessary.\"
\n\nThis is required in order to download and upload files as well as create directories along with creation of sharable link.\n\nThe author cannot modify/manipulate any personal data or Google Drive files. All the write/read access are provided solely to\nthe user granting the permission. \n \n## Parameters\n\nThe parameters that can be used are:\n\n* -reset\n\nReset account associated with GDrive_Sync and give it the read and write permissions to your Google Drive. Automatically executed at the\nfirst run of GDrive_Sync.\n\n* -start\n\nStart the automatic GDrive syncing of the folders set as upload directories.\n\n* -stop\n\nStop the automatic GDrive syncing of the folders set as upload directories.\n\n* -status\n\nShows whether GDrive is uploading automatically or not.\n\n* -version\n\nShows the current version of the GDrive_Sync.\n\n* -config\n\nGives option to edit the configuration file on which automatic upload and download works.\n- Up_Directory: The directory where the files that are to be uploaded are given, relative to home directory.\n (e.g. for \"~/Documents/to_GDrive\", input \"Documents/to_GDrive\")\n (Default is \"to_GDrive\" directory in your Documents folder)\n- Down_Directory: The directory where the files are downloaded, relative to home directory.\n (e.g. for \"~/Documents/from_GDrive\", input \"Documents/from_GDrive\")\n (Default is \"from_GDrive\" directory in you Documents folder)\n- Remove_Post_Upload: [Y/N] 'Y' removes the local file post upload. 'N' moves the file to GDrive download folder\npost upload.\n (Default is 'N')\n- Share_Link: [Y/N] 'Y' puts the shareable link of the file uploaded in share.txt in Up_Directory.\n (Default is 'Y')\n- Write_Permission: [Y/N] 'Y' gives the write permission in the sharable link.\n (Default is 'N')\n\nConfiguration is stored in config.json as a dictionary which can be manually edited as well.\n\n* -ls [local/remote]\n\nLists all files and folders in your GDrive (default or when \"remote\" used).\nLists all files and folders in your downloads directory (when \"local\" used).\n\n* -ls_trash\n\nLists all files and folders in your GDrive trash.\n\n* -ls_folder [folder_id]\n\nLists files and folders in the given folder id in your drive.\n\n* -ls_files [folder_id/\"root\"]\n\nLists all files recursively present in the folder id given.\n\n* -download [file_id1] [file_id2]\n\nDownloads the given file from GDrive. Multiple files can be downloaded by putting file_ids one after the other.\nUse \"-d all\" argument to download entire your entire GDrive.\n\n* -upload [file_add]\n\nUpload file/folder corresponding to the address given to GDrive, for one time.\n\n* -share [file_id]\n\nOutputs the shareable link of the file.\n\n* -remove [local/remote] [file_name/folder_name/file_id/folder_id]\n\nDelete the mentioned file from GDrive download directory or GDrive remote. Please input file_id/folder_id if it's a\nremote file. You can add multiple file_ids/folder_ids one after the other, e.g. -remove remote [file_id1] [file_id2]\n\n* -open [upload/download]\n\nOpens the upload or download directory in file explorer.\n\n## Contributing\n\nContributions to this project are highly encouraged. We will soon be having a contribution guide.
\nTo begin, please have a look at the issues. They are simple and easy to implement/resolve.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/thealphadollar/GDrive_Sync", "keywords": "google-drive GDrive automatic sync GDrive manager", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "drive-sync", "package_url": "https://pypi.org/project/drive-sync/", "platform": "", "project_url": "https://pypi.org/project/drive-sync/", "project_urls": { "Homepage": "http://github.com/thealphadollar/GDrive_Sync" }, "release_url": "https://pypi.org/project/drive-sync/1.222/", "requires_dist": null, "requires_python": "", "summary": "GDrive_Sync is an automatic folder syncing client for Google Drive", "version": "1.222" }, "last_serial": 3723219, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "6a16c8c8b94bf670145cc5a44a1aec5a", "sha256": "72f4c1e9a6cbef8b04b9ed0d162ec09757982293f1a2a531692eea84a103aa10" }, "downloads": -1, "filename": "drive_sync-0.9.tar.gz", "has_sig": false, "md5_digest": "6a16c8c8b94bf670145cc5a44a1aec5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13007, "upload_time": "2018-03-01T11:26:56", "url": "https://files.pythonhosted.org/packages/e5/5a/51832439694dc57b21eeadc701e0cc45e39674485e745a2c4953db8e2b96/drive_sync-0.9.tar.gz" } ], "0.91": [ { "comment_text": "", "digests": { "md5": "2ffb7b6575c1c5e8b47100001ebc3694", "sha256": "8490e00e46a43da97ccb35747974b7a26c16758f9815854ebf72d4e657b9f5b4" }, "downloads": -1, "filename": "drive_sync-0.91.tar.gz", "has_sig": false, "md5_digest": "2ffb7b6575c1c5e8b47100001ebc3694", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13061, "upload_time": "2018-03-01T11:43:13", "url": "https://files.pythonhosted.org/packages/47/9f/c01f2e7a223cca6396a8ec012c1d9655273f8b31319a47bdf6f0085e31b0/drive_sync-0.91.tar.gz" } ], "0.92": [ { "comment_text": "", "digests": { "md5": "daa9230e8f0648ea7af645ac3c876322", "sha256": "adb0ade72a4f63d712dd84660db5ee522a9e43f9f02307eeb3a54097f0bfd8b5" }, "downloads": -1, "filename": "drive_sync-0.92.tar.gz", "has_sig": false, "md5_digest": "daa9230e8f0648ea7af645ac3c876322", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13150, "upload_time": "2018-03-01T13:09:15", "url": "https://files.pythonhosted.org/packages/21/9a/b8dfc4816d5e09b1a68478878e29456c2d9770b6a0524c52b7791ccb626f/drive_sync-0.92.tar.gz" } ], "0.93": [ { "comment_text": "", "digests": { "md5": "602ca29ff7e65df343aec928e06c882e", "sha256": "92ecd80fa9f27cdb9438bcdd2356123baeb05b3bb684f5ba81b109f223781e47" }, "downloads": -1, "filename": "drive_sync-0.93.tar.gz", "has_sig": false, "md5_digest": "602ca29ff7e65df343aec928e06c882e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15268, "upload_time": "2018-03-01T13:23:48", "url": "https://files.pythonhosted.org/packages/a6/c1/d3282c79e76f08b185824fd8676f2615275dacbbb86080d18179b0925347/drive_sync-0.93.tar.gz" } ], "0.95": [ { "comment_text": "", "digests": { "md5": "33d10dcc616950aca76b33002766d694", "sha256": "f85f0aaf21f4b2c62c36c66c4b0fdcf45b218a6c063fc9c8edfc218c2e0746fb" }, "downloads": -1, "filename": "drive_sync-0.95.tar.gz", "has_sig": false, "md5_digest": "33d10dcc616950aca76b33002766d694", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17302, "upload_time": "2018-03-01T19:20:05", "url": "https://files.pythonhosted.org/packages/88/a9/6d6b939e798032ef9fc79ecd4303e89106f9a880e026c9f46185bca20545/drive_sync-0.95.tar.gz" } ], "0.98": [ { "comment_text": "", "digests": { "md5": "3ae9a51aa4153d61ac7a4fe415241d86", "sha256": "298e5aa42dcc1e4afd96c934914cf3949497df844441b0445e547491376e4909" }, "downloads": -1, "filename": "drive_sync-0.98.tar.gz", "has_sig": false, "md5_digest": "3ae9a51aa4153d61ac7a4fe415241d86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17403, "upload_time": "2018-03-03T07:46:36", "url": "https://files.pythonhosted.org/packages/74/a0/bcde0e957fd48c87f8d3b51d415b5845c0d61a8b5c9384952853e9482593/drive_sync-0.98.tar.gz" } ], "0.99": [ { "comment_text": "", "digests": { "md5": "1c1cd230e436bcf82633ae339be82003", "sha256": "47f59c470e467166f761e2963010dbe6f39f58f6186789045051b967a58e0330" }, "downloads": -1, "filename": "drive_sync-0.99.tar.gz", "has_sig": false, "md5_digest": "1c1cd230e436bcf82633ae339be82003", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17444, "upload_time": "2018-03-03T08:39:43", "url": "https://files.pythonhosted.org/packages/ec/ec/281c8d11c8b1c049c71fc5389a7c3d03fac4e399b0e13da3230c8b7fd5f3/drive_sync-0.99.tar.gz" } ], "0.99.1": [ { "comment_text": "", "digests": { "md5": "d4479beb949c6c4bb5c83027efbccd99", "sha256": "9918ecd5a939655c4b5bffca210abec9937fa38ed37a16f41c99c1edb51a67f6" }, "downloads": -1, "filename": "drive_sync-0.99.1.tar.gz", "has_sig": false, "md5_digest": "d4479beb949c6c4bb5c83027efbccd99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17463, "upload_time": "2018-03-03T08:57:10", "url": "https://files.pythonhosted.org/packages/c8/61/5f9fe1157b565de8d821cf74c2ff792981b52874357b50404e7716af3d0d/drive_sync-0.99.1.tar.gz" } ], "0.99.2": [ { "comment_text": "", "digests": { "md5": "f3e4f6a8090bd588a17620ac759308dc", "sha256": "f9e1bed3a3d6a350a3931325173f23e7857b4412aa0c57728a7bb5a4258a7a7b" }, "downloads": -1, "filename": "drive_sync-0.99.2.tar.gz", "has_sig": false, "md5_digest": "f3e4f6a8090bd588a17620ac759308dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17459, "upload_time": "2018-03-03T09:29:22", "url": "https://files.pythonhosted.org/packages/e9/34/88b0f75e0237a8104eae39f22a94d68376f789fc0419d3f53e170c5e18cc/drive_sync-0.99.2.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "7fc8c466d23819e6f6a7968d81f75f00", "sha256": "75de300ba7fbe9e16d4e530070cf8813d1ef7d47320106699c10f070550359bb" }, "downloads": -1, "filename": "drive_sync-1.2.tar.gz", "has_sig": false, "md5_digest": "7fc8c466d23819e6f6a7968d81f75f00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17879, "upload_time": "2018-04-01T05:51:40", "url": "https://files.pythonhosted.org/packages/a9/50/3375565d0186c22deeda4a9031dacb512408fb66ed80125ca17634bd1d86/drive_sync-1.2.tar.gz" } ], "1.211": [ { "comment_text": "", "digests": { "md5": "e2b4eb0716e821408effa41e837ec2d1", "sha256": "b14e6f0ea11ad2532289ed4f2e8bf2cf4a44c403f3e6e3f02be03ff75ec3126d" }, "downloads": -1, "filename": "drive_sync-1.211.tar.gz", "has_sig": false, "md5_digest": "e2b4eb0716e821408effa41e837ec2d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17885, "upload_time": "2018-04-01T06:11:23", "url": "https://files.pythonhosted.org/packages/fd/b6/7cbdcb0172e6206ae08bba502497d7dbcba3ec35381c501838c6892bb112/drive_sync-1.211.tar.gz" } ], "1.222": [ { "comment_text": "", "digests": { "md5": "2166fc199767c4e1e3416e3a5d131041", "sha256": "188873861a315bb2dac36e689c903ea2473b97e3e09889b942662db81e0b67ab" }, "downloads": -1, "filename": "drive_sync-1.222.tar.gz", "has_sig": false, "md5_digest": "2166fc199767c4e1e3416e3a5d131041", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17893, "upload_time": "2018-04-01T06:13:12", "url": "https://files.pythonhosted.org/packages/2d/0b/f3cd01572f71a06af263e75d1d9295eb48565dbd73bde3736511d53db070/drive_sync-1.222.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2166fc199767c4e1e3416e3a5d131041", "sha256": "188873861a315bb2dac36e689c903ea2473b97e3e09889b942662db81e0b67ab" }, "downloads": -1, "filename": "drive_sync-1.222.tar.gz", "has_sig": false, "md5_digest": "2166fc199767c4e1e3416e3a5d131041", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17893, "upload_time": "2018-04-01T06:13:12", "url": "https://files.pythonhosted.org/packages/2d/0b/f3cd01572f71a06af263e75d1d9295eb48565dbd73bde3736511d53db070/drive_sync-1.222.tar.gz" } ] }