No problem, I work in the command line a good part of my day at work and sometimes forget about all the assumptions that I make.
Here are a few things that you need to check first. The $ sign below is supposed to indicate the Terminal App prompt and the text after it what you would type.
$ python --version
$ python3 --version
If like on my system the first command says 'Python 2.{something}' then there are 3 lines the the script that need to be modified. However, if the first command says 'Python 3.{something}' or the second command doesn't error and says 'Python 3.{something}' then the previous script should work using the appropriate python version. I installed Python 3 on my system and was using python3 as my prefix command.
The third option and harder to deal with is if you do not have python installed. In this case both the above commands will error with something like '-bash: python: command not found'. In this case you will have to navigate the hazardous waters of downloading and installing python3 from the web. This step is beyond what I can describe here and better documentation is probably already written online.
So first if you have python3, then here is a trick that will simplify running the command. Create a directory where you want your files output, such as your HomeDirectory/TextPad. Then copy the getMyData.py and the TextPad.sqlite to that directory. One problem command line commands have is when the paths to the files contain spaces, such as the 'Application Support' in the path to the sqlite file. If you forgot to enclose the path in double quotes it would not have worked. With everything colocated, now the command to execute will be much simpler with no special case spaces or quote required.
$ python3 getMyData.py TextPad.sqlite
This should extract and your files into the current directory.
Now for the special case of not having python3. There are only 3 lines that need modification, but as you stated not being a command line user, I am including the entire script here instead. I have bolded the changes. Python2 had issues with non-ascii characters.
import sqlite3,os,sys
import codecs
if len(sys.argv) != 2:
print("pass in sql file name")
sys.exit(1)
db = sys.argv[1]
if not os.path.exists(db):
print("Path to db '",db,"' does not exist")
sys.exit(1)
connection = sqlite3.connect(db)
cursor = connection.cursor()
rows = cursor.execute("SELECT ZTEXT from ZTPNOTE").fetchall()
i=0
ar=[]
for row in rows:
i+=1
ar = str(row[0].encode("utf-8")).split('\n')
tab=ar[0]
if len(tab) > 30 or r"/" in tab:
tab = "Tab "+str(i)+" problem name"
print("Extracting Tab>>",tab)
f = codecs.open(tab,"w")
for s in ar:
f.write(s)
f.write('\n')
f.close()
sys.exit(0)
Hopefully this will help you get past your hurdle.
One last possible problem. These python scripts load the non-standard python modules sqlite3 and the python2 version also needs codecs. I did not have to do anything to install them as they were already on my system. Should you get an error such as the following on either sqlite3 or codecs, you will need to somehow get them installed. Again the steps to do this are beyond what I can document here.
Traceback (most recent call last):
File "getMyStuff.py", line 3, in <module>
import codecs
Should all the above still fail, there is the possibility that your version of TextPad was different from mine and that the developer changed something, such as the name of the table or column in sqlite. I'm still willing to help you get to the bottom of this but I think in that case a more direct and private communication channel would be more appropriate.
If all else fails and you don't mind doing the work to separate the tabs into files and deal with trimming some junk strings. You can print your data to the screen with the following command.
$ strings TextPad.sqlite
and write it to a file with
$ strings TextPad.sqlite > aFileName
Then you can edit the file and figure out where each tab started and stopped and copy that to another application. The python scripts were intended to do all that work for you.