pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ValvePython/vdf/pull/55

552848.css" /> Add acf dump support by rejedai · Pull Request #55 · ValvePython/vdf · GitHub
Skip to content

Add acf dump support#55

Open
rejedai wants to merge 1 commit intoValvePython:masterfrom
rejedai:master
Open

Add acf dump support#55
rejedai wants to merge 1 commit intoValvePython:masterfrom
rejedai:master

Conversation

@rejedai
Copy link

@rejedai rejedai commented Oct 31, 2023

Added ability to dump to acf format.

vdf.dumps(__test_acf, pretty=True, acf=True)

No modification is required for read, parser reads correctly, test code:

    with open("appmanifest_2348590.acf", "r") as read_acf:
        __manifest_orig = read_acf.read()

        read_acf.seek(0)
        __manifest_dict = vdf.load(read_acf)
        __manifest_dump = vdf.dumps(__manifest_dict, pretty=True, acf=True)
        with open("appmanifest_test.acf", "w") as write_acf:
            vdf.dump(__manifest_dict, write_acf, pretty=True, acf=True)

        print(f"Result: {__manifest_orig == __manifest_dump}")

output:

Result: True

md5sum:

❯ md5sum ./appmanifest_2348590.acf 
ffbafff6611f9be6bd95ff4b30d49f37  ./appmanifest_2348590.acf
❯ md5sum ./appmanifest_test.acf 
ffbafff6611f9be6bd95ff4b30d49f37  ./appmanifest_test.acf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy