{"id":16168586,"url":"https://github.com/thatxliner/rrd","last_synced_at":"2025-04-07T06:30:35.612Z","repository":{"id":104225588,"uuid":"376185863","full_name":"ThatXliner/rrd","owner":"ThatXliner","description":"Rick Roll Detector. My first C++ project that uses CMake and external libraries. Now with comments so you can, too!","archived":false,"fork":false,"pushed_at":"2021-10-25T16:14:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T10:46:30.018Z","etag":null,"topics":["cmake","cmake-examples","cpp","example","example-code","example-project"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThatXliner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-12T02:33:32.000Z","updated_at":"2021-10-25T16:15:01.000Z","dependencies_parsed_at":"2023-11-25T14:00:10.735Z","dependency_job_id":null,"html_url":"https://github.com/ThatXliner/rrd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatXliner%2Frrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatXliner%2Frrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatXliner%2Frrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatXliner%2Frrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThatXliner","download_url":"https://codeload.github.com/ThatXliner/rrd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247605823,"owners_count":20965657,"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":["cmake","cmake-examples","cpp","example","example-code","example-project"],"created_at":"2024-10-10T03:12:19.526Z","updated_at":"2025-04-07T06:30:35.588Z","avatar_url":"https://github.com/ThatXliner.png","language":"CMake","readme":"# RRD\n\n[**R**ick **R**oll](https://www.youtube.com/watch?v=dQw4w9WgXcQ \"Rickrolling - Wikipedia\") **D**etector\n\n---\n\n### Why\n\nI wanted to learn C++. I already know the syntax (mostly) and I wanted to test myself with using C++ and external libraries\n\n#### Why not Python\n\nThe entire program can be written in **1 line of Python**:\n```python\nimport re,urllib.request,sys;print(\"Usage: rrd URL\" if len(sys.argv) \u003c 2 else \"Possible rickroll detected\" (if re.search(r\"((rick\\s*roll)|(never\\s*gonna\\s*(give\\s*you\\s*up)?)|(dQw4w9WgXcQ))\", urllib.request.urlopen(sys.argv[1]).read().decode()) else \"No rickroll detected\"));sys.exit(1 if len(sys.argv) \u003c 2 else 0)\n```\n\nor 4 lines, conforming very closely to my C++ program\n\n```python\nimport re, urllib.request, sys\n\nREGEX = re.compile(r\"((rick\\s*roll)|(never\\s*gonna\\s*(give\\s*you\\s*up)?)|(dQw4w9WgXcQ))\")\n\nif len(sys.argv) \u003c 2:\n    print(\"Usage: rrd URL\")\n    sys.exit(1)\nwith urllib.request.urlopen(sys.argv[1]) as f:\n    print(\n        \"Possible rickroll detected\"\n        if REGEX.search(f.read().decode())\n        else \"No rickroll detected\"\n    )\n```\n\nBut come on, that defeats the purpose of this project.\n\n### Installation\n\n1. Download source\n\n```bash\ngit clone https://github.com/ThatXliner/rrd.git\ncd rrd\n```\n\n2. Generate makefiles\n\n```bash\ncmake .\n```\n\n[*Hey it fails!*](#troubleshooting)\n\n3. Build the program\n\n```bash\nmake\n```\n\n4. Enjoy\n\n```bash\n./rrd 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'\n```\n(or, on Windows)\n```powershell\n.\\rrd 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'\n```\n\n### Help\n\n#### Troubleshooting\n\n**Running `cmake .` doesn't work!**\n\nThis part took me a TON of time.\n\nIf you're on Mac and have [homebrew](https://brew.sh) (and you can run it), run\n\n```bash\nbrew upgrade\nbrew update\nbrew install openssl\n```\n\nShould fix your problems. I forgot what worked for me but at some point, re-installing OpenSSL was all that I needed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatxliner%2Frrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatxliner%2Frrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatxliner%2Frrd/lists"}