Last active
December 22, 2015 23:07
-
-
Save rmuslimov/ba64f1a25572b0217b46 to your computer and use it in GitHub Desktop.
Creating nice looking headers for python files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# name: cgd | |
# -- | |
# coding: utf-8 | |
""" | |
`(let* ((relative_p (f-relative (buffer-file-name) (vc-git-root (buffer-file-name)))) | |
(package_name (s-replace "/" "." (s-replace ".py" "" relative_p)))) | |
(format "%s\n%s\n%s\n" | |
(s-repeat (length package_name) "=") | |
package_name | |
(s-repeat (length package_name) "=") | |
)) | |
` | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment