Code Monkey home page Code Monkey logo

obsidian-pandoc's Introduction

Hi, I'm Oliver!

I'm currently studying computer science and mathematics at the Australian National University.

I've built everything from control panels for rocket engine testing rigs to an algorithm for diagnosing eye disease.

I've interned at Jane Street, built language model interpretability tools at Redwood Research, and built user interfaces for scientific instruments at Liquid Instruments.

I'm interested in AI safety and software engineering. Feel free to reach out!

Email: (@) oliver.leo.balfour $ gmail . com. Resume: resume-oliver-balfour.pdf

Oliver's GitHub stats

obsidian-pandoc's People

Contributors

clemens-e avatar frogkind avatar janlo avatar kostapc avatar lishid avatar oliverbalfour avatar phillipjohnston avatar taurelas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obsidian-pandoc's Issues

Release as a 'Community Plugin'?

Thank you so much for making this plugin! I love pandoc, and was considering writing a plugin for Obsidian with this functionality until I found this one. Are there plans to have it added to the 'Community Plugins' in Obsidian?

Batch export feature?

I'm not sure what the interface for this would be yet, but I'd like this personally for publishing my PKMS and several people on Discord have requested it. Example:

I wonder how feasible batch outputs would be 👀 , perhaps by specifying a (yaml) query
(@ foreveryone)

I'm thinking a "Pandoc Plugin: Batch export" option in the command palette, which comes up with a modal dialog. The modal would have some sort of very simple query system (eg fields for tags, search terms, YAML metadata, etc.) and options for a format to export to and a folder to export to.

Exporting saves to the root of the vault by default

If you export a file in a subfolder, the export is apparently saved to the root of the vault (I haven't seen this as my vault is one giant flat folder)

For some types like HTML which use relative paths to embed images, this behaviour is buggy. It should save next to the file exported like the documentation says.

I'll add a default export location setting though so you can specify a certain subfolder or choose to save exports next to the files they were exported from. This is instead of #8.

Self-containing HTML files

As stated in Pandoc User’s Guide, there exists a parameter (--self-contained) which creates a self-containing HTML file. Said file has no dependencies and is useful when it comes to portability without worrying about the images, videos, etc. being transformed as well.

Since the current HTML to HTML conversion doesn't use Pandoc -and by extension no Pandoc parameters-, I was wondering if there is a way to implement this parameter in order to create self-containing HTML files.

Cheers.

Setting to open file automatically when it's exported?

Using a cross platform wrapper around xdg-open (this node module looks useful)

Another consideration: with the core Obsidian export to PDF feature, if you've saved as a PDF and still got the PDF open, it still opens a new PDF viewer. The simplest way to work around this is to add an option to disable the auto-open feature in the settings, so you can open it manually.

Simplify settings UI

Have as few settings as possible without compromising on features. Collapse settings into one, have very good defaults, etc. Adding more config options just adds more work when using it. You should be able to never open the settings and have good results all the same.

request: option to set attachments folder

Currently, if you have embedded images in your note, they must be in the same directory as the note to be exported.

I ask that an option to set the designated attachments folder is added, so as to not have to move the images to the note directory every time you want to export something.

Pandoc template support

Requested by @eleanorkonik on the Discord's #creative channel

Basically, you can write template files for most output formats which use a templating language to include bits of the input document. Using the Pandoc CLI the command will have a --template=file.tex if you've got a template called file.tex in the working directory or ~/.pandoc/templates.

My idea for the UX is to have a setting where you list files anywhere in your vault that you'd like to be templates (or specify a template directory?). Then, when you export, if there are any custom templates for that export type you should be prompted for the template you want, including the default one.

Related links:

Inject CSS in HTML export

Hello! First of all this plugin is excellent. I would like to know if there is a possibility to export your notes to html but keeping the CSS style of your Obsidian theme. It would be really helpful because I want to use github and netlify to manage a personal blog so I could export my notes directly with the css settings already included.

Best regards.

Feature request: export whole folder into dokuwiki with internal links preserved

Great Plugin

Great plugin, was wating for this since ages

Current Issue

  • When currently export .md to any format, internal links [[Link]] doesn't work

Dokuwiki

  • Exporting whole folder as .txt files with dokuwiki formatting, one can upload it to dokuwiki server, hence internal links would be preserved

Benefits

  • One can directly publish his/her work on dokuwiki server

pdf-engine xelatex is not compatible with output format pdf

Hi,

I have pandoc version 2.7 on my computer and also TexLive (with pdflatex.exe programme inside).
When I try to export a md note to a pdf note with your plugin (it works in command lines with pandoc), I receive this message :

"pandoc export failed: pdf-engine xelatex is not compatible with output format pdf"

Please could you tell me how I could solve this problem?

Regards,

Support internal note embeds (with recursion limits)

The ![[note name]] syntax for embedding files currently doesn't work.

This is a little tricky as it involves loading note name.md and then applying my markdown rendering + post-processing stages. This code is currently coupled with the Pandoc subprocess spawning code so a minor refactor is required.

This feature will also have to be careful about recursion - if a note is embedded within itself any number of layers deep (you could have normal recursion, mutual recursion, etc.), you will get an infinite loop.

Note to self: see this bug report for a suggestion on how to handle recursive note embeds.

Error: Pandoc Export Failed

OS: ElementaryOS Hera (based on Ubuntu 18.04.4 LTS)

Issue: I cannot get working the plugin in Linux although I use pandoc CLI very often without any problem. The output of which pandoc command inside the terminal is right: /usr/bin/pandoc. I've install pandoc from a .deb package and I'm wondering if it's because some path divergence from the installation method; but I'm lost. I attached the Obsidian console output of the errors for every path I have find a pandoc file.

Any idea of what is going wrong?

Screenshot from 2021-07-13 23-45-03

Allow adding arbitrary arguments to the pandoc invocation (for basic citation support)

Relates to #21 - this is a quick intermediate fix to support citations, at the cost of being slightly less user friendly (docs can help though).

The idea is there should be a setting where you can add stuff like this to the command (from SkepticMystic):

--citeproc --csl "https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl" 
--bibliography "Zotero Exports\My Library.json" 
--reference-doc="Pandoc\Templates\APA7.docx" 

Embed syntax with block references doesn't work

Embedding entire notes via ![[note]] works fine, but adding block references to the mix like ![[note^uid]] or even ![[^uid]] (which embeds a block inside the current note) will not work.

The concerning part is it will fail silently - no error notification. It eventually generates an export file but it takes absurdly long (presumably waiting for a timeout of some kind). The export just displays note > uid instead of the embedded note as desired.

Note to self: be careful not to regress the recursion limiting behaviour introduced in #5.

Is there an Obsidian API function to turn a ![[note^uid]] embed string into a source markdown string or similar? That would be a far more scalable way of doing this. (edit: yes, there's a method in the metadata cache API)

Feature Request: Support for Dataview plugin on a note

Hi! I would like to ask if there is any chance to make a dataview plugin integration with the pandoc plugin.

Today I tryed to export a note to html but the plugin show me this in the console.

image

So, in this sense it would be very useful if you could render the kind of notes that have dataview tables and lists with pandoc.

Thanks in advance.

Removing links to other obsidian notes in the output (PDF)

** removing markdown links**

your plugin is released with an awsome feature, the possibility in the settings to choose the way links will be processed.
When I use pandoc, the output contains links to other notes between brackets. I do not want these links to be active, but I would like the brackets to be removed as well. Do you know how this task is done in your plugin (which part of the command line is responsible for that?)

Regards,

Damien

Preserve CSS settings

We once had a discussion about the possibility of preserving/adding CSS settings for export to PDF.
Since it is not listed in your features, I wonder if this is still pending? Is it even on your roadmap?

Feature request: export from outline, and/or nested inclusions

Is it possible be able to export a document from a nested markdown outline of inclusions ![[page(n)]] so that it removes the indentations before exporting? That way I can order different pages as sections of a single manuscript for compilation?

  • [[page_1]]
    • [[page_4]]
  • [[page_5]]
    • [[page_2]]
      • [[page_3]]
        • [[page_8]]
    • [[page_7]]
  • [[page_6]]

And/Or

Be able to include in an export an inclusion on a page that I am including. For example in a page I exporting [[page_1]], include "![[page_2]]" where that page include another "![[page_3]]

The first option would allow for compilation of document organized with the outliner plugin, creating functionality like Scrivener!

Thank you in advance!

Support Pandoc citation syntax

Suggested by Mara & SkepticMystic on Discord #plugins

See https://pandoc.org/MANUAL.html#citations

We'll need to
a) add a setting to specify a database file
b) parse [@foo, p. 33] syntax into whatever Pandoc likes best
c) add a --citeproc option to the CLI commands
d) ...

This will be enormously helpful in conjunction with Zotero and the Obsidian citation plugin

This may be a fair bit of work. I'll tentatively mark it for the 0.2.0 release and push it back a week or two if needed (possibly after submission to the community plugins list).

Failed to load plugin obsidian-pandoc-plugin

Hi,

I have tried to load your last release in my vault but the message I have received was:

"failed to load plugin obsidian-pandoc-plugin"

The plugin cannot be activated in Obsidian.

Regards.

Support for mediawiki output

The "official" source of documentation at my company is in Mediawiki, but I much prefer to write in Markdown in Obsidian. Sometimes, I need to transform my notes into real documentation, so it'd be great if I could do it via this plugin.

Pandoc supports mediawiki as an output format.

Thanks!

Feature Request: Export a markdown folder as a single document

Great plugin. I tend to break my writing projects into separate sections/chapters - sometimes a large number of them. I control their order by name e.g. 000 Introduction, 002 Chapter 1, 003 Chapter 1 Notes, 004 Chapter 2

What would be useful is if the export could be done on a folder. It would then run through the files in alphabetical order and export to the requested format as a single document. I know applications like Zettlr can do this for nested folders ("projects") but a single folder and its md content would be sufficient for me. The pandoc command itself is pretty straightforward - just passing multiple filenames as the input instead of just one.

I'd like to help but need to get my head around how plugins work first!

TypeError: i.addChild is not a function

I tried to export a file (I tried two different files, actually) and got the following error:

image

I tried exporting as .docx using pandoc and the export as html without pandoc option.

Multimedia embeds (PDF, audio, etc.)

For the HTML output, it might be nice to have PDF embeds work (note: be careful with the ![[doc.pdf#page=number]] syntax). Audio/video is relatively easy, not sure about PDF though.

For export types other than HTML, multimedia embeds should just be stripped entirely. There's no value in leaving behind filenames or other artefacts, it should just be purged.

Documentation improvements

  • Add example files for each export format to an examples subfolder
  • Add instructions for how to write for each export type
    • Slideshow formats use --- (ie <hr>) to demarcate slides
    • You can use ---\ntitle: my title\n--- YAML frontmatter
  • Explain what sort of new workflows this plugin enables
    • Writing books - just use ![[Chapter1]] ![[Chapter2]] ... and export as PDF/ePub/Word/etc
    • Fancy presentations - explain Reveal.js
    • Drafting LaTeX documents and eBooks
    • Making static websites (like Obsidian publish, but you can put them on a USB drive or use GitHub Pages/Jekyll)
    • Writing assignments in Obsidian and exporting them to whatever format you need them in
    • Explain obscure export types and why they're worth using
    • Writing Word documents without Word
    • Ultimately, it lets you do more inside Obsidian (centralised PKMS) and in a simpler interface, and still interface with the outside world
  • Update the list of caveats and the screenshot
  • Mention you can put tags in YAML frontmatter to hide them in the output
  • Mention #15 and the fix for it if it's just a PATH configuration issue

LaTeX/PDF export templates

Suggested by @ argentum on Discord # general

This would let you customise the LaTeX preamble, packages, fonts, etc. without having to export to TeX, manually edit, and manually invoke pdflatex. Super cool idea for reducing friction in the export workflow, and the Zettlr devs have done the hard work designing the UX already.

Docs: https://docs.zettlr.com/en/academic/custom-templates/

This is definitely a post 0.2.0 thing, and it will come after the bibliography work too

Can't find Pandoc even though Path has been set - Windows

Hi @OliverBalfour,

I'm a noob user. I reached the settings panel with the pandoc path to the folder which has pandoc application. But it seems that Pandoc is not enabled yet as it says Pandoc is not installed or accessible on your PATH. This plugin's functionality will be limited.

image
image

Checked again in the terminal:
image

Thanks Oliver.

Yaml frontmatter processing

** yaml metadata **

I have noticed that the only metadata from the YAML frontmatter which appears to be processed by the pandoc-obsidian plugin is the title (--metadata title=). Why other elements (subtitle, author, date) do not appear in the PDF ?

Could you tell me please if there is a way to fix it?

Regards,

Damien

Remove outline indentation before export?

I like to write with Obdisian's outliner plugin, but would like to export the file without the outline markup. Is it possible to automate the removal of outline indentation before export? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.