Liking cljdoc? Tell your friends :D

notion-to-md.core


->mdclj

(->md {:keys [results]} file-name)

input: :results (coll) from the notion API https://api.notion.com/v1/blocks/<id>/children file-name: the current md file being generated output: an md file with markdown formatted string as content (and other possible md files created)

input: :results (coll) from the notion API https://api.notion.com/v1/blocks/<id>/children
file-name: the current md file being generated
output: an md file with markdown formatted string as content (and other possible md files created) 
sourceraw docstring

->spaces-affixesclj

(->spaces-affixes text)
source

-mainclj

(-main & args)
source

apply-annotationsclj

(apply-annotations
  {:keys [annotations] :or {annotations no-annotations} :as text-element})

Example: input: 'abc' marked as bold output 'abc' annotations: { bold: false, italic: false, strikethrough: false, underline: false, <-- unsupported code: false, color: default <-- unsupported }

Example: 
input: 'abc' marked as bold 
output '*abc*'
annotations: {
               bold: false,
               italic: false,
               strikethrough: false,
               underline: false, <-- unsupported
               code: false,
               color: default <-- unsupported
               }
sourceraw docstring

apply-space-affixesclj

(apply-space-affixes raw-text processed-text)

Example: raw-text ' abc ' processed-text '~~abc~~' output ' ~~abc~~ '

Example: 
raw-text ' abc '  processed-text '~~abc~~'
output ' ~~abc~~ '
sourceraw docstring

code->mdclj

(code->md prefix text language)
source

create-file!clj

(create-file! caption url md-file-name)

Creates a file and returns 'caption'

Creates a file and 
returns '![caption](file-path)'
sourceraw docstring

create-readme!clj

(create-readme! secret page-id)
source

docs-pathclj

source

element->contentclj

(element->content prefix file-name)

input: prefix (optional) to prepend to md content if nested file-name the current md file-name element: a block from the notion API output: (may create an md files) string with markdown content

input: prefix (optional) to prepend to md content if nested
       file-name the current md file-name
       element: a block from the notion API
output: (may create an md files) string with markdown content
sourceraw docstring

element->mdclj

(element->md results & opts)

input: :results (coll) from the notion API https://api.notion.com/v1/blocks/<id>/children opts: prefix: nil or a prefix file-name: the current md file being generated output: a markdown formatted string (and possible md files created)

input: :results (coll) from the notion API https://api.notion.com/v1/blocks/<id>/children
opts: prefix: nil or a prefix
file-name: the current md file being generated
output: a markdown formatted string (and possible md files created)
sourceraw docstring

fetch-childrenclj

source

fetch-notion-childrenclj

(fetch-notion-children id)
source

heading-charsclj

source

helpclj

source

make-headingclj

(make-heading text)
source

md-charsclj

source

no-annotationsclj

source

page-idclj

source

parse-bulleted-list-itemclj

(parse-bulleted-list-item prefix)
https://www.markdownguide.org/basic-syntax/#unordered-lists
sourceraw docstring

parse-calloutclj

(parse-callout prefix)

An emoji plus a text

An emoji plus a text
sourceraw docstring

parse-child-page!clj

(parse-child-page! current-file)

Creates a file and returns a link to it

Creates a file and returns a link to it
sourceraw docstring

parse-codeclj

(parse-code prefix)

returns ```language code;

returns ```language
code;
```
sourceraw docstring

parse-column!clj

(parse-column! prefix file-name)

Returns the children content

Returns the children content
sourceraw docstring

parse-column-list!clj

(parse-column-list! prefix file-name)

Returns the children content

Returns the children content
sourceraw docstring

parse-dividerclj

(parse-divider _)
source

parse-equationclj

(parse-equation prefix)
source

parse-fileclj

(parse-file kind)

Returns a 'type'

Returns a '[type](link)' 
sourceraw docstring

parse-headingclj

(parse-heading heading-key)
See https://developers.notion.com/reference/block heading blocks
sourceraw docstring

parse-image!clj

(parse-image! md-file-name)

Returns a 'caption' If it's a notion hosted file, creates it

Returns a '![caption](url)' 
If it's a notion hosted file, creates it
sourceraw docstring

(parse-link-to-page! {:keys [link_to_page]})

Returns the content from the page. Doesn't return a markdown link

Returns the content from the page. 
Doesn't return a markdown link
sourceraw docstring

parse-numbered_list_itemclj

(parse-numbered_list_item prefix)
https://www.markdownguide.org/basic-syntax/#ordered-lists
sourceraw docstring

parse-paragraphclj

(parse-paragraph {:keys [has_children id paragraph]})

Paragraph blocks Paragraph block objects contain the following information within the paragraph property: Property Type Description text array of rich text objects Rich text in the paragraph block. children array of block objects Any nested children blocks of the paragraph block.

Paragraph blocks
Paragraph block objects contain the following information within the paragraph property:
Property	Type	Description
text	array of rich text objects	Rich text in the paragraph block.
children	array of block objects	Any nested children blocks of the paragraph block.
sourceraw docstring

parse-quoteclj

(parse-quote prefix)
https://www.markdownguide.org/basic-syntax/#blockquotes-1
sourceraw docstring

parse-synced-block!clj

(parse-synced-block! {:keys [synced_block has_children id]})

Parses a synced_block, returns it's original content

Parses a synced_block, returns it's original content
sourceraw docstring

parse-template!clj

(parse-template! {:keys [template has_children id]})

Parses the template type from notion.

Parses the template type from notion.
sourceraw docstring

parse-textclj

(parse-text text-element)

input: a https://developers.notion.com/reference/rich-text output: if its a link, [text] (link), else, the text with Markdown surroundings

input: a https://developers.notion.com/reference/rich-text
output: if its a link, [text] (link), else, the text with Markdown surroundings
sourceraw docstring

parse-todoclj

(parse-todo prefix)

A TODO checkbox. If its checked, represent it as markdown

A TODO checkbox. If its checked, represent it as markdown
sourceraw docstring

parse-toggle!clj

(parse-toggle! {:keys [toggle has_children id]})

Returns a <details> html element that will be rendered as a button to fold content

Returns a <details> html element that will be rendered as a button to fold content
sourceraw docstring

parsersclj

(parsers kind prefix file-name)

input: type of notion element; optional prefix for recursiveness; current file-name output: (may create an md file) string with markdown content

input: type of notion element; optional prefix for recursiveness; current file-name
output: (may create an md file) string with markdown content
sourceraw docstring

placeholder-parserclj

(placeholder-parser element)

Parser not supported or not implemented. If there is a text, show it, else dump the element form

Parser not supported or not implemented.
If there is a text, show it, else dump the element form
sourceraw docstring

secretclj

source

sort-md-charsclj

(sort-md-chars coll)

They must be sorted this way to show fine at github

They must be sorted this way to show fine at github
sourceraw docstring

spaces-prefixclj

(spaces-prefix text)

Example: input ' abc' output ' '

Example: 
input '  abc' 
output '  '
sourceraw docstring

spaces-suffixclj

(spaces-suffix text)

Example: input 'abc ' output ' '

Example: 
input 'abc  ' 
output '  '
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close