doorstop icon indicating copy to clipboard operation
doorstop copied to clipboard

Reverse import from md to document

Open villanella opened this issue 1 year ago • 2 comments

Hello! Because our team loves markdown and uses it in all the integrations, I'll be very happy with reverse import feature)

Use case

  1. Analyst publishes document with requirements to one markdown file: doorstop publish REQ REQ.md and commits/merges it into developer's branch.
  2. Lead Developer/Architect/Another analyst reviews and corrects REQ.md.
  3. Analyst makes reverse import doorstop import REQ.md REQ
  4. All changed items are updated in REQ, removed items are removed, new items are added with uid and level defined by markdown, and default values for other attributes. No necessary to import links, but it's important to keep the existing links while importing (import links is also good solution).

Example of exported (by doorstop publish) markdown to reverse import:

# 3.0 Functional requirements <small>REQ-000</small> {#REQ-001 }

The existing requirement with link and header.

*Parent links: UC-001*

## 3.1 REQ-001 {#REQ-001 }

The existing requirement without header.

## 3.2 New requirement <small>REQ-002</small> {#REQ-002 }

New requirement with level and header.

Result:

REQ-000:
  active: true
  derived: false
  header: |
    Functional requirements
  level: 3.0
  links: 
   - UC-001
  normative: true
  ref: ''
  reviewed: l0ocFFatmW8By7f3R7FV6QXELXY-HHzEjs5MsbARlas=
  text: |
    The existing requirement with link and header.

REQ-001:
  active: true
  derived: false
  header: ''
  level: 3.1
  links: |
   The existing requirement without header.

REQ-002:
  active: true
  derived: false
  header: |
    New requirement
  level: 3.2
  links: []
  normative: true
  ref: ''
  reviewed: null
  text: |
   New requirement with level and header.

villanella avatar Mar 07 '24 08:03 villanella

Maybe the item markdown format feature would be helpful? https://doorstop.readthedocs.io/en/latest/reference/item/

robtaylor avatar Sep 27 '24 14:09 robtaylor

Maybe the item markdown format feature would be helpful? https://doorstop.readthedocs.io/en/latest/reference/item/

We used a lot this feature, but it doesn't support many items in one document. This is because we need a converter "markdown document with many items to one yaml".

villanella avatar Sep 27 '24 23:09 villanella