$ asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
λ€μμ tmp-folderμ μλ μ±μ λλ€.
$ exa -l /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
.rw------- 5.8M user 28 Jan 16:33 /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
μ μ ν μ€λ₯ λ©μμ§κ° νμλμ§ μλ μ΄μ λ νμ€νμ§ μμ§λ§ μ λ‘λ νμΌμ 5M μ νμ΄ μμ΅λλ€. #91 μ°Έμ‘°
μ, ν¬κΈ° μ ν λ¬Έμ μ λλ€.
asciinemaμλ μν 413(μ΄ κ²½μ° μΉ μλ²μμ λ°νλ¨)μ λν μ€λ₯ μ²λ¦¬κΈ°κ° μμ§λ§ Pythonμ urllib μλ λ°©μμΌλ‘ μΈν΄ μ λλ‘ μ²λ¦¬λμ§ μλ κ² κ°μ΅λλ€. λ¬Έμ μ λν μμΈν λ΄μ©μ https://github.com/kennethreitz/requests/issues/2422#issuecomment -184012765μμ νμΈν μ μμ΅λλ€.
μ€λ κ°μ λ¬Έμ κ° λ°μνμ΅λλ€. μ λ‘λν νμΌμ΄ 5M μ΄μμΈ κ²½μ° ν΄λΌμ΄μΈνΈ μΈ‘ κ²½κ³ λ₯Ό λ΄λ³΄λ΄λ μμλ°©νΈμ λν΄ μ΄λ»κ² μκ°νμλκΉ?
λλ μ κΈ°μ μΌλ‘ 5M μ νλ³΄λ€ ν¨μ¬ μλμ μμ΅λλ€.
[schwarzgerat](2) $ ls -l /tmp/user/1000/tmpaxpadd2n-ascii.cast
-rw------- 1 dank dank 592498 2020-01-05 08:57 /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](0) $ asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](1) $
μ κ²μ 600Kμ λΆκ³Όν©λλ€. λ‘컬μμ μλ²½νκ² μ¬μλ©λλ€.
μ¬κΈ°μμ μ¬νν μ μμ΅λλ€.
$ asciinema upload display_sweep.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload display_sweep.cast
$ ll -h display_sweep.cast
-rw-r--r-- 1 nicoo nicoo 2.3M Jan 14 21:29 display_sweep.cast
μμ νμΌμμλ κ°μ μΌμ΄ λ°μν©λλ€. curl
λ‘ μ¬ννλ €κ³ μλνμ§λ§ μ λλ‘ μλνμ΅λλ€.
$ curl --http1.1 -v -u $USER:$(cat ~/.config/asciinema/install-id) https://asciinema.org/api/asciicasts -F asciicast=@display_sweep.cast
* Trying 109.107.38.78:443...
* TCP_NODELAY set
* Connected to asciinema.org (109.107.38.78) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=asciinema.org
* start date: Jan 16 08:09:20 2020 GMT
* expire date: Apr 15 08:09:20 2020 GMT
* subjectAltName: host "asciinema.org" matched cert's "asciinema.org"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
* Server auth using Basic with user 'nicoo'
> POST /api/asciicasts HTTP/1.1
> Host: asciinema.org
> Authorization: Basic XXXXSECRETVALUEHERE
> User-Agent: curl/7.67.0
> Accept: */*
> Content-Length: 2332762
> Content-Type: multipart/form-data; boundary=------------------------8506bb168e19a8c6
> Expect: 100-continue
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Cache-Control: max-age=0, private, must-revalidate
< Content-Length: 78
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 17 Jan 2020 16:47:43 GMT
< Location: https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
< Server: Caddy
< Server: nginx
< Strict-Transport-Security: max-age=15768000
< X-Request-Id: 2nlbkv35ad6doecmo07jcdm2
<
View the recording at:
https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
* Connection #0 to host asciinema.org left intact
μ΄κ²μ asciinema
μ HTTP API ν΄λΌμ΄μΈνΈμ κ΄λ ¨λ λ¬Έμ μΈ κ² κ°μ΅λλ€. asciinema
form pip
in new venv
μ€μΉν λλ λ°μνμ΅λλ€. λ‘컬 νμ΄μ¬ λ²μ μ 3.7.5μ
λλ€(Debian 11/testingμ ν¨ν€μ§λ‘ μ 곡λ¨)
μ μ ν μ€λ₯ λ©μμ§κ° νμλμ§ μλ μ΄μ λ νμ€νμ§ μμ§λ§ μ λ‘λ νμΌμ 5M μ ν μ΄ μμ΅λλ€. #91 μ°Έμ‘°
μ΄κ²μ FAQ νλͺ©μ΄μ΄μΌ ν©λλ€.
'κΉ¨μ§ νμ΄ν'κ° λ λ² λ°λ³΅λλ κ²μ 보μλ§μ λ΄ 630λ§ μΊμ€νΈκ° μ λ‘λ μ νμ μ΄κ³Όνλ€κ³ μμ¬νμ΅λλ€.
νμ§λ§ μ€μ λ‘ μ΄ μ€λ λλ₯Ό μ°Ύλ λ°λ... μ΄... 24λΆμ΄ κ±Έλ Έμ΅λλ€. κ·Έ μ€ 15κ° μ λλ discobot
μΈμ¦μ μλ§μΌλ‘ λ§λ€μμ΅λλ€. κ·Έλ¬λ©΄ FAQ λ΄λ‘ μΉμ
μ μ§λ¬Έμ κ²μν μ μκΈ°λ₯Ό λ°λλλ€(κ·Έλ μ§ μμ).
μμ μ€λ₯κ° λ°μν©λλ€.
``` sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ μ’
λ£
asciinema: λ
Ήμ μλ£
asciinema: 보λ
asciinema: μ
λ‘λ μ€ν¨:
asciinema: asciinema upload /tmp/tmpe_sntawl-ascii.castλ₯Ό μ€ννμ¬ λμ€μ λ€μ μλνμμμ€.
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ du -sh /tmp/tmpe_sntawl-ascii.cast
184K /tmp/tmpe_sntawl-ascii.cast
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$
Tried uploading it later too:
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ asciinema μ
λ‘λ /tmp/tmpe_sntawl-ascii.cast
asciinema: μ
λ‘λ μ€ν¨:
asciinema: asciinema upload /tmp/tmpe_sntawl-ascii.castλ₯Ό μ€ννμ¬ λμ€μ λ€μ μλνμμμ€.
```