{ "info": { "author": "AbdealiJK", "author_email": "abdealikothari@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: Implementation :: CPython" ], "description": "Introduction\n============\n\n``file-metadata`` is a python package that aims to analyze files and find\nmetadata that can be used from it.\n\nInstallation\n============\n\nBefore installing file-metadata, a few dependencies need to be\ninstalled. For Ubuntu, these can be installed with::\n\n $ sudo apt-get install perl openjdk-7-jre python-dev pkg-config \\\n > libfreetype6-dev libpng12-dev liblapack-dev libblas-dev gfortran \\\n > cmake libboost-python-dev libzbar-dev\n\nNext, use ``pip`` to install the library. To install the latest stable\nversion, use::\n\n $ pip install file-metadata\n\nTo get development builds from the master branch of the github repo, use::\n\n $ pip install --pre file-metadata\n\nUsage\n=====\n\nTo use the package, you first need a file which can be any media file.\n\nLet us first download an example qrcode from commons wikimedia::\n\n $ wget https://upload.wikimedia.org/wikipedia/commons/5/5b/Qrcode_wikipedia.jpg -O qrcode.jpg\n\nAnd now, let us create a File object from this::\n\n >>> from file_metadata.generic_file import GenericFile\n >>> qr = GenericFile.create('qrcode.jpg')\n\nNotice that when creating the file, the class automatically finds the best\ntype of class to analyze the file. In this case, it auto detecs that the\nfile is an image file, and uses the ``ImageFile`` class::\n\n >>> qr.__class__.__name__\n 'ImageFile'\n\nNow, to find possible analysis routines supported for the file, ``help(qr)``\ncan be checked. All routines beginning with ``analyze_`` perform analysis.\nAs the example we have is a qrcode, let us use ``analyze_barcode_zxing()``::\n\n >>> qr.analyze_barcode_zxing()\n {'zxing:Barcodes': [{'data': 'http://www.wikipedia.com',\n 'format': 'QR_CODE',\n 'points': [(50.0, 316.0), (50.0, 52.0), (314.0, 52.0), (278.0, 280.0)],\n 'raw_data': 'http://www.wikipedia.com'}]}\n\nWhich tells us the bounding box of the barcode (``points``) and also the data\n(``http://www.wikipedia.com``). It also mentions that the format of the barcode\nis QR_CODE.\n\nSimilarly, to check the mimetype, the analysis routing ``analyze_mimetype()``\ncan be used::\n\n >>> qr.analyze_mimetype()\n {'File:MIMEType': 'image/jpeg'}\n\nTo perform all the analyze routines on the image, the\n``analyze()`` method can be used. It runs all the analysis routines on the\nfile and gives back the merged result::\n\n >>> qr.analyze()\n \nDevelopment\n===========\n\nTesting\n-------\n\nTo test the code, install dependencies using::\n\n $ pip install -r test-requirements.txt\n\nand then execute::\n\n $ python -m pytest\n\nDocker\n------\n\nTo pull the ``latest`` docker image use::\n\n $ docker pull pywikibotcatfiles/file-metadata\n\nSupported tags and respective ``Dockerfile`` links:\n * ``latest``, ``ubuntu-14.04`` (`docker/Dockerfile `__)\n * ``ubuntu-16.04`` (`docker/Dockerfile `__)\n * ``centos-7`` (`docker/Dockerfile `__)\n * `show all... `__\n\nFor more information about this image and its history, please see\n``pywikibotcatfiles/file-metadata`` (`on docker-hub `__).\nThis image is updated via push to the ``pywikibot-catfiles/docker-file-metadata``\n`GitHub repo `__\nor the ``pywikibot-catfiles/file-metadata``\n`GitHub repo `__ (by\nTriggering builds through the Travis CI API).\n\nBuild status\n------------\n\n.. image:: https://travis-ci.org/pywikibot-catfiles/file-metadata.svg?branch=master\n :target: https://travis-ci.org/pywikibot-catfiles/file-metadata\n\n.. image:: https://codecov.io/gh/pywikibot-catfiles/file-metadata/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pywikibot-catfiles/file-metadata\n\n.. image:: https://travis-ci.org/pywikibot-catfiles/docker-file-metadata.svg?branch=master\n :target: https://travis-ci.org/pywikibot-catfiles/docker-file-metadata\n\nCredits\n-------\n\nThis package has been derived from `pywikibot-compat\n`__.\nSpecifically, the script ``catimages.py`` which can be found at\n`pywikibot-compat/catimages.py\n`__.\nThese packages were created by `DrTrigon `__ who\nis the original author of this package.\n\nLICENSE\n=======\n\n.. image:: https://img.shields.io/github/license/pywikibot-catfiles/file-metadata.svg\n :target: https://opensource.org/licenses/MIT\n\nThis code falls under the\n`MIT License `__.\nPlease note that some files or content may be copied from other places\nand have their own licenses. Dependencies that are being used to generate\nthe databases also have their own licenses.\n", "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/AbdealiJK/file-metadata", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "file-metadata", "package_url": "https://pypi.org/project/file-metadata/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/file-metadata/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/AbdealiJK/file-metadata" }, "release_url": "https://pypi.org/project/file-metadata/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Helps to find structured metadata from a given file.", "version": "0.2.0" }, "last_serial": 2261123, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a558f1241d784808b183ec3bab43fd44", "sha256": "da6a453a954208be21534d9c81f63c252c1405a1e361477ef9e818ac21f8d4c5" }, "downloads": -1, "filename": "file-metadata-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a558f1241d784808b183ec3bab43fd44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17233, "upload_time": "2016-06-11T08:08:55", "url": "https://files.pythonhosted.org/packages/3c/ce/ec247d4949ab386bea81a500a8c8008af81f49eae7a69f2e605068a1ebb5/file-metadata-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4d545e1375e020a73cca147f092fac19", "sha256": "96a67e8b16f898a0acfaef3948467e94fda0db5dcd99f2a5c9f89766d6097306" }, "downloads": -1, "filename": "file-metadata-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4d545e1375e020a73cca147f092fac19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 631074, "upload_time": "2016-08-04T02:58:20", "url": "https://files.pythonhosted.org/packages/23/01/11b9557430c7a53c330e1ea20b05fb785c19169113b6b487456db37175ba/file-metadata-0.2.0.tar.gz" } ], "0.2.0.dev3": [ { "comment_text": "", "digests": { "md5": "90058092dcdd1199802e6f98e03fa493", "sha256": "cf2a8b040a0e9306649d79f9af96452df73f53eb381ed56087b587b7ebaeedc4" }, "downloads": -1, "filename": "file-metadata-0.2.0.dev3.tar.gz", "has_sig": false, "md5_digest": "90058092dcdd1199802e6f98e03fa493", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 631106, "upload_time": "2016-08-03T02:21:11", "url": "https://files.pythonhosted.org/packages/81/7b/eab27cda752ef9ed336105c2390f3bac3bb3f1531b3df8901991bede231f/file-metadata-0.2.0.dev3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4d545e1375e020a73cca147f092fac19", "sha256": "96a67e8b16f898a0acfaef3948467e94fda0db5dcd99f2a5c9f89766d6097306" }, "downloads": -1, "filename": "file-metadata-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4d545e1375e020a73cca147f092fac19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 631074, "upload_time": "2016-08-04T02:58:20", "url": "https://files.pythonhosted.org/packages/23/01/11b9557430c7a53c330e1ea20b05fb785c19169113b6b487456db37175ba/file-metadata-0.2.0.tar.gz" } ] }