Skip to content
Snippets Groups Projects
Commit 31dd832a authored by Denis Arrivault's avatar Denis Arrivault
Browse files

Stamping copyright with good version number and year

parent 0aedb1dd
Branches
Tags
No related merge requests found
Showing
with 80 additions and 136 deletions
......@@ -42,6 +42,19 @@ def fileRemoveSharps(filename):
removeLine = False
print(line, end="")
def fileRemoveBlankLines(filename):
""" Remove undesirable blank lines from a file """
removeLine = False
for line in fileinput.input(filename, inplace=1):
if line.startswith("# -*- coding: utf-8 -*-"):
print(line, end="")
removeLine = True
elif removeLine and not line.strip():
pass
else:
removeLine = False
print(line, end="")
def fileStamping(filename, stamp):
""" Write a stamp on a file
......@@ -53,7 +66,7 @@ def fileStamping(filename, stamp):
old_stamp = not old_stamp
elif line.startswith("# -*- coding: utf-8 -*-"):
print(line, end="")
print(stamp)
print(stamp, end="")
elif not old_stamp:
print(line, end="")
......@@ -123,6 +136,13 @@ def removeSharps():
fileRemoveSharps(filename)
fileRemoveSharps("setup.py")
def removeBlankLines():
""" Remove undesirable blank lines from all files """
files = findFiles(os.path.join(os.path.dirname(os.path.abspath(__file__)),
"ltfatpy"))
for filename in files:
fileRemoveBlankLines(filename)
def usage(arg):
print("Usage :")
print("\tpython %s stamping" % arg)
......@@ -137,6 +157,8 @@ if __name__ == "__main__":
eraseStamp()
elif sys.argv[1].startswith("stamping"):
writeStamp()
elif sys.argv[1].startswith("blanklines"):
removeBlankLines()
else:
usage(sys.argv[0])
else:
......
Copyright(c) 2016
Copyright(c) 2017
-----------------
* LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -8,7 +8,7 @@ Copyright(c) 2016
* Université d'Aix-Marseille : http://www.univ-amu.fr/
This software is a port from LTFAT 2.1.0 :
Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
Contributors
------------
......@@ -26,7 +26,7 @@ time-frequency analysis and synthesis.
Version
-------
* ltfatpy version = 1.0.7
* ltfatpy version = 1.0.8
* LTFAT version = 2.1.0
Licence
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of FIR window names
Ported from ltfat_2.1.0/comp/arg_firwin.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of order parameter growing
Ported from ltfat_2.1.0/comp/assert_groworder.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of original permuted shape restoration
Ported from ltfat_2.1.0/comp/assert_sigreshape_post.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of dimension input proprocessing and handling
Ported from ltfat_2.1.0/comp/assert_sigreshape_pre.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of dct calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of dst calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of gabor dual windows calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of tight gabor windows calculation.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of sampling of continuous Hermite function computation
Ported from ltfat_2.1.0/comp/comp_hermite.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of sampling of all Hermite function computation
Ported from ltfat_2.1.0/comp/comp_hermite_all.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of isepdgt calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,11 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of isepdgtreal calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of periodized Gaussian calculation.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of sepdgt calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
"""This module contains interface functions for the LTFAT computed
versions of sepdgt calculations.
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of comp_sigreshape_post calculation
Ported from ltfat_2.1.0/comp/comp_sigreshape_post.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of comp_sigreshape_pre calculation
Ported from ltfat_2.1.0/comp/comp_sigreshape_pre.m
......
# -*- coding: utf-8 -*-
# ######### COPYRIGHT #########
#
# Copyright(c) 2016
# Copyright(c) 2017
# -----------------
#
# * LabEx Archimède: http://labex-archimede.univ-amu.fr/
......@@ -10,7 +10,7 @@
# * Université d'Aix-Marseille : http://www.univ-amu.fr/
#
# This software is a port from LTFAT 2.1.0 :
# Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
# Copyright (C) 2005-2017 Peter L. Soendergaard <peter@sonderport.dk>.
#
# Contributors
# ------------
......@@ -28,7 +28,7 @@
# Version
# -------
#
# * ltfatpy version = 1.0.7
# * ltfatpy version = 1.0.8
# * LTFAT version = 2.1.0
#
# Licence
......@@ -50,10 +50,6 @@
# ######### COPYRIGHT #########
""" Module of window calculation from descriptions
Ported from ltfat_2.1.0/comp/comp_window.m
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment