{ "info": { "author": "Adam Thompson-Sharpe", "author_email": "adamthompsonsharpe@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: Public Domain", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6" ], "description": "# MBH Updater\nA Python script designed for frontend updating of files.\nNot intended for use as a GIT alternative for backend programming.\n\n## Overview\nThis is a fairly simple program that will copy files from online and keep the file structure. For example, if you have `/path/to/file/code.txt` and `/path/to/code.txt`, it will keep those files in those folders locally.\n\n## Documentation\n### Updater class\nWhat each class variable means.\n\n class Updater(object):\n\n def __init__(local_version_file=\"version.txt\",\n latest_version_file=\"new_version.txt\",\n latesturl=False, new_files=[],\n new_filesurl=True, output=True,\n source_file=\"\", source_file_enabled=True,\n source_fileurl=True, files_offset=0)\n \"\"\"\n local_version_file: The downloaded version of the software.\n Should contain a number, like 1, 1.2, 1.234.\n latest_version_file: Likely stored online. This is the latest version of the software.\n Should contain a number, like 2, 2.3, 2.345.\n latesturl: Boolean. Whether or not the file stored at latest_version_file is a url.\n new_files: Array. Contains the location of the files to update if the versions don't match.\n new_filesurl: Boolean. Whether or not the items listed in new_files are urls.\n output: Boolean. Whether or not to write to screen. Ignored for TQDMUpdater.\n source_file: (optional) The location of the source file (where all files required to pull\n are stored).\n source_file_enabled: Boolean. Whether or not to use the source file feature.\n source_fileurl: Whether or not the source file is stored online.\n files_offset: Integer. Contains the folder offset to add to URLs when pulling from online. (eg. If the url is http://files.net/files/source/file.txt, and files_offset is 1, it will be pulled into /source/file.txt. If the offset is 2, it will not be stored in an extra folder.)\n \"\"\"\n\n### Initialize the updater\n##### Standard\n import mbhupdater.updater\n\n updater = mbhupdater.updater.Updater()\n##### tqdm (Progress Bar)\n import mbhupdater.tqdm_updater\n\n updater = mbhupdater.tqdm_updater.TQDMUpdater()\n\n### Pull the new files\nPull without comparing versions: \n `updater.pull_files()` \nPull if local version is outdated: \n `updater.compare_and_pull()` \n\nWhen you are pulling files from online, you MUST include the `http://` or `https://` part of the URL in the sources list, otherwise there may be errors in both pulling the file from online, and writing the files locally.\n\n### Example source file\nThere is an optional source file feature in the updater.\nIf you're using it, this is how you would format it:\n\n http://www.location1.com/file/file.txt\n http://files.server.net/files/code.py\n [DELETE]\n /local/path/to/file.txt\n /local/path/to/file2.txt\n /old/thing/file.txt\n /old/folder/\n /temp/\nMake sure to include the `http://` or `https://` for online files, otherwise it will not output to the correct folder and may crash. \nAny files under the `[DELETE]` tag will be deleted instead of updated/created. The path for deletion must be a local file, not a URL. \nIf you want to delete a folder, you must have a `/` at the end.\n\n### Getters and setters\nPretty easy to guess what they do, they just use the variable names in the functions. Here's a list:\n\n # Getters\n get_local_version_file()\n get_latest_version_file()\n get_latesturl_status()\n get_files_offset()\n get_new_filesurl_status()\n get_output_status()\n get_local_version()\n get_latest_version()\n get_source_file_enabled()\n get_source_fileurl_status()\n # Setters\n set_local_version_file(local_version_file)\n set_latest_version_file(latest_version_file)\n set_source_file(source_file)\n set_files_offset()\n toggle_latesturl()\n toggle_new_filesurl()\n toggle_output()\n toggle_source_file_enabled()\n toggle_source_fileurl()\nAll functions have descriptions that will show up in IDEs.\n\n### Other functions\n # Other functions\n compare_versions() - Returns True if the versions match and False if the local one is out of date.\n read_files() - Reads the content of the version files. Must use before get_local_version() or get_latest_version()\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MysteryBlokHed/mbhupdater", "keywords": "", "license": "Unlicense", "maintainer": "", "maintainer_email": "", "name": "mbhupdater", "package_url": "https://pypi.org/project/mbhupdater/", "platform": "", "project_url": "https://pypi.org/project/mbhupdater/", "project_urls": { "Homepage": "https://github.com/MysteryBlokHed/mbhupdater" }, "release_url": "https://pypi.org/project/mbhupdater/0.1.0/", "requires_dist": [ "tqdm" ], "requires_python": "", "summary": "An easy-to-use, OS-Independent updater for games/programs.", "version": "0.1.0" }, "last_serial": 5853214, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "11f22835f0d230d5b5ec8776e2aa1772", "sha256": "8d204c7225f7780591f6d2e5ff3771d1e0e85ac5f2486c4e940e6dcfb2840f87" }, "downloads": -1, "filename": "mbhupdater-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "11f22835f0d230d5b5ec8776e2aa1772", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7969, "upload_time": "2019-09-19T00:10:44", "url": "https://files.pythonhosted.org/packages/75/45/69a01e90323dd3fd95227b964a2be9cb64a38381263940d3f636d4f15662/mbhupdater-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb001f7760c4be4de56feea3bda2856c", "sha256": "da73b7498f98bc3ca16b662baa37b1e552279eaaa6caf34a9b0e19e98d069cd7" }, "downloads": -1, "filename": "mbhupdater-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bb001f7760c4be4de56feea3bda2856c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6477, "upload_time": "2019-09-19T00:10:47", "url": "https://files.pythonhosted.org/packages/98/d6/0fd0af3cece077ea4a6b7675d4986e9b81bb2b151c5176c86d4ea0977bf7/mbhupdater-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "11f22835f0d230d5b5ec8776e2aa1772", "sha256": "8d204c7225f7780591f6d2e5ff3771d1e0e85ac5f2486c4e940e6dcfb2840f87" }, "downloads": -1, "filename": "mbhupdater-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "11f22835f0d230d5b5ec8776e2aa1772", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7969, "upload_time": "2019-09-19T00:10:44", "url": "https://files.pythonhosted.org/packages/75/45/69a01e90323dd3fd95227b964a2be9cb64a38381263940d3f636d4f15662/mbhupdater-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb001f7760c4be4de56feea3bda2856c", "sha256": "da73b7498f98bc3ca16b662baa37b1e552279eaaa6caf34a9b0e19e98d069cd7" }, "downloads": -1, "filename": "mbhupdater-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bb001f7760c4be4de56feea3bda2856c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6477, "upload_time": "2019-09-19T00:10:47", "url": "https://files.pythonhosted.org/packages/98/d6/0fd0af3cece077ea4a6b7675d4986e9b81bb2b151c5176c86d4ea0977bf7/mbhupdater-0.1.0.tar.gz" } ] }