Skip to content

project files filtering #34

Open
Open
@pmp-p

Description

@pmp-p

as @davidpendergast suggested on discord we should have some kind of
.pygbagignore file ( following .gitignore convention but not limited to )

to integrate in the pipeline

actually pack.py does too much things it should be splitted

[ gathering.py ]
<- read a path to a zip or a folder.

unpack a project archive or take a source folder and search for .gitignore and .pygbagignore and merge them each time.

-> save a .pygbagignore at the unpacked project root
-> produce an iterator of valid files to use

[ filtering.py ]
<- read a list

apply the merged .pygbagignore saved file.

apply heuristic to detect harmfull assets like wav / oversized png / mp3 unreadable files
offer choices
report about potential download time of game on first use.

update the .pygbagignore with comments line starting with # to specify optim applied to file or wildcard set of files (re-using the same parser logic of gitignore blocklisting for a different purpose).

-> produce a iterator of tuple of valid files to use in output each annotated with optimization to apply ( maybe not yet available but still ... )

[ optimizing.py ]
<- read tuple list

apply optim where possible
( https://github.com/scour-project/scour , pngquant, ffmpeg convertions etc )
remove docstrings.
use https://github.com/interpreters/pypreprocessor to remove platforms dead code

-> produce a iterator of valid files to pack.py

future: when running in browser pygbag should offer to download the .pygbagignore file if created/changed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions