This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PART A | |
// Variables and Functions for Notion | |
// These just set up some functions that can then be called in subsequent scripts. | |
// Basic variables - sets up fixed variables to be used in all the functions below | |
base = "https://api.notion.com/v1/"; | |
version = "2021-08-16"; | |
//// Secret token and inbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import re | |
import os | |
if os.path.isfile(sys.argv[2]): | |
os.remove(sys.argv[2]) | |
eudic = open(sys.argv[1]) | |
anki = open(sys.argv[2], 'a') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import os | |
import sys | |
file_path = "/Users/theme/Desktop/English vocabulary.txt" | |
def judge_file(): | |
file_state = os.path.exists(file_path) | |
if file_state: | |
print "File was exist." |