Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dotstutor for new users. #471

Merged
merged 13 commits into from
Feb 23, 2023
Prev Previous commit
Next Next commit
fix: just copy temp file under current directory.
  • Loading branch information
ayamir committed Feb 3, 2023
commit c4f336800a554e6d6ac98d2cf77dc1139edf9ad2
4 changes: 1 addition & 3 deletions scripts/dostutor.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import os
import time
import shutil
import tempfile

if __name__ == "__main__":
suffix = time.strftime("%Y_%m_%d_%H_%M_%S")
tmp_dir = tempfile.gettempdir()
tmp_path = os.path.join(tmp_dir, f"tmp_dotstutor.{suffix}")
tmp_path = os.path.join("..", f"tmp_dotstutor.{suffix}")
shutil.copyfile("../dotstutor", tmp_path)
os.system(f"nvim {tmp_path}")
os.remove(tmp_path)