Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ideascube
ARCHIVED Kiwix Hotspot
Commits
ef5cb029
Commit
ef5cb029
authored
Apr 06, 2017
by
thiolliere
Browse files
add catalog
parent
c188e091
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/catalog.py
0 → 100644
View file @
ef5cb029
import
wget
import
pretty_print
import
os
catalog_dir
=
"catalog"
catalog_url_path
=
"http://catalog.ideascube.org"
catalog_files
=
[
"kiwix.yml"
,
"static-sites.yml"
,
"bibliotecamovil.yml"
,
]
def
make
():
pretty_print
.
step
(
"build zim catalog"
)
if
os
.
path
.
isdir
(
catalog_dir
):
pretty_print
.
std
(
"nothing to do"
)
return
os
.
mkdir
(
catalog_dir
)
for
catalog
in
catalog_files
:
wget
.
download
(
"{}/{}"
.
format
(
catalog_url_path
,
catalog
),
out
=
"{}/{}"
.
format
(
catalog_dir
,
catalog
))
print
()
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment