1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-08 14:20:10 +01:00

[mod] make themes.all update pygments*.less

Add a searx/static/themes/*/src/generated empty folder
This commit is contained in:
Alexandre Flament 2021-06-18 16:44:27 +02:00
parent bb3e67f72b
commit d20f6a1f19
11 changed files with 21 additions and 11 deletions

11
manage
View File

@ -325,6 +325,16 @@ node.clean() {
dump_return $? dump_return $?
} }
pygments.less() {
[ "$_pyenv_OK" == "OK" ] && return 0
build_msg PYGMENTS "searx_extra/update/update_pygments.py"
if ! pyenv.cmd python searx_extra/update/update_pygments.py; then
build_msg PYGMENTS "building LESS files for pygments failed"
return 1
fi
return 0
}
py.build() { py.build() {
build_msg BUILD "[pylint] python package ${PYDIST}" build_msg BUILD "[pylint] python package ${PYDIST}"
pyenv.cmd python setup.py \ pyenv.cmd python setup.py \
@ -462,6 +472,7 @@ test.clean() {
themes.all() { themes.all() {
( set -e ( set -e
pygments.less
node.env node.env
themes.oscar themes.oscar
themes.simple themes.simple

View File

@ -1,6 +1,6 @@
/* /*
this file is generated automatically by searx_extra/update/update_pygments.py this file is generated automatically by searx_extra/update/update_pygments.py
using pygments version 2.8.1 using pygments version 2.9.0
*/ */
.code-highlight .linenos { .code-highlight .linenos {

View File

@ -1,6 +1,6 @@
/* /*
this file is generated automatically by searx_extra/update/update_pygments.py this file is generated automatically by searx_extra/update/update_pygments.py
using pygments version 2.8.1 using pygments version 2.9.0
*/ */
.code-highlight .linenos { .code-highlight .linenos {

View File

@ -1,6 +1,7 @@
@import "../logicodev/variables.less"; @import "../logicodev/variables.less";
@import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/new_issue.less";
@import "../../../../__common__/less/stats.less"; @import "../../../../__common__/less/stats.less";
@import "../../generated/pygments-logicodev.less";
@stacked-bar-chart: rgb(213, 216, 215, 1); @stacked-bar-chart: rgb(213, 216, 215, 1);

View File

@ -2,8 +2,6 @@ pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Lucida Console', monospace !important; font-family: 'Ubuntu Mono', 'Courier New', 'Lucida Console', monospace !important;
} }
@import "pygments.less";
.code-highlight pre { .code-highlight pre {
margin-bottom: 25px; margin-bottom: 25px;
padding: 20px 10px; padding: 20px 10px;

View File

@ -1,6 +1,7 @@
@import "variables.less"; @import "variables.less";
@import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/new_issue.less";
@import "../../../../__common__/less/stats.less"; @import "../../../../__common__/less/stats.less";
@import "../../generated/pygments-logicodev.less";
@import "navbar.less"; @import "navbar.less";
@import "footer.less"; @import "footer.less";

View File

@ -1,2 +0,0 @@
@import "pygments.less";

View File

@ -1,6 +1,7 @@
@import "variables.less"; @import "variables.less";
@import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/new_issue.less";
@import "../../../../__common__/less/stats.less"; @import "../../../../__common__/less/stats.less";
@import "../../generated/pygments-pointhi.less";
@import "footer.less"; @import "footer.less";
@import "checkbox.less"; @import "checkbox.less";

View File

@ -1,6 +1,6 @@
/* /*
this file is generated automatically by searx_extra/update/update_pygments.py this file is generated automatically by searx_extra/update/update_pygments.py
using pygments version 2.8.1 using pygments version 2.9.0
*/ */
.code-highlight .linenos { .code-highlight .linenos {

View File

@ -5,4 +5,4 @@
border: inherit; border: inherit;
} }
@import "pygments.less"; @import "../generated/pygments.less";

View File

@ -125,17 +125,17 @@ def get_css(cssclass, style):
def main(): def main():
fname = 'static/themes/oscar/src/less/logicodev/pygments.less' fname = 'static/themes/oscar/src/generated/pygments-logicodev.less'
print("update: %s" % fname) print("update: %s" % fname)
with open(get_output_filename(fname), 'w') as f: with open(get_output_filename(fname), 'w') as f:
f.write(get_css(CSSCLASS, LogicodevStyle)) f.write(get_css(CSSCLASS, LogicodevStyle))
fname = 'static/themes/oscar/src/less/pointhi/pygments.less' fname = 'static/themes/oscar/src/generated/pygments-pointhi.less'
print("update: %s" % fname) print("update: %s" % fname)
with open(get_output_filename(fname), 'w') as f: with open(get_output_filename(fname), 'w') as f:
f.write(get_css(CSSCLASS, 'default')) f.write(get_css(CSSCLASS, 'default'))
fname = 'static/themes/simple/less/pygments.less' fname = 'static/themes/simple/src/generated/pygments.less'
print("update: %s" % fname) print("update: %s" % fname)
with open(get_output_filename(fname), 'w') as f: with open(get_output_filename(fname), 'w') as f:
f.write(get_css(CSSCLASS, 'default')) f.write(get_css(CSSCLASS, 'default'))