Comments (15)
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.
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.
But thanks a lot for being such an avid and accurate reporter! I appreciate your help 😃.
from pandoc-zotxt.lua.
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.
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.
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.
That’s odd. I'll need to have a look at my test case agin.
from pandoc-zotxt.lua.
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.
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.
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.
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.
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.
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.
Thanks!
from pandoc-zotxt.lua.
The pandoc.utils.type
API has now been released and v1.1.0 uses it.
from pandoc-zotxt.lua.
Related Issues (12)
- Doesn't work well with Zotero >= v5.0.71 HOT 3
- bibliography "not found in resource path" HOT 2
- reference file is not updated when new citations are added HOT 11
- zotxt response not encoded in UTF-8. HOT 6
- PandocCouldNotFindDataFileError "lunajson.lua" HOT 8
- Newbie question HOT 3
- Error printed if key not in Zotero, but in metadata or bibliography HOT 19
- Ignores --resource-path for metadata fields `bibliography` and `zotero-bibliography`.
- Conflicts between easykeys and betterbibtexkeys HOT 7
- Invalid for zotero 6.0 HOT 5
- v1.1 aborts processing with cryptic error message when used with zotxt 6.0.0 and an item is not found.
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 pandoc-zotxt.lua.