{ "info": { "author": "alice1017", "author_email": "genocidedragon@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Filesystems", "Topic :: System :: Monitoring", "Topic :: Utilities" ], "description": "mdfmonitor - Monitor the file moification\r\n#####################################\r\n\r\nThe **mdfmonitor** is Python module about monitoring files modification using timestamp and body.\r\n\r\nThe **mdfmonitor** contains:\r\n\r\n + **FileModificationMonitor**\r\n + **URLModificationMonitor**\r\n\r\nFileModificationMonitor\r\n=================\r\n\r\nThis FileModificationMonitor (call this *monitor* from now) can monitor to a **file** or files modification.\r\n\r\nMonitor has the repository of file's **timestamp** data and **body** data.\r\nAnd monitor appends each data, then monitor **compare** new data to old data.\r\nIf new data **differ** to old data, monitor **regard** this difference to **modification**.\r\nThen monitor create instance of FileModificationObject, yield this.\r\n\r\nHow to Use\r\n------------\r\n\r\nIt's simple. \r\n\r\n1. Import this module.\r\n2. Create `FileModificationMonitor` class's instance.\r\n3. Append file or files to instance using add_file method.\r\n4. using Python for sentence, You can write anything under for sentence.\r\n\r\n::\r\n\r\n #!/usr/bin/python\r\n\r\n import os\r\n from mdfmonitor import FileModificationMonitor\r\n\r\n files = os.listdir(\".\") # >>> ['sample.txt', 'sample.py']\r\n\r\n # create Watcher instnce\r\n monitor = FileModificationMonitor()\r\n\r\n # append file to mdfmonitor instance\r\n monitor.add_file(\"sample.txt\")\r\n\r\n # or \r\n # append files to mdfmonitor instance\r\n monitor.add_files(os.listdir(\".\"))\r\n \r\n for mdf in monitor.monitor():\r\n \r\n print mdf.file.center(30, \"=\")\r\n print \"Catch the Modification!!\"\r\n print \"Old timestamp: %s\" % mdf.old_mtime\r\n print \"New timestamp: %s\" % mdf.new_mtime\r\n print \"manager: %s\" % str(mdf.manager.o_repository)\r\n print \"Diff\".center(30,\"=\")\r\n print mdf.diff\r\n\r\n\r\nURLModificationMonitor\r\n=================\r\n\r\nThis URLModificationMonitor (call this *monitor* from now) can monitor to **body of url** or urls modification.\r\n\r\nThis monitor's structure **almost same** to FileModificationMonitor.\r\nBoth monitor just difference is to time data what compare.\r\nFileModificationMonitor gets a file **timestamp**, URLModificationMonitor gets the `Date` header's **date** of server.\r\n\r\n\r\nHow to Use\r\n-------------\r\n\r\nIt's simple too. \r\n\r\n1. Import this module.\r\n2. Create `URLModificationMonitor` class's instance.\r\n3. Append url string or url string's list to instance using add_url method.\r\n4. using Python for sentence, You can write anything under for sentence.\r\n\r\n::\r\n\r\n #!/usr/bin/python\r\n \r\n import os\r\n from mdfmonitor import URLModificationMonitor\r\n \r\n files = os.listdir(\".\") # >>> ['sample.txt', 'sample.py']\r\n \r\n # create Watcher instnce\r\n monitor = URLModificationMonitor()\r\n \r\n # append file to mdfmonitor instance\r\n monitor.add_url(\"http://sampe.com/path/\")\r\n\r\n for mdf in monitor.monitor():\r\n \r\n print mdf.url.center(30, \"=\")\r\n print \"Catch the Modification!!\"\r\n print \"Old timestamp: %s\" % mdf.old_dtime\r\n print \"New timestamp: %s\" % mdf.new_dtime\r\n print \"manager: %s\" % str(mdf.manager.o_repository)\r\n print \"Diff\".center(30,\"=\")\r\n print mdf.diff", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alice1017/mdfmonitor", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "mdfmonitor", "package_url": "https://pypi.org/project/mdfmonitor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mdfmonitor/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/alice1017/mdfmonitor" }, "release_url": "https://pypi.org/project/mdfmonitor/0.1.2b/", "requires_dist": null, "requires_python": null, "summary": "The mdfmonitor can monitoring the file modification.", "version": "0.1.2b" }, "last_serial": 1040681, "releases": { "0.1.2b": [ { "comment_text": "", "digests": { "md5": "b6c8328b9693e6556908ac455069b68e", "sha256": "05eb5463e3b1e21a6a6ccdf962c67dbd2b70095ce56251bef2bc5642375801b8" }, "downloads": -1, "filename": "mdfmonitor-0.1.2b.tar.gz", "has_sig": false, "md5_digest": "b6c8328b9693e6556908ac455069b68e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3838, "upload_time": "2014-03-25T15:16:27", "url": "https://files.pythonhosted.org/packages/19/8f/ae60ff0108e18478189885ab6c3e47b0b6ed87af9057ecb2f5844466b6ef/mdfmonitor-0.1.2b.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6c8328b9693e6556908ac455069b68e", "sha256": "05eb5463e3b1e21a6a6ccdf962c67dbd2b70095ce56251bef2bc5642375801b8" }, "downloads": -1, "filename": "mdfmonitor-0.1.2b.tar.gz", "has_sig": false, "md5_digest": "b6c8328b9693e6556908ac455069b68e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3838, "upload_time": "2014-03-25T15:16:27", "url": "https://files.pythonhosted.org/packages/19/8f/ae60ff0108e18478189885ab6c3e47b0b6ed87af9057ecb2f5844466b6ef/mdfmonitor-0.1.2b.tar.gz" } ] }