aboutsummaryrefslogtreecommitdiff
path: root/sgdfi/manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'sgdfi/manager.py')
-rwxr-xr-xsgdfi/manager.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/sgdfi/manager.py b/sgdfi/manager.py
index 8c339d7..02a4998 100755
--- a/sgdfi/manager.py
+++ b/sgdfi/manager.py
@@ -16,6 +16,7 @@ from sys import stdout as _stdout
from string import ascii_letters as _ascii_letters
from shutil import copyfile as _copyfile
from datetime import datetime as _datetime, date as _date
+from textwrap import wrap as _wrap
from appdirs import user_cache_dir as _user_cache_dir
@@ -640,7 +641,7 @@ class Manager(_Decoder):
print("#!/usr/bin/env python3", file = to)
print("#" + "*" * 78, file = to)
- print("# Copyright (C) {_date.now().year} " \
+ print(f"# Copyright (C) {_datetime.now().year} " \
+ "Thomas Touhey <thomas@touhey.fr>", file = to)
print("# This file is part of the sgdfi project, which " \
"is MIT-licensed.", file = to)
@@ -654,7 +655,6 @@ class Manager(_Decoder):
file = to)
print("\tmodifier manuellement ! \"\"\"", file = to)
- print(f"{repr(docstring)}", file = to)
print("", file = to)
print("from enum import Enum as _Enum", file = to)
print("", file = to)
@@ -664,7 +664,8 @@ class Manager(_Decoder):
# Enumeration definition.
print("class Function(_Enum):", file = to)
- print("\t\"\"\"Fonction.", file = to)
+ print("\t\"\"\" Fonction d'un adhérent au sein de l'association.",
+ file = to)
print("", file = to)
print("\t.. data:: UNKNOWN", file = to)
print("", file = to)
@@ -676,7 +677,11 @@ class Manager(_Decoder):
print("", file = to)
print(f"\t.. data:: {cname}", file = to)
print("", file = to)
- lastline = f"\t\t{func.name}"
+
+ lastline = ""
+ for line in _wrap(func.name, 60):
+ if lastline: print(lastline, file = to)
+ lastline = f"\t\t{line}"
print(f"{lastline} \"\"\"", file = to)
print("", file = to)
@@ -686,6 +691,8 @@ class Manager(_Decoder):
for cname in func.cnames:
print(f"\t{cname} = {i}")
+ print("", file = to)
+
# Function data definition.
print("FunctionData = {", file = to)