Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: nakamura196
  • License: other
  • Language: Python
  • Default Branch: main
  • Size: 7.81 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Funding License Citation

README.md

Zotero x Streamlit Integration

This repository hosts the code for an app developed using Zotero's API and Streamlit. The app demonstrates how to integrate Zotero's bibliographic management capabilities with a web application, providing a user-friendly interface to interact with your Zotero collections.

App Overview

The app is deployed and can be viewed at:

🔗 Zotero x Streamlit App

App Screenshot

Key Features

  • Collection Listing: Fetch and display a list of collections from a Zotero library.
  • Items Viewing: View details of items within a selected collection, filtering out attachments.
  • Interactive Charts: Visualize data distributions using Plotly charts.

Technologies Used

  • Streamlit: An open-source app framework for Machine Learning and Data Science projects.
  • Zotero API: Used for accessing bibliographic data stored in Zotero.
  • Pyzotero: A Python client for the Zotero API.

Quick Start

To run this project locally, follow these steps:

  1. Clone the repository:

bash git clone https://github.com/nakamura196/zotero_streamlit.git cd zotero_streamlit

  1. Install dependencies:

bash pip install -r requirements.txt

  1. Set up your Zotero API credentials. Create a file named .streamlit/secrets.toml and fill it with your Zotero details:

toml [zotero] library_id = "your_library_id" library_type = "user" api_key = "your_api_key"

  1. Run the app: bash streamlit run app.py

Deployment

This app is deployed on Streamlit Community Cloud. You can deploy your own version by clicking the 'Deploy' button in Streamlit and following the prompts. Don't forget to add your secrets in the Streamlit Cloud dashboard under 'Advanced settings'.

How It Works

Fetch Collections

Retrieve a list of collections from your Zotero library:

python def fetch_collections(zot): collections = zot.collections() return [{"name": collection['data']['name'], "key": collection['data']['key']} for collection in collections]

Create DataFrames

Convert item data from Zotero into a pandas DataFrame, excluding attachments:

python def create_df(zot, collection_id): items = zot.collection_items(collection_id) return pd.DataFrame([{ 'title': item['data']['title'], "itemType": item['data']['itemType'], "creators": ", ".join(f"{creator['firstName']} {creator['lastName']}" for creator in item['data'].get('creators', [])), "date": item['data'].get('date', "") } for item in items if item['data']['itemType'] != "attachment"])

Configure Page Settings

Set up the page with title, icon, and additional menu options:

python st.set_page_config( page_title="Zotero x Streamlit", page_icon="🧊", menu_items={ 'Get Help': "https://github.com/nakamura196/zotero_streamlit/", 'Report a bug': 'https://github.com/nakamura196/zotero_streamlit/issues', 'About': "This is an app developed using Zotero's API and Streamlit." } )

Conclusion

This project illustrates the power of combining Zotero's bibliographic tools with Streamlit's interactive capabilities. It's a practical example of how these technologies can be used to enhance the accessibility and visualization of bibliographic data.

Owner

  • Name: Satoru Nakamura
  • Login: nakamura196
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.1.0
message: "Cite as"
authors:
  - family-names: Nakamura
    given-names: Satoru
    orcid: https://orcid.org/0000-0001-8245-7925
    affiliation: "The University of Tokyo (UT)"
    website: https://researchmap.jp/nakamura.satoru?lang=en
title: "zotero_streamlit"

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • pandas *
  • plotly *
  • pyzotero *
  • streamlit *