From aecb5b4ed7232ad8b33365f4203d27f74865fe03 Mon Sep 17 00:00:00 2001 From: Karl Voit Date: Thu, 9 May 2013 17:42:31 +0200 Subject: [PATCH] renamed vktag to filetag --- README.org | 10 +++++----- vktag.py => filetag.py | 12 ++++++++++-- tests/unit_tests.py | 4 ++-- 3 files changed, 17 insertions(+), 9 deletions(-) rename vktag.py => filetag.py (96%) diff --git a/README.org b/README.org index 28a2c5d..829fa2f 100644 --- a/README.org +++ b/README.org @@ -1,8 +1,8 @@ -## Time-stamp: <2013-05-09 16:37:45 vk> +## Time-stamp: <2013-05-09 17:42:06 vk> ## -*- coding: utf-8 -*- ## This file is best viewed with GNU Emacs Org-mode: http://orgmode.org/ -* vktag.py +* filetag.py This Python script adds or removes tags to file names in the following form: @@ -45,14 +45,14 @@ GNU/Linux. FIXXME: usage -: vktag.py --tag foo a_file_name.txt +: filetag.py --tag foo a_file_name.txt ... adds tag "foo" such that it results in ~foo a_file_name -- foo.txt~ -: vktag.py --tag "foo bar" "file name 1.jpg" "file name 2 -- foo.txt" "file name 3 -- bar.csv" +: filetag.py --tag "foo bar" "file name 1.jpg" "file name 2 -- foo.txt" "file name 3 -- bar.csv" ... adds tag "foo" such that it results in ... : "file name 1 -- foo bar.jpg" "file name 2 -- foo bar.txt" "file name 3 -- bar foo.csv" -: vktag.py --remove --tag foo "foo a_file_name -- foo.txt" +: filetag.py --remove --tag foo "foo a_file_name -- foo.txt" ... removes tag "foo" such that it results in ~foo a_file_name.txt~ * Contribute! diff --git a/vktag.py b/filetag.py similarity index 96% rename from vktag.py rename to filetag.py index aa7bdc6..dc56d99 100755 --- a/vktag.py +++ b/filetag.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Time-stamp: <2013-05-09 17:11:42 vk> +# Time-stamp: <2013-05-09 17:40:38 vk> ## TODO: ## * fix parts marked with «FIXXME» @@ -148,7 +148,15 @@ def main(): error_exit(4, "I found option \"--interactive\" and option \"--remove\". \n" + "Please choose either interactive mode OR specify tag(s) to remove together with the \"--tag\" option.") - sys.exit(0) + + ## extract list of tags + ## FIXXME + + ## extract list of files + ## FIXXME + + ## iterate over files + ## FIXXME diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 8f4c1a7..699fbe0 100755 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -1,12 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Time-stamp: <2013-05-09 17:38:22 vk> +# Time-stamp: <2013-05-09 17:41:54 vk> ## ~/src/vktag % PYTHONPATH="~/src/vktag:" tests/unit_tests.py --verbose import unittest import os -import vktag +import filetag import tempfile import os.path from shutil import rmtree