GithubHelp home page GithubHelp logo

yrahul3910 / journal Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 5.34 MB

Cross-platform journal application written in JS and Electron

License: MIT License

HTML 13.49% JavaScript 77.15% CSS 9.36%
electron javascript journal-application journal aes-256

journal's Introduction

JournalBear

A cross-platform journal application written in JS and Electron, with AES-256 encryption. Uses Metro UI CSS, jQuery, and pickadate. Uses emoji images from emojify.js, which are stored in the emoji directory.

Deploying

The repo is configured with electron-builder. Run npm run dist to create a built executable for your platform.

Folder Structure

The root folder contains the following files:

  • .editorconfig: The EditorConfig configuration for editors. VS Code requires a plugin for this to work.
  • .eslintignore: Specifies the folders that ESLint should ignore.
  • .eslintrc.json: The ESLint configuration file.

app

The app folder is the core source code.

  • index.html is the page source code that Electron renders.
  • index.js is the Electron index file.
  • render.js is the JS file that has all the handlers for components in index.html.
  • archive.js is the module that has the archiving related functions.
  • encryption.js has encryption functions.

css and js

The css and js folders have the files for third-party libraries used. This avoids the need for the user to have an Internet connection.

  • Metro UI CSS provides the styling for the page.
  • default.css, default.date.css, picker.js, and picker.date.js are the pickadate.js datepicker library used in the Add Entry dialog.
  • jQuery is used for event handling and DOM manipulation.
  • index.css contains custom styling used in the app.

fonts

This folder contains fonts required by Metro UI CSS.

Git Hooks

pre-commit

#!/bin/sh
eslint .

File Format

The .zjournal file format is formed as follows. The base is a JSON file called data.json. All attachments are stored in an images folder beside this JSON file. These two are put in a directory called _jbfiles in the temp directory. This directory is compressed to a .tar.gz format, and this file is encrypted by AES-256.

The JSON file looks like this. The en key was required to maintain compatibility with an older version.

{
    "en": [
        {
            "sentiment": String,
            "entryDate": String,
            "content": String,
            "attachment": [String],
            "nsfw": boolean
        }
    ]
}

journal's People

Contributors

dependabot[bot] avatar yrahul3910 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

journal's Issues

Fix HTML export

HTML export is broken.

  • Need better styling
  • While the images are exported, they don't show up in the page.

Show emotion names in entry list

Along with the little colored circle, show the emotion name for unambiguity. This can be implemented using a constant object with mappings.

Preview glitch

The Preview Entry button shows the preview, but a lot of times, the preview goes below the window and a lot of the preview can't be seen. This should use a scroll pane.

Search by RegEx

There should be an option to search using regular expressions. JS's built-in functions could do this easily.

Emotion name not shown in right pane

The sentiment name should be shown beside the circle in the right pane when an entry is clicked as well, similar to how it's done in the left pane.

Add documentation to code

There's barely any code documentation...variables and functions without explanations. This needs to be urgently addressed.

Sentiment analysis

Given how each entry has an emotion attached to it, it would be neat to show the user how his year was, a simple pie chart should suffice.

Add more options to search

We need to be able to search by existence of attachment and by emotion as well. Preferably through a dialog.

Add Year In Review

A "Your Year in Review" feature would be nice, if it popped up at the end of the year.

Reorder emojis

Although emojis are supported, they're shown in a seemingly random order. Ideally, they'd be shown grouped, like other apps.

Add a dark theme

Some of the required CSS is already there, so perhaps using localStorage, the preferences of the user could be stored.

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.