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

YAML export does not export proper YAML or correctly spelled "starred" field #835

Closed
micahellison opened this issue Feb 8, 2020 · 5 comments
Labels
bug Something isn't working day one Issues related to Day One (dayoneapp.com) stale Inactive issue: will be closed soon if no activity

Comments

@micahellison
Copy link
Member

Bug report

  • Jrnl version: 2.2
  • How you installed Jrnl: pip install jrnl
  • Operating system [MacOS, Linux, Windows?]: Windows 10

Steps to repro:

jrnl --export yaml -o .\jrnltest

Expected results:

  • Export should be in YAML format
  • Fields should be spelled correctly

Actual results:

  • The output has YAML in it, but the entry contents are not encapsulated in a YAML field; instead there's just a space before the entry.
  • The "starred" field is spelled "stared"
title: Test
date: 2020-02-08 12:05
stared: False
tags:
 So, I was testing jrnl today, and I was wondering, what happens when I export to YAML?

Uncovered while reviewing the tests in PR #824.

Background/discussion

The YAML export's history is rooted in Day One compatibility (#159, #773, #349). That's fine, and it looks like we may need to preserve this behavior as a Day One export, but calling it a YAML export means that anybody expecting to extract/transform/load their jrnl anywhere else via YAML is going to have a bad time.

Maybe we rename the export type to something more appropriate to its intended function. Or, if the original target of this export can take proper YAML, then maybe we rework it. @MinchinWeb, any thoughts?

@micahellison micahellison added bug Something isn't working 🆕 New! day one Issues related to Day One (dayoneapp.com) and removed 🆕 New! labels Feb 8, 2020
@wren
Copy link
Member

wren commented Mar 13, 2020

Yup! I'm in favor of renaming it to clarify that it's DayOne-related.

@MinchinWeb Your opinion?

@MinchinWeb
Copy link
Contributor

The YAML export is designed to support DayOne (although I hope all exporters will do so), but it's actual roots are a modification of the Markdown exporter to include the entry metadata in a format useful as an input format for Pelican, a static site generator. This is why the files export with a .md file extension.

I'm fine with renaming it, but a more appropriate name would be along the lines of "Markdown with YAML front matter" or "Pelican Markdown"; i.e. nothing to do with DayOne.


"stared" appears to be an spelling mistake from when the exporter was first added; no reason to keep the error.

@MinchinWeb
Copy link
Contributor

MinchinWeb commented Mar 21, 2020

The (original) discussion about why the exporter is named the way it is is found in this pull request --> #258

MinchinWeb added a commit to MinchinWeb/jrnl that referenced this issue Apr 7, 2020
wren pushed a commit that referenced this issue Apr 11, 2020
wren pushed a commit that referenced this issue Apr 18, 2020
@stale
Copy link

stale bot commented Jun 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Jun 6, 2020
@micahellison
Copy link
Member Author

This was fixed by #907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working day one Issues related to Day One (dayoneapp.com) stale Inactive issue: will be closed soon if no activity
Projects
None yet
Development

No branches or pull requests

3 participants