Playback from new IPFS URL scheme - dweb:/ipfs/

This commit is contained in:
Marcin Kulik
2017-12-01 23:09:35 +01:00
parent fe75b4e06c
commit e0dc8fdd8c
3 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
* toggling pause in `asciinema play` by <kbd>Space</kbd>
* stepping through a recording one frame at a time with <kbd>.</kbd> (when playback paused)
* new `asciinema cat <filename>` command to dump full output of the recording
* playback from new IPFS URL scheme (`dweb:/ipfs/`)
* lots of other bugfixes and improvements
## 1.4.0 (2017-04-11)

View File

@@ -218,8 +218,7 @@ Playing from stdin:
Playing from IPFS:
asciinema play ipfs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V
asciinema play fs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V
asciinema play dweb:/ipfs/QmNe7FsYaHc9SaDEAEXbaagAzNw9cH7YbzN4xV7jV1MCzK/ascii.cast
Available options:

View File

@@ -39,6 +39,8 @@ def open_url(url):
url = "https://gateway.ipfs.io/%s" % url[6:]
elif url.startswith("fs:/"):
url = "https://gateway.ipfs.io/%s" % url[4:]
elif url.startswith("dweb:/ipfs/"):
url = "https://gateway.ipfs.io/%s" % url[5:]
if url.startswith("http:") or url.startswith("https:"):
req = Request(url)