kiwi0fruit / pandoctools

Profile manager of text processing pipelines: Pandoc filters, any text CLI filters. Atom+Markdown+Pandoc+Jupyter workflow, export to ipynb. Uses Stitch fork: https://github.com/kiwi0fruit/knitty
MIT License
52 stars 9 forks source link

Hide KNITTY declaration #13

Closed kiwi0fruit closed 6 years ago

kiwi0fruit commented 6 years ago

At the monent Knitty/Hydrogen documents look like this:

# %% {md} """ %%% """
"""
---
results: pandoc
...
"""
# %% {echo=False, eval=True}
KNITTY = True
# %% {echo=False, eval=False}
# noinspection PyRedeclaration
KNITTY = False

Move

# %% {echo=False, eval=True} """ %%% """
KNITTY = True

to separate file that is prepended to *.py files by pandotools. Then Knitty/Hydrogen documents would look like:

# %% {md}
"""
---
results: pandoc
...
"""
# %% {echo=False, eval=False}
KNITTY = False
kiwi0fruit commented 6 years ago

Or in case of *.md:

---
pandoctools:
  out: "%USERPROFILE%\\*.ipynb"
input: True
eval: False
...
@{input=False, echo=False, eval=True}
```py
KNITTY = True

@{input=False, echo=False, eval=False}

KNITTY = False

Such files should have \*.py.md extension in order to be prepended with:

@{input=False, echo=False, eval=True}

KNITTY = True
so that the documents looks like:

pandoctools: out: "%USERPROFILE%\*.ipynb" input: True eval: False ... @{input=False, echo=False, eval=False}

KNITTY = False
kiwi0fruit commented 6 years ago

And on Hydrogen side: https://github.com/nteract/hydrogen/issues/1343

kiwi0fruit commented 6 years ago

!!! Add interface like in PySide/PyQt: OS env var or check if module was imported.

make work without ready ()

kiwi0fruit commented 6 years ago

fixed in https://github.com/kiwi0fruit/pandoctools/commit/ced71f349c325dff4f029f0d7b568cc4e254abc2