Giter Club home page Giter Club logo

logging's People

Contributors

wlupton 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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jjallaire

logging's Issues

Using the Pandoc User Data Directory

In your instructions, you suggest putting logging.lua in the same directory as the pandoc filters. In my case this is the standard path ~/.local/share/pandoc/filters/.
So I have:

▶︎ ll .local/share/pandoc/filters/logging*
-rw-r--r--@ 1 ian  staff   9.1K  5 Oct 12:26 .local/share/pandoc/filters/logging.lua
-rw-r--r--@ 1 ian  staff   588B  5 Oct 14:59 .local/share/pandoc/filters/loggingTest.lua

However if I call local logging = require 'logging' in loggingTest.lua then I get the following error:

pandoc -t html5 --verbose -L loggingTest.lua

---
title: My Title
---

Here.
[INFO] Running filter /Users/ian/.local/share/pandoc/filters/loggingTest.lua
Error running filter /Users/ian/.local/share/pandoc/filters/loggingTest.lua:
/Users/ian/.local/share/pandoc/filters/loggingTest.lua:2: module 'logging' not found:
	no field package.preload['logging']
	no file '/usr/local/share/lua/5.4/logging.lua'
	no file '/usr/local/share/lua/5.4/logging/init.lua'
	no file '/usr/local/lib/lua/5.4/logging.lua'
	no file '/usr/local/lib/lua/5.4/logging/init.lua'
	no file './logging.lua'
	no file './logging/init.lua'
	no file '/usr/local/lib/lua/5.4/logging.so'
	no file '/usr/local/lib/lua/5.4/loadall.so'
	no file './logging.so'
stack traceback:
	/Users/ian/.local/share/pandoc/filters/loggingTest.lua:2: in main chunk

I'm not a Lua person, but I understood that ./logging.lua should have found it? My solution is the following:

local fpath = PANDOC_STATE.user_data_dir .. '/filters/'
local logging = dofile(fpath .. 'logging.lua')

But I'm sure I doing something stupid here!?

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.