Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
0c80f5c6
Commit
0c80f5c6
authored
May 11, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Teststatus
parent
3b03aa30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
516 additions
and
478 deletions
+516
-478
admin.py
cps/admin.py
+1
-1
subproc_wrapper.py
cps/subproc_wrapper.py
+2
-1
config_view_edit.html
cps/templates/config_view_edit.html
+4
-2
detail.html
cps/templates/detail.html
+2
-2
index.html
cps/templates/index.html
+1
-1
ub.py
cps/ub.py
+1
-1
web.py
cps/web.py
+1
-2
Calibre-Web TestSummary.html
test/Calibre-Web TestSummary.html
+504
-468
No files found.
cps/admin.py
View file @
0c80f5c6
...
@@ -529,7 +529,7 @@ def new_user():
...
@@ -529,7 +529,7 @@ def new_user():
content
.
locale
=
to_save
[
"locale"
]
content
.
locale
=
to_save
[
"locale"
]
val
=
0
val
=
0
for
key
,
_
in
to_save
.
items
():
for
key
,
_
_
in
to_save
.
items
():
if
key
.
startswith
(
'show'
):
if
key
.
startswith
(
'show'
):
val
+=
int
(
key
[
5
:])
val
+=
int
(
key
[
5
:])
content
.
sidebar_view
=
val
content
.
sidebar_view
=
val
...
...
cps/subproc_wrapper.py
View file @
0c80f5c6
...
@@ -37,6 +37,7 @@ def process_open(command, quotes=(), env=None, sout=subprocess.PIPE):
...
@@ -37,6 +37,7 @@ def process_open(command, quotes=(), env=None, sout=subprocess.PIPE):
else
:
else
:
if
sys
.
version_info
<
(
3
,
0
):
if
sys
.
version_info
<
(
3
,
0
):
exc_command
=
[
x
.
encode
(
sys
.
getfilesystemencoding
())
for
x
in
command
]
exc_command
=
[
x
.
encode
(
sys
.
getfilesystemencoding
())
for
x
in
command
]
else
:
exc_command
=
[
x
for
x
in
command
]
# return subprocess.Popen(exc_command, shell=False, stdout=subprocess.PIPE, universal_newlines=True, env=env)
return
subprocess
.
Popen
(
exc_command
,
shell
=
False
,
stdout
=
sout
,
universal_newlines
=
True
,
env
=
env
)
return
subprocess
.
Popen
(
exc_command
,
shell
=
False
,
stdout
=
sout
,
universal_newlines
=
True
,
env
=
env
)
cps/templates/config_view_edit.html
View file @
0c80f5c6
...
@@ -119,10 +119,12 @@
...
@@ -119,10 +119,12 @@
<div
id=
"collapseseven"
class=
"panel-collapse collapse"
>
<div
id=
"collapseseven"
class=
"panel-collapse collapse"
>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
{% for element in sidebar %}
{% for element in sidebar %}
<div
class=
"form-group"
>
{% if element['config_show'] %}
<div
class=
"form-group"
>
<input
type=
"checkbox"
name=
"show_{{element['visibility']}}"
id=
"show_{{element['visibility']}}"
{%
if
conf
.
show_element_new_user
(
element
['
visibility
'])
%}
checked
{%
endif
%}
>
<input
type=
"checkbox"
name=
"show_{{element['visibility']}}"
id=
"show_{{element['visibility']}}"
{%
if
conf
.
show_element_new_user
(
element
['
visibility
'])
%}
checked
{%
endif
%}
>
<label
for=
"show_{{element['visibility']}}"
>
{{element['show_text']}}
</label>
<label
for=
"show_{{element['visibility']}}"
>
{{element['show_text']}}
</label>
</div>
</div>
{% endif %}
{% endfor %}
{% endfor %}
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<input
type=
"checkbox"
name=
"Show_detail_random"
id=
"Show_detail_random"
{%
if
conf
.
show_detail_random
()
%}
checked
{%
endif
%}
>
<input
type=
"checkbox"
name=
"Show_detail_random"
id=
"Show_detail_random"
{%
if
conf
.
show_detail_random
()
%}
checked
{%
endif
%}
>
...
...
cps/templates/detail.html
View file @
0c80f5c6
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
{% endif %}
{% endif %}
{% if entry.series|length > 0 %}
{% if entry.series|length > 0 %}
<p>
{{_('Book')}} {{entry.series_index}} {{_('of')}}
<a
href=
"{{url_for('web.
series
', book_id=entry.series[0].id)}}"
>
{{entry.series[0].name}}
</a></p>
<p>
{{_('Book')}} {{entry.series_index}} {{_('of')}}
<a
href=
"{{url_for('web.
books_list', data='series',sort='abc
', book_id=entry.series[0].id)}}"
>
{{entry.series[0].name}}
</a></p>
{% endif %}
{% endif %}
{% if entry.languages.__len__() > 0 %}
{% if entry.languages.__len__() > 0 %}
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
<div
class=
"publishers"
>
<div
class=
"publishers"
>
<p>
<p>
<span>
{{_('Publisher')}}:
<span>
{{_('Publisher')}}:
<a
href=
"{{url_for('web.
publisher
', book_id=entry.publishers[0].id ) }}"
>
{{entry.publishers[0].name}}
</a>
<a
href=
"{{url_for('web.
books_list', data='publisher', sort='new
', book_id=entry.publishers[0].id ) }}"
>
{{entry.publishers[0].name}}
</a>
</span>
</span>
</p>
</p>
</div>
</div>
...
...
cps/templates/index.html
View file @
0c80f5c6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"discover random-books"
>
<div
class=
"discover random-books"
>
<h2
class=
"random-books"
>
{{_('Discover (Random Books)')}}
</h2>
<h2
class=
"random-books"
>
{{_('Discover (Random Books)')}}
</h2>
<div
class=
"row"
>
<div
class=
"row"
>
web.
{% for entry in random %}
{% for entry in random %}
<div
class=
"col-sm-3 col-lg-2 col-xs-6 book"
id=
"books_rand"
>
<div
class=
"col-sm-3 col-lg-2 col-xs-6 book"
id=
"books_rand"
>
<div
class=
"cover"
>
<div
class=
"cover"
>
<a
href=
"{{ url_for('web.show_book', book_id=entry.id) }}"
data-toggle=
"modal"
data-target=
"#bookDetailsModal"
data-remote=
"false"
>
<a
href=
"{{ url_for('web.show_book', book_id=entry.id) }}"
data-toggle=
"modal"
data-target=
"#bookDetailsModal"
data-remote=
"false"
>
...
...
cps/ub.py
View file @
0c80f5c6
...
@@ -105,7 +105,7 @@ def get_sidebar_config(kwargs=None):
...
@@ -105,7 +105,7 @@ def get_sidebar_config(kwargs=None):
else
:
else
:
content
=
False
content
=
False
else
:
else
:
content
=
False
content
=
'conf'
in
kwargs
sidebar
=
list
()
sidebar
=
list
()
sidebar
.
append
({
"glyph"
:
"glyphicon-book"
,
"text"
:
_
(
'Recently Added'
),
"link"
:
'web.index'
,
"id"
:
"new"
,
sidebar
.
append
({
"glyph"
:
"glyphicon-book"
,
"text"
:
_
(
'Recently Added'
),
"link"
:
'web.index'
,
"id"
:
"new"
,
"visibility"
:
SIDEBAR_RECENT
,
'public'
:
True
,
"page"
:
"root"
,
"visibility"
:
SIDEBAR_RECENT
,
'public'
:
True
,
"page"
:
"root"
,
...
...
cps/web.py
View file @
0c80f5c6
...
@@ -1209,7 +1209,6 @@ def token_verified():
...
@@ -1209,7 +1209,6 @@ def token_verified():
@
web
.
route
(
"/me"
,
methods
=
[
"GET"
,
"POST"
])
@
web
.
route
(
"/me"
,
methods
=
[
"GET"
,
"POST"
])
@
login_required
@
login_required
def
profile
():
def
profile
():
global
_
downloads
=
list
()
downloads
=
list
()
languages
=
speaking_language
()
languages
=
speaking_language
()
translations
=
babel
.
list_translations
()
+
[
LC
(
'en'
)]
translations
=
babel
.
list_translations
()
+
[
LC
(
'en'
)]
...
@@ -1248,7 +1247,7 @@ def profile():
...
@@ -1248,7 +1247,7 @@ def profile():
current_user
.
locale
=
to_save
[
"locale"
]
current_user
.
locale
=
to_save
[
"locale"
]
val
=
0
val
=
0
for
key
,
_
in
to_save
.
items
():
for
key
,
_
_
in
to_save
.
items
():
if
key
.
startswith
(
'show'
):
if
key
.
startswith
(
'show'
):
val
+=
int
(
key
[
5
:])
val
+=
int
(
key
[
5
:])
current_user
.
sidebar_view
=
val
current_user
.
sidebar_view
=
val
...
...
test/Calibre-Web TestSummary.html
View file @
0c80f5c6
This diff is collapsed.
Click to expand it.
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