Skip to content

Victorq10/trojanda-book-reader

Repository files navigation

Trojanda Book Reader

A ePub reader application. It's written on Electron with usage of TypeScript.

Dark mode:
Trojanda Book Reader — Dark mode

Light mode:
Trojanda Book Reader — Light mode

Dark romanized mode:
Trojanda Book Reader — Dark romanized mode

INSTALLATION

git clone git@github.com:Victorq10/trojanda-book-reader.git
cd trojanda-book-reader
npm install
npm run build
npm run start

WORK IN THE VISUAL STUDIO CODE IDE

cd trojanda-book-reader
code trojanda-book-reader.code-workspace 

Open terminal in the Code and run a command to compile *.ts files on save:

npm run watch

Open Debuger drop-down menu and select Debug Main Process (trojanda-book-reader)

USED VERSIONS

$ node --version
v10.20.1

$ sqlite3 --version
3.31.1 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1

$ code --version
1.46.0
a5d1cc28bb5da32ec67e86cc50f84c67cc690321
x64

Possible version incompatability

if you have trable with better-sqlite3 version compatability with electron. You need to run a command

$(npm bin)/electron-rebuild

npm install better-sqlite3 — https://github.com/JoshuaWise/better-sqlite3/blob/HEAD/docs/troubleshooting.md
npm install --save-dev electron-rebuild — https://www.npmjs.com/package/electron-rebuild
$(npm bin)/electron-rebuild

VESUAL STUDIO CODE CONFIGURATION

Command line tools:

sqlite3 — install with synaptic package manager in the Ubuntu 20.04.

Press ctrl+shift+P in the Visual Studio Code and start to type sqlite than select SQLite: Open Database. Select testBook.db or Books.db from the drop-down. Repeate for anothor database. An SQLITE EXPLORER will be appear in the left side of you Visual Studio Code in the Explorer.

Visual Studio Code plugins:

NAME CONVENTIONS

snale cace (or Underscope) is used for variable, instances, parameters and function names.

CamelCaces is used for Types, Classes, Enums etc.

See: Snake case on Wikipedia. and Python: Naming Conventions (5 007 026 views • published 30 трав. 2017 р.)

At least one study found that readers can recognise snake case values more quickly than camelCase: Sharif, Bonita; Maletic, Jonathan I. (2010). "An Eye Tracking Study on camelCase and under_score Identifier Styles"

History of usage of identifiers in the CSS and DOM elements https://developer.mozilla.org/en-US/docs/Archive/Beginner_tutorials/Underscores_in_class_and_ID_Names. Why it is dash and not underscope symbol.

Some links to other standarts of Code conventions

OTHER APPLICATIONS FOR DEVELOPMENT ENVIRONMENT

DATABASE APPLICATIONS

Mainly I use this SQuirreL SQL and DB Browser for SQLite for sqlite.db files.

SVG IMAGES

I used Inkscape Vector Graphics Editor for creating icons in the Trojanda Book Application.

Anothe editor is https://boxy-svg.com/. It has even browser version of editor (Live demo). Which you can open from his home page https://boxy-svg.com/app/-LYzdDlq8VjMN2Bl9HUD

With https://www.pencil2d.org/ editor you can create even animation with sound tracks.

There are some intresting video about animation “12 Principles of Animation (Official Full Series)” https://www.youtube.com/watch?v=uDqjIdI4bF4

RESEARCH INFORMATION

There are some result of investigation about packages needed for Trojanda Book Reader project.

ZIP PACKAGES

adm-zip jsZip UnZip

hejoshwolfe/yauzl — https://github.com/thejoshwolfe/yauzl
antelle/node-stream-zip — https://github.com/antelle/node-stream-zip
ZJONSSON/node-unzipper — https://github.com/ZJONSSON/node-unzipper
EvanOxfeld/node-unzip — https://github.com/EvanOxfeld/node-unzip
Stuk/jszip — https://github.com/Stuk/jszip
kriskowal/zip — https://github.com/kriskowal/zip

see https://blog.csdn.net/meimeilive/article/details/103150412 and https://github.com/open-xml-templating/pizzip/blob/master/documentation/howto/read_zip.md

  • import PizZip from 'pizzip'
  • import JSZipUtils from 'jszip-utils'

DOM PACKAGES

CHANGE_LOG GENERATOR

https://www.npmjs.com/search?q=github_changelog_generator

Create file "scripts/changelog" wish content:

#!/usr/bin/env bash
#  gem install github_changelog_generator
github_changelog_generator -u fgribreau -p node-unidecode

ICONS SET

A project which combine many packages https://github.com/oblador/react-native-vector-icons — example page is here https://oblador.github.io/react-native-vector-icons/ you can see used icon packages in the package.json. There are some of them:

And another:

Using icon package sets and use them to create Android or iOS application is placed in the https://github.com/WrathChaos/react-native-dynamic-vector-icons repository

NOT RELATED REVIEW OF CLojure LANGUAGE

A project https://github.com/razum2um/awesome-clojure collects a collection of projects are written on Clojure language. It amazing.

A spec Guide of Clojure language https://clojure.org/guides/spec

DOCUMANTATION RESOURCES

RESOURCES