module homeblog.copyfile#

Inheritance diagram of ensae_teaching_cs.homeblog.copyfile

Short summary#

module ensae_teaching_cs.homeblog.copyfile

Copy files

source on GitHub

Classes#

class

truncated documentation

CopyFileForFtp

This classes maintains a list of files and does some verifications in order to check if a file was modified or not …

FileToCopy

Static Methods#

staticmethod

truncated documentation

convert_st_date_to_datetime

Methods#

method

truncated documentation

__init__

__init__

constructor

__str__

add_if_modified

Adds a file to self.modifiedList if it was modified.

copy_file

Processes a file copy.

copy_file_contains

copy_file()

copy_file_ext

copy_file(),

has_been_modified_and_reason

Returns True, reason if a file was modified or False, None if not.

save_dates

Saves the status of the copy.

set_date

set_md5

set_mdate

update_copied_file

Updates the file in copyFiles (before saving), update all field.

Documentation#

Copy files

source on GitHub

class ensae_teaching_cs.homeblog.copyfile.CopyFileForFtp(file, logfunction=<function fLOG>, bloggiflatex='blog/giflatex/', giflatex='giflatex', giflatextemp='giflatex/temp', specificTrigger=False)#

Bases : object

This classes maintains a list of files and does some verifications in order to check if a file was modified or not (if yes, then it will be updated to the website).

source on GitHub

__init__(file, logfunction=<function fLOG>, bloggiflatex='blog/giflatex/', giflatex='giflatex', giflatextemp='giflatex/temp', specificTrigger=False)#
add_if_modified(file)#

Adds a file to self.modifiedList if it was modified.

Paramètres:

file – filename

Renvoie:

True or False

source on GitHub

copy_file(file, to, doFTP=True, doClean=False, to_is_a_file=False)#

Processes a file copy.

Paramètres:
  • file – file to copy

  • to – destination (folder)

  • doFTP – if True, does some latex modifications (creates an image)

  • doClean – if True, does some cleaning before the copy (for script in pyhome having section such as the one in tableformula.py)

  • to_is_a_file – it means to is a file, not a folder

source on GitHub

copy_file_contains(file, pattern, to, doFTP=True, doClean=False)#

copy_file

source on GitHub

copy_file_ext(file, exte, to, doFTP=True, doClean=False)#

copy_file,

source on GitHub

has_been_modified_and_reason(file)#

Returns True, reason if a file was modified or False, None if not.

Paramètres:

file – filename

Renvoie:

True,reason or False,None

source on GitHub

save_dates(checkfile=None)#

Saves the status of the copy.

Paramètres:

checkfile – check the status for file checkfile

source on GitHub

update_copied_file(file)#

Updates the file in copyFiles (before saving), update all field.

Paramètres:

file – filename

Renvoie:

file object

source on GitHub