Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Commits
f4365d92
Commit
f4365d92
authored
4 years ago
by
Anders H. Rebner
Browse files
Options
Downloads
Patches
Plain Diff
#264 Type-kolonne vises ikke i liten kodebok-pdf
parent
d394ada8
No related branches found
Branches containing commit
No related tags found
1 merge request
!99
#263 og #264 Kolonneendring kodebok pdf
Pipeline
#84024
passed with stages
in 2 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
soitool/codebook_to_pdf.py
+22
-12
22 additions, 12 deletions
soitool/codebook_to_pdf.py
with
22 additions
and
12 deletions
soitool/codebook_to_pdf.py
+
22
−
12
View file @
f4365d92
...
...
@@ -38,15 +38,15 @@ PAGE_NUMBER_FONT = "Helvetica"
TABLE_STYLE
=
TableStyle
(
[
(
"
FONTSIZE
"
,
(
0
,
0
),
(
3
,
0
),
16
),
# Header-fontsize
(
"
BOTTOMPADDING
"
,
(
0
,
0
),
(
3
,
0
),
10
),
# Header-padding bottom
(
"
FONTSIZE
"
,
(
0
,
0
),
(
-
1
,
0
),
16
),
# Header-fontsize
(
"
BOTTOMPADDING
"
,
(
0
,
0
),
(
-
1
,
0
),
10
),
# Header-padding bottom
(
"
BACKGROUND
"
,
(
0
,
0
),
(
3
,
0
),
(
-
1
,
0
),
HEADER_BG_COLOR
,
),
# Header background-color
(
"
ALIGN
"
,
(
0
,
0
),
(
3
,
0
),
"
CENTER
"
),
# Header-text centered
(
"
ALIGN
"
,
(
0
,
0
),
(
-
1
,
0
),
"
CENTER
"
),
# Header-text centered
(
"
GRID
"
,
(
0
,
0
),
(
-
1
,
-
1
),
1
,
colors
.
black
),
# Border around cells
]
)
...
...
@@ -156,18 +156,28 @@ def get_codebook_data(database, small=False):
data_decode
=
[]
# Add column-headers
data_code
.
append
([
HEADERS
[
0
],
HEADERS
[
3
],
HEADERS
[
1
],
HEADERS
[
2
]])
data_decode
.
append
([
HEADERS
[
3
],
HEADERS
[
0
],
HEADERS
[
1
],
HEADERS
[
2
]])
if
small
:
data_code
.
append
([
HEADERS
[
0
],
HEADERS
[
3
],
HEADERS
[
1
]])
data_decode
.
append
([
HEADERS
[
3
],
HEADERS
[
0
],
HEADERS
[
1
]])
else
:
data_code
.
append
([
HEADERS
[
0
],
HEADERS
[
3
],
HEADERS
[
1
],
HEADERS
[
2
]])
data_decode
.
append
([
HEADERS
[
3
],
HEADERS
[
0
],
HEADERS
[
1
],
HEADERS
[
2
]])
# Add row data
for
row
in
db_data_code
:
data_code
.
append
(
[
row
[
"
word
"
],
row
[
"
code
"
],
row
[
"
category
"
],
row
[
"
type
"
]]
)
if
small
:
data_code
.
append
([
row
[
"
word
"
],
row
[
"
code
"
],
row
[
"
category
"
]])
else
:
data_code
.
append
(
[
row
[
"
word
"
],
row
[
"
code
"
],
row
[
"
category
"
],
row
[
"
type
"
]]
)
for
row
in
db_data_decode
:
data_decode
.
append
(
[
row
[
"
code
"
],
row
[
"
word
"
],
row
[
"
category
"
],
row
[
"
type
"
]]
)
if
small
:
data_decode
.
append
([
row
[
"
code
"
],
row
[
"
word
"
],
row
[
"
category
"
]])
else
:
data_decode
.
append
(
[
row
[
"
code
"
],
row
[
"
word
"
],
row
[
"
category
"
],
row
[
"
type
"
]]
)
return
data_code
,
data_decode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment