Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit 473f080

Browse files
committed
Fix php-curl-class#223: Update README with available methods
1 parent 342fbd3 commit 473f080

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ MultiCurl::setBasicAuthentication($username, $password = '')
215215
MultiCurl::setCookie($key, $value)
216216
MultiCurl::setCookieFile($cookie_file)
217217
MultiCurl::setCookieJar($cookie_jar)
218+
MultiCurl::setDigestAuthentication($username, $password = '')
218219
MultiCurl::setHeader($key, $value)
219220
MultiCurl::setJsonDecoder($function)
220221
MultiCurl::setOpt($option, $value)

scripts/update_readme_methods.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
before=$(head -n $(
2+
grep --context="0" --line-number --max-count="1" "### Available Methods" "README.md" |
3+
perl -pe 's/^(\d+):.*/\1/') "README.md")
4+
5+
after=$(tail -n +$(
6+
grep --context="0" --line-number --max-count="1" "### Contribute" "README.md" |
7+
perl -pe 's/^(\d+):.*/\1/') "README.md")
8+
9+
echo "${before}" > "README.md"
10+
11+
curl_max_line_number=$(grep --context="0" --line-number --max-count="1" '^}$' "src/Curl/Curl.php" | \
12+
perl -pe 's/^(\d+):.*/\1/')
13+
echo '```php' >> "README.md"
14+
head -n "${curl_max_line_number}" "src/Curl/Curl.php" | \
15+
egrep "^ .* function .*" | \
16+
egrep "^ public" | \
17+
sort | \
18+
perl -pe 's/^ public (.* )?function /Curl::/' | \
19+
tee -a "README.md"
20+
egrep "^ .* function .*" "src/Curl/MultiCurl.php" | \
21+
egrep "^ public" | \
22+
sort | \
23+
perl -pe 's/^ public (.* )?function /MultiCurl::/' | \
24+
tee -a "README.md"
25+
echo '```' >> "README.md"
26+
echo >> "README.md"
27+
28+
echo "${after}" >> "README.md"

0 commit comments

Comments
 (0)