You are not logged in.

#1 2016-01-02 11:31:58

respiranto
Member
Registered: 2015-05-15
Posts: 367
Website

ctct - a simple console contact manager, written in bash

I have just finished my first properly licensed and published small project, a contact manager (or addressbook utility), written in bash.


It is designed to adhere as much to the KISS principle as possible.

Any contact is stored as a file of the form first-name.last-name, though one can obviously store any information in these two parts.
E.g. one could also have contacts of the form organization.last-name.
The content of these contact files is completely left to the user, though it makes sense to have common elements in them, like 'email:', to simplify searching.
It might be an idea to include templates for such stuff in later releases.

The most simple usage is:

ctct first.last

This will print the contents of the file first.last or last.first, which are treated equally by ctct and thereby can never both exist, unless manually created.

Further features are:

  • -e, --edit                        edit or create a contact file (syntax must be correct)

  • -s, --search-by-name    search for contacts with a matching first or last name - several patterns can be provided, which all are required to match

  • -S, --search-by-data      search through the files (grep) - again with possibly several patterns

  • -l, --list-all

  • -d, --delete

There is a system wide and a per user configuration file, in which for example the directory, where the entries are to be stored, can be set.

---
Source: https://respiranto.de/bash/
AUR: https://aur.archlinux.org/packages/ctct/
---

I see, that due to its simplistic design, it is not at all suitable to those, who want to keep all their data synchronized with whichever cloud service or any more complex programs, though I hope it is of use for some.

What do you think of it?
Any comment is welcome.

Offline

#2 2016-01-24 03:34:46

duckunix
Member
Registered: 2009-05-22
Posts: 4

Re: ctct - a simple console contact manager, written in bash

Very quick check via the package in the AUR.

3 Questions:

  1. Why force to lower case?  It tried to create an entry with First.Last, and the regex in the code is only looking for lower-case, and gave me a not clear error (just repeated usage w/o telling me I needed to use lowercase).

  2. Would it be possible to add git integration for revision tracking?

  3. Have you thought about gnupg encrypting each entry like pass does?


Looks good so far (aside from #1)

Offline

#3 2016-01-24 08:32:10

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 288

Re: ctct - a simple console contact manager, written in bash

my suggestion is you DONT use gnupg to encrypt. It's not easy to setup for everybody and I have never gotten it to work. Therefore I ignore all progs that use it.


You can like linux without becoming a fanatic!

Offline

#4 2016-01-24 10:51:47

respiranto
Member
Registered: 2015-05-15
Posts: 367
Website

Re: ctct - a simple console contact manager, written in bash

Nice to hear you like it, duckunix.

As to your questions:

  1. I personally prefer using lower-case letters, to simplifly typing.* The actual capitalization should be obvious by the naming.
    Anyways, I agree, that it does not make any sense to prevent this. Will be added soon. Done.
    Maybe, I will also allow names without dots at all, which will require differentiation between these two kinds of entries due to the order interchangeability of first and last name.

  2. I would have to set up a git server first, since I don't want to use any commercial service like github.
    It is certainly possible, though I don't think, there will be many releases of this program, so it would make much sense.
    However, I am also developing other programs, most notably an ncurses based snake program, which unfortunately lacks a name until now and would certainly benefit from a git versioning system.

  3. As noted in the man page under TODO, I am planning to add an option to specify the output program, that would get the data on stdin.
    The same could be done for an input program.
    Will be done in version 0.2.

To come to your concern, chickenPie4tea:
I never used gnupg much, except for encrypted mail, though I have to say, that I did not found it hard to set up.
However, as a simpler alternative I can recommend ccrypt, which would en- and decrypt any single file with an individual password.

UPDATE:
Version 0.1.2 is out.

EDIT:
* The actual reason for this was to prevent ambiguity when searching for a name. However, the only thing to be changed is the decapitalization in find_exact(), i.e. when calling ctct without any option.

Last edited by respiranto (2016-01-24 23:04:42)

Offline

#5 2016-01-24 16:08:55

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 288

Re: ctct - a simple console contact manager, written in bash

Yes I use ccrypt already thanks


You can like linux without becoming a fanatic!

Offline

#6 2016-01-29 14:02:22

respiranto
Member
Registered: 2015-05-15
Posts: 367
Website

Re: ctct - a simple console contact manager, written in bash

Version 0.2.1 is published!

It adds several new features and improvements, of which the most notable are:

Configuration options:

  • {input,output}_program: Enable encryption.

  • visual_program: Use a program such as less(1) or more(1) to display the entries instead of simply cat(1).

Commandline Options:

  • Added '--rename' and '--version'.

Syntax:

  • Names may now not contain dots.


Project page | AUR

Last edited by respiranto (2016-01-29 14:07:03)

Offline

Board footer

Powered by FluxBB