Giter Site home page Giter Site logo

edge2992 / prog_shojin_util Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 100 KB

A utility tool to aid in the "Shojin" practice of programming contests, extracting and filtering problems from AtCoder, Yukicoder, and more.

Home Page: https://pypi.org/project/prog-shojin-util/

License: MIT License

Python 100.00%
atcoder cli competitive-programming

prog_shojin_util's Introduction

prog_shojin_util: Competitive Programming Problem Fetcher

PyPI version Unit Test codecov

Fetch and organize competitive programming problems from various blogs with ease.

Table of Contents

Introduction

prog-shojin-util (pshu) is a CLI utility tool tailored to extract competitive programming problems not directly from contest platforms, but from blogs and websites that curate high-quality problems, particularly from renowned platforms like AtCoder and Yukicoder. By sifting through these selected compilations, users can focus on problems that are recommended by the community, filtering them based on criteria like AC status, date range, and more.

Features

  • User-Based Filtering: Focus on problems based on a specific user's activity on platforms like AtCoder.
  • Problem Status Filtering: Whether you're looking to find unsolved problems or revisit those you've already solved, prog_shojin_util has you covered.
  • Flexible Output: Obtain your results in various formats such as JSON, Markdown, CSV, and more.
  • Date-based Retrieval: Fetch problems available since a specific date for targeted practice sessions.

Integration with atcoder-cli

prog_shojin_util offers integration capabilities with atcoder-cli, an essential tool in the competitive programming community. By saving the fetched problems as contest.acc.json in a directory and then using atcoder-cli in that directory, you can streamline your problem-solving workflow.

  1. Create a Workspace for Practice: Begin by setting up a designated workspace for the problems.

    mkdir practice
    cd practice
  2. Fetch Unsolved Problems with prog_shojin_util: Fetch problems curated by a specific user (edge2992 in this case) from a Qiita post and save them in a format suitable for atcoder-cli.

     pshu --atcoder-user edge2992 \
          -t https://qiita.com/e869120/items/f1c6f98364d1443148b3 \
          --status not-ac \
          --output acc_json > contest.acc.json
  3. Integrate with atcoder-cli: With the contest.acc.json file at hand, you can now use the atcoder-cli to add the problems to your list of tasks.

    acc add -c inquire

By following these steps, you can efficiently extract unsolved problems from a curated list, then download and submit tests using atcoder-cli.

Supported Contest Platforms

Here's a list of contest platforms supported by prog_shojin_util:

Contest Platform Support Status
AtCoder
Yukicoder
[Other platforms]

Installation

To install prog_shojin_util, use the following command:

pip install prog_shojin_util

Ensure you have a compatible Python version installed.

Examples

To fetch unsolved problems from a specific URL for a given AtCoder user:

pshu --atcoder-user john_doe \
     -t https://example.com/problems \
     --status not-ac

To obtain all problems in CSV format for a Yukicoder user:

pshu --yukicoder-user jane_doe \
     -t https://example.com/problems \
     --status both --output csv

For detailed options and configurations, consult the Options section.

Options

Here's a breakdown of the available options in prog_shojin_util:

  • --atcoder-user TEXT: Specify the User ID for AtCoder to filter problems based on the user's activity.

  • --yukicoder-user TEXT: Specify the User Name for Yukicoder to filter problems based on the user's activity.

  • -t, --target TEXT: The base URL from which problem links will be fetched. This option is mandatory.

  • --status [ac|not-ac|both]: Filter problems based on their AC (Accepted) status.

    • ac: For problems already solved.
    • not-ac: For unsolved problems.
    • both: For all problems. The default is not-ac.
  • --output [json|markdown|csv|acc_json]: Choose the desired output format:

    • json: Standard JSON format.
    • markdown: Markdown format.
    • csv: CSV format.
    • acc_json: The format used by the atcoder-cli tool. The default is json.
  • --since DATE_FORMAT: Filter problems available since the specified date. Use the format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'. The default is set to 2012-01-01.

  • --verbose: Enable this option for detailed logging, which aids in debugging.

For command-line help, use the --help option.

Acknowledgements

Special thanks to the AtCoder Problems API and Yukicoder API for providing invaluable data resources. Our tool, prog_shojin_util, greatly benefits from its capabilities.

Contributing

If you'd like to contribute to the project, feel free to submit issues or pull requests.

License

MIT

prog_shojin_util's People

Contributors

edge2992 avatar

Watchers

 avatar

prog_shojin_util's Issues

prog_shojin_utilのURL解析の問題

説明:

prog_shojin_utilがターゲットブログからURLを収集する際、一部のURLに追加のクエリパラメータ(例: ?lang=ja)が含まれていることに気づきました。例として以下のURLがあります:

https://atcoder.jp/contests/abc075/tasks/abc075_c?lang=ja

期待する動作:

クエリパラメータを持たない標準的な形式でURLを収集することを期待しています。

実際の動作:

収集された一部のURLには、?lang=jaのような追加のクエリパラメータが含まれています。

提案される解決策:

不要なクエリパラメータを削除するURLクリーナーまたはパーサーの実装を検討してください。

再現手順:

  1. クエリパラメータを含むURLがあるターゲットブログからprog_shojin_utilを使用してURLを収集します。
  2. 収集されたURLを確認します。

追加情報:

現時点で特にありません。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.