* 'master' of https://git.charlesreid1.com/charlesreid1/cheeseburger-search:
cheeseburger-search
use whoosh to search documents in a google drive folder.
Implemented in Python using Flask, Whoosh and Mistune.
virtualenv
virtualenv vp
source vp/bin/activate
pip install -r requirements.txt
notes
in addition to the schema changes listed in issues-search:
- also need to update schema for new document types, of course
- document schema implies new objects, new arguments being passed
- each method listed will also have new arguments
- how to integrate a new API?
- API is only used in search portion...
integrating a new API:
- open the
*_search.py
file - import it at the top
- in the add all documents method, create your API instance
- in the update index incremental (alt route), create your API instance
dealing with API library's objects:
- from there, the API is used to obtain various kinds of objects
- the objects can "just be used" without a problem from other methods
- example: github api is used to get a repo object in
add_all_issues()
, and repo object is then passed toadd_issue()
with no problem
adding support for "collections":
- may eventually want to add multiple folders
- add labels for top-level folders... call it a "collection"
the api:
- replace
add_issue
withadd_document
- replace
add_all_issues
withadd_all_documents
- replace method signatures
add_document()
- add document object and collection labeladd_all_documents()
- add credentials filename and collection labelupdate_index_incremental()
- add credentials filename and collection label
- drive credentials
- drive API object wrapper
- spiraling out of control
- example: list all files.
- import pdb right before we run example code to print all docs
- this is write before (ha ha) the
writer.add_document()
call
last schema thing to change:
search()
method in*_search.py
- list of fields needs to be updated
- don't exactly understand that if block but okkkkk....
todo
see Todo.md
creating apps
Description
Languages
Python
57.2%
CSS
37.3%
HTML
5.5%