-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: augmented feats Added two features which are allowed by the Notion endpoint API and can be useful to further customize the export: - recursive, allows to export one block and alla the block children - no-files, to avoid downloading files like pdf or images (as it is optional from the UI) Also, addeda function `getMdFiles` to dump the files in a folder (this is useful if we want to use a function from langchain, for example, to load all files in a folder). * chore: Readme updated * chore: remove comment * feat: added new flags * Clean-up * Introduce config object. * Adapt readme. --------- Co-authored-by: Guille <guillermo.c.martinez@dcsl.com>
- Loading branch information
1 parent
c7c353b
commit 841f351
Showing
5 changed files
with
49 additions
and
13 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
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,19 @@ | ||
/** Configuration options that are passed to the Notion API. */ | ||
export interface Config { | ||
/** Export embedded image and pdf files, not only the (text) content. Default: false */ | ||
includeContents?: boolean | ||
/** Export children subpages recursively. Default: false */ | ||
recursive?: boolean | ||
/** Default: UTC */ | ||
timeZone?: string | ||
/** Default: en */ | ||
locale?: string | ||
/** Export all blocks of the DB/page or just the ones in the current view. Default: "all" */ | ||
collectionViewExportType?: "currentView" | "all" | ||
} | ||
|
||
export const defaultConfig: Config = { | ||
timeZone: "UTC", | ||
locale: "en", | ||
collectionViewExportType: "all", | ||
} |
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