Skip to main content

Converts exported data from Minuteman Library Network reading history.

Project description

Minuteman Library Network (MLN) Record Converter

Historical loan records exported via the MLN website are in a semi-human readable format, making them difficult to use in analyses. This utility converts each record into a Record object that can be inspected in multiple ways.

Dev install

Prerequisites

Installation

Clone the git repository locally and run poetry install from the main directory. On Ubuntu:

git clone git@gitlab.com:woodforsheep/mln-to-csv.git
cd mln-to-csv
poetry install

Command Line Use

poetry run mln-to-csv --help
Using python3 (3.11.4)
usage: mln-to-csv [-h] files [files ...]

Converts exported MLN records to CSV

positional arguments:
  files       The list of files to convert

options:
  -h, --help  show this help message and exit

Library use

The main utility in the library is lines_to_records and can be used as follows:

from mln_converter import lines_to_records

with open(records_file) as fp:
    lines = fp.readlines()
records = lines_to_records(lines)

for record in records:
    print(f"{record.titles[0]} ({record.authors[0]})")

Convert icons created by iconsax - Flaticon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mln_converter-0.2.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

mln_converter-0.2.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page