Giter Site home page Giter Site logo

csv-to-html's Introduction

CSV-to-HTML

NOTES FOR UMD LIB-CODE MEMBERS: I've added the output directory to the repository, including sample output files. You may want to delete the output files before attempting to run the program locally, so you can easily see what your local version actually creates. As noted in our meeting, one cross-platform compatibility problem could be the hard-coding of slashes in output file paths (Windows machines would expect \ where UNIX and Mac machines will have /). I have developed and tested my code exclusively on a Mac. For the data file, you can use one of the included vbic_data files. The program assumes that the data will be a CSV file with certain column headers, and that it will be found in the same directory as the python script itself. It will try to write the output files to a subdirectory called output.


These Python scripts were developed for work in Digital Programs and Initiatives at the University of Maryland Libraries. There are three scripts, each of which takes data from a CSV file and converts it to another form:

  • htmlgen.py searches for matching keywords in a particular column of the CSV data, and then converts the found data to simple HTML for copying into the Libraries' CMS-based website.
  • htmlgen-alpha.py generates HTML-formatted text from all rows in the CSV for easier proofreading and data cleanup.
  • csv-json.py converts CSV data to JSON, for transfer to other systems.

The included file vbic_data.csv is the primary dataset for which these scripts were developed, and can be used for testing. By default, htmlgen.py outputs files to the output directory.

csv-to-html's People

Contributors

jwestgard avatar wallberg avatar

Stargazers

 avatar

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.