File tree Expand file tree Collapse file tree 5 files changed +9
-13
lines changed
Expand file tree Collapse file tree 5 files changed +9
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,16 +4,14 @@ USER root
44
55WORKDIR /app
66
7- COPY /.git ./.git
8- COPY .gitmodules .
9-
107COPY /api ./api
118COPY requirements.txt .
9+ COPY Makefile .
1210
13- RUN apt-get update && apt-get install -y git
11+ RUN apt-get update && apt-get install -y git make
1412
1513RUN mkdir assets
16- RUN git submodule update --init --recursive
14+ RUN make pull-repo
1715RUN cd ./assets/git_repo && git config features.manyFiles 1
1816
1917RUN pip install -r requirements.txt
Original file line number Diff line number Diff line change 77test :
88 ruff .
99
10- pull-submodules :
11- git submodule update --init --recursive
10+ pull-repo :
11+ git clone https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books ./assets/git_repo
1212
1313docker-build :
1414 python scripts/docker_build.py
Original file line number Diff line number Diff line change 1- __version__ = "1.3.5 "
1+ __version__ = "1.3.6 "
Original file line number Diff line number Diff line change 1313
1414from .errors import APIException
1515
16+ EXCLUDED_DIRS = [".git" ]
1617EXCLUDED_FILES = [".DS_Store" ]
1718GIT_REPO_PATH = "./assets/git_repo"
1819GIT_REPO_URL = "https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books"
@@ -105,7 +106,7 @@ class AGHPB():
105106 """Interface to the anime girls holding programming books directory."""
106107 def __init__ (self ) -> None :
107108 self .books : List [Book ] = []
108- self .categories = [x for x in os .listdir (GIT_REPO_PATH ) if os .path .isdir (f"{ GIT_REPO_PATH } /{ x } " )]
109+ self .categories = [x for x in os .listdir (GIT_REPO_PATH ) if os .path .isdir (f"{ GIT_REPO_PATH } /{ x } " ) and not x in EXCLUDED_DIRS ]
109110
110111 print (Colours .ORANGE .apply ("Loading books..." ))
111112
@@ -119,7 +120,7 @@ def __init__(self) -> None:
119120 book = Book (f"{ GIT_REPO_PATH } /{ category } /{ book } " , str (_id ))
120121 self .books .append (book )
121122
122- sys .stdout .write (f"Book '{ Colours .BLUE .apply (book .name )} ' added!\n " )
123+ sys .stdout .write (f"Book '{ Colours .PINK_GREY . apply ( book . category ) } - { Colours . BLUE .apply (book .name )} ' added!\n " )
123124 _id += 1
124125
125126 print (Colours .GREEN .apply ("[Done!]" ))
You can’t perform that action at this time.
0 commit comments