Documentation for pdfebc-web¶
factory¶
Factory module for pdfebc-web.
startapp¶
Module for starting up the pdfebc-web application.
main.views¶
This module contains all views for the main blueprint.
main.forms¶
Module containing forms for use pdfebc-web.
util.file¶
This module contains functions for manipulating the file system.
-
exception
pdfebc_web.util.file.
ArchivingError
[source]¶ An error to be thrown something goes wrong when archiving a directory.
-
pdfebc_web.util.file.
compress_uploaded_files
(src_dir, gs_binary, status_callback=None)[source]¶ Compress the pdf files in the given source directory and place them in a subdirectory.
Parameters: src_dir (str) – Path to the source directory. Returns: Paths to the compressed files. Return type: List[str]
-
pdfebc_web.util.file.
compress_uploaded_files_to_tgz
(src_dir, gs_binary, status_callback=None)[source]¶ Compress the files in src_dir and place in a comrpessed tarball.
Parameters: src_dir (str) – Path to the source directory. Returns: Path to a tarball with the compressed files. Return type: str
-
pdfebc_web.util.file.
create_session_upload_dir
(session_id)[source]¶ Create an upload directory for the session.
Parameters: session_id (str) – The id for the session.
-
pdfebc_web.util.file.
delete_session_upload_dir
(session_id)[source]¶ Remove all files in the session upload directory.
Parameters: session_id (str) – Id of the session.
-
pdfebc_web.util.file.
get_session_upload_dir_path
(session_id)[source]¶ Return the path to the session upload directory
Parameters: session_id (str) – The id for the session.
-
pdfebc_web.util.file.
make_tarfile
(src_dir, out)[source]¶ Make a tar archive from the src_dir.
Parameters: - src_dir (str) – Path to the source directory.
- out – Path to the output file.
Returns: Path to the tarball.
Return type: Raises: ArchivingError