{"id":18597328,"url":"https://github.com/wiremoons/acroman","last_synced_at":"2025-05-16T13:33:47.898Z","repository":{"id":82690264,"uuid":"53122835","full_name":"wiremoons/acroman","owner":"wiremoons","description":"amt is a program written in C to manage acronyms","archived":false,"fork":false,"pushed_at":"2023-11-23T15:48:54.000Z","size":31922,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-17T23:44:39.676Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiremoons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-04T09:12:57.000Z","updated_at":"2022-03-30T03:55:48.000Z","dependencies_parsed_at":"2024-12-26T21:23:57.440Z","dependency_job_id":"7168f23d-bba7-456d-94c9-441de89cd8f2","html_url":"https://github.com/wiremoons/acroman","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Facroman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Facroman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Facroman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Facroman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiremoons","download_url":"https://codeload.github.com/wiremoons/acroman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538551,"owners_count":22087887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T01:27:41.230Z","updated_at":"2025-05-16T13:33:47.875Z","avatar_url":"https://github.com/wiremoons.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE)![](https://github.com/wiremoons/acroman/workflows/amt-build/badge.svg)\n\n# What is 'amt'?\n\nA small command line application called '`amt`' (which is an acronym for\n'*Acronym Management Tool*') which can be used to store, look up, change, or\ndelete acronyms that are kept in a SQLite database.\n\nThe program is small, fast, and is free software. It is used on a daily basis by\nthe author, running it on both Linux, macSOS, and Windows operating systems. \nIt should also compile and run on the various BSD Unix too, although this has\nnot been tested.\n\n\n## Status\n\nFrom version 0.5.0 of '`amt`' it is functionally feature complete, based on its\nability to provide **CRUD**. This is a set of basic features which includes:\n\n - *CREATE* : new records can be added (ie created) in the database;\n - *READ* : existing records can be searched for (ie read) from the database;\n - *UPDATE*: existing records held in the database can be altered (ie changed);\n - *DELETE*: existing records held in the database can be removed (ie deleted).\n\nThis does not mean the program is fully completed (or bug free) - but that it\nprovides a solid basic set of functionality. The program is used on a daily basis \nso it will continue to be improved as is felt necessary.\n\n\n## Usage Examples\n\nRunning `amt` without any parameters, but with a database already available, it \nwill output the following information:\n\n```\nERROR: no command lines argument provided.\n\n'/Users/simon/GenIsys-macOS/assets/amt-arm64' version is: '0.10.2'.\nCompiled on: 'Feb 19 2022 @ 19:20:47'.\nCopyright (c) 2022 Simon Rowe.\n\nC source built as 'Release' using compiler '13.0.0 (clang-1300.0.29.30)'.\n\nFor licenses and further information visit:\nApplication:          https://github.com/wiremoons/acroman\nLinenoise:            https://github.com/antirez/linenoise\nSQLite database:      https://www.sqlite.org/\n\nDatabase full path:   '/Users/simon/icloud/amt-db/acronyms.db'\nDatabase file size:   '2,134,016' bytes\nDatabase modified:    'Fri 18 Feb 2022 @ 21:28:27'\n\nSQLite version:       '3.37.1'\nTotal acronyms:       '17,951'\nLast acronym entered: 'STL'\n\n\nApplication to manage acronyms stored in a SQLite database.\nUsage: /Users/simon/GenIsys-macOS/assets/amt-arm64 [switches] [arguments]\n\n[Switches]        [Arguments]      [Description]\n-d, --delete       \u003crec_id\u003e        delete an acronym record. Argument is mandatory.\n-h, --help                         display help information.\n-l, --latest                       display the five latest records added.\n-n, --new                          add a new record.\n-s, --search       \u003cacronym\u003e       find a acronym record. Argument is mandatory.\n-u, --update       \u003crec_id\u003e        update an existing record. Argument is mandatory.\n-v, --version                      display program version information.\n\nArguments\n \u003cacronym\u003e : a string representing an acronym to be found. Use quotes if contains spaces.\n \u003crec_id\u003e  : unique number assigned to each acronym. Can be found with a '-s, --search'.\nUse '%' for wildcard searches.\n```\n\nRunning `amt -h` or `amt -v` displays a cut down version of the above output, just showing \nthose specific elements respectively. \n\n\n## Building the Application\n\nA C language compiler will be needed to build the application. There are also a\nfew dependencies that are required — many of which are included where possible.\nFor a successful build of `amt` follow the more detailed steps below.\n\n### Dependencies\n\nIn order to compile `amt` successfully, it requires a few development C code\nlibraries to support its functionality. These libraries are described below for\nreference.\n\n#### SQLite\n\nThe application uses SQLite to store the acronyms. The application \n**includes copies** of the `sqlite3.c` and `sqlite3.h` source code files \nthe code distribution. These are compiled directly into the application when it \nis built. The two included files are obtained from \n[http://www.sqlite.org/amalgamation.html](The SQLite Amalgamation) source \ndownload option.\n\nMore information on SQLite can be found here: [http://www.sqlite.org/](http://www.sqlite.org/).\n\n#### Linenoise\n\nThe application uses *linenoise* craeted by Salvatore Sanfilippo to manage the user input and input history when \nupdating or adding new acronym records. The application **includes copies** of the \n`linenoise.c` and `linenoise.h` source code files within this applications own code \ndistribution. These are compiled directly into the application when it\nis built. The two included files are obtained from\n[https://github.com/antirez/linenoise](https://github.com/antirez/linenoise)\n\nThe `amt` versions prior to '`0.9.0`' used the *GNU Readline* library which has been \nremoved completely in favour of the self-contained and more flexible (for my usage at \nleast)  *linenoise*, as described above.\n\n### Install a C Compiler and Supporting Libraries\n\nTo install the required libraries and compiler tools on various systems, use the\nfollowing commands before attempting to compile `amt`:\n\n- Ubuntu Linux: `sudo apt install build-essential cmake`\n- Fedora (Workstation) Linux: `sudo dnf install cmake`\n\nOn Windows you can use a C compiler such as MinGW (or equivalent) to build the\napplication. In order to build the Windows version for testing and personal use,\nthis is often done on Fedora Workstation as a cross compile.\n\n### Building 'amt'\n\nBefore trying to build `amt` make sure you have the required dependencies install\n- see above for more information.\n\nUse the provided `bash` shell script to run the build steps: `./build.sh`\n\nThe build binary will be added to a new `./bin` subdirectory - the above build script \nalso provided the same information.\n\nTo compile yourself without using `cmake` or the recommended `build.sh` script - the \nfollowing command can be used to compile `amt` with GCC compiler on a 64bit Linux \nsystem is shown below:\n```shell\ncc -g -Wall -m64 -std=gnu11 -o amt amt-db-funcs.c main.c sqlite3.c linenoise.c -lpthread -ldl\n```\n\n## Database Location\n\nThe SQLite database used to store the acronyms can be located in the same\ndirectory as the programs executable. The default filename that is looked for\nby the program is: '***acronyms.db***'\n\nHowever, this can be overridden, by giving a preferred location, which can be\nspecified by an environment variable called ***ACRODB***. You should set this\nto the path and preferred database file name of your SQLite acronyms database.\nExamples of how to set this for different operating systems are shown below.\n\nOn Linux and similar operating systems when using bash shell, add this line to\nyour `.bashrc` configuration file, located in your home directory (ie\n*~/.bashrc*), just amend the path and database file name to suit your own needs:\n\n```\nexport ACRODB=$HOME/work/my-own.db\n```\n\non Windows or Linux when using Microsoft Powershell:\n\n```\n$env:ACRODB += \"c:\\users\\simon\\work\\my-own.db\"\n```\n\non Windows when using a cmd.exe console:\n\n```\nset ACRODB=c:\\users\\simon\\work\\my-own.db\n```\n\nor Windows to add persistently to your environment run the following in a\ncmd.exe console:\n\n```\nsetx ACRODB=c:\\users\\simon\\work\\my-own.db\n```\n\n## Database and Acronyms Table Setup\n\n**NOTE:** More detailed information is to be added here - plus see point 1 in\ntodo list below.\n\nSQLite Table used by the program is created with:\n\n```\nCREATE TABLE Acronyms (\"Acronym\",\"Definition\",\"Description\",\"Source\");\n```\nAs long as the same table name and column names are used, the program should\nfunction with an empty database.\n\nWith the SQLite command line application `sqlite3` (or `sqlite3.exe` on\nWindows) you can create a new database and add a new record using a terminal\nwindow and running the following commands:\n\n```\nsqlite3 acronyms.db\n\nCREATE TABLE Acronyms (\"Acronym\", \"Definition\", \"Description\", \"Source\");\n\nINSERT INTO ACRONYMS(Acronym,Definition,Description,Source) values \n(\"AMT2\",\"Acronym Management Tool\",\n\"Command line application to manage a database of acronyms.\",\"Misc\");\n\n.quit\n```\n\n\n## Todo ideas and Future Development Plans\n\nBelow are some ideas that I am considering adding to the program, in no\nparticular priority order.\n\n1. Offer to create a new default database if one is not found on start up\n2. Ability to populate the database from a remote source\n3. Ability to update and/or check for a new version of the program\n4. Output of records in different formats (json, csv, etc)\n5. Ability to backup database\n6. Ability to backup the table within database and keep older versions\n7. Tune and add an index to the database\n8. Merge contents of different databases that have been updated on separate computer to keep in sync\n\n\n## Licenses\n\nThe following opensource licenses apply to the `amt` source code, and resulting built\napplication.\n\n#### License for 'amt'\n\nThis program `amt` is licensed under the **MIT License** see\nhttp://opensource.org/licenses/mit. A copy of the applications license is here \n[amt License](https://github.com/wiremoons/acroman/blob/master/LICENSE.txt).\n\n#### License for 'SQLite'\n\nThe *SQLite* database code used in this application is licensed as **Public\nDomain**, see http://www.sqlite.org/copyright.html for more details.\n\n#### License for 'linenoise'\n\nThe *linenoise* code used in this application is licensed under the \n**BSD-2-Clause License**. See [Linenoise License](https://github.com/antirez/linenoise/blob/master/LICENSE) \nfor more details. The *linenoise* code is copyright (c) of Salvatore Sanfilippo contactable \nat *antirez at gmail dot com*.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremoons%2Facroman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiremoons%2Facroman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremoons%2Facroman/lists"}