agritheory / cloud_storage

S3 protocol storage for Frappe Applications - compatible with S3, Backblaze and DO Spaces
https://agritheory.com/documentation/cloud_storage
Other
9 stars 4 forks source link

feat: add preview for Microsoft Word documents #44

Closed Alchez closed 1 month ago

Alchez commented 6 months ago

Libraries added (to keep consistent with Frappe Drive):

--

Sample File:

de876b68_TESTING.docx

Preview:

localhost_8004_app_file_92d040d462

agritheory commented 5 months ago

@Alchez Notes from our call:

agritheory commented 3 months ago

@Alchez Please update documentation to include this feature

Alchez commented 2 months ago

@agritheory I've fixed up the remaining issues and added some basic documentation for Word files. The Frappe tests in the GHA are failing due to typing validations on test objects, but they're running correctly on my local system. I think this one is good to be reviewed again.

agritheory commented 1 month ago

@Alchez Can you give this another once-over, I think it's ready to go.

github-actions[bot] commented 1 month ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
cloud_storage
   __init__.py11555%10–19
   customize.py25250%1–45
   hooks.py150100% 
cloud_storage/cloud_storage
   __init__.py00100% 
cloud_storage/cloud_storage/doctype
   __init__.py00100% 
cloud_storage/cloud_storage/doctype/file_association
   __init__.py00100% 
   file_association.py30100% 
cloud_storage/cloud_storage/doctype/file_version
   __init__.py00100% 
   file_version.py330%5–9
cloud_storage/cloud_storage/overrides
   file.py33715055%45, 52, 80, 85, 92, 101, 107, 139, 142, 152–169, 173, 178–179, 183–204, 213, 216–219, 222, 225, 230–231, 234, 237, 248–257, 266–271, 276–285, 319, 325, 331, 337, 343, 349, 359–367, 375–379, 393–394, 396, 419–423, 431–432, 435–436, 457–466, 481–482, 485, 488–497, 504–537, 549–552, 557–563, 568–574
cloud_storage/config
   __init__.py00100% 
   desktop.py330%1–5
   docs.py660%1–10
cloud_storage/tests
   conftest.py26196%36
   test_file.py900100% 
TOTAL51919363% 

Alchez commented 1 month ago

@agritheory I think this one is good to go, I've added a fix for the poetry lockfile