Merge pull request #158 from barrett-ruth/feat/buf-difficulties
fix: open problem-specific url
This commit is contained in:
commit
c29ec1c6b0
6 changed files with 7 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,3 +6,4 @@ io
|
|||
debug
|
||||
venv/
|
||||
CLAUDE.md
|
||||
__pycache__
|
||||
|
|
|
|||
|
|
@ -211,7 +211,8 @@ run CSES problems with Rust using the single schema:
|
|||
Should return full filename with extension.
|
||||
(default: concatenates contest_id and problem_id, lowercased)
|
||||
{ui} (|CpUI|) UI settings: run panel, diff backend, picker.
|
||||
{open_url} (boolean) Open the contest url in the browser.
|
||||
{open_url} (boolean) Open the contest & problem url in the browser
|
||||
when the contest is first opened.
|
||||
|
||||
*CpPlatform*
|
||||
Fields: ~
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ function M.setup_contest(platform, contest_id, problem_id, language)
|
|||
start_tests(platform, contest_id, problems)
|
||||
|
||||
if config_module.get_config().open_url and is_new_contest and contest_data.url then
|
||||
vim.ui.open(contest_data.url)
|
||||
vim.ui.open(contest_data.url:format(pid))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ class AtcoderScraper(BaseScraper):
|
|||
error="",
|
||||
contest_id=cid,
|
||||
problems=problems,
|
||||
url=f"https://atcoder.jp/contests/{contest_id}/tasks",
|
||||
url=f"https://atcoder.jp/contests/{contest_id}/tasks/{contest_id}_%s",
|
||||
)
|
||||
|
||||
return await self._safe_execute("metadata", impl, contest_id)
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class CodeforcesScraper(BaseScraper):
|
|||
error="",
|
||||
contest_id=cid,
|
||||
problems=problems,
|
||||
url=f"https://codeforces.com/contest/{contest_id}",
|
||||
url=f"https://codeforces.com/contest/{contest_id}/%s",
|
||||
)
|
||||
|
||||
return await self._safe_execute("metadata", impl, contest_id)
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ class CSESScraper(BaseScraper):
|
|||
error="",
|
||||
contest_id=contest_id,
|
||||
problems=problems,
|
||||
url="https://cses.fi/problemset",
|
||||
url="https://cses.fi/problemset/task/%s",
|
||||
)
|
||||
|
||||
async def scrape_contest_list(self) -> ContestListResult:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue