Code Monkey home page Code Monkey logo

readwise-reflections's Introduction

README

This is my first application written in Go. It's a command-line application that integrates with two APIs to enhance the user's experience with insightful prompts:

  • Readwise API - For retrieving book highlights.
  • OpenAI API - For generating thought-provoking prompts based on the quotes.

The application retrieves a random favorited quote from Readwise's API and then uses the OpenAI API to generate a thought-provoking prompt based on the quote. The prompt is displayed to the user and copied to their clipboard so that they can use it in their note-taking software.

How to use

To run this application, you need to set up environment variables for API access:

  1. READWISE_TOKEN - Your token for the Readwise API.
  2. OPENAI_TOKEN - Your token for the OpenAI API.

You can set these variables manually, or use an .env file for easier management:

cp .env.example ./cmd/.env

Navigate to the cmd directory and run the application using Go:

cd cmd
go run .

Known issues

As this is my first application written in Go, I'm sure there are some issues that I don't know about.

Here are some known limitations:

  • Inefficiency: The current method retrieves all highlights and filteres for favorites post-fetch. This is due to the API limitation, as it only returns 1000 highlights per request and offers no way to filter the response server-side.

Potential Enhancements

  • User input: Allow users to choose between retrieving a random highlight or entering their own.
  • Model selection: Allow users to select which model to use for the OpenAI API.

readwise-reflections's People

Contributors

jtucholski avatar

Stargazers

 avatar

Watchers

 avatar

readwise-reflections's Issues

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.