Giter VIP home page Giter VIP logo

oreilly_highlight_parser's Introduction

Parsing O'Reilly Books Exported Highlights to Markdown

O'Reilly Books allows you to export the highlights and notes made while reading a book, but those highlights are exported in the CSV file format. The highlights are also in reverse chronological order, meaning the latest ones are at the top and the earliest ones at the bottom of the CSV file.

The goal of this parser is to take in the exported highlights for an individual book and parse it into a markdown file.

Specification

The CSV exported from O'Reilly is formatted like this:

Book Title Chapter Title Date of Highlight Book URL Chapter URL Annotation URL Highlight Personal Note
Title Chapter 1 YYYY-MM-DD https://example.com https://example.com https://example.com Text that was highlighted Any notes made about the text

With the last highlight made at the beginning and the first highlight made at the bottom.

Given:

  • A CSV file formatted like the one above
  • For 1 book(so the Book Title value is exactly the same for all highlights)
  • With highlights in reverse chronological order
  • A directory to save files

Return a markdown file:

  • Whose file name is the book title in snake case(book_title)
  • Which is saved in the directory provided.
  • And formatted like the example below, with the oldest highlight first
# [Book Title Notes](book_url)

## [Chapter](chapter_url)

[Highlight](annotation_url)
Personal Note

API

Parser.parse(csv_file_path:String, directory_to_generated_markdown_file:String)

oreilly_highlight_parser's People

Contributors

edgenard avatar

Stargazers

Tarun Arora avatar cakefile avatar Ian Young avatar Mx. Kassian Rosner Wren avatar  avatar

Watchers

 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.