Skip to main content

A command line file-tagger/file-search tool for linux

Project description

KTagZ
-------------

A command line program for Linux that can add tags, description to a file and
allows you to perform a full text search on those tags to search for files.

### Note

This package is for demonstration purposes only. A full fledged package is yet to come. Please raise issues on github. And feel free to fork and contribute.

### Installation

1. You need xapian to run. So install using

sudo apt-get install python-xapian libxapian-dev

2. Install via ppa (Precise, Saucy, Trusty)

sudo add-apt-repository ppa:kkantnaik/ppa
sudo apt-get update
sudo apt-get install ktagz

OR

Install in a virtual environment

virtualenv --system-site-packages venv
source venv/bin/activate
pip install ktagz



### Running Examples

1. Getting Help

khirod@kurosaki:~/Documents/KTagZ$ ktagz -h
usage: ktagz [-h] [-f FILENAME] [-st] [-sd] [-sn]

optional arguments:
-h, --help show this help message and exit
-f FILENAME, --filename FILENAME
you want to index a new file
-st, --searchtags search for a file based on tags
-sd, --searchdescription
search for a file based on its description
-sn, --searchname search for a file based on its name


2. Indexing a File

(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -f LICENSE
Tags [separated by a space]: license
Description [short description]: A GPL V3 license file


(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -f LICENSE.txt
Tags [separated by a space]: license ktagz
Description [short description]: A GPL V2 license file


3. Index a directory recursively

(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -d tagzpackage/
Tags [separated by a space]: module tagz main_module
Description [short description]: Tagz module that contains all the python files.


4. Searching a File using tags

(venv)khirod@kurosaki:~/Documents/TagZ$ ktagz -st
Enter tags to be searched [space separated]: license

Results are
--------------------------------------

* File Name: LICENSE
* Description: A GPL V3 license file.
* File Path: /home/khirod/Documents/KTagZ/LICENSE
* File Tags: [u'license']

* File Name: LICENSE.txt
* Description: A GPL V2 license file.
* File Path: /home/khirod/Documents/KTagZ/LICENSE.txt
* File Tags: [u'license', u'ktagz']


LICENSE appears as top result, because we gave only one tag license and that is satisfied with LICENSE while
LICENSE.txt also had 'ktagz' as a tag hence it got a lower score and appeared lower.


5. Search a File using description

(venv)khirod@kurosaki:~/Documents/TagZ$ ktagz -sd
Rough description to be searched: license V2 file

Results are
--------------------------------------

* File Name: LICENSE.txt
* Description: A GPL V2 license file.
* File Path: /home/khirod/Documents/KTagZ/LICENSE.txt
* File Tags: [u'license', u'tagz']

* File Name: LICENSE
* Description: A GPL V3 license file.
* File Path: /home/khirod/Documents/KTagZ/LICENSE
* File Tags: [u'license', u'tagz']

Here LICENSE.txt appears as top result because the description only LICENSE.txt had all the three words we mentioned
in description while LICENSE had only two.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ktagz-0.1.7.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file ktagz-0.1.7.tar.gz.

File metadata

  • Download URL: ktagz-0.1.7.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ktagz-0.1.7.tar.gz
Algorithm Hash digest
SHA256 bcc3290ac607756fd08ca9e326756d762307ea357be88b6e413b83d2def513d5
MD5 08895df412f80d810d1fcc4f2c301834
BLAKE2b-256 c2218b3ca84fc292ca355a0e9b23a921b77fef883677d479d26d6342ab24b2a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page