It is Os X only at the moment, I have to adjust the buffer calculations, as widechars, utf-16 and ordinary bytes are involved. I have used 64-bit wchar_t. So I have to go over the calculations. But other than that, I think it should compile on other *nix'es, provided you have access to the Ncurses library, and ICU, both downloadable and open source.
I am very tired a the moment, it is passed bed time here. But you are so right.
Here is the short version.
You are a person that uses the commandline. You are doing some activity, either reading a text book, or gathering some information, debugging, or are having some ideas you'd like to structure, basically you are having a need for a structured information collection. At the time it pops into your head; hey it would be nice to have a "database" to register this stuff into, so that I later can retrieve it.
Then you fire up index, and enter a filename that you haven't used before. Index then fires up your editor, and you write the fieldnames you need, (up to 16). You close the editor, and you are sent to the "main menu" from where you can start entering records. It uses ncurses, and is really fast; you move between the fields with ctrl-n and ctrl-p, and are asked if you want to save the record when you press Esc.
Later on you can just enter the name from the main menu, and search and edit/delete/add new records.
You can make make index sort and print the records in a variety of ways through command line options. You can also have small filter files, based on awk or perl, to filter by a field if you like. I have modified it slightly from the original, so it is possible for a lot of files to share a single label file, so that you can have one "database" file per subdirectory, sharing the same "field-layout" if that suits your purpose (for modules for instance).
It should also work well with UTF-8, and collation ordering according to locale settings. (This includes reg-exp patterns thanks to IBM and their ICU library.)
This software should however work on Mac Os X from 10.5 onwards as it will then use the ICU libraries that shipped with Mac Os X from that version. Ncurses 5.9 you'll have to get from http://macports.org, or directly from the source.
8 comments
[ 2.7 ms ] story [ 31.0 ms ] threadMaybe I should, but I have just linked in the html version of the man file, which has an example.
But I will really consider adding more examples.
Here is the short version.
You are a person that uses the commandline. You are doing some activity, either reading a text book, or gathering some information, debugging, or are having some ideas you'd like to structure, basically you are having a need for a structured information collection. At the time it pops into your head; hey it would be nice to have a "database" to register this stuff into, so that I later can retrieve it.
Then you fire up index, and enter a filename that you haven't used before. Index then fires up your editor, and you write the fieldnames you need, (up to 16). You close the editor, and you are sent to the "main menu" from where you can start entering records. It uses ncurses, and is really fast; you move between the fields with ctrl-n and ctrl-p, and are asked if you want to save the record when you press Esc.
Later on you can just enter the name from the main menu, and search and edit/delete/add new records.
You can make make index sort and print the records in a variety of ways through command line options. You can also have small filter files, based on awk or perl, to filter by a field if you like. I have modified it slightly from the original, so it is possible for a lot of files to share a single label file, so that you can have one "database" file per subdirectory, sharing the same "field-layout" if that suits your purpose (for modules for instance).
It should also work well with UTF-8, and collation ordering according to locale settings. (This includes reg-exp patterns thanks to IBM and their ICU library.)
Thanks for your feedback!
This software should however work on Mac Os X from 10.5 onwards as it will then use the ICU libraries that shipped with Mac Os X from that version. Ncurses 5.9 you'll have to get from http://macports.org, or directly from the source.