Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown as a default markup #592

Open
villanella opened this issue Mar 7, 2023 · 9 comments
Open

Markdown as a default markup #592

villanella opened this issue Mar 7, 2023 · 9 comments

Comments

@villanella
Copy link

villanella commented Mar 7, 2023

We want to edit Doorstop files as markdown with header instead of yml:

  1. to use third-party edit tools. Some editors like VSC, Vim (Vimwiki) support very useful markdown editing features: tables formatting and alignment, custom syntax highlight etc;
  2. to edit text without indents. Editing tables in markdown is very uncomfortable when we have to keep indents.
@villanella villanella changed the title Markdown as default markup Markdown as a default markup Mar 7, 2023
@jacebrowning
Copy link
Member

This seems to be a duplicate of #295.

@neerdoc
Copy link
Collaborator

neerdoc commented Dec 30, 2023

@villanella Have you looked at #295? It is probably the best we can do since we do not want to go away from yaml as the file format.

@villanella
Copy link
Author

I use this feature "markdown with yaml header" about 1 year in beta-b8 version. I can't upgrade Doorstop to newer versions, because markdown is supported only in beta releases, that aren't stable . Are you planning to support this feature in stable (not beta) release?

@neerdoc
Copy link
Collaborator

neerdoc commented Dec 30, 2023

Always nice to hear from active users!

Yes, it will be supported in stable as it is already included in the development branch.

I've been way to busy with my day job to be able to spend enough time here for the last 2 years, but I've found some time now and is currently working on reaching the 3.0 milestone.

@robtaylor
Copy link
Collaborator

What I'm needing is a way to convert yml format items to markdown. My first attempts haven't gone well..
Any clues?

@robtaylor
Copy link
Collaborator

robtaylor commented Sep 27, 2024

actually, this almost did the job:

import doorstop
root=doorstop.Document("./reqs", "./reqs")
for i in root.items:
     i.load()
     i.itemformat="markdown"
     i.save()

Followed by renaming to .md.

Unfortunately I still get an error on loading the documents:

WARNING: REQ: no items
ERROR: no item with UID: REQ001

@robtaylor
Copy link
Collaborator

Ah, discovered my mistake: .doorstop.yml should contain:

settings:
    itemformat: markdown

@villanella
Copy link
Author

Ah, discovered my mistake: .doorstop.yml should contain:

settings:
    itemformat: markdown

Yes, I know these settings, but current release (not beta) version doesn't support markdown.
And maybe it's not possible to set markdown as default markup for the whole project, without defining this parameter in each document's doorstop.yml.

@robtaylor
Copy link
Collaborator

Ah, discovered my mistake: .doorstop.yml should contain:

settings:
    itemformat: markdown

Yes, I know these settings, but current release (not beta) version doesn't support markdown.

We use PDM for all our python projects, and so its easy to add the beta version as a dependency without messing up older projects (pdm run doorstop)

And maybe it's not possible to set markdown as default markup for the whole project, without defining this parameter in each document's .doorstop.yml.

Yeah, I haven't figured out yet if it gets inherited down the tree... I suspect not, and I might throw a patch together if not.

So it sounds like really looking for is export and import from markdown? I can imagine that could get quite tricky. I'm thinking of having non-coders using the nice markdown editor in vscode to edit requirements. I'd be interested to hear your experiences!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants