Last active
July 18, 2018 03:33
-
-
Save BlogBlocks/8a940c83093f6fd653bf2a27efa81d4e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Useage: python GistIndex.py | |
| # Prints an index of all posts in the database created by post2gist.py | |
| import sqlite3 | |
| def Index(): | |
| database ="GISTstore/gist.db" | |
| conn = sqlite3.connect(database) | |
| c = conn.cursor() | |
| for row in c.execute('SELECT rowid, content, description, filename FROM gist \ | |
| WHERE content = ?', ("Index",)): | |
| print row[0],row[1],row[2],row[3] | |
| if __name__ == "__main__": | |
| Index() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment