{"id":18684243,"url":"https://github.com/ebeem/erc-history","last_synced_at":"2026-03-19T05:53:25.441Z","repository":{"id":245268151,"uuid":"817701444","full_name":"ebeem/erc-history","owner":"ebeem","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-25T19:00:36.000Z","size":10534,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T12:52:58.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","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/ebeem.png","metadata":{"files":{"readme":"README.org","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":"2024-06-20T09:05:43.000Z","updated_at":"2024-09-12T23:50:12.000Z","dependencies_parsed_at":"2024-06-25T20:37:44.100Z","dependency_job_id":null,"html_url":"https://github.com/ebeem/erc-history","commit_stats":null,"previous_names":["ebeem/erc-history"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ebeem/erc-history","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebeem%2Ferc-history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebeem%2Ferc-history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebeem%2Ferc-history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebeem%2Ferc-history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebeem","download_url":"https://codeload.github.com/ebeem/erc-history/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebeem%2Ferc-history/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29857484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: 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":[],"created_at":"2024-11-07T10:16:56.971Z","updated_at":"2026-02-26T11:31:38.947Z","avatar_url":"https://github.com/ebeem.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+STARTUP: inlineimages\n#+OPTIONS: toc:3 ^:nil\n\n** ERC History\n\nThis package enhances Emacs's IRC client =ERC= by enabling it to retrieve chat history from channels. Note that chat logs must be archived and accessible online (currently, this package only supports HTTP access).\n\n** Configuration\n\nThe primary configuration required is setting the variable =erc-history-sources=, which is a list of sources (HTTP links) and the channels they offer logs for.\n\nThe link can include wildcards that will be replaced when pulling chat logs:\n- =#CHANNEL#=: The name of the currently viewed channel.\n- =TIME=: Replaces all available time formats using Emacs Lisp's =format-time-string= function.\n\n#+begin_src elisp\n  (require 'erc-history)\n  (setq erc-history-sources\n    '((\"http://localhost/grc-history/#CHANNEL#/%Y/%m/%d.txt\"\n      (\"#erc-history\" \"#erc-history-1\"))))\n#+end_src\n\nMost of the time, the available logs will need to be parsed. In such cases, you can provide a parser function for each source. If no parser function is provided, a default one will be used, though it may not work properly.\n\nThe 3rd element in the source list is the function that parses log messages. The =parser= will receive a line from the chat logs and is expected to return a list of three variables: (=MSG_TIME= =SENDER_NICK= =MSG_CONTENT=). Ensure that the time format is in Emacs Lisp's time format. Use =encode-time= when needed, and convert the =timezone= as necessary. The default parser is =erc-history-common-message-parser=.\n\n#+begin_src elisp\n  (defun erc-history-myhost-message-parser (msg)\n  \"Display MSG in its erc buffer named CHANNEL.\nMSG must match the format described for erc messages.\nexample: 2024-06-10 08:00:01 - ByteMaster: Good morning, team!\"\n  (let ((regex \"\\\\([0-9-]+ [0-9:]+\\\\) - \\\\([^:]+\\\\): \\\\(.*\\\\)\"))\n    (when (string-match regex msg)\n      (let* ((time (match-string 1 msg))\n            (nick (match-string 2 msg))\n            (content (match-string 3 msg))\n            (full-date (format-time-string\n                        (concat (string-replace \" \" \"T\" time) \"+0000\")\n                        erc-history-last-pulled-date)))\n        (list (encode-time (parse-time-string full-date))\n              nick\n              content)))))\n\n  (setq erc-history-sources\n      '((\"http://myhost/grc-history/#CHANNEL#/%Y/%m/%d.txt\"\n          (\"#erc-history\" \"#erc-history-1\")\n          erc-history-myhost-message-parser)))\n#+end_src\n\n*** Example: Configuring Ubuntu Archives\n\nSince all of Ubuntu's IRC chats are archived, they can be easily accessed using erc-history.\n\n#+begin_src elisp\n(defun erc-history-ubuntu-message-parser (msg)\n  \"Parse a chat log MSG and return a list of (time nickname message).\nexample: [23:22] \u003cBashing-om\u003e UWN: Opening 842 for Saturday.\"\n  (let ((regex \"\\\\[\\\\([0-9:]+\\\\)\\\\] \u003c\\\\([^\u003e]+\\\\)\u003e \\\\(.*\\\\)\"))\n    (when (string-match regex msg)\n      (let* ((time (match-string 1 msg))\n            (nick (match-string 2 msg))\n            (content (match-string 3 msg))\n            (full-date (format-time-string\n                        (concat \"%Y-%m-%dT\" time \":00+0000\")\n                        erc-history-last-pulled-date)))\n        (list (encode-time (parse-time-string full-date))\n              nick\n              content)))))\n\n  (setq erc-history-sources\n        ;; my personal logs\n        '((\"http://myhost/grc-history/#CHANNEL#/%Y/%m/%d.txt\"\n           (\"#erc-history-1\" \"#erc-history\"))\n\n          ;; ubuntu logs\n          (\"https://irclogs.ubuntu.com/%Y/%m/%d/#CHANNEL#.txt\"\n           (\"#cloud-init\" \"#kubuntu-devel\" \"#kubuntu\"\n            \"#launchpad-dev\" \"#launchpad\" \"#lubuntu-devel\"\n            \"#lubuntu\" \"#maas\" \"#mir-server\" \"#netplan\"\n            \"#snappy\" \"#ubports\" \"#ubuntu-au\" \"#ubuntu-bd\"\n            \"#ubuntu-bugs\" \"#ubuntu-community-team\" \"#ubuntu-de\"\n            \"#ubuntu-desktop\" \"#ubuntu-devel\" \"#ubuntu-discuss\"\n            \"#ubuntu-doc\" \"#ubuntu-es\" \"#ubuntu-hr\" \"#ubuntu-ir\"\n            \"#ubuntu-irc\" \"#ubuntu-it\" \"#ubuntu-kernel\" \"#ubuntu-kr\"\n            \"#ubuntu-lt\" \"#ubuntu-mate\" \"#ubuntu-meeting\" \"#ubuntu-mirrors\"\n            \"#ubuntu-news\" \"#ubuntu-next\" \"#ubuntu-nl\" \"#ubuntu-on-air\"\n            \"#ubuntu-ops\" \"#ubuntu-pl\" \"#ubuntu-qt\" \"#ubuntu-quality\"\n            \"#ubuntu-release\" \"#ubuntu-ru\" \"#ubuntu-sa\" \"#ubuntu-security\"\n            \"#ubuntu-server\" \"#ubuntu-tw\" \"#ubuntu-uk\" \"#ubuntu-us-mi\"\n            \"#ubuntu-us-oh\" \"#ubuntu-us-pa\" \"#ubuntu\" \"#ubuntustudio-devel\"\n            \"#ubuntustudio\" \"#xubuntu-devel\" \"#xubuntu\")\n           erc-history-ubuntu-message-parser)))\n#+end_src\n\nThe configured channels' logs will automatically be retrieved when you navigate to the beginning of their buffers.\n\nNote: Make sure you enable =erc-history-mode=.\n\n*** Elpaca Configuration\nIn case you use a flexible package manager, you can just link this repo.\n\n#+begin_src elisp\n(use-package erc-history\n  :after erc\n  :ensure (:host github :repo \"ebeem/erc-history\")\n  :hook (erc-mode . erc-history-mode)\n  :init\n  (setq erc-history-sources\n    '((\"http://localhost/grc-history/#CHANNEL#/%Y/%m/%d.txt\"\n      (\"#erc-history\" \"#erc-history-1\")))))\n#+end_src\n\n** Preview\n\n#+ATTR_ORG: :width 800\n[[./preview.gif]]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febeem%2Ferc-history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febeem%2Ferc-history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febeem%2Ferc-history/lists"}