5 from configparser import ConfigParser
7 config = ConfigParser()
8 config.read('.taguette_gdocs')
10 ## this is project ID from the configuration
11 project_id = int(config['General']['taguette_project_id'])
12 taguette_database_file = config['General']['taguette_database_file']
16 con = sqlite3.connect(taguette_database_file)
19 # Run this if you just want tags and no highlights
20 sql_stmt_get = "SELECT id, path, description FROM tags WHERE project_id = ?"
22 # Run this if you want tags AND highlights
23 #sql_stmt_get = "SELECT tags.id, tags.path, tags.description, highlights.snippet FROM highlight_tags INNER JOIN tags ON highlight_tags.tag_id = tags.id INNER JOIN highlights ON highlight_tags.highlight_id = highlights.id WHERE project_id = ?"
24 cur.execute(sql_stmt_get, (project_id,))
31 tag_id, path, description = row
33 m = re.match(r'^(.+)\_(.*)$', path)
41 print("\t".join([str(tag_id), axial, tag, description]))