Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
eaf09e55
Commit
eaf09e55
authored
Apr 20, 2019
by
Alessandro Viprati
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'scopri-ubuntu' of code.ubuntu-it.org:ubuntu-it-web/www into scopri-ubuntu
parents
425998a6
4d2b928a
Pipeline
#150
passed with stage
in 0 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
27 deletions
+52
-27
managetests.json
managetests.json
+4
-15
run
run
+17
-0
setup.py
setup.py
+1
-1
uitwww/data/downloads.toml
uitwww/data/downloads.toml
+10
-10
uitwww/main.py
uitwww/main.py
+19
-0
uitwww/utils.py
uitwww/utils.py
+1
-1
No files found.
managetests.json
View file @
eaf09e55
{
{
"build"
:
[
"build"
:
[
[
"invoke"
,
"build"
]
[
"./run"
,
"build_scss"
],
],
[
"./run"
,
"init"
,
"{{base}}/data"
]
"before_install"
:
[
[
"mkdir"
,
"{{base}}/data"
],
[
"virtualenv"
,
"-p"
,
"python3"
,
"{{base}}/env"
]
],
"install"
:
[
{
"artifacts"
:
"build/packages/*.whl"
,
"command"
:
[
"{{base}}/env/bin/pip"
,
"install"
,
"{{artifact}}"
]
}
],
"after_install"
:
[
[
"{{base}}/env/bin/uitwww"
,
"init"
,
"{{base}}/data"
]
],
],
"run"
:
[
"run"
:
[
"{{base}}/env/bin/uitwww"
,
"run"
,
"-g"
,
"{{gunicorn_config_file}}"
,
"{{base}}/build/run"
,
"run"
,
"-g"
,
"{{gunicorn_config_file}}"
,
"{{base}}/data"
"{{base}}/data"
]
]
}
}
run
0 → 100755
View file @
eaf09e55
#! /usr/bin/python3
import
os
import
sys
# Prefer local modules over any system-installed ones to ensure that running a
# Git version from any current working directory does not have unexpected
# behaviour.
parent
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
if
os
.
path
.
exists
(
os
.
path
.
join
(
parent
,
'uitwww'
,
'__init__.py'
)):
sys
.
path
.
insert
(
0
,
parent
)
if
__name__
==
'__main__'
:
from
uitwww
import
main
main
.
cli
()
setup.py
View file @
eaf09e55
...
@@ -49,7 +49,7 @@ setuptools.setup(
...
@@ -49,7 +49,7 @@ setuptools.setup(
entry_points
=
{
entry_points
=
{
"console_scripts"
:
[
"console_scripts"
:
[
"uitwww = uitwww.
__main__
:cli"
,
"uitwww = uitwww.
main
:cli"
,
],
],
},
},
...
...
uitwww/data/downloads.toml
View file @
eaf09e55
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
# necessario aggiornare questa sezione.
# necessario aggiornare questa sezione.
[releases.latest]
[releases.latest]
version
=
"18.04.
1
"
version
=
"18.04.
2
"
codename
=
"bionic"
codename
=
"bionic"
lts
=
true
lts
=
true
[releases.lts]
[releases.lts]
version
=
"16.04.
5
"
version
=
"16.04.
6
"
codename
=
"xenial"
codename
=
"xenial"
lts
=
true
lts
=
true
...
@@ -109,14 +109,14 @@ releases = ["latest"]
...
@@ -109,14 +109,14 @@ releases = ["latest"]
archs
=
{
amd64
=
"cdimages-derivatives"
,
i386
=
"cdimages-derivatives"
}
archs
=
{
amd64
=
"cdimages-derivatives"
,
i386
=
"cdimages-derivatives"
}
[distros.ubuntustudio]
#
[distros.ubuntustudio]
name
=
"Ubuntu Studio"
#
name = "Ubuntu Studio"
description
=
"Ubuntu con tutti i programmi per lavorare con audio, video e immagini"
#
description = "Ubuntu con tutti i programmi per lavorare con audio, video e immagini"
lts-support-years
=
3
#
lts-support-years = 3
#
lts-only
=
true
#
lts-only = true
releases
=
["lts"]
#
releases = ["lts"]
archs
=
{
amd64
=
"cdimages-studio"
,
i386
=
"cdimages-studio"
}
#
archs = { amd64 = "cdimages-studio", i386 = "cdimages-studio" }
...
...
uitwww/
__main__
.py
→
uitwww/
main
.py
View file @
eaf09e55
...
@@ -15,8 +15,10 @@
...
@@ -15,8 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
os
import
os
import
sys
import
click
import
click
import
subprocess
import
uitwww
import
uitwww
from
uitwww
import
utils
from
uitwww
import
utils
...
@@ -80,3 +82,20 @@ def init(data):
...
@@ -80,3 +82,20 @@ def init(data):
print
(
"Initializing data directory:"
,
data
)
print
(
"Initializing data directory:"
,
data
)
data_path
=
os
.
path
.
expanduser
(
os
.
path
.
abspath
(
data
))
data_path
=
os
.
path
.
expanduser
(
os
.
path
.
abspath
(
data
))
uitwww
.
init_data_directory
(
data_path
)
uitwww
.
init_data_directory
(
data_path
)
@
cli
.
command
(
"build_scss"
)
def
build_scss
():
"""Build the scss file"""
base_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
'..'
)
scss_file
=
open
(
'%s/assets/scss/www.scss'
%
base_dir
,
'rb'
)
css_file
=
open
(
'%s/uitwww/static/website.css'
%
base_dir
,
'wb'
)
subprocess
.
run
(
[
sys
.
executable
,
'-mscss'
],
stdin
=
scss_file
,
stdout
=
css_file
,
check
=
True
,
)
css_file
.
flush
()
scss_file
.
close
()
css_file
.
close
()
uitwww/utils.py
View file @
eaf09e55
...
@@ -18,7 +18,7 @@ import datetime
...
@@ -18,7 +18,7 @@ import datetime
import
random
import
random
import
string
import
string
from
htmlmin
.minify
import
html_minify
from
htmlmin
import
minify
as
html_minify
import
gunicorn.app.base
as
baseapp
import
gunicorn.app.base
as
baseapp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment