{"id":13660632,"url":"https://github.com/de-vri-es/weechat-autosort","last_synced_at":"2026-03-06T07:31:20.983Z","repository":{"id":15834077,"uuid":"18574029","full_name":"de-vri-es/weechat-autosort","owner":"de-vri-es","description":"Automatically keep your buffers sorted.","archived":false,"fork":false,"pushed_at":"2023-12-29T13:18:09.000Z","size":111,"stargazers_count":78,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-03T07:49:24.918Z","etag":null,"topics":["autosort","buffers","channels","irc","sort","weechat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dennybritz/reinforcement-learning","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/de-vri-es.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":"2014-04-08T20:31:53.000Z","updated_at":"2025-03-21T23:00:09.000Z","dependencies_parsed_at":"2024-08-02T05:08:35.513Z","dependency_job_id":null,"html_url":"https://github.com/de-vri-es/weechat-autosort","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/de-vri-es/weechat-autosort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fweechat-autosort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fweechat-autosort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fweechat-autosort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fweechat-autosort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/de-vri-es","download_url":"https://codeload.github.com/de-vri-es/weechat-autosort/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-vri-es%2Fweechat-autosort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30165617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["autosort","buffers","channels","irc","sort","weechat"],"created_at":"2024-08-02T05:01:23.908Z","updated_at":"2026-03-06T07:31:20.948Z","avatar_url":"https://github.com/de-vri-es.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Autosort\n\n## Introduction\nAutosort is a weechat script to automatically or manually keep your buffers sorted.\nThe sort order can be customized by defining your own sort rules,\nbut the default should be sane enough for most people.\nIt can also group IRC channel/private buffers under their server buffer if you like.\n\nAutosort uses a stable sorting algorithm, meaning that you can manually move buffers\nto change their relative order, if they sort equal with your rule set.\n\n## Sort rules\nAutosort evaluates a list of eval expressions (see /help eval) and sorts the buffers based on evaluated result.\nEarlier rules will be considered first.\nOnly if earlier rules produced identical results is the result of the next rule considered for sorting purposes.\n\nYou can debug your sort rules with the `/autosort debug` command, which will print the evaluation results of each rule for each buffer.\n\nNOTE: The sort rules for version 3 are not compatible with version 2 or vice versa.\nYou will have to manually port your old rules to version 3 if you have any.\n\n## Helper variables\nYou may define helper variables for the main sort rules to keep your rules readable.\nThey can be used in the main sort rules as variables.\nFor example, a helper variable named `foo` can be accessed in a main rule with the string `${foo}`.\n\n## Automatic or manual sorting\nBy default, autosort will automatically sort your buffer list whenever a buffer is opened, merged, unmerged or renamed.\nThis should keep your buffers sorted in almost all situations.\nHowever, you may wish to change the list of signals that cause your buffer list to be sorted.\nSimply edit the `autosort.sorting.signals` option to add or remove any signal you like.\nIf you remove all signals you can still sort your buffers manually with the `/autosort sort` command.\nTo prevent all automatic sorting, `autosort.sorting.sort_on_config_change` should also be set to off.\n\n## Recommended settings\nFor the best visual effect, consider setting the following options:\n```\n/set irc.look.server_buffer independent\n```\n\nThis setting allows server buffers to be sorted independently,\nwhich is needed to create a hierarchical tree view of the server and channel buffers.\n\nIf you are using the buflist plugin you can (ab)use Unicode to draw a tree\nstructure with the following setting (modify to suit your need):\n```\n/set buflist.format.indent \"${color:237}${if:${buffer.next_buffer.local_variables.type}=~^(channel|private)$?├─:└─}\"\n```\n\n## Commands\n\n### Miscellaneous\n```\n/autosort sort\n```\nManually trigger the buffer sorting.\n\n```\n/autosort debug\n```\nShow the evaluation results of the sort rules for each buffer.\n\n\n### Sorting rules\n```\n/autosort rules list\n```\nPrint the list of sort rules.\n\n```\n/autosort rules add \u003cexpression\u003e\n```\nAdd a new rule at the end of the list.\n\n```\n/autosort rules insert \u003cindex\u003e \u003cexpression\u003e\n```\nInsert a new rule at the given index in the list.\n\n```\n/autosort rules update \u003cindex\u003e \u003cexpression\u003e\n```\nUpdate a rule in the list with a new expression.\n\n```\n/autosort rules delete \u003cindex\u003e\n```\nDelete a rule from the list.\n\n```\n/autosort rules move \u003cindex_from\u003e \u003cindex_to\u003e\n```\nMove a rule from one position in the list to another.\n\n```\n/autosort rules swap \u003cindex_a\u003e \u003cindex_b\u003e\n```\nSwap two rules in the list\n\n\n### Helper variables\n```\n/autosort helpers list\n```\nPrint the list of helpers variables.\n\n```\n/autosort helpers set \u003cname\u003e \u003cexpression\u003e\n```\nAdd or update a helper variable.\n\n```\n/autosort helpers delete \u003cname\u003e\n```\nDelete a helper variable.\n\n```\n/autosort helpers rename \u003cold_name\u003e \u003cnew_name\u003e\n```\nRename a helper variable.\n\n```\n/autosort helpers swap \u003cname_a\u003e \u003cname_b\u003e\n```\nSwap the expressions of two helper variables in the list.\n\n## Info hooks\nAutosort comes with a number of info hooks to add some extra functionality to regular weechat eval strings.\nInfo hooks can be used in eval strings in the form of `${info:some_hook,arguments}`.\n\nCommas and backslashes in arguments to autosort info hooks (except for `${info:autosort_escape}`) must be escaped with a backslash.\n\n```\n${info:autosort_replace,pattern,replacement,source}\n```\nReplace all occurrences of `pattern` with `replacement` in the string `source`.\nCan be used to ignore certain strings when sorting by replacing them with an empty string.\n\nFor example: `${info:autosort_replace,cat,dog,the dog is meowing}` expands to \"`the cat is meowing`\".\n\n```\n${info:autosort_order,value,option0,option1,option2,...}\n```\nGenerate a zero-padded number that corresponds to the index of `value` in the list of options.\nIf one of the options is the special value `*`, then any value not explicitly mentioned will be sorted at that position.\nOtherwise, any value that does not match an option is assigned the highest number available.\nCan be used to easily sort buffers based on a manual sequence.\n\nFor example: `${info:autosort_order,${server},freenode,oftc,efnet}` will sort freenode before oftc, followed by efnet and then any remaining servers.\nAlternatively, `${info:autosort_order,${server},freenode,oftc,*,efnet}` will sort any unlisted servers after freenode and oftc, but before efnet.\n\n```\n${info:autosort_escape,text}\n```\nEscape commas and backslashes in `text` by prepending them with a backslash.\nThis is mainly useful to pass arbitrary eval strings as arguments to other autosort info hooks.\nOtherwise, an eval string that expands to something with a comma would be interpreted as multiple arguments.\n\nFor example, it can be used to safely pass buffer names to `${info:autosort_replace}` like so:\n`${info:autosort_replace,##,#,${info:autosort_escape,${buffer.name}}}`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-vri-es%2Fweechat-autosort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fde-vri-es%2Fweechat-autosort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-vri-es%2Fweechat-autosort/lists"}