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) 
raw docstring

->spaces-affixesclj

(->spaces-affixes text)

-mainclj

(-main & args)

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
               }
raw 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~~ '
raw docstring

code->mdclj

(code->md prefix text language)

create-readme!clj

(create-readme! secret page-id)

docs-pathclj


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
raw 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)
raw docstring

fetch-childrenclj


fetch-notion-childrenclj

(fetch-notion-children id)

heading-charsclj


helpclj


md-charsclj


no-annotationsclj


page-idclj


parse-bulleted-list-itemclj

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

parse-calloutclj

(parse-callout prefix)

An emoji plus a text

An emoji plus a text
raw 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
raw docstring

parse-codeclj

(parse-code prefix)

returns ```language code;

returns ```language
code;
```
raw docstring

parse-column!clj

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

Returns the children content

Returns the children content
raw docstring

parse-column-list!clj

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

Returns the children content

Returns the children content
raw docstring

parse-dividerclj

(parse-divider _)

parse-equationclj

(parse-equation prefix)

parse-fileclj

(parse-file kind)

Returns a 'type'

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

parse-headingclj

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

parse-image!clj

(parse-image! {:keys [image]})

Creates a file and returns a file link markdown formatted It assumes it's a png file

Creates a file and returns a file link markdown formatted
It assumes it's a png file
raw 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
raw docstring

parse-numbered_list_itemclj

(parse-numbered_list_item prefix)
https://www.markdownguide.org/basic-syntax/#ordered-lists
raw 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.
raw docstring

parse-quoteclj

(parse-quote prefix)
https://www.markdownguide.org/basic-syntax/#blockquotes-1
raw 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
raw docstring

parse-template!clj

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

Parses the template type from notion.

Parses the template type from notion.
raw 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
raw 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
raw 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
raw 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
raw 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
raw docstring

secretclj


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
raw docstring

spaces-prefixclj

(spaces-prefix text)

Example: input ' abc' output ' '

Example: 
input '  abc' 
output '  '
raw docstring

spaces-suffixclj

(spaces-suffix text)

Example: input 'abc ' output ' '

Example: 
input 'abc  ' 
output '  '
raw docstring

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

× close