Skip to content

Instantly share code, notes, and snippets.

@K4zuki
Created November 14, 2018 09:40
Show Gist options
  • Save K4zuki/618e3e538420ec0c036ad1efe85ce2db to your computer and use it in GitHub Desktop.
Save K4zuki/618e3e538420ec0c036ad1efe85ce2db to your computer and use it in GitHub Desktop.
docx_property.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Do nothing but get properties from a docx
requires python-docx >= 0.8.6
MIT licence (c) Kazuki Yamamoto (k.yamamoto.08136891@gmail.com)
"""
import docx
doc = docx.Document(outfile)
comments = doc.core_properties.comments
keywords = doc.core_properties.keywords
category = doc.core_properties.category
subject = doc.core_properties.subject
content_status = doc.core_properties.content_status
author = doc.core_properties.author
title = doc.core_properties.title
version = doc.core_properties.version
created = doc.core_properties.created
# doc.save(outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment