{ "info": { "author": "Martin Aspeli", "author_email": "optilude@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "transmogrify.filesystem\n=======================\n\nTransmogrifier source for reading files from the filesystem\n\nThis package provides a `Transmogrifier\n`_ data source for\nreading files, images and directories from the filesystem. The output format\nis geared towards constructing Plone ``File``, ``Image`` or ``Folder``\ncontent. It is also possible to add arbitrary metadata (such as titles and\ndescriptions) to the content items, by providing these in a separate CSV\nfile.\n\nInstallation\n------------\n\nFirst, add ``transmogrify.filesystem`` as a dependency of your product in\nyour ``setup.py``, and include its configuration in ``configure.zcml``::\n\n \n\nAlternatively you can use ``transmogrify.filesystem`` with ``mr.migrator`` by\nadding ``transmogrifier.filesystem`` to the list of eggs in the ``mr.migrator``\nsection of your buildout.cfg. See:\nhttp://pypi.python.org/pypi/mr.migrator/1.0b4 for more information.\n\n.. Note:: This is an experimental alternative approach to executing Transmogrifier\n pipelines, aimed at lowering the bar of entry to Transmogrifier\n migrations.\n\nUsage\n-----\n\nYou can use ``transmogrify.filesystem`` in a pipeline like this::\n\n [transmogrifier]\n pipeline =\n data\n constructor\n schema\n savepoint\n\n [data]\n blueprint = transmogrify.filesystem\n directory = my.package:data/root\n ignored =\n re:.*\\.svn.*\n\n [constructor]\n blueprint = collective.transmogrifier.sections.constructor\n\n [schema]\n blueprint = plone.app.transmogrifier.atschemaupdater\n\n [savepoint]\n blueprint = collective.transmogrifier.sections.savepoint\n every = 50\n\nThis will scan the directory ``data`` inside the Python package ``my.package``\nfor files and directories, but will ignore any ``.svn`` directories and their\ncontents. The source will yield items suitable for passing to the standard\nTransmogrifier content constructor and the schema updated from\n`plone.app.transmogrifier `_.\n\nAdding metadata\n***************\n\nTransmogrifier will re-create the directory structure and files in\nPlone, but there is no information here to set titles or descriptions for\ncreated items.\n\nYou can, however, add additional metadata to files by using a CSV file. For\nexample, say you had a CSV file like this::\n\n path,title,description\n /foo,Foo,A file\n /foo/bar,Bar,Another file\n\nThe headers in this file indicate the field names for additional data. One of\nthe columns must have a heading of ``path``, and should contain file paths\nrelative to the Transmogrifier context (normally the Plone site root), with\na leading slash, as shown here. These paths will be matched against the files\nloaded from the data directory.\n\nWith portal_type column you can pick a specific content type.\nWhen the portal type is \"News Item\" it checks whether the file is an image or \nnot, and acts accordingly.\nWhen the portal type is Document or Event the content of the file will be\nwritten in the \"text\" field.\n\n\nSubsequent columns are passed along as-is, so in this case, the ``title`` and\n``description`` fields will be set as given in the CSV file.\n\nTo use this file, use the ``metadata`` key, e.g.::\n\n [data]\n blueprint = transmogrify.filesystem\n directory = my.package:data/root\n metadata = my.package:data/metadata.csv\n ignored =\n re:.*\\.svn.*\n\nAvailable options\n-----------------\n\nThe available options are:\n\n``directory`` (required)\n The directory from which files are read. Subdirectories should reflect\n the eventual path of images and files uploaded. May be given as an\n absolute path, a path relative to the current working directory, or a\n package reference (e.g. ``my.package:foo/bar``).\n``metadata``\n A CSV file containing metadata. See above. May be given as an absolute\n path, a path relative to the current working directory, or a package\n reference (e.g. ``my.package:foo/bar``).\n``require-metadata``\n If set to True, only files with matching metadata are included.\n Directories are always included regardless. Defaults to False.\n``delimiter``\n A character that delimits data in your Metadata CSV file.\n``strict``\n If this is set to True, transmogrify.filesystem will break if it finds\n a row of data in Metadata CSV which field-count does not match\n field-count of the first row in the CSV file.\n``folder-type``\n The portal type for folders to create (if required). Defaults to\n 'Folder'.\n``file-type``\n The portal type for files. Defaults to 'File'.\n``file-field``\n The name of the field to use for file (non-image) content. Defaults\n to ``file``, which is the name for a standard ATFile.\n``image-type``\n The portal type for images. Defaults to 'Image'.\n``image-field``\n The name of the field to use for image content. Defaults to ``image``,\n which is the name for a standard ATImage.\n``wrap-data``\n By default, file data will be wrapped into an OFS.File or OFS.Image\n object. Set this option to False to get the raw data, as a string.\n``default-mime-type``\n The default file type for content where the mimetype cannot be\n guessed. Defaults to ``application/octet-stream``.\n``ignored``\n A list of paths and/or regular expressions (prefixed with ``re:`` or\n ``regexp:`` to skip).\n\nOutput\n------\n\nThe yielded dictionaries will have the following keys:\n\n``_type``\n Portal type name. Will be one of ``folder-type`` (Folder),\n ``file-type`` (File) or ``image-type`` (Image).\n\n``_path``\n The ZODB path for the new item. This is based on the folder structure\n from which files were read.\n\nFor images and files, two additional keys are included:\n\n``_mimetype``\n The mimetype, as guessed from the file extension. The default, if no\n adequate guess can be made, is ``application/octet-stream``.\n\nImage field name (as set with ``file-field`` or ``image-field``)\n The contents of the file.\n\nIn addition, any keys from matching rows in the metadata CSV file, if\nspecified, will be included. The values will all be strings.\n\nChangelog\n=========\n\n1.0b6 (2012-08-03)\n------------------\n\n - Fix brown bag release.\n [zupo]\n\n\n1.0b5 (2012-08-03)\n------------------\n\n - Sort subfolders and filenames after you read it from the filesystem; this\n avoids different order of subdirs/files on different OSes.\n [zupo]\n\n - When the portal type is \"News Item\" it checks whether the file is an image or\n not, and acts accordingly [sithmel]\n\n\n1.0b4 (2011-08-31)\n------------------\n\n - Add autoinclude entry targetting ``transmogrify`` to provide\n ``mr.migrator`` support. This means folks can list this package\n in their ``mr.migrator`` sections (in buildout.cfg) and mr.migrator\n will load its ZCML.\n [aclark]\n\n\n1.0b3 (2011-03-01)\n------------------\n\n - Added option to specify item's portal_type inside metadata.csv.\n [zupo]\n\n\n1.0b2 (2010-08-18)\n------------------\n\n - Added option 'strict' that will make transmogrify.filesystem break\n if it finds a row of data in Metadata CSV which field-count does not match\n field-count of the first row in the CSV file.\n [zupo]\n\n - Added option 'delimiter' so you can choose a character that delimits\n your Metadata CSV file.\n [zupo]\n\n - Fixed test_empty_directory by ignoring .svn and similar directories.\n [zupo]\n\n - Reverted toutpt's change since resolvePackageReferenceOrFile is now\n available in a released version of transmogrifier.\n [zupo]\n\n - update api resolvePackageReferenceOrFile -> resolvePackageReference\n [toutpt]\n\n1.0b1 (2009-12-30)\n------------------\n\n - Initial release\n [optilude]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/transmogrify.filesystem", "keywords": "plone transmogrifier filesystem", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "transmogrify.filesystem", "package_url": "https://pypi.org/project/transmogrify.filesystem/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/transmogrify.filesystem/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/transmogrify.filesystem" }, "release_url": "https://pypi.org/project/transmogrify.filesystem/1.0b6/", "requires_dist": null, "requires_python": null, "summary": "Transmogrifier source for reading files from the filesystem", "version": "1.0b6" }, "last_serial": 800889, "releases": { "1.0b1": [ { "comment_text": "", "digests": { "md5": "2695a19c54fd527fc10b2688477274f0", "sha256": "d9854a15c9cd5a0910132e8afa4da551cb7e9b5dd8a10a2f0d59d293850e84b3" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b1.tar.gz", "has_sig": false, "md5_digest": "2695a19c54fd527fc10b2688477274f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18828, "upload_time": "2009-12-30T10:41:38", "url": "https://files.pythonhosted.org/packages/c5/0c/36c678a30f347eaf85f38dcfb81f12e0ce28b63fd0dae67d17ca7b04da21/transmogrify.filesystem-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "376634178967e6be432835a020f38a69", "sha256": "33d1ae9cb90196ca9fc7cbd7e38c76f61427336c92fc3f49f3fa6e62a1581f1c" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b2.tar.gz", "has_sig": false, "md5_digest": "376634178967e6be432835a020f38a69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22011, "upload_time": "2010-08-18T20:38:22", "url": "https://files.pythonhosted.org/packages/0c/a2/be252ec353d9ed4e9787264c6a6c5329ef3963bb41c98e60d17c4e3bb811/transmogrify.filesystem-1.0b2.tar.gz" } ], "1.0b2dev-r123750": [ { "comment_text": "", "digests": { "md5": "c4b23452042c60f8aeec5dce571aa2f0", "sha256": "1619d919e2755d5f6069c85bb84ed327607d351c64d5fb1e8870334a09a1bf58" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b2dev-r123750.tar.gz", "has_sig": false, "md5_digest": "c4b23452042c60f8aeec5dce571aa2f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22101, "upload_time": "2010-08-18T20:29:33", "url": "https://files.pythonhosted.org/packages/3e/a8/6aa90f86f525ae144793f506cc02233888a9192fb297fa9e8efc88473f2b/transmogrify.filesystem-1.0b2dev-r123750.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "4a1d1eadc32eb72d3067dc240d76aa07", "sha256": "0ddd1014e2465b2e00cd6ef82740ebb5bd5e0fbdcab7c43599304cc303956ba4" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b3.tar.gz", "has_sig": false, "md5_digest": "4a1d1eadc32eb72d3067dc240d76aa07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20370, "upload_time": "2011-03-01T11:47:37", "url": "https://files.pythonhosted.org/packages/61/b6/57ab2a99c1b447947a883e3f6af32b9199c7e5c27400b2def38c1025226e/transmogrify.filesystem-1.0b3.tar.gz" } ], "1.0b4": [ { "comment_text": "", "digests": { "md5": "7cc1db19e6116b6c6687ba97c7e122e7", "sha256": "d6fd6684f56ef399daaa2533815dcab08a7c757787c6e469781cc01b7df83b60" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b4.zip", "has_sig": false, "md5_digest": "7cc1db19e6116b6c6687ba97c7e122e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32343, "upload_time": "2011-08-31T16:06:27", "url": "https://files.pythonhosted.org/packages/65/25/a13a9ec20329a6cbf27bc5f9c253926798e77d7d8113e8e6c86e27d8f0dc/transmogrify.filesystem-1.0b4.zip" } ], "1.0b5dev": [ { "comment_text": "", "digests": { "md5": "8ce2da0f8bf3e21b284d69c044e71918", "sha256": "4c61aba3e9c091dc8ba5d9e59399e25f27033c808f648d1aa0819991a5fbb971" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b5dev.zip", "has_sig": false, "md5_digest": "8ce2da0f8bf3e21b284d69c044e71918", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33373, "upload_time": "2012-08-03T10:10:36", "url": "https://files.pythonhosted.org/packages/9e/59/9bd7a6177e5f13b26bbc90e16af6d1fa15196556f87a0f347be7a72e32c7/transmogrify.filesystem-1.0b5dev.zip" } ], "1.0b6": [ { "comment_text": "", "digests": { "md5": "26277b09d91d8ea5228667dbcf12202c", "sha256": "edbe9e9b8e90de46dfc40f37116a1e6e061a4a37f6928fd78c86138376a7a429" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b6.zip", "has_sig": false, "md5_digest": "26277b09d91d8ea5228667dbcf12202c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33222, "upload_time": "2012-08-03T10:40:38", "url": "https://files.pythonhosted.org/packages/19/55/ba3ba735bc18294b423214f162f7d7d4b6e6bf985fd7229e0ad47c4e13b5/transmogrify.filesystem-1.0b6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "26277b09d91d8ea5228667dbcf12202c", "sha256": "edbe9e9b8e90de46dfc40f37116a1e6e061a4a37f6928fd78c86138376a7a429" }, "downloads": -1, "filename": "transmogrify.filesystem-1.0b6.zip", "has_sig": false, "md5_digest": "26277b09d91d8ea5228667dbcf12202c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33222, "upload_time": "2012-08-03T10:40:38", "url": "https://files.pythonhosted.org/packages/19/55/ba3ba735bc18294b423214f162f7d7d4b6e6bf985fd7229e0ad47c4e13b5/transmogrify.filesystem-1.0b6.zip" } ] }