File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 11
11
from util import par_dir , mkdir_p
12
12
from leetcode import Leetcode
13
13
from lintcode import Lintcode
14
+ from summary import update_summary
14
15
from ojhtml2markdown import problem2md
15
16
16
17
BASEDIR = os .path .abspath (os .path .dirname (__file__ ))
@@ -36,19 +37,20 @@ def curr_time():
36
37
print ('Called with arguments: {}' .format (args ))
37
38
38
39
ROOTDIR = par_dir (BASEDIR )
39
- raw_url = args .new
40
- problem_md = ''
41
- problem_slug = ''
42
- xxxcode = None
43
- convert_desc = True
44
- if raw_url .startswith ('https://leetcode' ):
45
- xxxcode = Leetcode ()
46
- elif raw_url .startswith ('https://www.lintcode.com' ):
47
- xxxcode = Lintcode ()
48
- convert_desc = False
49
- problem = xxxcode .get_problem_all (raw_url )
50
- problem_slug = slugify (problem ['title' ], separator = "_" )
51
- problem_md = problem2md (problem , convert_desc )
40
+ if args .new :
41
+ raw_url = args .new
42
+ problem_md = ''
43
+ problem_slug = ''
44
+ xxxcode = None
45
+ convert_desc = True
46
+ if raw_url .startswith ('https://leetcode' ):
47
+ xxxcode = Leetcode ()
48
+ elif raw_url .startswith ('https://www.lintcode.com' ):
49
+ xxxcode = Lintcode ()
50
+ convert_desc = False
51
+ problem = xxxcode .get_problem_all (raw_url )
52
+ problem_slug = slugify (problem ['title' ], separator = "_" )
53
+ problem_md = problem2md (problem , convert_desc )
52
54
53
55
if args .dir :
54
56
post_dir = os .path .join (ROOTDIR , args .dir )
You can’t perform that action at this time.
0 commit comments