Comments (8)
Hi @Gnossos, I don't use Zettlr so I'm afraid I won't have time to develop/test for it.
I could do some testing/developing, as I stumbled upon the plugin myself and this fits pretty well into workflows with regard to Zettlr. Plus, I'm also a huge fan of keeping everything editor-agnostic and using options for those stuff.
from zotero-mdnotes.
Hey @nathanlesage, thanks for offering! I'm preparing the release right now, let me know if you have any questions about it or if there's anything I can do to help!
from zotero-mdnotes.
Hey @argenos Thanks! I've tested the current develop branch, which works like a charm for me (with the additions of #38 even more so); and with regard to the YAML frontmatter: I think there's plenty of options to explore here, and I would love to help developing the plugin further!
from zotero-mdnotes.
Hi @Gnossos, I don't use Zettlr so I'm afraid I won't have time to develop/test for it. Feel free to open a PR for it though! The only constraint for accepting PRs is that they remain editor-agnostic, if you add any editor-specific features they should be optional.
That being said, I believe the upcoming release with a custom format should allow you to do that (or most of it). I'd recommend waiting until v0.1.0 before starting on a PR.
from zotero-mdnotes.
Sorry, I learned about Mdnotes on the Zettlr forum, and the individual who posted about it seemed to be its author. It was presumptuous of me to assume you used Zettlr.
But with this aside, the option of using pandoc YAML syntax instead of the double brackets would still be useful. Since bibliographic information in a markdown document is frequently rendered with pandoc, formatting the metadata this way would save an extra step.
I believe Zettlr uses a subset of the pandoc YAML, which probably just means the Zettlr documentation only covers some of the allowable fields. The pandoc User's Guide describes them on p. 40ff.
from zotero-mdnotes.
Not to worry, that's the nice thing about markdown, the editor shouldn't matter much!
I don't use pandoc very often with markdown files (I tend to use LaTeX for final form writing), but whenever I need to use pandoc with bibliography, I tend to do it through the CLI, e.g. pandoc -s --bibliography biblio.bib --citeproc CITATIONS -o example24a.pdf
. I'm afraid I don't have time right now to go through the allowed fields in pandoc's YAML, but I did in part decide to work on the custom format to make use of the YAML frontmatter, so maybe the next release will take care of this! If it doesn't, maybe I'll revisit, but I can't promise I'll be able to add it myself.
from zotero-mdnotes.
Hi @Gnossos, I've added an xpi
in #35 for those that want to test the upcoming release beforehand. I haven't had a chance to look at into bibliography definitions in the YAML frontmatter, could you add a couple of examples/screenshots here?
My suspicion is that the templates, custom format and wildcards could get you 90% there, but at the expense of being able to use them somewhere else. Let me know if/how that works for you.
from zotero-mdnotes.
Hi, I am just doing this and it seems to work very well. I am doing it to share my zotero items to a hugo blog but I think this is extremely versatile. A person like me who knows jack about s..t can easily export the zotero items into practically any text-based file format just by creating a dummy file. I tried using pandoc
/citeproc
previously but couldn't figure out how to get it smooth and reliable.
The way I did it was to go through every hidden preference in about:config that I would be interested and also add those which are missing. In most cases remove everything except the basic value.
So for example if you want the below to be your yaml
frontmatter. Make a custom template for Zotero Metadata Template.md
like this. I used this option because as far as I can see it always exports for every file.
---
title: "{{title}}"
tags:
- {{tags}}
slug: "{{citekey}}"
lang: "{{language}}"
date: {{accessDate}}
draft: true
---
here is what you need to change/add in the about:config
:
bullet
first I just deleted this. find extensions.mdnotes.bullet
and delete the value
. Maybe there is some other kind of work it could be doing.. but not for me. I will define everything in my template or the individual strings. Maybe it's not really necessary since I removed all references to it.
title
You could also use shortTitle
if you preferred.
create preference extensions.mdnotes.placeholder.shortTitle
with value:
{"content":"{{field_contents}}", "link_style": "none", "list_separator": ", "}
tags
change extensions.mdnotes.placeholder.tags
to:
{"content":"{{field_contents}}", "field_contents": "{{content}}", "link_style": "no-links", "list_separator": "\n - ", "remove_spaces": "true"}
this will make the tags be a dashed list like this
tags:
- apples
- hotdogs
- friday
"list_separator": "\n - "
defines this with the value \n
being a new line, then -
(space dash space) to make the list. You could replace with comma if you wanted just make sure to also edit the yaml
frontmatter because it starts the list.
citekey
/slug
make sure the citekey
format is compatible with this use if you want it.
change extensions.mdnotes.placeholder.citekey
to:
{"content":"{{field_contents}}", "field_contents": "{{content}}", "link_style": "no-links"}
language
create preference extensions.mdnotes.placeholder.language
with value:
{"content":"{{field_contents}}", "link_style": "itemType", "list_separator": ", "}
accessDate
(this would probably be inappropriate in a lot of cases so you'd neede another way to set the date)
create preference extensions.mdnotes.placeholder.accessDate
with value:
{"content":"{{field_contents}}", "link_style": "itemType", "list_separator": ", "}
Questions and unresolved
So the above works the way I expect on the files I have tested it on.
I kept notes of all the things I changed and also made a template that have a lot of the values so you can test the results. I would be happy to share this if wanted, but it was pretty tedious to enter them all by hand.
- Is there way to export my custom preferences and/or a way to update a flat text file instead of using the
about:config
editor? I can't seem to find where zotero is storing this (on a mac). Was hoping for a~/.zotero
but no dice. It is probably in~/Library
somewhere but I have not searched. The chances are also not great to be able to edit a file in there but not sure if it's actually impossible in all cases. It could also be in the actual.app
itself. - Even better, would it be easy to make a fork of this extension that simply exports the unmodified values? If I understand properly, the relevant files are in /content and I see a
makefile
one level up so I am guessing those are the 4 files to create the extension? Maybe my english is good enough to read javascript and xml.. unless someone who can actually read javascript and xml gets to this first. - I was not able to de linkify the below, is there a hidden pref or is it hard coded? Could be worked around with a find/replace as in #74
url (external url)
- `DOI (external url)
pdfAttachments
(zotero url) - even with "Internal links" set to "no links"
- Have not used enough to know how behaviour is
extra
- The above is just for the front matter and inserting metadata. I need to play more to see how to fully generate pages such as with the parts where you would be expecting paragraphs and lists, notes etc.
- How to manage attachments particularly non-PDF as it seems eg #62 that images are not supported.
- I tried to use
/
in the filename to move to a directory as would be required by my use case but the files did not appear anywhere that I could find. Is this expected or is there a way to do it? If expected then I can work around it as well withmv
, but if possible then better because it eliminates 1 step. :)
Even exactly as-is this is a massive improvement over my workflow as it existed 12 hours ago so THANK YOU. <3
edit: on further experimentation I found changes needed and I adjusted the above:
tags
was a mess for a bunch of reasons but it works now.- in the
yaml
: a space is needed at the end of each line. if there is no space and the value is empty, the line break is skipped and the key for the next line becomes the empty line's value... it's a mess. idk if this is againstyaml
specs but hugo doesn't mind. - in the
yaml
: added double quotes in case of badly formatted values. in my case I had a title liketitle : subtitle
; because there is a space on either side of the colon it becomes a mess. wrapping the text in quotes protects from all kind of havoc, I am hoping.
from zotero-mdnotes.
Related Issues (20)
- What appears to be html markup often exported within note HOT 1
- mdnotes menus don't appear
- C9TAWKMI-apse HOT 2
- Formatting lost when exporting annotations
- "Full export note" not working HOT 2
- Export item childnote
- Preferences buttons not working HOT 2
- Creating links to exact position of pdf annotations with mdnotes
- Double-clicking the mdnotes file in zotero does not open
- MdNotes not generating anything (on Macbook 2023) HOT 2
- html2md: obtain span style background-color
- the wildcards is not working at Zotero Metadata Template.md HOT 1
- Cannot export a note HOT 1
- Sorry, I can't use this plugin and export to markdown. And my laptop is Mac M1 Pro.
- Any plans on zotero 7 support? HOT 1
- Please export the Zotero Info, Notes, Tags and Related
- (Macbook related) While export markdown file or create mdnotes file, mdnotes can't create the correct paper name but "undefined-zotero.md" HOT 1
- Can't automatically use citekey as mdnotes' title with the latest version of BetterBibTex HOT 9
- Mdnotes creation failed HOT 5
- The BBT gets the citation key, but there is no file export. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zotero-mdnotes.