this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'main' of github.com:ian-h-chamberlain/dotfiles

+31
+9
.config/yadm/.pre-commit-config.yaml
··· 4 4 - id: check-hooks-apply 5 5 - id: check-useless-excludes 6 6 7 + - repo: local 8 + hooks: 9 + - name: Cleanup keepassxc.ini 10 + id: clean-keepassxc 11 + language: python 12 + entry: .config/yadm/hooks/clean-keepassxc-ini.py 13 + args: [.config/keepassxc/keepassxc.ini] 14 + files: ^[.]config/keepassxc/keepassxc[.]ini 15 + 7 16 # Order these first so any auto-formatting etc. doesn't affect them. 8 17 # For example, merge conflict detection may be affected. 9 18 - repo: https://github.com/pre-commit/pre-commit-hooks
+22
.config/yadm/hooks/clean-keepassxc-ini.py
··· 1 + #!/usr/bin/env python3 2 + 3 + import configparser 4 + import pathlib 5 + import sys 6 + 7 + 8 + def main(): 9 + filename = pathlib.Path(sys.argv[1]) 10 + 11 + config = configparser.ConfigParser(interpolation=None) 12 + # Preserve case in option names (default is to .lower()): 13 + config.optionxform = lambda optionstr: optionstr 14 + 15 + config.read(filename) 16 + config.remove_section("KeeShare") 17 + with filename.open("w") as newfile: 18 + config.write(newfile, space_around_delimiters=False) 19 + 20 + 21 + if __name__ == "__main__": 22 + main()