Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #/home/clockworkpc/bin/tiddlytagfilecreator.py
- # Released under a GPLv3 Licence by Clockwork PC 2012
- # www.clockworkpc.com.au
- # You are entitled to the following four freedoms:
- # Freedom 0: To run this program for any purpose
- # Freedom 1: To study how this program works and change it to make it do what you wish
- # Freedom 2: To redistribute copies so you can help your neighbour
- # Freedom 3: To distribute copies of your modified version to others
- import os
- import fileinput
- masterTagFile = (os.getenv("HOME")+"/Dropbox/Deakin/Tiddlywiki/TiddlyTags/MasterFiles/master_tiddlytags.txt")
- os.system("touch " + masterTagFile)
- tagDirectory = (os.getenv("HOME")+"/Dropbox/Deakin/Tiddlywiki/TiddlyTags/")
- tagSubject = raw_input("Which subject is this for? ")
- tagFileName = raw_input("What do you want to call the tag file? ")
- tagFile = tagDirectory + tagSubject + "_" + tagFileName + ".txt"
- os.system("touch " + tagFile)
- print tagFile
- def createList():
- a = open(masterTagFile, "a")
- a.write('\n' + tagFileName + " = []"+'\n')
- a.close()
- createList()
- def createTag():
- newTag = raw_input("Enter the name of the new tag: ")
- f = open(tagFile, "a")
- f.write("!!!![["+newTag+"]]"+'\n')
- f.close()
- print '\n' + "You are updating this topic: " + tagFileName + '\n'
- g = open(masterTagFile, "a")
- g.write(newTag+'\n')
- g.close()
- running = True
- while running:
- createTag()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement