Skip to content

App with multiple functionalities for creating, managing and modifying lists of terms + definitions (glossaries, indexes, dictionaries, etc.) that are stored in a file

Notifications You must be signed in to change notification settings

AnselmoGPP/Index_maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Index_maker

Useful application with multiple functionalities for creating, managing and modifying lists of terms + definitions (glossaries, indexes, dictionaries, etc.) that are stored in a file.

First of all, let us make some definitions that will be applied here:

  • File: File where the "glossary" is stored. This file must be in the same directory as the one where the executable is.
  • Glossary: Any list of "terms" with their corresponding "definitions". Each term + definition is an "entry".
  • Term: Compound of one or more words and/or symbols. The term ends with a colon (:). The terms are the first element in any "entry". Any term starts at the beggining of an "entry" and ends just before an "ending semicolon" is encountered.
  • Definition: Line of text containing information relative to the "term". It starts with the "ending semicolon" + white-space, and finishes when an end-of-line is encountered.
  • Entry: Each line of text found in the "file" is an entry and contains a "term" and a "definition". Each entry ends with an end-of-line, except the last entry of the "file".
  • Ending colon: For a colon to be considered an ending colon it must satisfy some conditions:
    • It must not be the first character of an "entry".
    • The previous character must not be another colon.
    • The next character must be a white-space.

The executable file shows a menu with the following options:

  1. Exit: Close the application.
  2. Name of file: Define the name of the file where you are going to work on.
  3. Number of terms: Shows the number of entries contained in the file.
  4. Search term (exact coincidence): Enter a term and the program will search for all the entries containing an exact coincidence of that term and will show all of them.
  5. Search term (exact and relative coincidence): Enter a term and the program will search for all the entries containing an exact coincidence of that term and all the entries containing a relative coincidence of that term (entries whose terms contains any word from the entered term) and will show all of them.
  6. Search by position: Enter the number of the position of an entry in the file (starts at 1) and the program will show that entry.
  7. Position of a term: Enter a term and program will show all the positions of all the entries that contains that term.
  8. Number of terms X: Enter a term and the program will show the numbers of the positions of all the entries containing that term.
  9. Repeated terms: Shows a list of all the terms that are in the file more than once (their definitions may or may not differ) and the number of repetitions of each term.
  10. Add new entry: Enter a new entry and the program will store it at the end of the file (a new line is occupied).
  11. Modify an entry: Enter a new entry and the number of an existing entry position. The program will overwrite that existing entry with the new entry in the file.
  12. Erase entry: Enter a term and the program will delete the entries that contain that term.
  13. Erase line X: Enter the number of an existing entry position and the program will delete that entry in the file.
  14. Erase repeated entries: Erases any entry that is repeated one or more times, leaving only one copy of that entry in the file. The repeated terms must be completly identical (term and definition).
  15. Sort alphabetically: Shorts alphabetically all the entries in the file based on their corresponding terms.

The source files (.cpp, .h) define the MyGlossary class, which contains the functionalities used in this program. Files included:

  • main.cpp: Entry point of the program. Contains function main().
  • MyGlossary.h: Contains the definition of class MyGlossary. It includes explanations for every member of the class.
  • MyGlossary.cpp: Contains the definitions of the members of class MyGlossary.
  • data.txt: An example file containing a glossary for testing purposes.

About

App with multiple functionalities for creating, managing and modifying lists of terms + definitions (glossaries, indexes, dictionaries, etc.) that are stored in a file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published