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

Exporting in markdown as an option #14

Closed
argenos opened this issue Jul 2, 2020 · 12 comments
Closed

Exporting in markdown as an option #14

argenos opened this issue Jul 2, 2020 · 12 comments

Comments

@argenos
Copy link

@argenos argenos commented Jul 2, 2020

Would it be possible to add support for markdown? Although that might not be relevant for Roam, this tool is great and its functionality is a lot more universal! Exports to markdown would help share annotations to non-roam users (via email!) and e.g. for people using Obsidian. This might be out of scope, but I thought I'd ask!

@melat0nin
Copy link
Owner

@melat0nin melat0nin commented Jul 2, 2020

Thanks for the suggestion. I think you're describing a different (albeit useful) tool, however, which would require quite a lot of refactoring. There are probably other tools better equipped to do this -- various Zotero export translators exist to output various formats so they would be a good place to start. That said, if there was demand in the future this might serve as a basis for a separate markdown exporter.

There's also the possibility to convert from JSON to markdown -- something like this might do the trick https://github.com/IonicaBizau/json2md (untested)

@argenos
Copy link
Author

@argenos argenos commented Jul 2, 2020

I've used Zotfile for a while to extract annotations, but I haven't seen yet any other export plugins that combine both the metadata and my highlights and comments. But I understand that this might be not straightforward over here. Thanks for the suggestion! I'll give the repo above a try!

@melat0nin
Copy link
Owner

@melat0nin melat0nin commented Jul 2, 2020

It's certainly a cool and useful idea, if I get some time I'll see how much work would be required to convert the output. I'd need to think about whether it merits a separate project though, given that it would no longer be Roam-specific, plus I'm sure it would be more complex than it might appear at first (these things always are).

@argenos
Copy link
Author

@argenos argenos commented Jul 9, 2020

Do you have any pointers on how to build the xpi from source files? I'm playing around with this locally, but have no idea how to test this. Thanks!

@melat0nin
Copy link
Owner

@melat0nin melat0nin commented Jul 9, 2020

Do you have any pointers on how to build the xpi from source files? I'm playing around with this locally, but have no idea how to test this. Thanks!

Just download the whole thing repo and zip it, then change the extension to .xpi (after making your changes, obvs). Testing within Zotero is a bit more involved; you have to close it first, then delete extensions.json from your Zotero profile folder, then replace the existing xpi in the extensions folder of your Zotero profile (make sure you use the identical file name). Alternatively, just remove the add-on, restart, add it, restart, then test (but this gets tedious pretty quickly!).

@linxule
Copy link

@linxule linxule commented Jul 19, 2020

I made this simple attempt to have Zotero write some info in MD as a QuickCopy option. Open to any suggestions and advice.

@argenos
Copy link
Author

@argenos argenos commented Jul 28, 2020

It took me a little while, but I ended up writing a plugin as well: https://github.com/argenos/zotero-mdnotes

@linxule I also went through the translator -> plugin path as mentioned in #17 since I couldn't access a few things (collections and related items I believe). I like the quick copy translator though! Any way that we can use preferences to avoid roam-specific formatting?

@argenos
Copy link
Author

@argenos argenos commented Jul 28, 2020

@melat0nin thanks for the pointers, they helped a lot! I used your plugin as a starting point, so I added a little acknowledgement at the bottom of my README. I hope that's alright!

@melat0nin
Copy link
Owner

@melat0nin melat0nin commented Jul 28, 2020

@argenos that's extremely cool, nice work! It's great you've worked out the preferences interface, that was my next challenge... I'll be borrowing some of your code back 😁

@argenos
Copy link
Author

@argenos argenos commented Jul 28, 2020

It's the least I can do! 😁

@linxule
Copy link

@linxule linxule commented Jul 28, 2020

It took me a little while, but I ended up writing a plugin as well: https://github.com/argenos/zotero-mdnotes

@linxule I also went through the translator -> plugin path as mentioned in #17 since I couldn't access a few things (collections and related items I believe). I like the quick copy translator though! Any way that we can use preferences to avoid roam-specific formatting?

Your plug-in looks amazing and I'm excited to try it soon! Using preferences to choose alternative formats makes sense and I am willing to give it a try. Would you be able to point me to some tools/softwares that might help facilitate this? Many thanks in advance!

@argenos
Copy link
Author

@argenos argenos commented Jul 29, 2020

@linxule I don't know if there's a better way to do it, but I tried to do that here: https://github.com/argenos/zotero-mdnotes/blob/master/content/mdnotes.js#L240

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

Successfully merging a pull request may close this issue.

None yet
3 participants