diff --git a/generate_markdown.sh b/generate_markdown.sh deleted file mode 100755 index 5da3efc..0000000 --- a/generate_markdown.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Generate markdown files from a list.txt file - -read -p "Are you sure you want to generate the markdown files? [y/N] " -n 1 -r -printf "\nGenerating markdown files...\n" - -# make sure docs directory exists -mkdir -p docs - -# Read the file list.txt line by line -while read line; do - # if line starts with a [D] create a directory and move into it - if [[ $line = \[D\]* ]]; then - dir="${line:3}" - # convert to lowercase and replace spaces with underscores - dir=$(echo "$dir" | tr '[:upper:]' '[:lower:]' | tr ' ' '_') - mkdir -p "$dir" - cd "$dir" - # write header to markdown file - echo "# ${line:3}" >> ../README.md - fi - # if line starts with a [F] save the file name - if [[ $line = \[F\]* ]]; then - file="${line:3}" - # convert to lowercase and replace spaces with underscores and add suffix - file=$(echo "$file" | tr '[:upper:]' '[:lower:]' | tr ' ' '_' | sed 's/$/.md/') - # create the file from the template - cp ../template.md "$file" - # write link to file in markdown file - echo "- [${line:3}]($dir/$file)" >> ../README.md - fi - # if line is empty, move up a directory - [[ -z $line ]] && cd .. -done < list.txt - -# copy all generated markdown files (without README.md) to the docs directory -find . -name "*.md" ! -name "README.md" -exec cp {} docs/ \; diff --git a/list.txt b/list.txt deleted file mode 100644 index f8abf17..0000000 --- a/list.txt +++ /dev/null @@ -1,34 +0,0 @@ -[D]SOLID Design Principles -[F]Single Responsibility Principle -[F]Open Closed Principle -[F]Liskov Substitution Principle -[F]Interface Segregation Principle -[F]Dependency Inversion Principle - -[D]Creational Design Patterns -[F]Builder -[F]Factories -[F]Prototype -[F]Singleton - -[D]Structrural Design Patterns -[F]Adapter -[F]Bridge -[F]Composite -[F]Decorator -[F]Façade -[F]Flyweight -[F]Proxy - -[D]Behavioral Design Patterns -[F]Chain of Responsibility -[F]Command -[F]Interpreter -[F]Iterator -[F]Mediator -[F]Memento -[F]Observer -[F]State -[F]Strategy -[F]Template Method -[F]Visitor diff --git a/template.md b/template.md deleted file mode 100644 index c4d2f29..0000000 --- a/template.md +++ /dev/null @@ -1,31 +0,0 @@ -# **`` Design Pattern** - -`` - -> `` - ---- - -## Review - -1. `` - ---- - -## Benefits - -* `` - ---- - -## Example - -```python -# Example -``` - ---- - -## Remember - -* ``