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
5fd6ac7f
Commit
5fd6ac7f
authored
Mar 02, 2019
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename __main__.py to main.py so it can be imported
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
515c4e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
setup.py
setup.py
+1
-1
uitwww/main.py
uitwww/main.py
+19
-0
No files found.
setup.py
View file @
5fd6ac7f
...
...
@@ -49,7 +49,7 @@ setuptools.setup(
entry_points
=
{
"console_scripts"
:
[
"uitwww = uitwww.
__main__
:cli"
,
"uitwww = uitwww.
main
:cli"
,
],
},
...
...
uitwww/
__main__
.py
→
uitwww/
main
.py
View file @
5fd6ac7f
...
...
@@ -15,8 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
os
import
sys
import
click
import
subprocess
import
uitwww
from
uitwww
import
utils
...
...
@@ -80,3 +82,20 @@ def init(data):
print
(
"Initializing data directory:"
,
data
)
data_path
=
os
.
path
.
expanduser
(
os
.
path
.
abspath
(
data
))
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
()
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