38
def pymarc(): """in 30 minutes"""

def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

def pymarc(): """in 30 minutes"""

Page 2: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Goals

› Install Python, PyCharm, pymarc library › Learn super basic Python functions › Run a few scripts with pymarc › Discuss additional resources › Establish (us) as a community of practice › Convince you that YOU can code

Page 3: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: About Me

Page 4: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: A Note on Admins › If you’re not an admin on your machine –

this will be harder › Opportunity for a team effort!

Page 5: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Why Python? Language Object

Oriented Can be used for working with MARC Data?

Easy to learn?

Is named after Monty Python?

Python Yes Yes Yes Yes PERL Yes Yes I don’t know No Ruby Yes Yes Yes No JavaScript Yes Yes Yes No R No (?) Yes Yes No XSLT No (?) Yes I don’ know

but I hear good things!

No

Page 6: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: A Note on Apple, UNIX, etc. › Python 2.7 comes preinstalled on MAC OSX › Python comes preinstalled on other UNIX

Machines › If on a Chrome Book, consider

PythonAnywhere (I haven’t used, but I hear it works on ChromeBooks)

Page 7: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Downloading Python › Go to Python.org, click on Downloads

Page 8: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Python 3 vs. Python 2

Image from CodersEye.com https://coderseye.com/python-2-vs-python-3-version-differences

https://coderseye.com/python-2-vs-python-3-version-differences

Page 9: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing Python › Run the downloaded file

Page 10: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing Python › Select all options on Optional Features

Page 11: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing Python › Install for all users › Change the location

Page 12: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Test the Installation › Open the command line › Type: “python –m”

Page 13: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm › IDE == Integrated Development Environment › Python comes with IDLE

Page 14: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 15: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 16: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 17: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 18: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 19: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Install PyCharm

Page 20: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Configure PyCharm › Go to Configure › You won’t have all

the projects on the left

Page 21: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Configure PyCharm › Select project

interpreter › Select the

dropdown › Select the “Show

All”

Page 22: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Configure PyCharm › Click the green

plus sign › Select Add Local

Page 23: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Configure PyCharm › Select the

python.exe that we just installed

Page 24: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: PyCharm – First Project

Page 25: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: PyCharm – First Project › To add a .py file: › Right click on the

project directory and select New Python File.

Page 26: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: PyCharm – First Project

Page 27: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: PyCharm – Workspace Layout

Page 28: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing pymarc with pip › Can us command line, python console, or Windows PowerShell › Python –m pip install pymarc

Page 29: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing pymarc with PyCharm

Page 30: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing pymarc with PyCharm

Page 31: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing pymarc with PyCharm

Page 32: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Installing pymarc with PyCharm

Page 33: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Writing scripts › Let’s go live to PyCharm!

Page 34: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Additional Python Resources › Code Academy, Coursera, MIT, etc. › Check your library - I'll bet it has books on learning Python › Documentation › I almost always find what I need when I’m stuck with something on

Stack Exchange. › Also, there is a Python Support Slack Channel on the Metadata

Support Group Slack: https://docs.google.com/forms/d/e/1FAIpQLSc3WCCi2_03rkbSwGVbE0rQwYFSxvL6THz6GRZY8HAbijaK4w/viewform

Page 35: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Additional pymarc Resources › pymarc Discussion on Google Groups › Hacking in Python with PyMARC ACRL TechConnect Blog

(http://acrl.ala.org/techconnect/post/hacking-in-python-with-pymarc)

› Augmenting the Cataloger’s Bag of Tricks : Using MarcEdit, Python, and PyMARC for Batch-Processing MARC Records Generated From the Archivists’ Toolkit (http://journal.code4lib.org/articles/8336)

› The librarian's introduction to programming languages a LITA guide, Chapter 2

Page 36: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Additional Resources › GitHub (https://github.com/EthanDF)

› Creating MARC Theses and Dissertations records based on data from our digital library

› Doing reconciliation projects between my ILS and OCLC Records › Batchloading error checks › eBook access checks

Page 37: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Final Thoughts › Should technical services librarians learn to code? › It is a privilege to have the time and opportunity to do so

Page 38: def pymarc(): '''in 30 minutes'''alcts2017.learningtimesevents.org/wp-content/... · A Note on Admins › If you’re not an admin on your machine – this will be harder › Opportunity

Pymarc in 30 Minutes: Sources Considered › Hacking in Python with PyMARC ACRL TechConnect Blog (http://acrl.ala.org/techconnect/post/hacking-

in-python-with-pymarc) › Augmenting the Cataloger’s Bag of Tricks : Using MarcEdit, Python, and PyMARC for Batch-Processing

MARC Records Generated From the Archivists’ Toolkit (http://journal.code4lib.org/articles/8336) › The librarian's introduction to programming languages a LITA guide, Chapter 2 › pymarc Discussion Google Group › Workflow Automation in Technical Services: Part 2 (http://acrl.ala.org/techconnect/post/workflow-

automation-in-technical-services-part-2) › Do Library Stuff Faster with Python (http://acrl.ala.org/techconnect/post/do-library-stuff-faster-with-

python) › How to do common Excel and SQL tasks in Python (http://code-love.com/2017/04/30/excel-sql-python/) › How to Install Python on Windows (https://www.howtogeek.com/197947/how-to-install-python-on-

windows/) › Python 3.6.1 documentation (https://docs.python.org/3/)