Giter Site home page Giter Site logo

anselmogpp / index_maker Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 20 KB

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

CMake 0.75% C++ 99.25%
app application index-generator glossaries dictionaries repeated-terms cplusplus

index_maker's Introduction

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.

index_maker's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.