Giter Site home page Giter Site logo

caltechlibrary / boffo Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 1.0 14.53 MB

Boffo is an add-on for Google Sheets written by the Caltech Library. It lets you select item barcodes in a spreadsheet and retrieve information about the item records from a FOLIO server.

Home Page: https://caltechlibrary.github.io/boffo/

License: Other

JavaScript 60.50% HTML 22.75% Makefile 16.76%
folio folio-lsp google-apps-script google-scripts google-sheet google-sheets javascript library-automation

boffo's Introduction

BoffoBoffo logo

Boffo (Barcodes from FOLIO) is a Google Sheet script for getting data about FOLIO items.

License made-with-javascript Google Sheets Latest release DOI Boffo

Table of contents

Introduction

Boffo (a loose acronym of Barcodes from FOLIO, and pronounced like the noun) is an add-on for Google Sheets. Among other things, it lets you select item barcodes in a spreadsheet and retrieve information about the item records from a FOLIO server.

Installation

If you're Caltech Library staff, Boffo is available to you from the Google Marketplace for add-ons as an "Internal" add-on; if you're not Caltech Library staff, you can still install Boffo using alternate methods, as described in the pages linked below:

Quick start

Once installed as an Add-on on a Google Sheet, Boffo will present itself as a menu item in the Extensions menu across the top of the sheet. Selecting the Boffo item in the Extensions menu will present several items in a submenu:

Screenshot of Boffo menu

Boffo's main function is Look up barcodes in FOLIO and its use is very simple:

  1. Select some item barcodes in your Google spreadsheet
  2. Pull down the Extensions menu
  3. Select Look up barcodes in FOLIO from the Boffo menu

Screenshot of spreadsheet with Boffo

Boffo will create a new sheet titled "Item Data" in the spreadsheet where you ran it, then add the results of the item lookups to the new sheet.

Screenshot of sample results from Boffo

If this is the first time you've used Boffo, it will first request your FOLIO account login and password in order to ask FOLIO for a token to use the network services. Boffo will store that token (and not your login or password), then proceed to look up the items whose barcodes are highlighted in the sheet. On subsequent invocations, Boffo will not ask you for FOLIO credentials unless something happens to make the token invalid (in which case, Boffo will ask you for the credentials again and generate a new token).

Usage

Please see the detailed usage section in the Boffo documentation for more information about Boffo's features and how to use them.

Known issues and limitations

Depending on your account type, Boffo will run into Google quotas limiting maximum execution time. For G Suite users such as the Caltech Library, this limit is 30 minutes. For non-G Suite users, the limit is 6 minutes. At the time of this writing, Boffo can retrieve item records at a rate of about 70–100 records/second, so the 6 minute time limit will limit non-G suite users to looking up somewhere between 25,000–35,000 item records at a time.

Getting help

If you find an issue, please submit it in the GitHub issue tracker for this repository.

Contributing

Your help and participation in enhancing Boffo is welcome! Please visit the guidelines for contributing for some tips on getting started.

License

Software produced by the Caltech Library is Copyright © 2024 California Institute of Technology. This software is freely distributed under a BSD-style license. Please see the LICENSE file for more information.

Acknowledgments

The vector artwork used as a starting point for the logo for this project was created by Sunarto Hamizan It is licensed under the Creative Commons Attribution 3.0 Unported license. The vector graphics was modified by Mike Hucka to change the color.

The spinner used in some HTML dialogs shown by Boffo came from SVG Spinners (CSS & SMIL) by Utkarsh Verma. The code was copied on 2023-08-01 and is licensed under the MIT license by the author.

This work was funded by the California Institute of Technology Library.

boffo's People

Contributors

mhucka avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

metatext

boffo's Issues

Add a progress bar dialog with a cancel button

Currently, you can't cancel an ongoing lookup. You can only stop it by refreshing the browser page, but that's not obvious. Better would be to have a typical progress bar dialog and add a cancel button that the user could click to stop things deliberately.

Fetch multiple barcodes at once

Turns out it's possible to look up multiple barcodes in one API call. Use OR in the CQL query, and make sure to encode the spaces. Roughly like this:

OKAPI-URL/inventory/items?query=barcode=12345%20OR%20barcode=45678

Also watch out for the maximum length of the URL.

Add function to look up by call numbers

The library staff would like a way to get the records for items that span a range of call numbers. My current thinking is that it would work roughly like this:

  1. user selects a range of cells in the spreadsheet containing barcodes
  2. Boffo looks up all the items
  3. Boffo determines which call numbers are the bounds of the range of call numbers covered by the selected cells
  4. Boffo does a Folio lookup based on wildcarding the call numbers, somehow

Detect if user clicks "x" to close dialogs

If the user clicks "x" in the upper right-hand corner in a dialog like the folio credentials dialog, Boffo does not detect it and doesn't do the right thing for canceling the process.

Add tests

This code doesn't have any tests. I need to figure out how to do unit testing in JS.

Adjust selection filter to allow alpha-only barcodes

Boffo as of version 1.6.0 filters the user's spreadsheet selection in the command for looking up barcodes. It filters out anything that doesn't have at least one digit. The only purpose of this particular filter is that I wanted to guard against the user selecting a whole column with a title. If they have a spreadsheet like

Our Barcodes
────────
0930950
0930951
0930952
...

etc., and they select the whole column instead of selecting just the cells containing barcodes, I wanted to filter out the text "Our Barcodes" (or whatever they might have written in the header row) because in the output, Boffo creates a new sheet where the first column has a title (and the title is "Barcodes").

In a conversation with Kyle Banerjee on the code4lib Slack on 2023-09-01, I learned that some other sites do have barcodes that have no digits in them. This would be a problem for Boffo, which would ignore those barcodes completely.

I'm not sure what the solution is going to be. Maybe there needs to be a user preference setting that allows them to say "allow anything" or something like that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.