--- parser3/operators.txt 2024/12/20 18:59:22 1.262 +++ parser3/operators.txt 2024/12/21 00:27:50 1.265 @@ -427,7 +427,7 @@ hash ^hash.foreach[key;value]{body}[[delimiter]|{delimiter executed before each non-empty non-first body}] ^hash.delete[key] delete key - ^hash.contain[key] + ^hash.contains[key] checks if hash contains a key (bool) ^hash.at[first|last][[key|value|hash]] ^hash.at([-]N)[[key|value|hash]] @@ -508,7 +508,7 @@ array adds an element to the end of the array ^array.pop[] returns the last element and removes it from the array - ^array.contain(index) + ^array.contains(index) checks if an element exists at the given index (bool) ^array::sql{query}[ $.sparse(false|true) $.distinct(false|true) $.limit(n) $.offset(n) $.type[hash|string|table] ] creates an array based on a database query @@ -750,6 +750,28 @@ cookie $cookie:fields hash with all cookies +curl + ^curl:load[[ + $.url[http://URL] + $.timeout(N) + $.ssl_verifypeer(0) + $.mode[text|binary] type of the created file + ]] + downloads a file from a remote server, can be called multiple times within one session; + any libcurl option can be specified, option names in lowercase without the CURLOPT_ prefix + ^curl:options[[ + $.library[libcurl.so.4] + $.charset[UTF-8] + ... + ]] + subsequent ^curl:load calls inherit the specified options, the path to libcurl must be set before using curl + ^curl:session{code} + creates a cURL session, common options can be set, multiple downloads performed + ^curl:info[name], ^curl:info[] + information about the last request (a value or a hash) + ^curl:version[] + the version of the cURL library in use + env $env:variable $env:fields hash with environment variables @@ -879,9 +901,9 @@ mail $value[FILE] ] ] - if charset is specified, the email is transcoded to this charset - content-type.charset does not affect transcoding - after the part name a # number can follow + if charset is specified, the email is transcoded to this charset + content-type.charset does not affect transcoding + after the part name a # number can follow ^mail:send[ # by default, matches the source encoding. @@ -1396,4 +1418,4 @@ if $SIGPIPE(1) is defined in MAIN, then if the method description explicitly contains the local variable result (there is also an implicit variable), then the code for outputting whitespace literals does not get into the final bytecode -$Id: operators.txt,v 1.262 2024/12/20 18:59:22 moko Exp $ +$Id: operators.txt,v 1.265 2024/12/21 00:27:50 moko Exp $