Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrMohamad committed Dec 10, 2022
1 parent 9de1757 commit 40a87eb
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions docs/CodeExplanation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# PyKanban - Code Explanation

- []()

- [Constants](#constants)
- [inflect engine](#inflect-engine)
- [Card class](#card-class)
- [Attributes](#attributes)
- [The classmethods of Card class](#the-classmethods-of-card-class)
- [add_title method](#add_title-method)
- [add_sub_titles method](#add_sub_titles-method)
- [add_lines method](#add_lines-method)
- [print_here method](#print_here-method)
- [init_header function](#init_header-function)
- [init_table function](#init_table-function)
- [view_tables function](#view_tables-function)
- [open_table function](#open_table-function)
- [Regular Expression at open_table function](#regular-expression-at-open_table-function)
- [save_table function](#save_table-function)
- [add_card function](#add_card-function)
- [move_card function](#move_card-function)
- [delete_card function](#delete_card-function)
- [view_history function](#view_history-function)
- [menu function](#menu-function)
- [clearConsole function](#clearconsole-function)
- [main function](#main-function)
- [selecting View Tables](#selecting-view-tables)
- [selecting Create Table](#selecting-create-table)
- [selecting Exit](#selecting-exit)


- []()

## Constants

```py
Expand Down Expand Up @@ -176,7 +207,7 @@ sub_titles (dict): A dictionary of sub-titles and their corresponding text.

<br>

### The classmethods of Card class:
### The classmethods of Card class

```py
@classmethod
Expand Down Expand Up @@ -587,7 +618,6 @@ The function first renames the latest.csv file in the table's directory by appen

Next, the function loops through the values in the table_data dictionary and finds the longest list of strings. This is done to determine the number of rows in the table. The function then loops through the rows and creates a new dictionary containing the data for each row. The keys of the dictionary are the column names, and the values are the strings in the corresponding column at the current row. The function then writes the row data to the file using the writerow() method of the DictWriter object. This process is repeated for all rows in the table, saving the changes made to the table in the latest.csv file.


## add_card function

```py
Expand Down Expand Up @@ -1626,4 +1656,4 @@ The code of Exit first clears the console screen to remove any previous output.

Next, a timer is set to count down from 5 seconds. The timer is displayed on the screen using the print function with the end parameter set to \r. This causes the timer to be displayed on the same line, overwriting the previous timer value on each iteration of the loop.

After the timer counts down to 0, the console is cleared again using clearConsole() and the program is terminated using sys.exit().
After the timer counts down to 0, the console is cleared again using clearConsole() and the program is terminated using sys.exit().

0 comments on commit 40a87eb

Please sign in to comment.