{"id":21981649,"url":"https://github.com/soft/weechat-share-file","last_synced_at":"2025-07-13T03:33:55.328Z","repository":{"id":66599677,"uuid":"82081714","full_name":"Soft/weechat-share-file","owner":"Soft","description":"Weechat-share-file is an extension for popular WeeChat IRC-client that makes sharing files blazingly fast.","archived":false,"fork":false,"pushed_at":"2021-03-15T17:54:00.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T04:29:07.009Z","etag":null,"topics":["extension","file-shari","python","script","upload","weechat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-15T16:32:21.000Z","updated_at":"2021-03-15T17:54:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ec088c1-f6cc-4fc8-93c3-e67a9c93c647","html_url":"https://github.com/Soft/weechat-share-file","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fweechat-share-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fweechat-share-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fweechat-share-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fweechat-share-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soft","download_url":"https://codeload.github.com/Soft/weechat-share-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040855,"owners_count":20551332,"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":["extension","file-shari","python","script","upload","weechat"],"created_at":"2024-11-29T17:18:54.807Z","updated_at":"2025-03-23T01:18:16.374Z","avatar_url":"https://github.com/Soft.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dashing file sharing for WeeChat :rocket:\n\nWeechat-share-file is an extension for popular [WeeChat](https://weechat.org)\nIRC-client that makes sharing files blazingly fast. No longer will there be a\ndisparity between newfangled IM clients and the trusty old IRC when it comes to\nthe ease of sharing photos and files. Just pick a file and WeeChat will share it\nusing the sharing service of your choice and provide you with an URL ready to be\nsent out. All without leaving the comfort of your chat buffer.\n\nThe script adds an integrated file browser to WeeChat that allows users to\nselect the files they wish to share. How the files are actually shared is\ndependent upon their type and can be configured using a built-in command. Adding\nan external sharing tool simply requires associating it with a\n[MIME](http://en.wikipedia.org/wiki/Media_type) type.\n\nThe aesthetics of weechat-share-file have been strongly influenced by Emacs'\n[Ido-mode](https://www.gnu.org/software/emacs/manual/html_mono/ido.html) and the\never so useful [go.py](https://weechat.org/scripts/source/go.py.html/) buffer\nselection tool.\n\n## Features\n\n- Snappy, search-oriented interface\n- Multiple matching methods\n- Sorting\n- …and more!\n\n## Installation\n\nweechat-share-file requires WeeChat compiled with a support for Python 2.7 and\n[python-magic](https://pypi.python.org/pypi/python-magic/) package to be\ninstalled.\n\nAt present, weechat-share-file can only be installed directly from this\nrepository. Simply download the `share_file.py` script to WeeChat's python\nscript directory:\n\n\tcd ~/.weechat/python # or alternatively ~/.weechat/python/autoload if you wish the script to be automatically loaded on start up\n\twget https://bitbucket.org/Soft/weechat-share-file/raw/master/share_file.py\n\nAfter this, the script is ready to be activated:\n\n\t/python load share_file.py\n\nIt is also recommended to bind the `/share` command to a key combination.\n\n\t/key bind meta-o /share\n\nBinds the `/share` command to `ALT-o`.\n\n## Viewing and Editing Program Associations\n\nweechat-share-file relies on external programs for sharing the files. This means\nit is not dependent on any particular service and that adding support for new\nservices is close to trivial. However, this decoupling also means that there is\nsome configuration required, before the script can be fully utilized. The\n`sharers` directory contains a few example scripts for uploading files to\npopular hosting services.\n\nweechat-share-file chooses how a file should be shared based on its MIME type.\nApplications can be associated with MIME type patterns. For example, by default\nthe script has just a single association:\n\n\t/sharers list\n\n\tAll sharers:\n\t  1. * echo\n\nThis means that any type of file (the `*` pattern in the output) is \"shared\"\nusing the `echo` command. This causes the path to the selected file to be\nappended to the message, when the user tries to share a file. We can add a new\nassociating for files of type `image/*`:\n\n\t/sharers add image/* imgur.sh 1\n\nThis assumes that a script `imgur.sh` resides in the `PATH`. The final `1` in\nthe command specifies the rule's priority. The rules are tried sequentially\nuntil a matching rule is found. Since the default rule matches all the files we\nadded the new rule with a higher priority. Now, if we take a look at the\nassociations listing we'll see:\n\n\tAll sharers:\n\t  1. image/* imgur.sh\n\t  2. *       echo\n\nThis means that if the file is an image, it is shared via the `imgur.sh` script.\nIf the file is not an image, it is still sent to `echo`. If we want to, we can\nnow delete the default rule by executing:\n\n\t/sharers del 2\n\n## Usage\n\nOnce setup, you should be able to invoke `/share` command on any buffer by\npressing `ALT-o`. The command transforms the input bar into an inline file\nbrowser that can then be used to select files for sharing. The browser should\nsupport everything you would expect from any self-respecting file explorer\nutility. As a search-oriented interface, the listing can be further filtered\ndown by searching. By default, `ALT-TAB` and `ALT-SHIFT-TAB` can be used to move\nbetween the candidates.\n\n## Additional Configuration\n\nweechat-share-file supports a bunch of customization options. Available options\ncan be viewed with `/set plugins.var.python.share_file.*`.\n\n## License\n\nweechat-share-file and all the associated scripts are licensed under the\n[GNU General Public License Version 3](http://www.gnu.org/licenses/gpl-3.0.en.html)\nor any later version.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoft%2Fweechat-share-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoft%2Fweechat-share-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoft%2Fweechat-share-file/lists"}