Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 2.12 KB

README.md

File metadata and controls

41 lines (26 loc) · 2.12 KB

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.
  • A lot of the code is devoted to specifically handling the peculiarities of data from ProQuest's Oasis. If you're using another data source, your mileage may vary.

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 E
LC Class Author Title Call Number ISBN
... ... ... ... ...
  • Be sure to include a row with column headers!
  • The data goes below.
  • Save it as a CSV file. Make sure the ISBN is not in scientific notation. 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?

See the repository for the desktop version.

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