Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/lc_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ Reetkode

My personal collection of [LeetCode](https://leetcode.com/) solutions done in multiple languages, shared for learning and reference. 😃

This README is generated using the following custom-built **Python** scripts: [`lc_markdown.py`](scripts/lc_markdown.py), [`lc_chart.py`](scripts/lc_chart.py), and [`lc_stats.py`](scripts/lc_stats.py), as part of a **GitHub Actions** [workflow](.github/workflows/main.yml) which runs during checks within pull requests made to `main` branch, updating the content and organising solution files prior to merging.
***
This README is generated using the following custom-built **Python** scripts: [`lc_markdown.py`](scripts/lc_markdown.py), [`lc_chart.py`](scripts/lc_chart.py), and [`lc_stats.py`](scripts/lc_stats.py), as part of an automated **GitHub Actions** [workflow](.github/workflows/main.yml) which runs during checks within pull requests made to the `main` branch, updating the README content and organising solution files prior to merging.

The following diagram illustrates the action flow of using these [scripts](scripts/):

![Script flow](.github/lc_flow.png?)
***
## Progress Overview
![LeetCode stats](.github/lc_chart.png?)

Expand Down Expand Up @@ -252,3 +255,5 @@ This README is generated using the following custom-built **Python** scripts: [`
|**3541**|🟩 Easy|⚙️|[Find Most Frequent Vowel And Consonant](https://lcid.cc/3541)|<a href="python/lce_p3541_find_most_frequent_vowel_and_consonant.py"><img src=".github/icons/python-original.svg" height="25"></a>|
|**3550**|🟩 Easy|⚙️|[Smallest Index With Digit Sum Equal To Index](https://lcid.cc/3550)|<a href="python/lce_p3550_smallest_index_with_digit_sum_equal_to_index.py"><img src=".github/icons/python-original.svg" height="25"></a>|


#### <div align="right"> [🔝Return to top](#reetkode) </div>
1 change: 1 addition & 0 deletions scripts/lc_constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
REETKODE_SOLUTION_URL = "{folder}/{filename}"
REETKODE_ICON_URL = ".github/icons/{icon}"
REETKODE_CHART_URL = ".github/lc_chart.png?"
REETKODE_FLOW_URL = ".github/lc_flow.png?"
LEETCODE_PROBLEM_URL = "https://lcid.cc/{id}"

IGNORED_DIRS = (".git", ".github", "icons", "scripts")
Expand Down
12 changes: 10 additions & 2 deletions scripts/lc_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,17 @@ def markdown_leetcode() -> None:
readme_file.new_line()
readme_file.new_line(text=
"This README is generated using the following custom-built **Python** scripts: [`lc_markdown.py`](scripts/lc_markdown.py), [`lc_chart.py`](scripts/lc_chart.py), and [`lc_stats.py`](scripts/lc_stats.py), " +
"as part of a **GitHub Actions** [workflow](.github/workflows/main.yml) which runs during checks within pull requests made to `main` branch, updating the content and organising solution files prior to merging."
"as part of an automated **GitHub Actions** [workflow](.github/workflows/main.yml) which runs during checks within pull requests made to the `main` branch, updating the README content and organising solution files prior to merging."
)
readme_file.new_line(text="***")
readme_file.new_line()

flow_link_url = lcc.REETKODE_FLOW_URL
readme_file.new_line(text="The following diagram illustrates the action flow of using these [scripts](scripts/):")
readme_file.new_line()

readme_file.new_line(readme_file.new_inline_image(text="Script flow", path=flow_link_url))
readme_file.new_line(text="***")

# data showing the number of LeetCode problems solved, grouped by difficulty level and programming language
# key = programming language, value = mapping of each difficulty level to the number of problems solved
chart_leetcode()
Expand Down Expand Up @@ -189,6 +195,8 @@ def markdown_leetcode() -> None:
readme_file.new_table(columns=cols_num, rows=rows_num + 1, text=cells, text_align="left")
readme_file.new_line()

readme_file.new_line(text='#### <div align="right"> [🔝Return to top](#reetkode) </div>')

# generate README
readme_file.create_md_file()
print(f"[SUCCESS] README generated (table included: {rows_num} rows x {cols_num} columns)")
Expand Down