8000 add solutions folder · bonfy/leetcode@9d56fdf · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d56fdf

Browse files
committed
add solutions folder
1 parent abd2257 commit 9d56fdf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

leetcode_generate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
from collections import namedtuple, OrderedDict
2121

2222
HOME = Path.cwd()
23-
SOLUTION_FOLDER = Path.joinpath(HOME, 'solutions')
23+
SOLUTION_FOLDER_NAME = 'solutions'
24+
SOLUTION_FOLDER = Path.joinpath(HOME, SOLUTION_FOLDER_NAME)
2425
CONFIG_FILE = Path.joinpath(HOME, 'config.cfg')
2526
COOKIE_PATH = 'cookies.json'
2627
BASE_URL = 'https://leetcode.com'
@@ -551,7 +552,8 @@ def write_readme(self):
551552
language = ':lock:'
552553
else:
553554
if item.solutions:
554-
dirname = 'solutions/{id}-{title}'.format(
555+
dirname = '{folder}/{id}-{title}'.format(
556+
folder=SOLUTION_FOLDER_NAME,
555557
id=str(item.question_id).zfill(3),
556558
title=item.question__title_slug,
557559
)

0 commit comments

Comments
 (0)
0