Code Monkey home page Code Monkey logo

bookx's Issues

Switch to MVC design pattern for `src` directory

Currently, the structure looks janky. My engineering skills should help me little bit.
Structure right now:

  • library: handles internal state of library
  • settings: global setting module
  • ui: handles everything related to UI.

Changes afterward:

  • models: module for model/data of individual components or entity here book, annotation, bookmark, how is it structured
  • views: how that model is going to be read to become usable for widgets.
  • widgets: forward facing module interacting with gtk widgets.

Take Read It Later as inspiration.

Write `library/book/book_data.rs`

  • This will store BookxLibraryBookData struct storing:
    • identifier: id of book
    • _type: the type of book
    • storage: path to book
    • cache: cache dir for book
    • cover_path: cover path for book
    • view_set
    • annotations_map: annotations mapping from cfi to color
    • annotations_list: Liststore.
  • Method to implement:
    • load_data(): function to load data about book
    • add_annotation(): add annotations to book
    • remove_annotation(): remove annotations
    • add_bookmark(): add bookmark
    • remove_bookmark(): remove bookmark
    • add_view(): add view to view_set
    • delete_view(): delete view from view_set
    • save_cover(): save cover as png file to cache dir

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.