Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FranksGP/Gestor_de_tareas/llms.txt

Use this file to discover all available pages before exploring further.

Once you finish a piece of work, you can reflect that progress in Gestor de Tareas by marking the corresponding task as completed. Selecting option 3 from the main menu automatically displays the full task list first — so you always have the correct index in front of you — and then prompts you for the number of the task you want to mark done. The change is written to Tareas.json immediately, and the task will show the ✔ Completada badge the next time you list your tasks.

Workflow

1

Run the application

Open a terminal in the directory that contains index.py and start the program:
python index.py
The main menu is displayed:
Gestor de Tareas
1. Agregar tarea
2. Listar tareas
3. Marcar tarea como completada
4. Eliminar tarea
5. Salir
2

Select option 3

At the prompt, type 3 and press Enter:
Seleccione una opción: 3
The application automatically calls listarTask() and prints your current tasks before asking for input.
3

Review the task list and enter the task number

The current task list is shown. Identify the number of the task you want to complete, then enter it and press Enter:
Ingrese el número de la tarea a completar: 1
4

Confirm the result

A confirmation message is printed:
Tarea marcada como completada.
The task’s "completed" field is now true in Tareas.json.

Full terminal example

The following example starts with two pending tasks and marks the first one as completed:
Gestor de Tareas
1. Agregar tarea
2. Listar tareas
3. Marcar tarea como completada
4. Eliminar tarea
5. Salir
Seleccione una opción: 3
1. Comprar leche - Ir al supermercado [✘ Pendiente]
2. Estudiar Python - Repasar funciones [✘ Pendiente]
Ingrese el número de la tarea a completar: 1
Tarea marcada como completada.

What happens internally

When you enter a valid task number, the application calls tareaCompletada(index):
  1. cargarTask() reads the current contents of Tareas.json into a Python list.
  2. The function checks that the provided index satisfies 0 < index <= len(tasks). If so, it sets tasks[index - 1]["completed"] = True.
  3. guardarTask(tasks) writes the entire updated list back to Tareas.json, persisting the change immediately.
  4. The confirmation message Tarea marcada como completada. is printed.

JSON before and after

[
    {
        "titulo": "Comprar leche",
        "descripcion": "Ir al supermercado",
        "completed": false
    },
    {
        "titulo": "Estudiar Python",
        "descripcion": "Repasar funciones",
        "completed": false
    }
]
Only the targeted task’s "completed" field changes; all other fields and all other tasks remain untouched.

Error handling

Option 3 handles two error conditions:
  • Invalid index: If you enter a number that is less than 1 or greater than the total number of tasks, tareaCompletada prints the following and makes no changes to the file:
    Índice inválido.
    
  • Non-integer input: If you type something that is not a whole number (for example abc or 1.5), the ValueError is caught and the following message is printed instead:
    Entrada inválida. Debe ingresar un número.
    
In both cases the main menu reappears and you can try again.
Marking a task as completed is a one-way operation through the menu. There is no built-in option to revert a task back to Pending. If you need to undo a completion, you must manually open Tareas.json in a text editor and change the relevant "completed" value from true back to false.

Build docs developers (and LLMs) love