faizhalas / Search4All

Full-text search of library collections using text-mining

Home Page:https://search4all.streamlit.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search4All

A web application for exploring further into full text or specific sections linked to Google Sheets.

Open in Streamlit License

Create your own app

  • Prepare your data in Google Sheet
  • Fork Search4All and edit as you want
  • Run your own app on Streamlit Community Cloud

Component Setup - Connection

  • For security reason, you need to prepare sheet_id, sheet_name, sheet_journal, and sheet_info which are placed on Streamlit:
# URL of a Google Sheet
https://docs.google.com/spreadsheets/d/{sheet_id}/gviz/tq?tqx=out:csv&sheet={sheet_name}

# Home
sheet_id = st.secrets.sheet_id
sheet_name = st.secrets.sheet_name

# Journal
sheet_name = st.secrets.sheet_journal

# Journal Info
sheet_name = st.secrets.sheet_info

Component Setup - Home

  • Changes to the interface
# Title on the browser tab.
page_title="Your Text"

# Icon on the browser tab.
page_icon="Your URL"

# Title on the web page.
st.title("Your Text")

# Sub-title on the web page.
st.caption("Your Text")

# How many cards appear in one row of search results.
N_cards_per_row = 4
  • Changes to the variables
# Image component to match the collection type.
image_dict = {"Your Text": "Your URL"}

# If you want a full-text search, you can manipulate the dataframe created because Google Sheets limits 50,000 characters in a cell.
df["full-text"] = df[["type1", "type2", "type3", "type4", "....."]]

# Option to search for in the search field. Adjust and match with your Google Sheet columns.
list_opt = ["column1", "column2", "column3", "column4", "....."]

# List of owned collection types. "All" indicates that the search will be performed on all collection types.
format_options = ["All", "type1", "type2", "type3", "type4", "....."]

Component Setup - Journal

  • Changes to the variables
# Image component to match the collection type.
image_dict = {"Your Text": "Your URL"}

# If you want a full-text search, you can manipulate the dataframe created because Google Sheets limits 50,000 characters in a cell.
df["full-text"] = df[["type1", "type2", "type3", "type4", "....."]]

# Option to search for in the search field. Adjust and match with your Google Sheet columns.
part_opt = ["column1", "column2", "column3", "column4", "....."]

# List of journal titles. "All" indicates that the search will be performed on all journal.
s_titles = ["All", "type1", "type2", "type3", "type4", "....."]

About

Full-text search of library collections using text-mining

https://search4all.streamlit.app

License:MIT License


Languages

Language:Python 100.0%