-
-
Save influx6/59a7f017cb6b22ffa70ed29aeb66f984 to your computer and use it in GitHub Desktop.
Transmission11s Style Headers In Python
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
#!/bin/python3 | |
import sys | |
import pyperclip | |
def main(): | |
args = sys.argv | |
if len(args) != 2: | |
raise ValueError(f'Invalid argument count {len(args)} expected 2') | |
word = args[1] | |
header = ' /*//////////////////////////////////////////////////////////////\n'\ | |
+ ' ' * ((64 - len(word)) // 2)\ | |
+ word.upper()\ | |
+ '\n //////////////////////////////////////////////////////////////*/' | |
print(header) | |
pyperclip.copy(header) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment