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
eef4787b
Commit
eef4787b
authored
Feb 24, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/patch-1' into Develop
Oauth is optional again
parents
1de39299
38307ece
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
13 deletions
+13
-13
cps.py
cps.py
+7
-2
about.py
cps/about.py
+1
-1
editbooks.py
cps/editbooks.py
+1
-1
helper.py
cps/helper.py
+1
-2
opds.py
cps/opds.py
+1
-2
shelf.py
cps/shelf.py
+1
-3
web.py
cps/web.py
+1
-2
No files found.
cps.py
View file @
eef4787b
...
@@ -36,7 +36,11 @@ from cps.shelf import shelf
...
@@ -36,7 +36,11 @@ from cps.shelf import shelf
from
cps.admin
import
admi
from
cps.admin
import
admi
from
cps.gdrive
import
gdrive
from
cps.gdrive
import
gdrive
from
cps.editbooks
import
editbook
from
cps.editbooks
import
editbook
from
cps.oauth_bb
import
oauth
try
:
from
cps.oauth_bb
import
oauth
oauth_available
=
True
except
ImportError
:
oauth_available
=
False
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
@@ -49,7 +53,8 @@ if __name__ == '__main__':
...
@@ -49,7 +53,8 @@ if __name__ == '__main__':
app
.
register_blueprint
(
admi
)
app
.
register_blueprint
(
admi
)
app
.
register_blueprint
(
gdrive
)
app
.
register_blueprint
(
gdrive
)
app
.
register_blueprint
(
editbook
)
app
.
register_blueprint
(
editbook
)
app
.
register_blueprint
(
oauth
)
if
oauth_available
:
app
.
register_blueprint
(
oauth
)
Server
.
startServer
()
Server
.
startServer
()
...
...
cps/about.py
View file @
eef4787b
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
from
flask
import
Blueprint
from
flask
import
Blueprint
from
flask_login
import
login_required
from
flask_login
import
login_required
import
db
from
cps
import
db
import
sys
import
sys
import
uploader
import
uploader
from
babel
import
__version__
as
babelVersion
from
babel
import
__version__
as
babelVersion
...
...
cps/editbooks.py
View file @
eef4787b
...
@@ -26,7 +26,7 @@ from cps import config, language_table, get_locale, app, ub, global_WorkerThread
...
@@ -26,7 +26,7 @@ from cps import config, language_table, get_locale, app, ub, global_WorkerThread
from
flask
import
request
,
flash
,
redirect
,
url_for
,
abort
,
Markup
,
Response
from
flask
import
request
,
flash
,
redirect
,
url_for
,
abort
,
Markup
,
Response
from
flask
import
Blueprint
from
flask
import
Blueprint
import
datetime
import
datetime
import
db
from
cps
import
db
import
os
import
os
import
json
import
json
from
flask_babel
import
gettext
as
_
from
flask_babel
import
gettext
as
_
...
...
cps/helper.py
View file @
eef4787b
...
@@ -19,13 +19,12 @@
...
@@ -19,13 +19,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
cps
import
config
,
global_WorkerThread
,
get_locale
from
cps
import
config
,
global_WorkerThread
,
get_locale
,
db
from
flask
import
current_app
as
app
from
flask
import
current_app
as
app
from
tempfile
import
gettempdir
from
tempfile
import
gettempdir
import
sys
import
sys
import
os
import
os
import
re
import
re
import
db
import
unicodedata
import
unicodedata
import
worker
import
worker
import
time
import
time
...
...
cps/opds.py
View file @
eef4787b
...
@@ -22,12 +22,11 @@
...
@@ -22,12 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# opds routing functions
# opds routing functions
from
cps
import
config
,
mimetypes
,
app
from
cps
import
config
,
mimetypes
,
app
,
db
from
flask
import
request
,
render_template
,
Response
,
g
,
make_response
from
flask
import
request
,
render_template
,
Response
,
g
,
make_response
from
pagination
import
Pagination
from
pagination
import
Pagination
from
flask
import
Blueprint
from
flask
import
Blueprint
import
datetime
import
datetime
import
db
import
ub
import
ub
from
flask_login
import
current_user
from
flask_login
import
current_user
from
functools
import
wraps
from
functools
import
wraps
...
...
cps/shelf.py
View file @
eef4787b
...
@@ -22,13 +22,11 @@
...
@@ -22,13 +22,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
flask
import
Blueprint
,
request
,
flash
,
redirect
,
url_for
from
flask
import
Blueprint
,
request
,
flash
,
redirect
,
url_for
from
cps
import
ub
,
searched_ids
from
cps
import
ub
,
searched_ids
,
app
,
db
from
flask_babel
import
gettext
as
_
from
flask_babel
import
gettext
as
_
from
sqlalchemy.sql.expression
import
func
,
or_
from
sqlalchemy.sql.expression
import
func
,
or_
from
flask_login
import
login_required
,
current_user
from
flask_login
import
login_required
,
current_user
from
web
import
render_title_template
from
web
import
render_title_template
from
cps
import
app
import
db
shelf
=
Blueprint
(
'shelf'
,
__name__
)
shelf
=
Blueprint
(
'shelf'
,
__name__
)
...
...
cps/web.py
View file @
eef4787b
...
@@ -40,10 +40,9 @@ import json
...
@@ -40,10 +40,9 @@ import json
import
datetime
import
datetime
from
iso639
import
languages
as
isoLanguages
from
iso639
import
languages
as
isoLanguages
import
re
import
re
import
db
import
gdriveutils
import
gdriveutils
from
redirect
import
redirect_back
from
redirect
import
redirect_back
from
cps
import
lm
,
babel
,
ub
,
config
,
get_locale
,
language_table
,
app
from
cps
import
lm
,
babel
,
ub
,
config
,
get_locale
,
language_table
,
app
,
db
from
pagination
import
Pagination
from
pagination
import
Pagination
from
sqlalchemy.sql.expression
import
text
from
sqlalchemy.sql.expression
import
text
...
...
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