{"id":28458380,"url":"https://github.com/nellogan/studybuddy","last_synced_at":"2025-07-02T05:31:15.849Z","repository":{"id":297606223,"uuid":"997290448","full_name":"nellogan/studybuddy","owner":"nellogan","description":"Optimize Leetcode study sessions by scraping provided URLs to local files with preconfigured imports/includes and supporting build files. Generates a log header per file and a consolidated log file in the destination directory.","archived":false,"fork":false,"pushed_at":"2025-06-06T10:46:00.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-06T11:34:09.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nellogan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-06T09:21:37.000Z","updated_at":"2025-06-06T10:42:33.000Z","dependencies_parsed_at":"2025-06-06T11:44:19.641Z","dependency_job_id":null,"html_url":"https://github.com/nellogan/studybuddy","commit_stats":null,"previous_names":["nellogan/studybuddy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nellogan/studybuddy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nellogan%2Fstudybuddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nellogan%2Fstudybuddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nellogan%2Fstudybuddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nellogan%2Fstudybuddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nellogan","download_url":"https://codeload.github.com/nellogan/studybuddy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nellogan%2Fstudybuddy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263081198,"owners_count":23410824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-07T00:11:00.367Z","updated_at":"2025-07-02T05:31:15.808Z","avatar_url":"https://github.com/nellogan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/nellogan/studybuddy/actions/workflows/CI.yml/badge.svg)](https://github.com/nellogan/studybuddy/actions/workflows/CI.yml)\n\n# Description\nOptimize Leetcode study sessions by scraping provided URLs to local files with preconfigured imports/includes and supporting build files.\n\nWhat studybuddy does:\n\n    1. Creates a directory for current session.\n    2. Each question will have its own sub-directory created.\n    3. Each sub-directory will contain a solution file. This file will automatically import/include \n       commonly used data structures for the selected language. For C++, the file will have a main function as well as\n       a make file generated. Run the C++ solution file by simply calling 'make' or 'make run'\n    4. Creates a session log, 'log.txt', that will note the difficulty and suggested time limit based on the difficulty\n       rating. Allows the user to take notes per question such as start time, end time, link to a discussion post\n       with a clean answer for comparison or review. This log header will also be included in the solution file so\n       that it can be seamlessly copy pasted back into the log.txt file.\n    5. The log file can be omitted by passing the -n commandline option.\n\nFor example, passing URL: https://leetcode.com/problems/two-sum/ will produce a file called 'TwoSum.py' (if \nPython selected). Since the question is marked Easy, the suggested time limit will be set to 20 minutes \n(Easy: 20 minutes, Easy: 30 minutes, Hard: 40 minutes).\n\n\nStudybuddy increases study efficiency by:\n    \n    1. Eliminating boilerplate associated with copying question information to a local IDE or file, rather than relying \n        on Leetcode's brower editor and test cases.\n    2. Automatically generating a study journal to keep track of progress. Very useful for spaced repitition of problem\n       sets. Enabling the user to waste less time managing a study journal.\n    3. Neatly consolidating the study session into one directory.\n\n\n# Installation\nRequires Python3, chromium, and the chromedriver to be installed. The only supported operating system is Linux.\n\nBoth the chromium and chromium-driver packages are required to interface with Selenium. For C++ problems,\nmakefile is assumed to be installed. If using a debian based distribution:\n\n    sudo apt install chromium chromium-driver\n\n## Install From Source:\n\n    git clone https://github.com/nellogan/studybuddy.git\n    python3 -m venv ./.venv\n    source ./.venv/bin/activate\n    pip install .\n\n### Option 1: venv will need to be activated every time before directly calling studybuddy, for example:\n    \n    source ./.venv/bin/activate\n    studybuddy [args]\n\n### Option 2 (cleaner method): Create a symlink to /usr/local/bin so that venv does NOT need to be activated beforehand\n\n    sudo ln -s $PWD/.venv/bin/studybuddy /usr/local/bin/studybuddy\n    # Now studybuddy will persist in $PATH\n    studybuddy [args]\n\n## Uninstall\n    \n    cd $INSTALL_DIR\n    source ./.venv/bin/activate\n    pip uninstall studybuddy\n    #If used Option 2 of 'Install from source': sudo rm /usr/local/bin/studybuddy\n\n# How To Use\n\n    studybuddy -h\n    usage: studybuddy [-h] [-l LANGUAGE] [-n] (-q QUESTION | -f QUESTIONS_FILE) DESTINATION_DIR\n        \n    Optimize Leetcode study sessions by scraping provided URLs code data to local files with preconfigured imports/includes and supporting build files. Generates a log header per file and a\n    consolidated log file in the destination directory.\n    \n    positional arguments:\n      DESTINATION_DIR       (Required) destination directory (will recursively create directories if they do not exist)\n    \n    options:\n      -h, --help            show this help message and exit\n      -l, --language LANGUAGE\n                            (Optional) specify language, only Python3 and C++ are supported. Defaults to Python3 if omitted\n      -n, --no_log          (Optional) turn off logging\n      -q, --question QUESTION\n                            (Required, mutually exclusive to -f) URL of question\n      -f, --questions_file QUESTIONS_FILE\n                            (Required, mutually exclusive to -q) path to file that contains question urls that are newline separated\n    \n    For suggestions or bug reports, raise an issue at 'https://github.com/nellogan/studybuddy/issues'\n\nPython3 is the default language. Currently only Python3 and C++ are supported.\n\nFor a single question, let URL=https://leetcode.com/problems/two-sum:\n\n    studybuddy /path/to/destination -q $URL\n    #Solve the question and validate solution with any test cases developed with (optionally fill out header/log):\n    python3 /path/to/destination/TwoSum.py\n\nFor multiple questions, create a file that contains a question url on each line, for example: \"URLS_FILE=./questions_file\"\nwhere the file contains https://leetcode.com/problems/two-sum/description and https://leetcode.com/problems/add-two-numbers.\n\n    studybuddy /path/to/destination -f $URLS_FILE -l C++\n    #Solve TwoSum and validate solution with any test cases developed with (optionally fill out header/log):\n    cd /path/to/destination/TwoSum \u0026\u0026 make\n    #Solve AddTwoNumbers and validate solution with any test cases developed with (optionally fill out header/log) \n    cd /path/to/destination/AddTwoNumbers \u0026\u0026 make\n\n\n# License Information\nThis project uses Selenium, which is licensed under the Apache 2.0 License. See the `selenium_license` directory for the \nSelenium LICENSE and NOTICE files.\n\nstudybuddy is licensed under the Apache 2.0 License, see files LICENSE and NOTICE in the root directory.\n\n\n# Suggestions or Issues\nFor any suggestions such as support for a new language or any bugs are found, raise an issue at: https://github.com/nellogan/studybuddy/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnellogan%2Fstudybuddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnellogan%2Fstudybuddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnellogan%2Fstudybuddy/lists"}