Skip to content

Commit 71a03f3

Browse files
author
Steve Canny
committed
release: v0.5.3 add feature #19 Run.underline
1 parent b84d64f commit 71a03f3

File tree

3 files changed

+50
-44
lines changed

3 files changed

+50
-44
lines changed

HISTORY.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
Release History
44
---------------
55

6+
0.5.3 (2014-05-10)
7+
++++++++++++++++++
8+
9+
- Add feature #19: Run.underline property
10+
11+
612
0.5.2 (2014-05-06)
713
++++++++++++++++++
814

9-
- Add #17 feature: character style
15+
- Add feature #17: character style
1016

1117

1218
0.5.1 (2014-04-02)

docs/index.rst

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,48 @@ What it can do
1414

1515
Here's an example of what |docx| can do:
1616

17-
====== ======================================================================
18-
|img| ::
19-
20-
from docx import Document
21-
from docx.shared import Inches
22-
23-
document = Document()
24-
25-
document.add_heading('Document Title', 0)
26-
27-
p = document.add_paragraph('A plain paragraph having some ')
28-
p.add_run('bold').bold = True
29-
p.add_run(' and some ')
30-
p.add_run('italic.').italic = True
31-
32-
document.add_heading('Heading, level 1', level=1)
33-
document.add_paragraph('Intense quote', style='IntenseQuote')
34-
35-
document.add_paragraph(
36-
'first item in unordered list', style='ListBullet'
37-
)
38-
document.add_paragraph(
39-
'first item in ordered list', style='ListNumber'
40-
)
41-
42-
document.add_picture('monty-truth.png', width=Inches(1.25))
43-
44-
table = document.add_table(rows=1, cols=3)
45-
hdr_cells = table.rows[0].cells
46-
hdr_cells[0].text = 'Qty'
47-
hdr_cells[1].text = 'Id'
48-
hdr_cells[2].text = 'Desc'
49-
for item in recordset:
50-
row_cells = table.add_row().cells
51-
row_cells[0].text = str(item.qty)
52-
row_cells[1].text = str(item.id)
53-
row_cells[2].text = item.desc
54-
55-
document.add_page_break()
56-
57-
document.save('demo.docx')
58-
====== ======================================================================
17+
============================================== ===============================================================
18+
|img| ::
19+
20+
from docx import Document
21+
from docx.shared import Inches
22+
23+
document = Document()
24+
25+
document.add_heading('Document Title', 0)
26+
27+
p = document.add_paragraph('A plain paragraph having some ')
28+
p.add_run('bold').bold = True
29+
p.add_run(' and some ')
30+
p.add_run('italic.').italic = True
31+
32+
document.add_heading('Heading, level 1', level=1)
33+
document.add_paragraph('Intense quote', style='IntenseQuote')
34+
35+
document.add_paragraph(
36+
'first item in unordered list', style='ListBullet'
37+
)
38+
document.add_paragraph(
39+
'first item in ordered list', style='ListNumber'
40+
)
41+
42+
document.add_picture('monty-truth.png', width=Inches(1.25))
43+
44+
table = document.add_table(rows=1, cols=3)
45+
hdr_cells = table.rows[0].cells
46+
hdr_cells[0].text = 'Qty'
47+
hdr_cells[1].text = 'Id'
48+
hdr_cells[2].text = 'Desc'
49+
for item in recordset:
50+
row_cells = table.add_row().cells
51+
row_cells[0].text = str(item.qty)
52+
row_cells[1].text = str(item.id)
53+
row_cells[2].text = item.desc
54+
55+
document.add_page_break()
56+
57+
document.save('demo.docx')
58+
============================================== ===============================================================
5959

6060

6161
User Guide

docx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from docx.api import Document # noqa
44

5-
__version__ = '0.5.2'
5+
__version__ = '0.5.3'
66

77

88
# register custom Part classes with opc package reader

0 commit comments

Comments
 (0)