{"id":19855779,"url":"https://github.com/jcs-elpa/file-header","last_synced_at":"2025-10-06T01:33:02.347Z","repository":{"id":41565010,"uuid":"162982841","full_name":"jcs-elpa/file-header","owner":"jcs-elpa","description":"Highly customizable self design file header. (Emacs)","archived":false,"fork":false,"pushed_at":"2025-09-18T03:57:23.000Z","size":97,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T05:43:10.168Z","etag":null,"topics":["emacs","header"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcs-elpa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["jcs-elpa","jcs090218"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-12-24T11:17:03.000Z","updated_at":"2025-09-18T03:57:26.000Z","dependencies_parsed_at":"2023-12-11T10:27:27.143Z","dependency_job_id":"97d2dc09-514d-4619-a08d-577a9d494a84","html_url":"https://github.com/jcs-elpa/file-header","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jcs-elpa/file-header","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcs-elpa%2Ffile-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcs-elpa%2Ffile-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcs-elpa%2Ffile-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcs-elpa%2Ffile-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcs-elpa","download_url":"https://codeload.github.com/jcs-elpa/file-header/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcs-elpa%2Ffile-header/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547774,"owners_count":26004772,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["emacs","header"],"created_at":"2024-11-12T14:13:41.817Z","updated_at":"2025-10-06T01:33:02.304Z","avatar_url":"https://github.com/jcs-elpa.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/jcs-elpa","https://github.com/sponsors/jcs090218","https://www.paypal.me/jcs090218","https://www.patreon.com/jcs090218"],"categories":[],"sub_categories":[],"readme":"[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![JCS-ELPA](https://raw.githubusercontent.com/jcs-emacs/badges/master/elpa/v/file-header.svg)](https://jcs-emacs.github.io/jcs-elpa/#/file-header)\n\n# file-header\n\u003e Highly customizable self-design file header.\n\n[![CI](https://github.com/jcs-elpa/file-header/actions/workflows/test.yml/badge.svg)](https://github.com/jcs-elpa/file-header/actions/workflows/test.yml)\n\n## 🔧 Usage\n\n### 🔍 Step 1. Define template path\n\nFirst, you need to set the template config file path.\n\n```elisp\n(setq file-header-template-config-filepath \"~/.emacs.jcs/template/template_config.properties\")\n```\n\n### 🔍 Step 2. Create configuration\n\nThen create the config file to the directory where you just set it. The config file \nthe example can be found under `Config Example` section below.\n\n### 🔍 Step 3. Design your template configuration\n\nCreate the template file and design it. The template file example can be found under \n`Templates Example` section below.\n\n### 🔍 Step 4. Call and use it!\n\nLastly, you can define your own insert template function by calling `file-header-insert-template-by-file-path` \nbypassing the template file path.\n\nExample function that insert the Java template. You can either set \ninteractive or not interactive depends on your usage.\n\n```elisp\n(defun insert-java-template ()\n  \"Insert the template for Java file.\"\n  (interactive)\n  (file-header-insert-template-by-file-path \"~/.emacs.d/template/java/java_template.txt\"))\n```\n\nYou can bind it to any `mode-hook' so every time you created a file, \nthe template will be inserted.\n\n```elisp\n(add-hook 'java-mode-hook\n              (lambda ()\n                ;; Insert the template once a .java file created.\n                (insert-java-template))\n```\n\n### 🖼️ Screenshot\n\nHere is the result after I created `cool.java` file.\n\n\u003cimg src=\"./etc/demo.png\" width=\"612\" height=\"255\"/\u003e\n\n## 🧪 Config Example\n\nHere is the minimal config example. Functions below like `(buffer-file-name)`, `(format-time-string \"%Y\")`, etc, \nare for demonstration purposes and not included inside this package. You would need \nto define these functions on your own somewhere in your emacs configuration.\n\n```ini\n# Author related\nCREATOR_NAME=`user-full-name`\n\n# File related\nFILE_NAME=`buffer-file-name`\nFILE_NAME_NO_EXT=`(file-name-sans-extension buffer-file-name)`\n\n# Time\nTIME_STAMP=`(format-time-string \"%Y-%m-%d %H:%M:%S\")`\nTIME_YEAR=`(format-time-string \"%Y\")`\n```\n\nThere are two ways to assign value in the config file.\n\n* Assign property with value directly. e.g. `CREATOR_NAME=Jen-Chieh Shen`.\n* Assign property to a lisp function that returns a string. e.g. ``TIME_STAMP=`(format-time-string \"%Y-%m-%d %H:%M:%S\")` ``.\n\n## 🏚️ Templates Example\n\nThis is the minimal template example for a Java file. The full example \ncan be found [here](https://github.com/jcs090218/jcs-emacs-init/tree/master/.emacs.jcs/template).\n\n```java\n/**\n * $File: #FILE_NAME# $\n * $Date: #TIME_STAMP# $\n * $Revision: $\n * $Creator: #CREATOR_NAME# $\n * $Notice: See LICENSE.txt for modification and distribution information\n *                   Copyright © #TIME_YEAR# by #COPYRIGHT_INFO# $\n */\n\n\npublic class #FILE_NAME_NO_EXT# {\n\n}\n```\n\n## ️🛠 Contribute\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![Elisp styleguide](https://img.shields.io/badge/elisp-style%20guide-purple)](https://github.com/bbatsov/emacs-lisp-style-guide)\n[![Donate on paypal](https://img.shields.io/badge/paypal-donate-1?logo=paypal\u0026color=blue)](https://www.paypal.me/jcs090218)\n[![Become a patron](https://img.shields.io/badge/patreon-become%20a%20patron-orange.svg?logo=patreon)](https://www.patreon.com/jcs090218)\n\nIf you would like to contribute to this project, you may either \nclone or make pull requests to this repository. Or you can \nclone the project and establish your own branch of this tool. \nAny methods are welcome!\n\n### 🔬 Development\n\nTo run the test locally, you will need the following tools:\n\n- [Eask](https://emacs-eask.github.io/)\n- [Make](https://www.gnu.org/software/make/) (optional)\n\nInstall all dependencies and development dependencies:\n\n```sh\neask install-deps --dev\n```\n\nTo test the package's installation:\n\n```sh\neask package\neask install\n```\n\nTo test compilation:\n\n```sh\neask compile\n```\n\n**🪧 The following steps are optional, but we recommend you follow these lint results!**\n\nThe built-in `checkdoc` linter:\n\n```sh\neask lint checkdoc\n```\n\nThe standard `package` linter:\n\n```sh\neask lint package\n```\n\n*📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.*\n\n## ⚜️ License\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\nSee [`LICENSE`](./LICENSE.txt) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcs-elpa%2Ffile-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcs-elpa%2Ffile-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcs-elpa%2Ffile-header/lists"}