Giter Club home page Giter Club logo

Comments (15)

odkr avatar odkr commented on July 20, 2024 1

Okay, metadata elements don't report any type at all in the development version of Pandoc. I doubt that this is intentional. I'll file a bug with them.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

This is already fixed in the development branch. The functions that Pandoc provides for walking the AST simply don't cover metadata. I'm a bit busy right now, so it might will take a while before I'll come around to releasing a new beta.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

But thanks a lot for being such an avid and accurate reporter! I appreciate your help 😃.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

Pandoc v2.15 has made major change to Pandoc's Lua API. elem_type and walk no longer work as a consequence. Re-opening this for the time being.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

I’ve released a beta version that searches for citations in all metadata fields. I’d welcome feedback and testing, you can download it at https://github.com/odkr/pandoc-zotxt.lua/releases/tag/v1.1.0b3.

from pandoc-zotxt.lua.

njbart avatar njbart commented on July 20, 2024

Many thanks, but I’m afraid that after installing 1.1.0b3, my examples from the OP behave exactly as they did before, including no output at all for the nocite example.

(pandoc 2.16.2, Zotero 5.0.97-beta.57+07df7d0de, zotxt 5.1.4, BBT 5.6.11)

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

That’s odd. I'll need to have a look at my test case agin.

from pandoc-zotxt.lua.

njbart avatar njbart commented on July 20, 2024

Just to double-check, I just tried this with the absolute path to the filter, but the result is unchanged, no output at all.

pandoc --lua-filter  /Users/nb/.local/share/pandoc/filters/pandoc-zotxt.lua-1.1.0b3/pandoc-zotxt.lua  -C -t plain << EOT
---
nocite: '@brush:ornithology'
...
EOT

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

I can't say that I have found the bug. But give the new beta a try. I can say that I cannot reproduce the issue with the beta and the most recent version of Zotero, so here's to hoping.

from pandoc-zotxt.lua.

njbart avatar njbart commented on July 20, 2024

Finally, I seem to have figured out why I was seeing what I was seeing – I was using the dev version of pandoc (which identifies as "2.16.2", just like the released version). Two dev versions I tried, one compiled a few weeks ago and one compiled yesterday, behave identically in rendering no output at all in case of the nocite example.

When I switched to the latest release (2.16.2), binary installed via homebrew on macOS, pandoc-zotxt.lua started behaving as expected WRT the nocite example.

Of course it’d be interesting to know if the unexpected results with the latest dev can be reproduced by others.

Lastly, a hunch – I did spot quite a bit of activity having to do with lua components on https://github.com/jgm/pandoc/ lately, so it might be worth checking out whether anything significant pandoc-zotxt.lua is relying upon has changed.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

Oh, that's interesting! And it makes a lot of sense. Pandoc moved to a new major release of HsLua, as a consequence the implementation details of Pandoc's own data types have changed -- and the elem_walk function I use to walk the metadata depends on those details, unfortunately. I am suprised that even more changes are incoming though. Thanks for the heads up!

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

So, it is intentional. I adapted the script, but am not sure how well it works (the test suite doesn't work for non-released versions because it relies on the reported version number). If you want to give it a go, have a look at the release-1.1.0b5 branch, it contains the fix.

from pandoc-zotxt.lua.

njbart avatar njbart commented on July 20, 2024

1.1.0b5 does seem to work as expected so far. In case I come across anything unusual, I'll let you know.

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

Thanks!

from pandoc-zotxt.lua.

odkr avatar odkr commented on July 20, 2024

The pandoc.utils.type API has now been released and v1.1.0 uses it.

from pandoc-zotxt.lua.

Related Issues (12)

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.