{ "info": { "author": "Abhilash Raj", "author_email": "raj.abhilash1@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "Paper to Git ![Build Status](https://travis-ci.org/maxking/paper-to-git.svg?branch=master)\n============\n\nThis project aims to sync documents between [Dropbox Paper][0] and any local Git\nrepository. Why? Because apart from all other features that Paper has, it is\nan excellent in-browser markdown editor.\n\nThis is an effort to create and automate Paper->Github Pages workflow, where I\ncan create and publish my blog posts by writing them in dropbox paper and\nautomatically fetching it from there and publishing it in Github Pages.\n\n_Current State_: This project is currently in its very initial stages and\nnothing is guaranteed to work. I will update this as the project moves forward.\n\nInstall\n=======\n\nTo install, try out the following commands:\n\n```bash\n$ virtualenv dropbox-sdk --python=python3\n$ source dropbox-sdk/bin/activate\n$ python setup.py develop\n```\n\n\nUsage\n=====\nWeb Interface\n-------------\n\nPaper-to-Git comes with a neat little Web Frontend written in Flask. You can run\nthat by using:\n\n```bash\n$ paper-git serve\n```\n\nIf this is your first time, you will have to authorize usage of your dropbox\naccount. See more on that below.\n\nCommandline\n-----------\n\nYou can run `paper-git --help` in the console to print out the help text.\n\nThe first time you use `paper-git`, it will create a `var` directory in the\ncurrent working directory. This directory will hold the important files and\ndatabase related to `paper-git`.\n\nOn the first run of any commnad, like `paper-git list` will run the\nauthorization workflow for you to allow `paper-git` access to your Dropbox\naccount. Not that even if you allow, I cannot access anything in your account as\nthe authorization token is stored locally only on your machine.\n\nThe flow looks something like this:\n```bash\n$ paper-git list\n1. Go to: https://www.dropbox.com/oauth2/authorize?client_id=&response_type=code\n2. Click \"Allow\" (you might have to log in first).\n3. Copy the authorization code.\nEnter the authorization code here: \n```\n\nThis will store your authorization token in the user configuration file at\n`var/etc/paper-git.cfg`.\n\nIf you want this configuration to persist from anywhere, just copy\n`var/etc/paper-git.cfg` to `/etc/paper-git.cfg`.\n\nAfter this, you can run `update command to pull the list of all the docs`:\n\n```\n$ paper-git update\n```\n\nNote that update command doesn't pull changes in the already exsting docs in the\ndatabase. To update an existing document in the database try:\n\n```\n$ paper-git update \n```\n\nYou can list all the docs in the database using:\n\n```\n$ paper-git list --docs\n```\n\nor you can list all the folders using:\n\n```\n$ paper-git list --folder\n```\n\nYou can also add a `Sync` object to a tie together a path in a git repo to a\nPaper Folder so that they can be synchronized automatically.\n\n```\n$ paper-git add --repo --path --folder \n```\n\nNote that the `` in the above command is\ncase-insensitive. Once you replace all the variables and the above command runs\nsuccessfully, you have added a new rule to sync the documents.\n\nAfter you have add a new rule, now you can publish your documents to their\nrespective. `publish` command will copy the downloaded files to their new\ndestination along with some added metadata that most common static site\ngenerators expect.\n\nWhile the addition of metadata can be turned off if needed, it is turned on by\ndefualt for now.\n\n```\n$ paper-git publish \n```\n\nNote that this will only work for changes that have already been pulled down\nusing the `update` command.\n\nYou can play `paper-git` using an interactive shell by using the `shell`\ncommand:\n\n```bash\n$ paper-git shell\n```\n\nThis will a start an interactive `ipython` shell with an initialized `config`\nobject.\n\n```python\nIn [1]: config\nOut[1]: \n\nIn [2]: config.db\nOut[2]: \n```\n\nYou can play with the models and interact with the database:\n\n```python\n\nIn [3]: from paper_to_git.models import PaperDoc\n\nIn [4]: for doc in PaperDoc.select():\n ...: print(doc)\n ...:\n1: Document <1>\n2: Document <2>\n3: Document <3>\n```\n\nYou can also force sync of a Doc, which you have changed:\n\n```python\nIn [5]: doc = PaperDoc.get_by_paper_id('')\n\nIn [6]: doc.get_changes()\nUpdate revision for doc from 54 to 69\n```\n\nLicense:\n========\n\nThis project is licensed under MIT License. Please see the LICENSE file for a\ncomplete copy of license.\n\n\n[0]: https://paper.dropbox.com\n[1]: https://github.com/dropbox/dropbox-sdk-python#updating-api-specification\n[2]: https://github.com/pypa/virtualenv", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maxking/paper-to-git", "keywords": "dorpbox-paper git blog", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "papergit", "package_url": "https://pypi.org/project/papergit/", "platform": "", "project_url": "https://pypi.org/project/papergit/", "project_urls": { "Homepage": "https://github.com/maxking/paper-to-git" }, "release_url": "https://pypi.org/project/papergit/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Sync between Dropbox Paper and any local git repo.", "version": "0.1.3" }, "last_serial": 3075848, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "88b56278efa0eec673e114e35e44eeeb", "sha256": "abb6a7dafdaac1278f83180c3d49742b319575fecc0814efc2e8ad1b0df2896c" }, "downloads": -1, "filename": "papergit-0.1.1.tar.gz", "has_sig": true, "md5_digest": "88b56278efa0eec673e114e35e44eeeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16603, "upload_time": "2017-08-06T03:06:40", "url": "https://files.pythonhosted.org/packages/c9/ca/baadfe00bb4eb0ee689940d197c4cc385faa4030c8b9c84d4708b196f1f5/papergit-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2097ef2a5682af79255295b85b3065dc", "sha256": "8672e2c0a781c2a2a07d508f9f3b045a947b698fe0a37a71c17a017eacf7beec" }, "downloads": -1, "filename": "papergit-0.1.2.tar.gz", "has_sig": true, "md5_digest": "2097ef2a5682af79255295b85b3065dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16603, "upload_time": "2017-08-06T03:13:41", "url": "https://files.pythonhosted.org/packages/0b/7b/940bb16aea56a782d91f546a9c703536f1f790daa670f255445c335fcf5a/papergit-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8e2251a8b42d84ef57583f873dd2f404", "sha256": "78eee577a6be8b564a17a767764eb0a4bb227fabbe1e7dc308c3c1119f039b88" }, "downloads": -1, "filename": "papergit-0.1.3.tar.gz", "has_sig": true, "md5_digest": "8e2251a8b42d84ef57583f873dd2f404", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15896, "upload_time": "2017-08-06T03:42:22", "url": "https://files.pythonhosted.org/packages/e8/dd/c94ba084c29216e590b59d626f83903df06e1d20f2a3fa8795901083fc27/papergit-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e2251a8b42d84ef57583f873dd2f404", "sha256": "78eee577a6be8b564a17a767764eb0a4bb227fabbe1e7dc308c3c1119f039b88" }, "downloads": -1, "filename": "papergit-0.1.3.tar.gz", "has_sig": true, "md5_digest": "8e2251a8b42d84ef57583f873dd2f404", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15896, "upload_time": "2017-08-06T03:42:22", "url": "https://files.pythonhosted.org/packages/e8/dd/c94ba084c29216e590b59d626f83903df06e1d20f2a3fa8795901083fc27/papergit-0.1.3.tar.gz" } ] }