mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-03 00:23:15 +08:00
change to three collections for three problem sets
This commit is contained in:
+8
-2
@@ -28,8 +28,14 @@ exclude: [PATAdvanced/, PATBasic/, Gemfile, Gemfile.lock, source]
|
||||
|
||||
# collections
|
||||
collections:
|
||||
articles:
|
||||
Advanced:
|
||||
output: true
|
||||
permalink: /:path:output_ext
|
||||
permalink: /:collection/:path:output_ext
|
||||
Basic:
|
||||
output: true
|
||||
permalink: /:collection/:path:output_ext
|
||||
Top:
|
||||
output: true
|
||||
permalink: /:collection/:path:output_ext
|
||||
|
||||
# vim:tabstop=2:softtabstop=2:shiftwidth=2
|
||||
|
||||
+2
-3
@@ -104,15 +104,14 @@ class FileBuilder:
|
||||
"""
|
||||
write everything to a final markdown file
|
||||
"""
|
||||
filename = "{}/{}{:04}.md".format(config.md_dir, self.c, self.i)
|
||||
tag = config.tag[self.c]
|
||||
category = config.category[self.c]
|
||||
|
||||
filename = os.path.join(config.md_dir, "_" + category, "{:04}.md".format(self.i))
|
||||
title, problem_div = self.read_html()
|
||||
code, code_url = self.read_code()
|
||||
date, expl = self.read_expl()
|
||||
|
||||
tag = config.tag[self.c]
|
||||
|
||||
print("Building {}".format(filename))
|
||||
|
||||
with open(filename, 'w') as f:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
md_dir = "../_articles" # The dir of final generated markdown file
|
||||
md_dir = "../" # The dir of final generated markdown file
|
||||
html_dir = "html" # The dir of html file from patest.cn
|
||||
analysis_dir = "analysis" # The dir of md files of only analysis text
|
||||
code_dir = { # Children folders of code_dir
|
||||
|
||||
Reference in New Issue
Block a user