[Debtags-commits] [svn] r1101 - in tagcoll/trunk: debian src
Enrico Zini
enrico at costa.debian.org
Sat Aug 6 14:50:07 UTC 2005
Author: enrico
Date: Sat Aug 6 14:50:06 2005
New Revision: 1101
Modified:
tagcoll/trunk/debian/control
tagcoll/trunk/src/tagcoll.cc
Log:
Added option --remove-tags
Modified: tagcoll/trunk/debian/control
==============================================================================
--- tagcoll/trunk/debian/control (original)
+++ tagcoll/trunk/debian/control Sat Aug 6 14:50:06 2005
@@ -2,7 +2,7 @@
Section: misc
Priority: optional
Maintainer: Enrico Zini <enrico at debian.org>
-Build-Depends: cdbs, debhelper (>> 4.1), dh-buildinfo, pkg-config, libtagcoll1-dev (>= 1.0.3), libtagcoll1-dev (<< 1.1)
+Build-Depends: cdbs, debhelper (>> 4.1), dh-buildinfo, pkg-config, libtagcoll1-dev (>= 1.0.7), libtagcoll1-dev (<< 1.1)
Standards-Version: 3.6.2.0
Package: tagcoll
Modified: tagcoll/trunk/src/tagcoll.cc
==============================================================================
--- tagcoll/trunk/src/tagcoll.cc (original)
+++ tagcoll/trunk/src/tagcoll.cc Sat Aug 6 14:50:06 2005
@@ -55,6 +55,7 @@
#include <tagcoll/TextFormat.h>
#include <tagcoll/Serializer.h>
#include <tagcoll/TagcollReverser.h>
+#include <tagcoll/ExpressionFilter.h>
#include <tagcoll/UnfacetedRemover.h>
@@ -293,6 +294,7 @@
opts.add("filter", 'f', "filter", "filter out the tags with cardinality less than the given value (defaults to not filter; currently only works when building hierarchies)", "num");
opts.add("untagged-tag", 0, "untagged-tag", "set item name to use for associating untagged items when using the \"reverse\" command. If not specified, untagged items are not included in the output.", "tag");
opts.add("remove-unfaceted", 0, "remove-unfaceted", "while parsing, remove all tags with no facet part.");
+ opts.add("remove-tags", 0, "remove-tags", "while parsing, remove all tags matching the given tag expression.", "expression");
//opts.add("verbose", 'v', "verbose", "enable verbose output");
//opts.add("debug", 0, "debug", "enable debugging output (including verbose output)");
@@ -382,6 +384,13 @@
if (opts.get("remove-unfaceted").defined())
filters.appendFilter(&unfaceted_remover);
+ if (opts.get("remove-tags").defined())
+ {
+ ExpressionTagRemover<string, string>* r = new ExpressionTagRemover<string, string>;
+ r->setExpression(opts.get("remove-tags").stringVal());
+ filters.appendFilter(r);
+ }
+
InputMerger<string, string> merger;
filters.setConsumer(&merger);
readCollection(file1, filters);
More information about the Debtags-commits
mailing list