mirror of
https://github.com/Findus23/PaperLibrary-cli.git
synced 2024-09-20 17:03:46 +02:00
21 lines
370 B
Python
21 lines
370 B
Python
|
import click
|
||
|
|
||
|
from paperlibrary.api import PaperLibraryAPI
|
||
|
from paperlibrary.config import url, auth_token
|
||
|
from paperlibrary.library import write_symlinks, update_pdfs
|
||
|
|
||
|
|
||
|
@click.group()
|
||
|
def cli():
|
||
|
pass
|
||
|
|
||
|
@cli.command()
|
||
|
def update():
|
||
|
api=PaperLibraryAPI(url,auth_token=auth_token)
|
||
|
write_symlinks(api)
|
||
|
update_pdfs(api)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
cli()
|