-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from EgorDm/develop
Develop
- Loading branch information
Showing
25 changed files
with
707 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import click | ||
|
||
from notionsci.config import config | ||
from notionsci.connections.notion import parse_uuid_callback, ID | ||
from notionsci.sync.markdown import MarkdownPagesSync | ||
|
||
|
||
@click.group() | ||
def markdown(): | ||
""" | ||
Collection of Sync commands for Markdown documents | ||
""" | ||
pass | ||
|
||
|
||
@markdown.command() | ||
@click.argument('collection', callback=parse_uuid_callback, required=True) | ||
@click.argument('dir', required=True) | ||
@click.option('--force', is_flag=True, default=False, | ||
help='Ensures up to date items are also pushed to Zotero') | ||
def pages(collection: ID, dir: str, force: bool): | ||
""" | ||
Starts a sync of a collection to a folder of markdown files | ||
COLLECTION: Database ID or url | ||
DIR: Directory path to sync to | ||
""" | ||
notion = config.connections.notion.client() | ||
|
||
MarkdownPagesSync(notion, collection, dir).sync() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.