#!/usr/bin/env python
from setuptools import setup
setup(
  name = 'cs.fstags',
  description = 'Simple filesystem based file tagging and the associated `fstags` command line script.',
  author = 'Cameron Simpson',
  author_email = 'cs@cskk.id.au',
  version = '20200113',
  url = 'https://bitbucket.org/cameron_simpson/css/commits/all',
  classifiers = ['Programming Language :: Python', 'Programming Language :: Python :: 3', 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries :: Python Modules', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)'],
  entry_points = {'console_scripts': ['fstags = cs.fstags:main']},
  include_package_data = True,
  install_requires = ['cs.cmdutils', 'cs.deco', 'cs.edit', 'cs.lex', 'cs.logutils', 'cs.pfx', 'cs.threads', 'icontract'],
  keywords = ['python3'],
  license = 'GNU General Public License v3 or later (GPLv3+)',
  long_description = '*Latest release 20200113*:\nMirror tags to user.cs.fstags xattr to honour Linux namespace requirements. Add "filesize" to available tag string format (-o option). Small bugfixes.\n\nSimple filesystem based file tagging\nand the associated `fstags` command line script.\n\nTags are stored in a file `.fstags` in directories\nwith a line for each entry in the directory\nconsisting of the directory entry name and the associated tags.\n\nThe tags for a file are the union of its direct tags\nand all relevant ancestor tags,\nwith priority given to tags closer to the file.\n\nFor example, a media file for a television episode with the pathname\n`/path/to/series-name/season-02/episode-name--s02e03--something.mp4`\nmight obtain the tags:\n\n    series.title="Series Full Name"\n    season=2\n    sf\n    episode=3\n    episode.title="Full Episode Title"\n\nfrom the following `.fstags` files and entries:\n* `/path/to/.fstags`:\n  `series-name sf series.title="Series Full Name"`\n* `/path/to/series-name/.fstags`:\n  `season-02 season=2`\n* `/path/to/series-name/season-02.fstags`:\n  `episode-name--s02e03--something.mp4 episode=3 episode.title="Full Episode Title"`\n\nTags may be "bare", or have a value.\nIf there is a value it is expressed with an equals (`\'=\'`)\nfollowed by the JSON encoding of the value.\n\n## Class `FSTags`\n\nA class to examine filesystem tags.\n\n## Class `FSTagsCommand(cs.cmdutils.BaseCommand)`\n\nfstag main command line class.\n\n## Function `infer_tags(name, rules=None)`\n\nInfer `Tag`s from `name` via `rules`. Return a `TagSet`.\n\n`rules` is an iterable of objects with a `.infer_tags(name)` method\nwhich returns an iterable of `Tag`s.\n\n## Function `loadrc(rcfilepath=None)`\n\nRead rc file, return rules.\n\nIf `rcfilepath` is `None` default to `\'~/.fstagsrc\'` (from `RCFILE`).\n\n## Function `main(argv=None)`\n\nCommand line mode.\n\n## Class `RegexpTagRule`\n\nA regular expression based `Tag` rule.\n\n## Function `rfilepaths(path, name_selector=None)`\n\nGenerator yielding pathnames of files found under `path`.\n\n## Function `rpaths(path, yield_dirs=False, name_selector=None)`\n\nGenerator yielding pathnames found under `path`.\n\n## Function `rsync_patterns(paths, top_path)`\n\nReturn a list of rsync include lines\nsuitable for use with the `--include-from` option.\n\n## Class `Tag`\n\nA Tag has a `.name` (`str`) and a `.value`.\n\nThe `name` must be a dotted identifier.\n\nA "bare" `Tag` has a `value` of `None`.\n\n## Class `TagChoice(TagChoice,builtins.tuple)`\n\nA "tag choice", an apply/reject flag and a `Tag`,\nused to apply changes to a `TagSet`\nor as a criterion for a tag search.\n\nAttributes:\n* `spec`: the source text from which this choice was parsed,\n  possible `None`\n* `choice`: the apply/reject flag\n* `tag`: the `Tag` representing the criterion\n\n## Class `TagFile`\n\nA reference to a specific file containing tags.\n\nThis manages a mapping of `name` => `TagSet`,\nitself a mapping of tag name => tag value.\n\n## Class `TagFileEntry(builtins.tuple)`\n\nTagFileEntry(tagfile, name)\n\n## Class `TaggedPath`\n\nClass to manipulate the tags for a specific path.\n\n## Class `TagSet`\n\nA setlike class associating a set of tag names with values.\nA `TagFile` maintains one of these for each name.\n\n### Method `TagSet.__init__(self, *, defaults=None)`\n\nInitialise the `TagSet`.\n\nParameters:\n* `defaults`: a mapping of name->TagSet to provide default values.\n\n\n\n# Release Log\n\n*Release 20200113*:\nMirror tags to user.cs.fstags xattr to honour Linux namespace requirements. Add "filesize" to available tag string format (-o option). Small bugfixes.\n\n*Release 20191230*:\nCommand line: new "find" command to search a file tree based on tags.\nCommand line: new "mv" command to move a file and its tags.\nCommand line: Python string formats for "find" and "ls" output.\nTaggedPath.autotag: new optional `no_save` parameter, default False, to suppress update of the associated .fstags file.\nInital and untested "mirror tags to xattrs" support.\n\n*Release 20191201*:\nNew "edit" subcommand to rename files and edit tags.\n\n*Release 20191130.1*:\nInitial release: fstags, filesystem based tagging utility.',
  long_description_content_type = 'text/markdown',
  package_dir = {'': 'lib/python'},
  py_modules = ['cs.fstags'],
)
