Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

Commit

Permalink
fix(config): Add delay
Browse files Browse the repository at this point in the history
give time to user to read/understand the message before bookmark
  • Loading branch information
Mara-Li committed Feb 23, 2022
1 parent 494b010 commit 4c6c409
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkdocs_obsidian/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import subprocess
import sys
from datetime import datetime
from time import sleep
from pathlib import Path
from rich.console import Console
from rich.markdown import Markdown
Expand All @@ -24,9 +25,11 @@ def pyto_environment(console):
vault = ""
blog = ""
console.print("Please provide your [u bold]obsidian vault[/] path: ")
sleep(10) # The user needs to read the message !
vault = bm.FolderBookmark()
vault_path = vault.path
console.print("Please provide the [u bold]blog[/] repository path: ")
sleep(10) # The user needs to read the message !
blog = bm.FolderBookmark()
blog_path = blog.path
return vault_path, blog_path
Expand Down Expand Up @@ -61,11 +64,13 @@ def ashell_environment(console):
blog = ""
console.print("Please provide your [u bold]obsidian vault[/] path: ")
cmd = "pickFolder"
sleep(10) # The user needs to read the message !
subprocess.Popen(cmd, stdout=subprocess.PIPE)
# Now, the os.getcwd() change for the pickedFolder
vault = os.getcwd()
subprocess.Popen(cmd, stdout=subprocess.PIPE)
console.print("Please provide the [u bold]blog[/] repository path: ")
sleep(10) # The user needs to read the message !
subprocess.Popen(cmd, stdout=subprocess.PIPE)
blog = os.getcwd()
# return to default environment
Expand Down

0 comments on commit 4c6c409

Please sign in to comment.