You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to set the format on a fresh text file or modify the text file based on the current configuration (local if available else global) without specifying the argument to --set-formats.
For example, for the configuration in local .jupyter
And the pairing setup of the markdown file could be:
Within parent directory
jupytext --set-formats markdown/00-intro.md
or within markdown directory
jupytext --set-formats 00-intro.md
Above two command examples should be informed by the configuration that the markdown file is in the markdown directory.
To check what the current version (1.5.0) does, I ran both commands and got the same error
Traceback (most recent call last):
File "C:\Users\at17\.conda\envs\sthm\Scripts\jupytext-script.py", line 9, in <module>
sys.exit(jupytext())
File "C:\Users\at17\.conda\envs\sthm\lib\site-packages\jupytext\cli.py", line 376, in jupytext
exit_code += jupytext_single_file(nb_file, args, log)
File "C:\Users\at17\.conda\envs\sthm\lib\site-packages\jupytext\cli.py", line 389, in jupytext_single_file
raise ValueError("Cannot sync a notebook on stdin")
ValueError: Cannot sync a notebook on stdin
Is this usecase not yet supported or is there a different command I should use?
Lastly, I wonder if commandline operations can be used with the configuration which will save me from typing same arguments repetitively.
The text was updated successfully, but these errors were encountered:
The problem here is that you pass a file name to the --set-formats option rather than a format name.
I am sure you're not the only one to try this... a few days ago I found myself doing jupytext --to dest_file.md which is wrong for the same reason (a format name is expected there, not a file name). So I'll think of adding a warning when the value passed to --from, --to and --set-formats is a file name 😃 (please don't close this issue so that I don't forget)
So, on your side, you should do jupytext --sync markdown/00-intro.md, or jupytext --sync 00-intro.md in the markdown folder, or even jupytext --sync markdown/*, i.e. use --sync, not --set-formats.
Lastly, I wonder if commandline operations can be used with the configuration which will save me from typing same arguments repetitively.
You should be able to use jupytext --sync markdown/* - or are you looking for something else?
This is an extension of a related issue #485.
I would like to be able to set the format on a fresh text file or modify the text file based on the current configuration (local if available else global) without specifying the argument to
--set-formats
.For example, for the configuration in local
.jupyter
and we have a a directory structure with a
.md
file inmarkdown
directory:And the pairing setup of the markdown file could be:
markdown
directoryAbove two command examples should be informed by the configuration that the markdown file is in the
markdown
directory.To check what the current version (
1.5.0
) does, I ran both commands and got the same errorIs this usecase not yet supported or is there a different command I should use?
Lastly, I wonder if commandline operations can be used with the configuration which will save me from typing same arguments repetitively.
The text was updated successfully, but these errors were encountered: