{ "info": { "author": "Beining", "author_email": "i@cnbeining.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: System :: Archiving :: Backup", "Topic :: Utilities" ], "description": "onedrivecmd\n===========\n\nA command line client for Onedrive(including Office 365 and Business).\n\nBased on\n`onedrive-sdk-python `__\n, with lots of modifications.\n\nThis is very much a copycat of\n`megacmd `__ , but in different\nlanguage.\n\nWhy onedrivecmd?\n~~~~~~~~~~~~~~~~\n\nOnedrive is a cloud-storage service provided by Microsoft. Education\nusers can get 1TB of storage for free, which can be redeemed at\nhttps://products.office.com/en-us/student?tab=students .\n\nSince the recent update of Onedrive\u2019s API, there aren\u2019t a lot of \\*nix\nsoftwares that would provide support to Onedrive, most of them are\nsyncing softwares: But I prefer have more control of what I am doing. So\nhere it is, a tiny client that can do the jobs for you.\n\nFeatures\n~~~~~~~~\n\n- Ability to access files and folders using a path URI\n- Configuration file (~/.onedrive.json)\n- Folder/file get operations, and retry when failed (experimental)\n- Folder/file put operations, and retry when failed (experimental)\n- List operation (shows file size and timestamp)\n- Download and upload with native progress bar (with option of\n downloading with aria2!)\n- Remote download links to your drive(NEW! Not even available via Web\n console) (Only available at personal due to API limit)\n- Supports Office 365!\n- Python 2 and 3 compatible. Tested with lots of cases but please\n report if it is not working somehow.\n- Get share link and direct download link!\n\nInstall\n-------\n\nAs easy as: ``pip install onedrivecmd``!\n\nAlso you can clone this project, then execute\n``python3 setup.py install`` or ``python setup.py install``\n\nUsage\n~~~~~\n\n::\n\n Usage onedrivecmd:\n onedrivecmd -h \n onedrivecmd [OPTIONS] init\n onedrivecmd [OPTIONS] init_business\n onedrivecmd [OPTIONS] list od:/foo/bar/\n onedrivecmd [OPTIONS] share od:/foo/doc.txt\n onedrivecmd [OPTIONS] direct od:/foo/image.jpg\n onedrivecmd [OPTIONS] get od:/foo/file.txt /tmp/\n onedrivecmd [OPTIONS] get od:/boo/dir/ ./localdir/\n onedrivecmd [OPTIONS] put /tmp/hello.txt od:/bar/\n onedrivecmd [OPTIONS] put /tmp/dir/ od:/bar/\n onedrivecmd [OPTIONS] delete od:/foo/bar\n onedrivecmd [OPTIONS] mkdir od:/foo/bar/\n onedrivecmd [OPTIONS] search foobar\n onedrivecmd [OPTIONS] remote http://thecatapi.com/api/images/get?format=src&type=gif\n onedrivecmd [OPTIONS] quota\n\n\n -conf=\"~/onedrive.json\": Config file path, this file is as important as your password!\n -h: Help\n -hack: Use aria2 to download file, or the SDK's built-in uploader (without progress bar!)\n -recursive=false: Recursive listing\n -chunk=62914560: Chunk size when uploading \n -url=False: Only display the URL when downloading, temp one\n\nHow to run onedrivecmd?\n~~~~~~~~~~~~~~~~~~~~~~~\n\nInstall dependencies:\n\n\n*Only when you are installing from source code*\n\nThere are 3 packages you should install:\n\n::\n\n onedrivesdk < 2\n progress\n requests\n\nDo a ``pip install -r requirements.txt`` at the folder.\n\nLogin:\n\nDo a ``onedrivecmd init`` , or ``onedrivecmd init_business`` if you are\nusing Business or Office 365.\n\nYou shall be given a URL like\n\n::\n\n https://login.live.com/oauth20_authorize.srf?scope=wl.signin+wl.offline_access+onedrive.readwrite&redirect_uri=https%3A%2F%2Fod.cnbeining.com&response_type=code&client_id=aeba6391-92fd-437d-a9d9-33a258b96c4e\n\nAuthorize your login.\n\nYes you shall be redirected to ``https://od.cnbeining.com/``, which\napparently is owned by me. This page is hosted at `branch\ngh-pages `__,\nwith a Cloudflare at the front. I am doing this so you can just do a\nquick select-all and paste. If you have doubt, change the information in\n``static.py``.\n\nThe login information is storaged at ``~/.onedrive.json``, or any\nlocation you demanded. This file should be treated as secret as your\npassword.\n\nAfter this very first time init, the ``access_token`` shall be refreshed\nevery time you run the programme.\n\nPitfalls\n~~~~~~~~\n\nTo list directory contents, use:\n\n::\n\n $ onedrivecmd list od:/foo/bar/\n\nNames ending with \u2018/\u2019 is a directory. The size of directory is the size\nof the sum of its content.\n\nTo recursively list a directory use, -recursive option.\n\n::\n\n $ onedrivecmd -recursive list od:/foo/bar/\n\nThe delete can only move the item to the trash bin, as there is no way\nof just delete the item. Make sure you clean your trash.\n\n::\n\n $ onedrivecmd delete od:/foo/bar/file\n\nExamples\n~~~~~~~~\n\n::\n\n $ onedrivecmd init\n\n https://login.live.com/oauth20_authorize.srf?scope=wl.signin+wl.offline_access+onedrive.readwrite&redirect_uri=https%3A%2F%2Fod.cnbeining.com&response_type=code&client_id=aeba6391-92fd-437d-a9d9-33a258b96c4e\n\n Paste this URL into your browser, approve the app's access.\n Copy all the code in the new window, and paste it below:\n Paste code here: Ma0d6f772-****-e5ea-8d5a-****** \n\n $ onedrivecmd init_business\n ATTENTION: This is for Onedrive Business and Office 365 only.\n If you are using normal Onedrive, lease exit and run\n\n onedrivecmd init\n\n https://login.microsoftonline.com/common/oauth2/authorize?redirect_uri=https%3A%2F%2Fod.cnbeining.com&response_type=code&client_id=6fdb55b4-c905-4612-bd23-306c3918217c\n\n Paste this URL into your browser, approve the app's access.\n Copy all the code in the new window, and paste it below:\n Paste code here: (Very long!)\n\n $ onedrivecmd list od:/\n od:/133/ 0 2016-09-24T04:17:58.957000Z\n od:/134/ 0 2016-09-24T05:11:17.190000Z\n od:/New Folder/ 351 2016-09-22T03:02:25.423000Z\n od:/1.png 342677 2016-09-24T04:28:51.617000Z\n od:/OneDrive \u5165\u95e8.pdf 1159342 2016-08-23T03:03:55.043000Z\n\n $ onedrivecmd put /tmp/demo/ od:/test/\n\n [2019-03-19 11:57:07]\n /tmp/demo/index.html ==> od:/test/demo/index.html\n Uploading |################################| 100.0% - 0s\n\n [2019-03-19 11:57:26]\n /tmp/demo/Pic/1.png ==> od:/test/demo/Pic/1.png\n Uploading |################################| 100.0% - 0s\n\n [2019-03-19 11:57:44]\n /tmp/demo/Pic/2.png ==> od:/test/demo/Pic/2.png\n Uploading |################################| 100.0% - 0s\n\n [2019-03-19 11:58:03]\n /tmp/demo/Pic/test/365.ps1 ==> od:/test/demo/Pic/test/365.ps1\n Uploading |################################| 100.0% - 0s\n\n [2019-03-19 11:58:22]\n /tmp/demo/Pic/3.jpg ==> od:/test/demo/Pic/3.jpg\n Uploading |################################| 100.0% - 0s\n\n $ onedrivecmd get od:/1.pdf\n Downloading |###### | 21.4% - 74s\n\n # personal\n $ onedrivecmd share od:/1.png\n https://1drv.ms/u/s!AnpifX1Elagmb_7sFIiyr2ipY1k\n\n $ onedrivecmd direct od:/1.png\n https://onedrive.live.com/download?resid=26A895447D7D627A!111&authkey=!AP7sFIiyr2ipY1k\n\n # Office 365\n $ onedrivecmd share od:/onedrive.json\n https://ad-my.sharepoint.com/personal/email/_layouts/15/guestaccess.aspx?docid=xxx&authkey=xxx\n\n $ onedrivecmd direct od:/onedrive.json\n https://ad-my.sharepoint.com/personal/email/_layouts/15/download.aspx?docid=md5&authkey=xxx\n\n $ onedrivecmd -hack get od:/1.png\n [#e257f9 16KiB/334KiB(4%) CN:1 DL:230KiB ETA:1s] \n 09/24 02:10:56 [NOTICE] Download complete: **onedrivecmd/1.png\n\n Download Results:\n gid |stat|avg speed |path/URI\n ======+====+===========+=======================================================\n e257f9|OK | 343KiB/s|**onedrivecmd/1.png\n\n Status Legend:\n (OK):download completed.\n\n $ onedrivecmd search file.txt\n 01DERSD4MVUNK66BVQRFFZZEDK7FILJSYS file.txt 1073741824 2017-08-30T05:55:24Z\n 01DERSD4JFGCT7P2VFFVEI3KXDPASSCX2H files.txt 89 2017-08-30T05:46:38Z\n\n $ onedrivecmd mkdir od:/145\n\n $ onedrivecmd remote \"http://wscont2.apps.microsoft.com/winstore/1x/.../Screenshot.225037.100000.jpg\"\n https://api.onedrive.com/v1.0/monitor/...\n\n $ onedrivecmd quota\n\n Total Size: 1.0TiB,\n Used: 1.6MiB,\n Remaining: 1024.0GiB,\n Deleted: 0.0B,\n\n Your state is: normal\n\nTODO\n~~~~\n\n- Recursive \u2018mkdir\u2019.\n- Perfect retry-when-failed function.\n- Move\n- Code refactoring\n- I will not write sync since we have\n `rclone `__ which already supports\n Onedrive. Feel free to send me pull requests though.\n- I cannot think of anything. Open issues if you have amazing ideas.\n\nHow to Contribute ?\n~~~~~~~~~~~~~~~~~~~\n\nAny PR or issue would be appreciated.\n\nLicense\n~~~~~~~\n\nAGPL\n\nAuthor\n~~~~~~\n\nBeining, https://www.cnbeining.com/ , ``i [at] cnbeining.com`` .\n\nDriven by coffee, coffee and coffee.\n\nCollaborator/Dict Xiong, https://beardic.cn/, ``me [at] beardic.cn``.\n\nFurkan \u00d6ZO\u011eUL (https://gitlab.com/ozogulf ) solved the SDK issue.\n\n\u4e2d\u6587\u8bf4\u660e\n~~~~~~~~\n\n`\u70b9\u8fd9\u91cc `__\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cnbeining/onedrivecmd", "keywords": "onedrive backup", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "OnedriveCMD", "package_url": "https://pypi.org/project/OnedriveCMD/", "platform": "", "project_url": "https://pypi.org/project/OnedriveCMD/", "project_urls": { "Homepage": "https://github.com/cnbeining/onedrivecmd" }, "release_url": "https://pypi.org/project/OnedriveCMD/0.1.8.1/", "requires_dist": null, "requires_python": "", "summary": "A command line client for Onedrive.", "version": "0.1.8.1" }, "last_serial": 5817412, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f276cc54af7305ae135899789792a726", "sha256": "5212dda0c1ad9e5ca25b5c0e9a6a8b6d7dd477fa0c00c3096bff7f0a7dbea642" }, "downloads": -1, "filename": "OnedriveCMD-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "f276cc54af7305ae135899789792a726", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 36113, "upload_time": "2017-07-24T03:25:56", "url": "https://files.pythonhosted.org/packages/3a/a5/437085fdba21e6017149e1b18fae4da0976266a4f1eb332ac4055b1873f3/OnedriveCMD-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "c8e5352556055253852d44fb70f33deb", "sha256": "8f45889423a5cd685ae41c54d58ee2cb8640d6edcf984d0de431bc1989b23d28" }, "downloads": -1, "filename": "OnedriveCMD-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c8e5352556055253852d44fb70f33deb", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 23794, "upload_time": "2017-07-24T03:25:52", "url": "https://files.pythonhosted.org/packages/77/bf/7c392b1a744f49dcc0aa50ac311e123cee9c12e1e9e86ddb6d3476d7fd77/OnedriveCMD-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c45f7bd53b518ec8be90cccc2728deee", "sha256": "986d448b3efc41e1b581d854e01924b1332e654b112252e3caf916f3371e08ce" }, "downloads": -1, "filename": "OnedriveCMD-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c45f7bd53b518ec8be90cccc2728deee", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23797, "upload_time": "2017-07-24T03:25:54", "url": "https://files.pythonhosted.org/packages/17/81/83607981fc822ae4350816c74306f6ab59144fe682625efe766962b8cdf3/OnedriveCMD-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0e17c09bf166ff6c69233dcfeef451e", "sha256": "8958fbf76edaa7e3b6cabe987628c8960c1f10b82959f5847599b453db6eebc1" }, "downloads": -1, "filename": "OnedriveCMD-0.1.0-py3.5.egg", "has_sig": false, "md5_digest": "a0e17c09bf166ff6c69233dcfeef451e", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 36633, "upload_time": "2017-07-24T03:25:58", "url": "https://files.pythonhosted.org/packages/b4/ee/3c76d95b421a8a4face699f63f957e29a1c62d1c5aa149ee59f66e125e45/OnedriveCMD-0.1.0-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "29977b9dc6191b79b46bd67b820299c9", "sha256": "5004ee09c3ec840cd6246fbd8d73f9be33fb53015e89eec00758f682cf8aa32a" }, "downloads": -1, "filename": "OnedriveCMD-0.1.0.tar.gz", "has_sig": false, "md5_digest": "29977b9dc6191b79b46bd67b820299c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16495, "upload_time": "2017-07-24T03:26:00", "url": "https://files.pythonhosted.org/packages/ac/59/2902cbcae7c17ae8d975e8f363b2d33c6610bd4d31810c5e957bcb555d15/OnedriveCMD-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "680830a42f461d5c5dba6cb44233229c", "sha256": "ebb1e182a36236b2f5938e5485f727022a696d2a42a599bf90df3dfa1a2fc516" }, "downloads": -1, "filename": "OnedriveCMD-0.1.1-py2.7.egg", "has_sig": false, "md5_digest": "680830a42f461d5c5dba6cb44233229c", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 36220, "upload_time": "2017-08-10T20:17:41", "url": "https://files.pythonhosted.org/packages/7f/52/5c1d13bbba1a7a23c3e8ee3d06f61e491a3fc5a716fc51678666f1305809/OnedriveCMD-0.1.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8eec484d950500471c0e6f471773f8a0", "sha256": "f97f158f1f771eb4df6593a8e03fe1ef0ac5be0b1e4d025b5ab20a2694b6c2a5" }, "downloads": -1, "filename": "OnedriveCMD-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8eec484d950500471c0e6f471773f8a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16516, "upload_time": "2017-08-10T20:17:38", "url": "https://files.pythonhosted.org/packages/5e/37/287b45dd02c07b49224449ad99d999a81aecbfc5a40995be1489285a96bf/OnedriveCMD-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "016dac3faaf67feeb4fd95e747ab28b4", "sha256": "7f2e91f4a4ab4970b71b5dd3b4c39caa8c03270c2d16cd8d06eee911350f3eaf" }, "downloads": -1, "filename": "OnedriveCMD-0.1.2.tar.gz", "has_sig": false, "md5_digest": "016dac3faaf67feeb4fd95e747ab28b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28756, "upload_time": "2017-08-10T20:22:22", "url": "https://files.pythonhosted.org/packages/f7/f3/e2f692dd20734c333923494d10d87ff454fd77bce8b8c5759cf5e44b5af9/OnedriveCMD-0.1.2.tar.gz" } ], "0.1.2.1": [ { "comment_text": "", "digests": { "md5": "2fe1372d3ef9d225cdc6b627904521d0", "sha256": "7bc1ed851e1f001338f2cfcba6f8b58accec45587afa112b262bb19bea41ea84" }, "downloads": -1, "filename": "OnedriveCMD-0.1.2.1.tar.gz", "has_sig": false, "md5_digest": "2fe1372d3ef9d225cdc6b627904521d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28775, "upload_time": "2017-08-10T20:37:17", "url": "https://files.pythonhosted.org/packages/51/75/7c64fd86becc5c6ab7c48231b04350d6592ce829da223d5307c4deaf466c/OnedriveCMD-0.1.2.1.tar.gz" } ], "0.1.2.2": [ { "comment_text": "", "digests": { "md5": "b08cf852d53df8a5a9eba4635ad379c0", "sha256": "227a2798bbb04d591dfa44b8965105eb72c4658a3dec5f8015501f592015e98e" }, "downloads": -1, "filename": "OnedriveCMD-0.1.2.2.tar.gz", "has_sig": false, "md5_digest": "b08cf852d53df8a5a9eba4635ad379c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28791, "upload_time": "2017-08-10T20:47:56", "url": "https://files.pythonhosted.org/packages/3e/af/bb372ae281e13c4862dc8b9781343f5bdd6ddb3295f5f8e5d0409db90edc/OnedriveCMD-0.1.2.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f42a2cece5de641d1760d1d136c9abcb", "sha256": "dafa0eb96a4aa9a443d192d403de7a755c06751d85aed8aeeac91433fb118a04" }, "downloads": -1, "filename": "OnedriveCMD-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f42a2cece5de641d1760d1d136c9abcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29499, "upload_time": "2017-08-10T23:07:39", "url": "https://files.pythonhosted.org/packages/48/12/b45e2c9701f34f65b40553ac4a4b5cd66d81fafc002082d141ef865d4496/OnedriveCMD-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "53b22b3626ba5a9371d09c15ddd9ab81", "sha256": "392baacb8170b5f4d313ff45d2c33b97431602c9e6ebece209355f96b1c0204d" }, "downloads": -1, "filename": "OnedriveCMD-0.1.4.tar.gz", "has_sig": false, "md5_digest": "53b22b3626ba5a9371d09c15ddd9ab81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30374, "upload_time": "2017-08-30T05:48:55", "url": "https://files.pythonhosted.org/packages/02/57/e74f33815069afe7878eeb6bf1aaaed96e9ebc7887dc58e262c3eb551985/OnedriveCMD-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "52a7babf16ec01e1344e343cf1d7ff13", "sha256": "5a1b36dabadffd4ab54f7802eb557640862528aebbb473196b2b01f97b849ccc" }, "downloads": -1, "filename": "OnedriveCMD-0.1.5.tar.gz", "has_sig": false, "md5_digest": "52a7babf16ec01e1344e343cf1d7ff13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37007, "upload_time": "2018-01-11T23:00:47", "url": "https://files.pythonhosted.org/packages/32/54/cb8ddd9731cce5d9165f22934e08891f3ffedd165ff47358eb3849fb9eb9/OnedriveCMD-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "1d4df34a9b5de0a8965cc7c886b4d0e6", "sha256": "3842b5e06af72cc52040d6c20f73191757450b72a4fc30408a1e2738016053c7" }, "downloads": -1, "filename": "OnedriveCMD-0.1.6.tar.gz", "has_sig": false, "md5_digest": "1d4df34a9b5de0a8965cc7c886b4d0e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37312, "upload_time": "2018-04-07T06:17:31", "url": "https://files.pythonhosted.org/packages/0b/ba/76e4bc87d7e275e7dd2024852d9057e543849ae2ab0e674a6c92e4267057/OnedriveCMD-0.1.6.tar.gz" } ], "0.1.8.1": [ { "comment_text": "", "digests": { "md5": "62a6ffdf6bdfac0a863bd2b4bbb9b7f2", "sha256": "51d96acd3b940c3a96ecdecd66712260720f2811ac5cf479a4c7b3a0f5cada51" }, "downloads": -1, "filename": "OnedriveCMD-0.1.8.1.tar.gz", "has_sig": false, "md5_digest": "62a6ffdf6bdfac0a863bd2b4bbb9b7f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33996, "upload_time": "2019-09-11T23:24:12", "url": "https://files.pythonhosted.org/packages/2a/bd/162f2536876076a075a2c1dd117a48cdd7a3cf07df0338bc0f2cf5d13ffb/OnedriveCMD-0.1.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62a6ffdf6bdfac0a863bd2b4bbb9b7f2", "sha256": "51d96acd3b940c3a96ecdecd66712260720f2811ac5cf479a4c7b3a0f5cada51" }, "downloads": -1, "filename": "OnedriveCMD-0.1.8.1.tar.gz", "has_sig": false, "md5_digest": "62a6ffdf6bdfac0a863bd2b4bbb9b7f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33996, "upload_time": "2019-09-11T23:24:12", "url": "https://files.pythonhosted.org/packages/2a/bd/162f2536876076a075a2c1dd117a48cdd7a3cf07df0338bc0f2cf5d13ffb/OnedriveCMD-0.1.8.1.tar.gz" } ] }