diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 7713622..7541226 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -9,10 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.7' + - uses: actions/setup-python@v1 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/Dockerfile b/Dockerfile index a9c13f4..14cc3d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,8 @@ FROM python ARG SOURCE_BRANCH RUN pip install git+https://github.com/shuichiro-makigaki/mendeley_cli@${SOURCE_BRANCH} +ENV MENDELEY_CLIENT_ID=9999 +ENV MENDELEY_CLIENT_SECRET=dummy +ENV MENDELEY_REDIRECT_URI=http://localhost:8888 ENTRYPOINT [ "mendeley" ] CMD [ "--help" ] diff --git a/README.md b/README.md index 932c1b9..ef34579 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,24 @@ -# mendeley_cli +# mendeley-cli CLI for Mendeley # Install ``` -pip install mendeley_cli +pip install mendeley-cli +``` + +Docker image is also available. + +``` +docker image pull makisyu/mendeley ``` # How to get Mendeley API token To create, update, and delete resources in your Mendeley library via Mendeley API, OAUTH2 flow is required. -We have to register and mark this mendeley_cli as a trusted application in your Mendeley (Elsevier) account by yourself. +We have to register and mark this mendeley-cli as a trusted application in your Mendeley (Elsevier) account by yourself. -## 1. Register mendeley_cli as a trusted app +## 1. Register mendeley-cli as a trusted app https://dev.mendeley.com/myapps.html @@ -22,9 +28,9 @@ Register a new app (if not exists) All fields are required. -* **Application name** MendeleyCLI -* **Description** MendeleyCLI -* **RegirectURL** http://localhost:8888 +* **Application name**: MendeleyCLI +* **Description**: MendeleyCLI +* **RegirectURL**: http://localhost:8888 * Port number is a variable; >1024 is recommended. * Generate secret, and save it securely. * Submit diff --git a/mendeley_cli/__init__.py b/mendeley_cli/__init__.py index 89bfcb5..efef769 100644 --- a/mendeley_cli/__init__.py +++ b/mendeley_cli/__init__.py @@ -99,9 +99,10 @@ def cmd(): * MENDELEY_CLIENT_SECRET - * MENDELEY_TOKEN - * MENDELEY_REDIRECT_URI + + * MENDELEY_OAUTH2_TOKEN_BASE64 + """ pass diff --git a/setup.py b/setup.py index 7b0dc2d..109d781 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,8 @@ from setuptools import setup, find_packages setup( - name='mendeley_cli', - version='0.1.1', + name='mendeley-cli', + version='0.1.2', packages=find_packages(), include_package_data=True, install_requires=Path('requirements.txt').read_text().splitlines(),