{"id":27389093,"url":"https://github.com/01mu/sq-wikiquote","last_synced_at":"2025-09-08T09:38:59.061Z","repository":{"id":165311871,"uuid":"138363278","full_name":"01mu/sq-wikiquote","owner":"01mu","description":"Get authors and quotes from wikiquote.org","archived":false,"fork":false,"pushed_at":"2019-07-07T21:21:55.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-20T19:54:17.145Z","etag":null,"topics":["php","quotes","scraper","some","sq-wikiquote","wikimedia","wikiquote"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/01mu.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":"2018-06-23T01:56:17.000Z","updated_at":"2023-12-04T04:46:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7bbc66b-76fc-40fb-80b5-cd37493e234d","html_url":"https://github.com/01mu/sq-wikiquote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/01mu/sq-wikiquote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01mu%2Fsq-wikiquote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01mu%2Fsq-wikiquote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01mu%2Fsq-wikiquote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01mu%2Fsq-wikiquote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/01mu","download_url":"https://codeload.github.com/01mu/sq-wikiquote/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01mu%2Fsq-wikiquote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166389,"owners_count":25233953,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["php","quotes","scraper","some","sq-wikiquote","wikimedia","wikiquote"],"created_at":"2025-04-13T19:11:57.504Z","updated_at":"2025-09-08T09:38:59.053Z","avatar_url":"https://github.com/01mu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sq-wikiquote\nGet authors and quotes from wikiquote.org. Since user-edited Wikiquote pages are not formatted consistently some quotes are not included. There are over 100,000 quotes from over 7,000 authors.\n## Usage\n### Get quotes from an individual author:\n```php\n\u003c?php\ninclude_once 'sq-wikiquote.php';\n\n$wikiquote = new wikiquote();\n\n$quotes = $wikiquote-\u003eget_author_quotes('Richard Stallman');\n\nfor($i = 0; $i \u003c count($quotes); $i++)\n{\n    print($quotes[$i] . \"\\n\\n\");\n}\n```\n```\nWell, Geoff forwarded me a copy of the DEC message, and I eat my words. (...)\n\nGNU, which stands for Gnu's Not Unix, is the name for the complete  (...)\n\nHundreds of thousands of babies are born every day. While the whole (...)\n\n...\n```\n### Get names by page \"List_of_people_by_name,_C\", etc.:\n```php\n\u003c?php\ninclude_once 'sq-wikiquote.php';\n\n$wikiquote = new wikiquote();\n\n$pages = $wikiquote-\u003eget_pages();\n$c_names = $wikiquote-\u003eget_authors($pages[2]); // List_of_people_by_name,_C\n\nfor($i = 0; $i \u003c count($c_names); $i++)\n{\n    print($c_names[$i] . \"\\n\\n\");\n}\n```\n```\nMelanie C\n\nVico C\n\nLouis C.K.\n\nVince Cable\n\nNicola Cabibbo\n\n...\n```\n### Write all quotes to a MySQL database:\nCreates three tables (`quotes`, `authors`, and `relations`) and makes inserts.\n* `quotes` contains quote length information, the quote's author, and the quote itself.\n* `authors` contains the names of authors and their quote count.\n* `relations` contains quote authors that appear in a given author's Wikipedia page. (ex: Plato and Hannibal appear as links in Alexander the Great's Wikipedia article, so they are included as `relations` for Alexander the Great.)\n```php\n\u003c?php\ninclude_once 'sq-wikiquote.php';\n\n$wikiquote = new wikiquote();\n\n$server = '';\n$username = '';\n$pw = '';\n$db = '';\n\n$wikiquote-\u003econn($server, $username, $pw, $db);\n$wikiquote-\u003ecreate_tables();\n$wikiquote-\u003ewrite_db();\n$wikiquote-\u003ewrite_relations();\n```\n```\nInserting 'Brooks Adams' quotes... Quotes inserted: 3.\nInserting 'Bryan Adams' quotes... Quotes inserted: 19.\nInserting 'Charles Francis Adams, Sr.' quotes... Quotes inserted: 3.\nInserting 'Charles Follen Adams' quotes... Quotes inserted: 1.\nInserting 'Douglas Adams' quotes... Quotes inserted: 37.\n...\n```\n### API\nReturn quotes from the MySQL database.\n* get_author_list(`$start`, `$limit`): Return random authors.\n* get_author_search(`$author`, `$start`, `$limit`): Return authors matching query.\n* get_author_single(`$author`): Return specific author, quotes, and relations.\n* get_quote_random(`$start`, `$limit`): Return random quotes.\n* get_quote_search(`$quote`, `$start`, `$limit`): Return quotes matching query.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F01mu%2Fsq-wikiquote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F01mu%2Fsq-wikiquote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F01mu%2Fsq-wikiquote/lists"}