From bbcbb72c9eb190f45068360d5908bcc499841130 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Sat, 24 Aug 2024 13:22:18 -0400 Subject: [PATCH] Add flair --- README.md | 33 ++++++++++++++++---------------- scripts/update_readme_methods.sh | 6 +++--- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b706f55..87eef2c 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,18 @@ PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs. --- -- [Installation](#installation) -- [Requirements](#requirements) -- [Quick Start and Examples](#quick-start-and-examples) -- [Available Methods](#available-methods) -- [Security](#security) -- [Troubleshooting](#troubleshooting) -- [Testing](#testing) -- [Contributing](#contributing) +- [โš™๏ธ Installation](#โš™๏ธ-installation) +- [๐Ÿ“‹ Requirements](#๐Ÿ“‹-requirements) +- [๐Ÿš€ Quick Start and Examples](#๐Ÿš€-quick-start-and-examples) +- [๐Ÿ“– Available Methods](#๐Ÿ“–-available-methods) +- [๐Ÿ”’ Security](#๐Ÿ”’-security) +- [๐Ÿ› ๏ธ Troubleshooting](#๐Ÿ› ๏ธ-troubleshooting) +- [๐Ÿงช Testing](#๐Ÿงช-testing) +- [๐Ÿค Contributing](#๐Ÿค-contributing) --- -### Installation +### โš™๏ธ Installation To install PHP Curl Class, run the following command: @@ -35,11 +35,11 @@ To install the latest commit version: Installation instructions to use the `composer` command can be found on https://github.com/composer/composer. -### Requirements +### ๐Ÿ“‹ Requirements PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, and 7.4. -### Quick Start and Examples +### ๐Ÿš€ Quick Start and Examples More examples are available under [/examples](https://github.com/php-curl-class/php-curl-class/tree/master/examples). @@ -194,7 +194,7 @@ $multi_curl->start(); // Blocks until all items in the queue have been processed More examples are available under [/examples](https://github.com/php-curl-class/php-curl-class/tree/master/examples). -### Available Methods +### ๐Ÿ“– Available Methods ```php Curl::__construct($base_url = null, $options = []) Curl::__destruct() @@ -329,6 +329,7 @@ MultiCurl::close() MultiCurl::complete($callback) MultiCurl::disableTimeout() MultiCurl::error($callback) +MultiCurl::getActiveCurls() MultiCurl::getOpt($option) MultiCurl::removeHeader($key) MultiCurl::setAutoReferer($auto_referer = true) @@ -376,19 +377,19 @@ MultiCurl::unsetProxy() MultiCurl::verbose($on = true, $output = 'STDERR') ``` -### Security +### ๐Ÿ”’ Security See [SECURITY](https://github.com/php-curl-class/php-curl-class/blob/master/SECURITY.md) for security considerations. -### Troubleshooting +### ๐Ÿ› ๏ธ Troubleshooting See [TROUBLESHOOTING](https://github.com/php-curl-class/php-curl-class/blob/master/TROUBLESHOOTING.md) for help troubleshooting. -### Testing +### ๐Ÿงช Testing See [TESTING](https://github.com/php-curl-class/php-curl-class/blob/master/TESTING.md) for testing information. -### Contributing +### ๐Ÿค Contributing 1. Check for open issues or open a new issue to start a discussion around a bug or feature. 1. Fork the repository on GitHub to start making your changes. diff --git a/scripts/update_readme_methods.sh b/scripts/update_readme_methods.sh index 4a658c1..485eddf 100755 --- a/scripts/update_readme_methods.sh +++ b/scripts/update_readme_methods.sh @@ -4,11 +4,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${SCRIPT_DIR}/.." before=$(head -n $( - grep --context="0" --line-number --max-count="1" "### Available Methods" "README.md" | + grep --context="0" --line-number --max-count="1" "### ๐Ÿ“– Available Methods" "README.md" | perl -pe 's/^(\d+):.*/\1/') "README.md") after=$(tail -n +$( - grep --context="0" --line-number --max-count="1" "### Security" "README.md" | + grep --context="0" --line-number --max-count="1" "### ๐Ÿ”’ Security" "README.md" | perl -pe 's/^(\d+):.*/\1/') "README.md") echo "${before}" > "README.md" @@ -48,7 +48,7 @@ echo "${after}" >> "README.md" # Update table of contents. script=$(cat <<'EOF' $data = file_get_contents('README.md'); - preg_match_all('/^### ([\w ]+)/m', $data, $matches); + preg_match_all('/^### (.*)/m', $data, $matches); $toc = []; foreach ($matches['1'] as $match) { $href = '#' . str_replace(' ', '-', strtolower($match));