Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hyperlink] styles/ multiple runs #1

Open
wants to merge 354 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
99aeee4
style: add Styles.default()
Dec 26, 2014
aaf8da9
blkct: extract BlockItemContainer._add_paragraph()
Dec 27, 2014
4f3bcc7
txt: replace Paragraph.style setter
Dec 27, 2014
2d909ca
doc: add DocumentPart.get_style_id()
Dec 27, 2014
180de12
style: add Styles.get_style_id()
Dec 27, 2014
ad93c45
style: add Styles._get_style_id_from_name()
Dec 27, 2014
ef5f164
style: add Styles._get_style_id_from_style()
Dec 27, 2014
5e191e7
acpt: update scenario for Paragraph.clear()
Dec 26, 2014
675aa33
acpt: update scenario for Para.ins_para_before()
Dec 26, 2014
d9a47b4
acpt: remove now-passing features from WIP
Dec 26, 2014
faabd7b
docs: document analysis for add/remove style
Dec 27, 2014
f933976
acpt: add scenarios for Style.add_style()
Dec 28, 2014
400b4e5
style: add Styles.__contains__()
Dec 28, 2014
03c2fdb
style: add Styles.add_style()
Dec 28, 2014
c8f7620
reorg: mv oxml.parts.styles => oxml.styles
Dec 28, 2014
ade2ff4
style: add CT_Styles.add_style_of_type()
Dec 28, 2014
11efbb7
style: add BaseStyle.builtin
Dec 28, 2014
6c3ccd1
acpt: add scenario for Style.delete()
Dec 28, 2014
ec9e863
style: add BaseStyle.delete()
Dec 28, 2014
fd51c87
acpt: add scenarios for BaseStyle.base_style
Dec 30, 2014
b8abd27
style: add _CharacterStyle.base_style getter
Dec 30, 2014
b595e44
style: add _CharacterStyle.base_style setter
Dec 30, 2014
b50dc0e
docs: document Font feature analysis
Dec 28, 2014
32efba5
acpt: add scenarios for XxxStyle.font
Dec 28, 2014
6186c6a
style: add _CharacterStyle.font
Dec 28, 2014
fe616ff
docs: document Font analysis
Dec 29, 2014
1081cc2
rfctr: bring CT_RPr to latest coding standards
Dec 29, 2014
234cc0f
acpt: add scenarios for Font.name
Dec 29, 2014
c4ba0bd
font: add Font.name getter
Dec 29, 2014
270271f
font: add Font.name setter
Dec 29, 2014
60b38a8
acpt: add scenarios for Font.size
Dec 29, 2014
e85ba54
font: add Font.size getter
Dec 29, 2014
a8237a0
font: add Font.size setter
Dec 29, 2014
271c00c
acpt: add scenarios for Font.underline
Dec 29, 2014
601216c
font: add Font.underline getter
Dec 29, 2014
a74b0bf
font: add Font.underline setter
Dec 29, 2014
a618e0a
font: add Font boolean properties
Dec 23, 2014
bcb0907
acpt: add scenario for Run.font
Dec 29, 2014
277b46c
run: add Run.font
Dec 29, 2014
e728634
run: convert Run.bold to Run.font pass-through
Dec 29, 2014
0311ab2
run: convert Run.italic to Run.font pass-through
Dec 29, 2014
19a552e
run: convert Run.underline to Run.font pass-through
Dec 29, 2014
208a9cf
run: remove direct access to Run bool props
Dec 23, 2014
91d48ae
acpt: add scenarios for Font.sub/superscript
Dec 30, 2014
1904119
font: add Font.subscript getter
Dec 30, 2014
7d04ac9
font: add Font.superscript getter
Dec 30, 2014
05065bf
font: add Font.subscript setter
Dec 30, 2014
42ed65d
font: add Font.superscript setter
Dec 30, 2014
bae756e
docs: document ParagraphFormat analysis
Dec 30, 2014
8b5a221
acpt: add scenario for _ParaStyle.paragraph_format
Dec 31, 2014
29b954a
rfctr: reorder tests in DescribeParagraph
Dec 31, 2014
37788b0
style: add _ParagraphStyle.paragraph_format
Dec 31, 2014
2be2c92
acpt: add scenarios for ParagraphFormat.alignment
Dec 31, 2014
a076932
parfmt: add ParagraphFormat.alignment getter
Dec 31, 2014
c88125c
parfmt: add ParagraphFormat.alignment setter
Dec 31, 2014
e8de57e
acpt: add scenarios for ParagraphFormat spacing
Dec 31, 2014
4497b10
parfmt: add ParagraphFormat.space_before getter
Dec 31, 2014
ee719a9
parfmt: add ParagraphFormat.space_after getter
Dec 31, 2014
bc296cf
parfmt: add ParagraphFormat.space_before setter
Dec 31, 2014
d16452e
parfmt: add ParagraphFormat.space_after setter
Dec 31, 2014
6629346
acpt: add scenarios for ParaFormat line spacing
Dec 31, 2014
c38bf8e
parfmt: add ParagraphFormat.line_spacing getter
Dec 31, 2014
752f52f
parfmt: add ParaFormat.line_spacing_rule getter
Dec 31, 2014
3664bed
parfmt: add ParagraphFormat.line_spacing setter
Dec 31, 2014
6f5ed6d
parfmt: add ParaFormat.line_spacing_rule setter
Dec 31, 2014
0f58ff4
acpt: add scenarios for ParagraphFormat indents
Dec 31, 2014
931012d
parfmt: add ParaFormat.first_line_indent getter
Dec 31, 2014
0c26810
parfmt: add ParagraphFormat.left_indent getter
Dec 31, 2014
4e5f728
parfmt: add ParagraphFormat.right_indent getter
Dec 31, 2014
4321d9e
parfmt: add ParaFormat.first_line_indent.setter
Dec 31, 2014
5a92413
parfmt: add ParagraphFormat.left_indent setter
Dec 31, 2014
4863ac9
parfmt: add ParagraphFormat.right_indent setter
Dec 31, 2014
2fdb937
acpt: add scenarios for ParaFormat On/Off props
Jan 1, 2015
fcca0c1
parfmt: add ParagraphFormat.keep_together getter
Jan 1, 2015
8ed7151
parfmt: add ParagraphFormat.keep_with_next getter
Jan 1, 2015
8f836d4
parfmt: add ParaFormat.page_break_before getter
Jan 1, 2015
86741a1
parfmt: add ParagraphFormat.widow_control getter
Jan 1, 2015
ea6a195
parfmt: add ParagraphFormat.keep_together setter
Jan 1, 2015
288871d
parfmt: add ParagraphFormat.keep_with_next setter
Jan 1, 2015
3832dc1
parfmt: add ParaFormat.page_break_before setter
Jan 1, 2015
676612d
parfmt: add ParagraphFormat.widow_control setter
Jan 1, 2015
4564b33
docs: document Paragraph.paragraph_format
Jan 18, 2015
3b0253b
acpt: add scenario for Paragraph.paragraph_format
Jan 18, 2015
bddd27a
para: add Paragraph.paragraph_format
Jan 18, 2015
4ef1c51
docs: document Style behavior properties
Jan 18, 2015
93b990c
docs: document analysis for style behavior props
Jan 19, 2015
b7ec0f0
docs: add API page for docx.styles.style module
Jan 19, 2015
51db6f6
acpt: add scenarios for BaseStyle.hidden
Jan 18, 2015
167de84
style: add BaseStyle.hidden getter
Jan 18, 2015
0b89586
style: add BaseStyle.hidden setter
Jan 18, 2015
92a0e52
acpt: add scenarios for BaseStyle.priority
Jan 19, 2015
0b612d3
style: add BaseStyle.priority getter
Jan 19, 2015
872a0f2
style: add BaseStyle.priority setter
Jan 19, 2015
78008c6
acpt: add scenarios for BaseStyle.unhide_when_used
Jan 19, 2015
8ea3891
style: add BaseStyle.unhide_when_used getter
Jan 19, 2015
a6b429b
style: add BaseStyle.unhide_when_used setter
Jan 19, 2015
82fbefc
acpt: add scenarios for BaseStyle.quick_style
Dec 20, 2014
7dafb70
style: add BaseStyle.quick_format getter
Dec 20, 2014
c5b2688
style: add BaseStyle.quick_format setter
Dec 20, 2014
fa2917d
acpt: add scenarios for BaseStyle.locked
Jan 19, 2015
e8f3ad3
style: add BaseStyle.locked getter
Jan 19, 2015
67cfed6
style: add BaseStyle.locked setter
Jan 19, 2015
3b3713c
docs: add user documentation for latent styles
Jan 18, 2015
e7930e4
docs: document analysis for latent styles
Jan 19, 2015
b8b7367
acpt: add scenario for Styles.latent_styles
Jan 19, 2015
bb16965
style: add Styles.latent_styles
Jan 19, 2015
3912043
style: add LatentStyles.__len__()
Jan 19, 2015
faf2dee
style: add LatentStyles.__iter__()
Jan 19, 2015
3828b11
style: add LatentStyles.__getitem__()
Jan 19, 2015
faa7ab1
acpt: add scenarios for LatentStyles properties
Jan 20, 2015
c6ee527
style: add LatentStyles.default_priority getter
Jan 20, 2015
f9cacf3
style: add LatentStyles.load_count getter
Jan 20, 2015
45dd568
style: add LatentStyles on/off property getters
Jan 20, 2015
9121e10
style: add LatentStyles.default_priority setter
Jan 20, 2015
6a449d5
style: add LatentStyles.load_count setter
Jan 20, 2015
f2213d0
style: add LatentStyles on/off property setters
Jan 20, 2015
3eb7d1e
docs: add API documentation for latent styles
Jan 20, 2015
75beb5c
acpt: add scenarios for _LatentStyle on/off props
Feb 7, 2015
e0a27fa
style: add _LatentStyle.name getter
Feb 7, 2015
15c1cfe
style: add _LatentStyle.priority getter
Feb 7, 2015
75006eb
style: add _LatentStyle.priority setter
Feb 7, 2015
ec19643
style: add _LatentStyle on/off prop getters
Feb 7, 2015
8562eb7
style: add _LatentStyle on/off prop setters
Feb 7, 2015
df9d2ba
acpt: add scenarios for add/delete latent style
Feb 7, 2015
f3fa3a9
style: add LatentStyles.add_style()
Feb 7, 2015
10c01d1
style: add _LatentStyle.delete()
Feb 7, 2015
cb1ce72
docs: document analysis for next_paragraph_style
Feb 7, 2015
bbedd39
acpt: add scenarios for .next_paragraph_style
Feb 7, 2015
3119a45
style: add _ParaStyle.next_paragraph_style getter
Feb 8, 2015
7e5471e
style: add _ParaStyle.next_paragraph_style setter
Feb 8, 2015
656d356
style: extract BabelFish
Feb 8, 2015
d96f45f
style: add name translation to latent styles
Feb 8, 2015
6ef6bce
style: deprecate get style by styleId
Feb 8, 2015
ba40612
docs: update analysis for character style
Feb 8, 2015
a346cd7
acpt: rewrite run style scenarios
Feb 8, 2015
3f1a01a
run: rewrite Run.style getter
Feb 8, 2015
66f5b78
run: rewrite Run.style setter
Feb 8, 2015
1c9264e
docs: miscellaneous small documentation updates
Feb 8, 2015
3700d2d
acpt: rewrite table style scenarios
Feb 8, 2015
d922569
tbl: rewrite Table.style getter
Feb 8, 2015
a6bef96
tbl: rewrite Table.style setter
Feb 8, 2015
3ec35da
release: prepare v0.8.0 release
Feb 9, 2015
b28b6cd
fix: #140 warning triggered on add_heading/table()
stevecohen42 Feb 11, 2015
35db7e3
release: prepare v0.8.1 release
Feb 11, 2015
eadd737
api: rewrite docx.Document()
Feb 14, 2015
ce2f4cd
doc: add Document._body
Feb 15, 2015
be56d1d
acpt: migrate doc-add-paragraph.feature
Feb 15, 2015
fb5e7d7
doc: add Document.part
Feb 15, 2015
4f98312
doc: add Document.add_paragraph()
Feb 15, 2015
11394a0
api: remove old Document.add_paragraph()
Feb 15, 2015
f615c58
acpt: migrate doc-add-heading.feature
Feb 15, 2015
1d19d45
doc: add Document.add_heading()
Feb 15, 2015
3a9523a
api: remove old Document.add_heading()
Feb 15, 2015
57d67eb
acpt: migrate doc-add-page-break.feature
Feb 15, 2015
aaae2e6
doc: add Document.add_page_break()
Feb 15, 2015
99c713f
api: remove old Document.add_page_break()
Feb 15, 2015
08703b6
acpt: migrate doc-add-picture.feature
Feb 15, 2015
253b179
doc: add Document.add_picture()
Feb 15, 2015
c617f18
api: remove old Document.add_picture()
Feb 15, 2015
664905c
doc: add Document.add_section()
Feb 15, 2015
7c88a58
api: remove old Document.add_section()
Feb 15, 2015
e130662
acpt: migrate doc-add-table.feature
Feb 15, 2015
b00a46b
doc: add Document.add_table()
Feb 15, 2015
bd16fc7
api: remove old Document.add_table()
Feb 15, 2015
e08d95c
doc: add Document.core_properties
Feb 15, 2015
5ff190a
doc: add DocumentPart.core_properties
Feb 15, 2015
f3a2f10
api: remove old Document.core_properties
Feb 15, 2015
2350c52
acpt: migrate doc-access-collections.feature
Feb 15, 2015
026db1b
doc: add Document.inline_shapes
Feb 15, 2015
38272b4
api: remove old Document.inline_shapes
Feb 15, 2015
ba72289
acpt: migrate num-access-numbering-part.feature
Feb 15, 2015
382073e
doc: add DocumentPart.numbering_part
Feb 15, 2015
6b92497
api: remove old Document.numbering_part
Feb 15, 2015
a231eb1
acpt: add scenario for Document.paragraphs
Feb 15, 2015
4188ffd
doc: add Document.paragraphs
Feb 15, 2015
8e2f61a
api: remove old Document.paragraphs
Feb 15, 2015
60e5b53
doc: add Document.save()
Feb 15, 2015
6c9d5de
doc: add DocumentPart.save()
Feb 15, 2015
e5b84e7
api: remove old Document.save()
Feb 15, 2015
900807f
acpt: migrate scenario for Document.sections
Feb 15, 2015
64e1360
sect: migrate Sections to docx.section
Feb 15, 2015
118c438
doc: add Document.sections
Feb 15, 2015
804aad1
api: remove old Document.sections
Feb 15, 2015
13b1e74
acpt: migrate scenario for Document.styles
Feb 15, 2015
2afdf82
doc: add Document.styles
Feb 15, 2015
ac61bf6
api: remove old Document.styles
Feb 15, 2015
a9608c8
acpt: add scenario for Document.tables
Feb 15, 2015
8f7f4fa
doc: add Document.tables
Feb 15, 2015
2bad8ed
api: remove old Document.tables
Feb 15, 2015
b36e40f
doc: remove old Document shim object
Feb 15, 2015
655cb56
doc: remove DocumentPart.body
Feb 15, 2015
8202bb7
doc: migrate _Body to docx.document
Feb 15, 2015
e648135
shp: migrate InlineShapes to docx.shape
Feb 15, 2015
154f143
reorg: mv oxml.parts.document oxml.document
Feb 15, 2015
5032593
reorg: mv oxml.parts.coreprops oxml.coreprops
Feb 15, 2015
e9ad897
reorg: mv oxml.parts.numbering oxml.numbering
Feb 15, 2015
705391d
reorg: extract docx.text.parfmt
Feb 15, 2015
026009d
docs: adjust API docs to reflect relocations
Feb 16, 2015
71c657d
run: remove prior Run.add_picture() Implementation
Feb 16, 2015
e7553c2
run: rewrite Run.add_picture()
Feb 16, 2015
f1368d2
doc: add DocumentPart.new_pic_inline()
Feb 16, 2015
c96e946
doc: rewrite DocumentPart.get_or_add_image()
Feb 16, 2015
0d63564
reorg: reorder test_image.py fixtures
Feb 16, 2015
66fedd4
img: add Image.width and .height
Feb 16, 2015
4008ab2
img: add Image.scaled_dimensions()
Feb 16, 2015
395b48f
shp: fix #94 picture prints at wrong size
Feb 16, 2015
1d4f9bc
release: prepare v0.8.2 release
Feb 16, 2015
d7e5c9b
docs: document analysis for Font.color
Feb 17, 2015
49f935f
reorg: extract font-related behave steps
Feb 18, 2015
0f5ad58
reorg: extract parfmt-related behave steps
Feb 18, 2015
f54ccd7
reorg: extract docx.text.font
Feb 18, 2015
83cf975
reorg: extract docx.oxml.text.font
Feb 19, 2015
5e9c955
reorg: extract docx.oxml.text.parfmt
Feb 19, 2015
946864f
acpt: add scenario for Font.color
mavwolverine Feb 18, 2015
f2a3d7c
font: add Font.color
Feb 18, 2015
397cef4
acpt: add scenarios for ColorFormat.type
Feb 18, 2015
3c839ee
shr: transplant RGBColor
mavwolverine Feb 18, 2015
96273f2
dml: add ColorFormat.type
Feb 18, 2015
478c68b
acpt: add scenarios for ColorFormat.rgb
mavwolverine Feb 19, 2015
1fd6077
dml: add ColorFormat.rgb getter
mavwolverine Feb 19, 2015
cabb727
dml: add ColorFormat.rgb setter
Feb 19, 2015
426cad4
acpt: add scenarios for ColorFormat.theme
Feb 19, 2015
063396b
dml: add ColorFormat.theme_color getter
Feb 19, 2015
a51022b
dml: add ColorFormat.theme_color setter
Feb 19, 2015
dd44e1f
docs: add API docs for ColorFormat
Feb 20, 2015
b28327b
docs: add user docs for Font.color
Feb 20, 2015
1a7358e
release: prepare 0.8.3 release
Feb 20, 2015
ffdb139
img: #124 default to inches on no TIFF res unit
Feb 20, 2015
3603b5e
fix: #151 tests won't run on PyPI distribution
Feb 21, 2015
5a012fe
release: prepare v0.8.4 release
Feb 21, 2015
5309b41
acpt: groom some existing acceptance tests
Feb 21, 2015
280d46a
fix: #149 KeyError on Document.add_table()
Feb 21, 2015
74931e2
acpt: rewrite scenario for Document.add_table()
Feb 21, 2015
578f6c1
reorg: remove redundant tests from Describe_Body
Feb 21, 2015
7ea4d29
doc: rewrite Document.add_table()
Feb 21, 2015
1ff6d38
blkct: rewrite BlockItemContainer.add_table()
Feb 21, 2015
ebd5e85
acpt: add scenario for _Cell.add_table()
Feb 21, 2015
558a124
cell: rewrite _Cell.add_table()
Feb 21, 2015
8efe8ad
acpt: rewrite scenarios for Table add row & column
Feb 21, 2015
96ce9e3
tbl: rewrite Table.add_row()
Feb 21, 2015
7541f20
tbl: rewrite Table.add_column()
Feb 21, 2015
221e28c
enum: add WD_TABLE_DIRECTION enumeration
Feb 21, 2015
d278197
acpt: add scenarios for Table.table_direction
Feb 21, 2015
db70e4f
reorg: reorder tests in DescribeTable
Feb 21, 2015
d4ca18d
tbl: add Table.table_direction getter
Feb 21, 2015
9605cc0
tbl: add Table.table_direction setter
Feb 21, 2015
0c887e8
tbl: add CT_Row.trPr
Feb 22, 2015
bc34ec9
release: prepare v0.8.5 release
Feb 22, 2015
90237e8
add feature: Paragraph.add_hyperlink() #74
tanyunshi Mar 17, 2015
f25b178
docs.dev: improve hyperlink.rst after code review
Mar 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,104 @@
Release History
---------------

0.8.5 (2015-02-21)
++++++++++++++++++

- Fix #149: KeyError on Document.add_table()
- Fix #78: feature: add_table() sets cell widths
- Add #106: feature: Table.direction (i.e. right-to-left)
- Add #102: feature: add CT_Row.trPr


0.8.4 (2015-02-20)
++++++++++++++++++

- Fix #151: tests won't run on PyPI distribution
- Fix #124: default to inches on no TIFF resolution unit


0.8.3 (2015-02-19)
++++++++++++++++++

- Add #121, #135, #139: feature: Font.color


0.8.2 (2015-02-16)
++++++++++++++++++

- Fix #94: picture prints at wrong size when scaled
- Extract `docx.document.Document` object from `DocumentPart`

Refactor `docx.Document` from an object into a factory function for new
`docx.document.Document object`. Extract methods from prior `docx.Document`
and `docx.parts.document.DocumentPart` to form the new API class and retire
`docx.Document` class.

- Migrate `Document.numbering_part` to `DocumentPart.numbering_part`. The
`numbering_part` property is not part of the published API and is an
interim internal feature to be replaced in a future release, perhaps with
something like `Document.numbering_definitions`. In the meantime, it can
now be accessed using ``Document.part.numbering_part``.


0.8.1 (2015-02-10)
++++++++++++++++++

- Fix #140: Warning triggered on Document.add_heading/table()


0.8.0 (2015-02-08)
++++++++++++++++++

- Add styles. Provides general capability to access and manipulate paragraph,
character, and table styles.

- Add ParagraphFormat object, accessible on Paragraph.paragraph_format, and
providing the following paragraph formatting properties:

+ paragraph alignment (justfification)
+ space before and after paragraph
+ line spacing
+ indentation
+ keep together, keep with next, page break before, and widow control

- Add Font object, accessible on Run.font, providing character-level
formatting including:

+ typeface (e.g. 'Arial')
+ point size
+ underline
+ italic
+ bold
+ superscript and subscript

The following issues were retired:

- Add feature #56: superscript/subscript
- Add feature #67: lookup style by UI name
- Add feature #98: Paragraph indentation
- Add feature #120: Document.styles

**Backward incompatibilities**

Paragraph.style now returns a Style object. Previously it returned the style
name as a string. The name can now be retrieved using the Style.name
property, for example, `paragraph.style.name`.


0.7.6 (2014-12-14)
++++++++++++++++++

- Add feature #69: Table.alignment
- Add feature #29: Document.core_properties


0.7.5 (2014-11-29)
++++++++++++++++++

- Add feature #65: _Cell.merge()


0.7.4 (2014-07-18)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include HISTORY.rst LICENSE README.rst tox.ini
include tests/*.py
recursive-include tests *.py
recursive-include features *
recursive-include docx/templates *
recursive-include tests/test_files *
Expand Down
16 changes: 16 additions & 0 deletions docs/api/dml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

.. _dml_api:

DrawingML objects
=================

Low-level drawing elements like color that appear in various document
contexts.


|ColorFormat| objects
---------------------

.. autoclass:: docx.dml.color.ColorFormat()
:members:
:undoc-members:
105 changes: 96 additions & 9 deletions docs/api/document.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,111 @@ Document objects
The main Document and related objects.


.. currentmodule:: docx.api
|Document| constructor
----------------------

.. autofunction:: docx.Document


|Document| objects
------------------


.. autoclass:: Document
.. autoclass:: docx.document.Document()
:members:
:exclude-members: numbering_part, styles_part
:exclude-members: styles_part


.. currentmodule:: docx.parts.document
|CoreProperties| objects
-------------------------

Each |Document| object provides access to its |CoreProperties| object via its
:attr:`core_properties` attribute. A |CoreProperties| object provides
read/write access to the so-called *core properties* for the document. The
core properties are author, category, comments, content_status, created,
identifier, keywords, language, last_modified_by, last_printed, modified,
revision, subject, title, and version.

|Sections| objects
------------------
Each property is one of three types, |str|, |datetime|, or |int|. String
properties are limited in length to 255 characters and return an empty string
('') if not set. Date properties are assigned and returned as |datetime|
objects without timezone, i.e. in UTC. Any timezone conversions are the
responsibility of the client. Date properties return |None| if not set.

|docx| does not automatically set any of the document core properties other
than to add a core properties part to a presentation that doesn't have one
(very uncommon). If |docx| adds a core properties part, it contains default
values for the title, last_modified_by, revision, and modified properties.
Client code should update properties like revision and last_modified_by
if that behavior is desired.

.. autoclass:: Sections
:members:
.. currentmodule:: docx.opc.coreprops

.. class:: CoreProperties

.. attribute:: author

*string* -- An entity primarily responsible for making the content of the
resource.

.. attribute:: category

*string* -- A categorization of the content of this package. Example
values might include: Resume, Letter, Financial Forecast, Proposal,
or Technical Presentation.

.. attribute:: comments

*string* -- An account of the content of the resource.

.. attribute:: content_status

*string* -- completion status of the document, e.g. 'draft'

.. attribute:: created

*datetime* -- time of intial creation of the document

.. attribute:: identifier

*string* -- An unambiguous reference to the resource within a given
context, e.g. ISBN.

.. attribute:: keywords

*string* -- descriptive words or short phrases likely to be used as
search terms for this document

.. attribute:: language

*string* -- language the document is written in

.. attribute:: last_modified_by

*string* -- name or other identifier (such as email address) of person
who last modified the document

.. attribute:: last_printed

*datetime* -- time the document was last printed

.. attribute:: modified

*datetime* -- time the document was last modified

.. attribute:: revision

*int* -- number of this revision, incremented by Word each time the
document is saved. Note however |docx| does not automatically increment
the revision number when it saves a document.

.. attribute:: subject

*string* -- The topic of the content of the resource.

.. attribute:: title

*string* -- The name given to the resource.

.. attribute:: version

*string* -- free-form version string
23 changes: 23 additions & 0 deletions docs/api/enum/MsoColorType.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _MsoColorType:

``MSO_COLOR_TYPE``
==================

Specifies the color specification scheme

Example::

from docx.enum.dml import MSO_COLOR_TYPE

assert font.color.type == MSO_COLOR_TYPE.THEME

----

RGB
Color is specified by an |RGBColor| value.

THEME
Color is one of the preset theme colors.

AUTO
Color is determined automatically be the application.
71 changes: 71 additions & 0 deletions docs/api/enum/MsoThemeColorIndex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _MsoThemeColorIndex:

``MSO_THEME_COLOR_INDEX``
=========================

Indicates the Office theme color, one of those shown in the color gallery on
the formatting ribbon.

Alias: ``MSO_THEME_COLOR``

Example::

from docx.enum.dml import MSO_THEME_COLOR

font.color.theme_color = MSO_THEME_COLOR.ACCENT_1

----

NOT_THEME_COLOR
Indicates the color is not a theme color.

ACCENT_1
Specifies the Accent 1 theme color.

ACCENT_2
Specifies the Accent 2 theme color.

ACCENT_3
Specifies the Accent 3 theme color.

ACCENT_4
Specifies the Accent 4 theme color.

ACCENT_5
Specifies the Accent 5 theme color.

ACCENT_6
Specifies the Accent 6 theme color.

BACKGROUND_1
Specifies the Background 1 theme color.

BACKGROUND_2
Specifies the Background 2 theme color.

DARK_1
Specifies the Dark 1 theme color.

DARK_2
Specifies the Dark 2 theme color.

FOLLOWED_HYPERLINK
Specifies the theme color for a clicked hyperlink.

HYPERLINK
Specifies the theme color for a hyperlink.

LIGHT_1
Specifies the Light 1 theme color.

LIGHT_2
Specifies the Light 2 theme color.

TEXT_1
Specifies the Text 1 theme color.

TEXT_2
Specifies the Text 2 theme color.

MIXED
Indicates multiple theme colors are used.
Loading