Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
muppet-strings
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hugo Hörnquist
muppet-strings
Commits
48ec8b73
Commit
48ec8b73
authored
May 29, 2023
by
Hugo Hörnquist
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes.
parent
70085c70
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
muppet/__main__.py
+5
-3
5 additions, 3 deletions
muppet/__main__.py
templates/code_page.html
+4
-0
4 additions, 0 deletions
templates/code_page.html
with
9 additions
and
3 deletions
muppet/__main__.py
+
5
−
3
View file @
48ec8b73
...
@@ -324,14 +324,16 @@ def setup_module(base: str, module: ModuleEntry) -> None:
...
@@ -324,14 +324,16 @@ def setup_module(base: str, module: ModuleEntry) -> None:
# puppet_class['docstring']
# puppet_class['docstring']
# puppet_class['defaults']
# puppet_class['defaults']
with
open
(
os
.
path
.
join
(
dir
,
'
source.pp
'
),
'
w
'
)
as
f
:
# TODO option to add .txt extension (for web serverse which
# treat .pp as application/binary)
with
open
(
os
.
path
.
join
(
dir
,
'
source.pp.txt
'
),
'
w
'
)
as
f
:
f
.
write
(
puppet_class
[
'
source
'
])
f
.
write
(
puppet_class
[
'
source
'
])
with
open
(
os
.
path
.
join
(
dir
,
'
source.json
'
),
'
w
'
)
as
f
:
with
open
(
os
.
path
.
join
(
dir
,
'
source.json
'
),
'
w
'
)
as
f
:
json
.
dump
(
puppet_class
,
f
,
indent
=
2
)
json
.
dump
(
puppet_class
,
f
,
indent
=
2
)
with
open
(
os
.
path
.
join
(
dir
,
'
source.pp.html
'
),
'
w
'
)
as
f
:
#
with open(os.path.join(dir, 'source.pp.html'), 'w') as f:
f
.
write
(
format_class
(
puppet_class
))
#
f.write(format_class(puppet_class))
with
open
(
os
.
path
.
join
(
dir
,
'
index.html
'
),
'
w
'
)
as
f
:
with
open
(
os
.
path
.
join
(
dir
,
'
index.html
'
),
'
w
'
)
as
f
:
template
=
jinja
.
get_template
(
'
code_page.html
'
)
template
=
jinja
.
get_template
(
'
code_page.html
'
)
...
...
This diff is collapsed.
Click to expand it.
templates/code_page.html
+
4
−
0
View file @
48ec8b73
{% extends "base.html" %}
{% extends "base.html" %}
{% block content %}
{% block content %}
<ul>
<li><a
href=
"source.pp.txt"
>
Raw Source code
</a></li>
<li><a
href=
"source.json"
>
JSON blob
</a></li>
</ul>
{{ content }}
{{ content }}
{% endblock %}
{% endblock %}
{# ft: jinja #}
{# ft: jinja #}
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