{"id":18453233,"url":"https://github.com/wesleyac/topen","last_synced_at":"2025-07-19T05:06:52.522Z","repository":{"id":89702952,"uuid":"63128101","full_name":"WesleyAC/topen","owner":"WesleyAC","description":"A small script to open links on the command line","archived":false,"fork":false,"pushed_at":"2016-07-14T04:52:32.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T20:37:25.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WesleyAC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-12T05:07:51.000Z","updated_at":"2022-01-26T03:31:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7c5c55c-ea48-4430-ac8f-d55ca38af6e9","html_url":"https://github.com/WesleyAC/topen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WesleyAC/topen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyAC%2Ftopen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyAC%2Ftopen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyAC%2Ftopen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyAC%2Ftopen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WesleyAC","download_url":"https://codeload.github.com/WesleyAC/topen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyAC%2Ftopen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265892079,"owners_count":23844964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T07:35:36.388Z","updated_at":"2025-07-19T05:06:52.502Z","avatar_url":"https://github.com/WesleyAC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# topen\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WesleyAC/topen/blob/master/LICENSE)\n\n`topen` is a small script to open links on the command line. It's designed to be able to view multimedia content (images, videos, gifs, etc) without the overhead of a web browser. `topen` is designed to be used with [rtv](https://github.com/michael-lazar/rtv), but could be useful in other contexts as well.\n\n# How it works\n\n`topen` itself is a very small python script that has a list of regular expressions describing urls, along with a script to deal with the url. Because of this, it's very easy to extend: just add another script to the helpers directory, along with a regexp of sites that it should apply to.\n\n# Supported sites\n\nThe default browser is `w3m`. However, there is explicit support for the following sites and cases:\n\n| Site           | Notes                                             |\n| -------------- | ------------------------------------------------- |\n| Any image link |                                                   |\n| Any mp4 file   |                                                   |\n| Imgur          | Works with gifvs, single images, and albums       |\n| Gfycat         | Any gfycat link                                   |\n\n# Dependencies\n\n| Dependency       | Reason                  |\n| ---------------- | ----------------------- |\n| `python`         | Main script             |\n| `w3m`            | Default browser         |\n| `curl`           | Download images/videos  |\n| `feh`            | Display images          |\n| `mplayer`        | Display videos          |\n| `youtube-dl`     | Download youtube videos |\n| Beautiful Soup 4 | Download imgur albums   |\n\n# Use with `rtv`\n\nIn order to have `topen` play nice with `rtv`, the `$DISPLAY` environment variable must be set to something that evaluates as false. I use the following alias:\n\n```\nalias rtv='export DISPLAY=\"\";rtv'\n```\n\n`topen` will try to autodetect the `$DISPLAY` variable and set it back before running any handler scripts.\n\n# Contributing\n\nIf you find a site that might benefit from having a script for it, submit an issue with the name of the site (and ideally some example links). Or, even better, submit a PR!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesleyac%2Ftopen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesleyac%2Ftopen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesleyac%2Ftopen/lists"}