A desktop application that converts a CSV of new books into HTML suitable for pasting into a LibGuide
Go to file
Mark Eaton ab7254178f pipenv update --pre 2019-10-24 09:56:08 -04:00
data add a readme 2018-07-02 15:52:16 -04:00
LICENSE Create LICENSE 2019-01-02 09:27:57 -05:00
Pipfile fix 2 bugs. Switch from append to write; ignore blank lines in the csv 2019-05-08 12:46:23 -04:00
Pipfile.lock pipenv update --pre 2019-10-24 09:56:08 -04:00
README.md fix README 2019-05-20 09:46:25 -04:00
build.spec add build.spec 2019-05-18 02:09:34 -04:00
convert.py fix 2 bugs. Switch from append to write; ignore blank lines in the csv 2019-05-08 12:46:23 -04:00

README.md

Make an HTML document out of a spreadsheet of new books

  • This script was developed to solve a specific problem faced by our librarians: how to turn a spreadsheet of new books into an HTML document quickly and easily.
  • Because our acquisitions librarian needed to be do this regularly, coding the HTML by hand was not a viable option.
  • So the script we wrote automatically produces an HTML output from a CSV file. This HTML is suitable for cutting and pasting into a LibGuide.

To use the script

These instructions assume you already have the following installed: git, python 3, pipenv

To set up the converter at the command line (you only need to do this part once):

$ git clone https://github.com/markeeaton/new-books   # this will clone the github repository to your machine
$ cd new-books   # go to the repository directory
$ pipenv install   # to get the necessary packages

Then you should have your input spreadsheet organized as follows:

A B C D
LC Class Author Title Call Number
... ... ... ...
  • Be sure to include a row with column headers!
  • The data goes below.
  • Save it as a CSV file. Place it in the new-books/data/ directory.

Once that's set up, you can use the convert script by replacing input.csv and output.html in this command with your own filenames:

$ pipenv run python convert.py input.csv output.html

The output file will be in the data/ directory.

Want to run a desktop version?

Use the gooey branch of this repository. Then follow the packaging instructions at the Gooey page.

Want to see more?

Presented as a poster "Improving Workflows and Outreach with Python: Automating a New Books LibGuide" at ACRL 2019 in Cleveland, OH