readme2tex
readme2tex copied to clipboard
Possible to run without being in a git repo?
I'd just like to convert a markdown+tex file without being in git repo. Is this possible? Currently I get this error:
Not in a git repository, please enable --nocdn
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/readme2tex/render.py", line 290, in render
giturl = check_output(['git', 'remote', '-v']).strip().decode('utf-8').splitlines()[0]
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'remote', '-v']' returned non-zero exit status 128.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/anaconda3/lib/python3.7/site-packages/readme2tex/__main__.py", line 160, in <module>
args.bustcache)
File "/opt/anaconda3/lib/python3.7/site-packages/readme2tex/render.py", line 296, in render
raise Exception("Please specify your github --username and --project.")
Exception: Please specify your github --username and --project.
What to you want to convert it to? This repo is specially made for converting a markdown file containing tex into a markdown file that can be displayed in github
Basically I would love all the same functionality but not requiring the README.tex.md to be in a directory with .git repo. So, it would still generated a README.md and svg/ folder of math equations. These could be viewed or processed with something other than github.
I'll try to remove the dependency on Git if I have time for it. Doesn't look like a small task, since most of the code is really heavily focused on being used with Git.
I have proposed a PR for this issue. https://github.com/leegao/readme2tex/pull/42