├── server ├── config │ ├── application_env │ ├── development.js │ ├── production.js │ ├── base.js │ └── index.js ├── core │ ├── LibSharedStorage │ │ └── index.js │ ├── Reader │ │ └── BookConverter │ │ │ ├── ConvertDoc.js │ │ │ ├── ConvertRtf.js │ │ │ ├── ConvertMobi.js │ │ │ ├── ConvertEpub.js │ │ │ ├── ConvertFb3.js │ │ │ ├── ConvertDocX.js │ │ │ ├── index.js │ │ │ ├── ConvertFb2.js │ │ │ ├── ConvertJpegPng.js │ │ │ ├── ConvertSites.js │ │ │ ├── textUtils.js │ │ │ ├── ConvertPdfImages.js │ │ │ └── ConvertBase.js │ ├── Zip │ │ ├── ZipReader.js │ │ └── ZipStreamer.js │ ├── WorkerState.js │ ├── AppLogger.js │ ├── RemoteStorage.js │ ├── RemoteWebDavStorage.js │ ├── AsyncExit.js │ ├── LimitedQueue.js │ ├── utils.js │ ├── FileDownloader.js │ └── xmlParser.js ├── controllers │ ├── BaseController.js │ ├── index.js │ ├── MiscController.js │ ├── WorkerController.js │ ├── ReaderController.js │ └── BookUpdateCheckerController.js ├── db │ └── jembaMigrations │ │ ├── reader-storage │ │ ├── index.js │ │ └── 001-create.js │ │ ├── book-update-server │ │ ├── index.js │ │ └── 001-create.js │ │ ├── index.js │ │ └── app │ │ ├── index.js │ │ ├── 001-create.js │ │ └── 002-create.js ├── createWebApp.js └── dev.js ├── docs ├── omnireader.ru │ ├── old │ │ ├── info.txt │ │ ├── robots.txt │ │ ├── config │ │ │ ├── config.js │ │ │ └── config.php │ │ ├── f.php │ │ ├── txt │ │ │ └── .htaccess │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── js │ │ │ ├── bpr319.js │ │ │ ├── load.gif │ │ │ ├── bpricon.gif │ │ │ ├── colo58.png │ │ │ └── stylex.css │ │ ├── test.php │ │ ├── apple-touch-icon.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── .htaccess │ │ └── parser.php │ ├── stop_server.sh │ ├── deploy.sh │ ├── start_server.sh │ ├── cron_server.sh │ ├── omnireader_http │ ├── README.md │ └── omnireader ├── assets │ ├── face.jpg │ └── reader.jpg ├── beta │ ├── run_server.sh │ ├── deploy.sh │ ├── beta.omnireader_http │ ├── beta.liberama │ └── beta.omnireader └── liberama.top │ └── liberama ├── makefile ├── client ├── assets │ ├── robots.txt │ ├── favicon.ico │ ├── apple-touch-icon.png │ ├── apple-touch-icon-precomposed.png │ └── sw-register.js ├── components │ ├── fonts │ │ ├── arimo.woff2 │ │ ├── avrile.ttf │ │ ├── avrile.woff │ │ ├── geo_1.ttf │ │ ├── geo_1.woff │ │ ├── roboto.ttf │ │ ├── roboto.woff │ │ ├── rubik.woff2 │ │ ├── open-sans.ttf │ │ ├── open-sans.woff │ │ ├── reader-default.ttf │ │ └── reader-default.woff │ ├── Reader │ │ ├── TextPage │ │ │ ├── images │ │ │ │ ├── paper1.jpg │ │ │ │ ├── paper10.png │ │ │ │ ├── paper11.png │ │ │ │ ├── paper12.png │ │ │ │ ├── paper13.png │ │ │ │ ├── paper14.png │ │ │ │ ├── paper15.png │ │ │ │ ├── paper16.png │ │ │ │ ├── paper17.png │ │ │ │ ├── paper2.jpg │ │ │ │ ├── paper3.jpg │ │ │ │ ├── paper4.jpg │ │ │ │ ├── paper5.jpg │ │ │ │ ├── paper6.jpg │ │ │ │ ├── paper7.jpg │ │ │ │ ├── paper8.jpg │ │ │ │ └── paper9.jpg │ │ │ └── TextPage.css │ │ ├── SettingsPage │ │ │ ├── ViewTab │ │ │ │ ├── helper.js │ │ │ │ ├── ViewTab.vue │ │ │ │ └── defPalette.js │ │ │ ├── ResetTab │ │ │ │ └── ResetTab.vue │ │ │ ├── KeysTab │ │ │ │ └── KeysTab.vue │ │ │ ├── ToolBarTab │ │ │ │ └── ToolBarTab.vue │ │ │ └── PageMoveTab │ │ │ │ └── PageMoveTab.vue │ │ ├── share │ │ │ ├── clickMap.js │ │ │ ├── wallpaperStorage.js │ │ │ └── coversStorage.js │ │ ├── HelpPage │ │ │ ├── DonateHelpPage │ │ │ │ └── DonateHelpPage.vue │ │ │ ├── HotkeysHelpPage │ │ │ │ └── HotkeysHelpPage.vue │ │ │ ├── VersionHistoryPage │ │ │ │ └── VersionHistoryPage.vue │ │ │ ├── MouseHelpPage │ │ │ │ └── MouseHelpPage.vue │ │ │ ├── HelpPage.vue │ │ │ └── CommonHelpPage │ │ │ │ └── CommonHelpPage.vue │ │ ├── ClickMapPage │ │ │ └── ClickMapPage.vue │ │ ├── SetPositionPage │ │ │ └── SetPositionPage.vue │ │ ├── ProgressPage │ │ │ └── ProgressPage.vue │ │ ├── CopyTextPage │ │ │ └── CopyTextPage.vue │ │ ├── LoaderPage │ │ │ └── PasteTextPage │ │ │ │ └── PasteTextPage.vue │ │ └── LibsPage │ │ │ └── LibsPage.vue │ ├── ExternalLibs │ │ └── linkUtils.js │ ├── share │ │ ├── Dialog.vue │ │ └── Notify.vue │ └── vueComponent.js ├── api │ ├── webSocketConnection.js │ └── misc.js ├── main.js ├── store │ ├── modules │ │ ├── fonts │ │ │ ├── fonts2list.js │ │ │ └── fonts.json │ │ └── config.js │ ├── root.js │ └── index.js ├── index.html.template ├── share │ ├── dynamicCss.js │ ├── cryptoUtils.js │ └── LockQueue.js ├── router.js └── quasar.js ├── .gitignore ├── nodemon.json ├── .babelrc ├── .eslintrc └── package.json /server/config/application_env: -------------------------------------------------------------------------------- 1 | development -------------------------------------------------------------------------------- /docs/omnireader.ru/old/info.txt: -------------------------------------------------------------------------------- 1 | omnireader.ru -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | 3 | %: 4 | @npm run $@ -------------------------------------------------------------------------------- /client/assets/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /?*url= 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /server/.liberama* 3 | /dist 4 | dev*.sh 5 | 6 | -------------------------------------------------------------------------------- /docs/omnireader.ru/old/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /?*url= 3 | -------------------------------------------------------------------------------- /docs/assets/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/assets/face.jpg -------------------------------------------------------------------------------- /docs/assets/reader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/assets/reader.jpg -------------------------------------------------------------------------------- /client/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/assets/favicon.ico -------------------------------------------------------------------------------- /docs/omnireader.ru/stop_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo service cron stop 4 | sudo killall liberama -------------------------------------------------------------------------------- /docs/omnireader.ru/old/config/config.js: -------------------------------------------------------------------------------- 1 | siteroot = 'http://old.omnireader.ru/'; 2 | doRedirect = ''; 3 | -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignore": ["node_modules", ".git", "client/**/*.*"], 3 | 4 | "ext": "js json" 5 | } -------------------------------------------------------------------------------- /docs/omnireader.ru/old/f.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/f.php -------------------------------------------------------------------------------- /server/core/LibSharedStorage/index.js: -------------------------------------------------------------------------------- 1 | class LibSharedStorage { 2 | } 3 | 4 | module.exports = LibSharedStorage; -------------------------------------------------------------------------------- /docs/omnireader.ru/old/txt/.htaccess: -------------------------------------------------------------------------------- 1 | AddType 'text/plain; charset=windows-1251' .txz .txt 2 | AddEncoding gzip .txz -------------------------------------------------------------------------------- /client/assets/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/assets/apple-touch-icon.png -------------------------------------------------------------------------------- /client/components/fonts/arimo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/arimo.woff2 -------------------------------------------------------------------------------- /client/components/fonts/avrile.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/avrile.ttf -------------------------------------------------------------------------------- /client/components/fonts/avrile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/avrile.woff -------------------------------------------------------------------------------- /client/components/fonts/geo_1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/geo_1.ttf -------------------------------------------------------------------------------- /client/components/fonts/geo_1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/geo_1.woff -------------------------------------------------------------------------------- /client/components/fonts/roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/roboto.ttf -------------------------------------------------------------------------------- /client/components/fonts/roboto.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/roboto.woff -------------------------------------------------------------------------------- /client/components/fonts/rubik.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/rubik.woff2 -------------------------------------------------------------------------------- /docs/beta/run_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo -H -u www-data bash -c "cd /var/www; /home/beta.liberama/liberama" 4 | -------------------------------------------------------------------------------- /docs/omnireader.ru/old/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/favicon.ico -------------------------------------------------------------------------------- /docs/omnireader.ru/old/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/index.html -------------------------------------------------------------------------------- /docs/omnireader.ru/old/js/bpr319.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/js/bpr319.js -------------------------------------------------------------------------------- /docs/omnireader.ru/old/js/load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/js/load.gif -------------------------------------------------------------------------------- /client/components/fonts/open-sans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/open-sans.ttf -------------------------------------------------------------------------------- /docs/omnireader.ru/old/js/bpricon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/js/bpricon.gif -------------------------------------------------------------------------------- /docs/omnireader.ru/old/js/colo58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/js/colo58.png -------------------------------------------------------------------------------- /docs/omnireader.ru/old/js/stylex.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/js/stylex.css -------------------------------------------------------------------------------- /client/components/fonts/open-sans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/open-sans.woff -------------------------------------------------------------------------------- /docs/beta/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | npm run build:linux 4 | sudo -u www-data cp -r ../../dist/linux/* /home/beta.liberama 5 | -------------------------------------------------------------------------------- /client/components/fonts/reader-default.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/reader-default.ttf -------------------------------------------------------------------------------- /docs/omnireader.ru/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | npm run build:linux 4 | sudo -u www-data cp -r ../../dist/linux/* /home/liberama 5 | -------------------------------------------------------------------------------- /docs/omnireader.ru/old/test.php: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /client/components/fonts/reader-default.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/fonts/reader-default.woff -------------------------------------------------------------------------------- /docs/omnireader.ru/old/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/apple-touch-icon.png -------------------------------------------------------------------------------- /client/assets/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/assets/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /client/api/webSocketConnection.js: -------------------------------------------------------------------------------- 1 | import WebSocketConnection from '../../server/core/WebSocketConnection'; 2 | 3 | export default new WebSocketConnection(); -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper1.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper10.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper11.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper12.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper13.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper14.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper15.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper16.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper17.png -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper2.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper3.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper4.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper5.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper6.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper7.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper8.jpg -------------------------------------------------------------------------------- /client/components/Reader/TextPage/images/paper9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/client/components/Reader/TextPage/images/paper9.jpg -------------------------------------------------------------------------------- /server/config/development.js: -------------------------------------------------------------------------------- 1 | const base = require('./base'); 2 | 3 | module.exports = Object.assign({}, base, { 4 | branch: 'development', 5 | }); 6 | -------------------------------------------------------------------------------- /docs/omnireader.ru/old/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bookpauk/liberama/HEAD/docs/omnireader.ru/old/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /docs/omnireader.ru/old/config/config.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /client/assets/sw-register.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | if('serviceWorker' in navigator) { 3 | navigator.serviceWorker.register('/service-worker.js'); 4 | } 5 | })(); 6 | -------------------------------------------------------------------------------- /docs/omnireader.ru/start_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo -H -u www-data bash -c "cd /var/www; /home/liberama/liberama >/dev/null & disown" 4 | sudo service cron start 5 | -------------------------------------------------------------------------------- /server/controllers/BaseController.js: -------------------------------------------------------------------------------- 1 | class BaseController { 2 | constructor(config) { 3 | this.config = config; 4 | } 5 | } 6 | 7 | module.exports = BaseController; -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [['@babel/preset-env', { "targets": { "esmodules": true } }]], 3 | "plugins": [ 4 | ["@babel/plugin-proposal-decorators", { "legacy": true }] 5 | ] 6 | } -------------------------------------------------------------------------------- /server/db/jembaMigrations/reader-storage/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | table: 'migration1', 3 | data: [ 4 | {id: 1, name: 'create', data: require('./001-create')} 5 | ] 6 | } -------------------------------------------------------------------------------- /server/db/jembaMigrations/book-update-server/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | table: 'migration1', 3 | data: [ 4 | {id: 1, name: 'create', data: require('./001-create')} 5 | ] 6 | } -------------------------------------------------------------------------------- /docs/omnireader.ru/old/.htaccess: -------------------------------------------------------------------------------- 1 | #RewriteEngine On 2 | #RewriteCond %{HTTP_HOST} ^www.bookpauk.ru$ [NC] 3 | #RewriteRule ^(.*)$ http://bookpauk.ru/$1 [R=301,L] 4 | 5 | Options None 6 | Options +ExecCGI 7 | -------------------------------------------------------------------------------- /server/db/jembaMigrations/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'app': require('./app'), 3 | 'reader-storage': require('./reader-storage'), 4 | 'book-update-server': require('./book-update-server'), 5 | }; 6 | -------------------------------------------------------------------------------- /server/db/jembaMigrations/app/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | table: 'migration1', 3 | data: [ 4 | {id: 1, name: 'create', data: require('./001-create')}, 5 | {id: 2, name: 'create', data: require('./002-create')}, 6 | ] 7 | } -------------------------------------------------------------------------------- /docs/omnireader.ru/cron_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! pgrep -x "liberama" > /dev/null ; then 4 | sudo -H -u www-data bash -c "cd /var/www; /home/liberama/liberama >/dev/null" 5 | else 6 | echo "Process 'liberama' already running" 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /server/db/jembaMigrations/app/001-create.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | up: [ 3 | ['create', { 4 | table: 'remote_sent' 5 | }], 6 | ], 7 | down: [ 8 | ['drop', { 9 | table: 'remote_sent' 10 | }], 11 | ] 12 | }; 13 | -------------------------------------------------------------------------------- /server/controllers/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MiscController: require('./MiscController'), 3 | ReaderController: require('./ReaderController'), 4 | WorkerController: require('./WorkerController'), 5 | WebSocketController: require('./WebSocketController'), 6 | BookUpdateCheckerController: require('./BookUpdateCheckerController'), 7 | } -------------------------------------------------------------------------------- /client/components/Reader/SettingsPage/ViewTab/helper.js: -------------------------------------------------------------------------------- 1 | const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/; 2 | 3 | export function colorPanStyle(bgColor) { 4 | return `width: 30px; height: 30px; border: 1px solid black; border-radius: 4px; background-color: ${bgColor}`; 5 | } 6 | 7 | export function isHexColor(value) { 8 | return hex.test(value); 9 | } 10 | -------------------------------------------------------------------------------- /client/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | 3 | import router from './router'; 4 | import store from './store'; 5 | import q from './quasar'; 6 | 7 | import App from './components/App.vue'; 8 | 9 | const app = createApp(App); 10 | 11 | app.use(router); 12 | app.use(store); 13 | app.use(q.quasar, q.options); 14 | q.init(); 15 | 16 | app.mount('#app'); 17 | -------------------------------------------------------------------------------- /server/db/jembaMigrations/reader-storage/001-create.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | up: [ 3 | //CREATE TABLE storage (id TEXT PRIMARY KEY, rev INTEGER, time INTEGER, data TEXT); 4 | ['create', { 5 | table: 'storage' 6 | }], 7 | ], 8 | down: [ 9 | ['drop', { 10 | table: 'storage' 11 | }], 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /client/components/Reader/share/clickMap.js: -------------------------------------------------------------------------------- 1 | export const clickMap = { 2 | 33: {30: 'PgUp', 100: 'PgDown'}, 3 | 67: {30: 'Up', 70: 'Menu', 100: 'Down'}, 4 | 100: {30: 'PgUp', 100: 'PgDown'} 5 | }; 6 | 7 | export const clickMapText = { 8 | 'PgUp': 'Страницу назад', 9 | 'PgDown': 'Страницу вперед', 10 | 'Up': 'Строку назад', 11 | 'Down': 'Строку вперед', 12 | 'Menu': 'Показать или скрыть панель', 13 | }; 14 | -------------------------------------------------------------------------------- /client/store/modules/fonts/fonts2list.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | 3 | async function main() { 4 | const webfonts = await fs.readFile('webfonts.json'); 5 | let fonts = JSON.parse(webfonts); 6 | 7 | fonts = fonts.items.filter(item => item.subsets.includes('cyrillic')); 8 | fonts = fonts.map(item => item.family); 9 | fonts.sort(); 10 | 11 | await fs.writeFile('fonts.json', JSON.stringify(fonts)); 12 | } 13 | main(); -------------------------------------------------------------------------------- /client/store/root.js: -------------------------------------------------------------------------------- 1 | // initial state 2 | const state = { 3 | apiError: null, 4 | }; 5 | 6 | // getters 7 | const getters = {}; 8 | 9 | // actions 10 | const actions = {}; 11 | 12 | // mutations 13 | const mutations = { 14 | setApiError(state, value) { 15 | state.apiError = value; 16 | }, 17 | }; 18 | 19 | export default { 20 | namespaced: true, 21 | state, 22 | getters, 23 | actions, 24 | mutations 25 | }; 26 | -------------------------------------------------------------------------------- /server/config/production.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const base = require('./base'); 3 | 4 | const execDir = path.dirname(process.execPath); 5 | 6 | module.exports = Object.assign({}, base, { 7 | branch: 'production', 8 | 9 | execDir, 10 | 11 | servers: [ 12 | { 13 | serverName: '1', 14 | mode: 'reader', 15 | ip: '0.0.0.0', 16 | port: '44080', 17 | }, 18 | ], 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /client/store/modules/config.js: -------------------------------------------------------------------------------- 1 | // initial state 2 | const state = { 3 | name: null, 4 | version: null, 5 | mode: null, 6 | }; 7 | 8 | // getters 9 | const getters = {}; 10 | 11 | // actions 12 | const actions = {}; 13 | 14 | // mutations 15 | const mutations = { 16 | setConfig(state, value) { 17 | Object.assign(state, value); 18 | }, 19 | }; 20 | 21 | export default { 22 | namespaced: true, 23 | state, 24 | getters, 25 | actions, 26 | mutations 27 | }; 28 | -------------------------------------------------------------------------------- /client/index.html.template: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |5 | Здесь вы можете пожертвовать на развитие проекта: 6 |
7 | 8 |8 | {{ item }} 9 |
10 | 11 | 12 |', 9 | 'BR' => chr(13) . chr(10) . '
', 10 | 'BR/' => chr(13) . chr(10) . '
', 11 | 'DD' => chr(13) . chr(10) . '
', 12 | 'P' => chr(13) . chr(10) . '
',
13 | 'HR' => chr(13) . chr(10),
14 | 'LI' => chr(13) . chr(10),
15 | 'OL' => chr(13) . chr(10),
16 | '/OL' => chr(13) . chr(10),
17 | 'TABLE' => chr(13) . chr(10),
18 | '/TABLE' => chr(13) . chr(10),
19 | 'TITLE' => '
',
20 | '/TITLE' => '
',
21 | 'UL' => chr(13) . chr(10) . ' ',
22 | '/UL' => chr(13) . chr(10),
23 |
24 | // fb2
25 | 'EMPTY-LINE/' => '
', 26 | 'STANZA' => '
', 27 | 'V' => '
', 28 | '/POEM' => '
',
29 | 'SUBTITLE' => '
',
30 | '/SUBTITLE' => '
',
31 | );
32 |
33 | $inner_cut = array(
34 | 'HEAD' => 1,
35 | 'SCRIPT' => 1,
36 | 'STYLE' => 1,
37 | //fb2
38 | 'BINARY' => 1,
39 | 'DESCRIPTION' => 1,
40 | );
41 |
42 | if ($remove_tags)
43 | $substs = $inner_cut = array();
44 |
45 |
46 | $data = str_replace(' ', ' ', $data);
47 |
48 | $i = 0;
49 | $len = strlen($data);
50 | $out = '';
51 | $cut_counter = 0;
52 | $cut_tag = '';
53 | while ($i < $len) {
54 | $left = strpos($data, '<', $i);
55 | if ($left !== FALSE) {
56 | $right = strpos($data, '>', $left + 1);
57 | if ($right !== FALSE) {
58 | $tag = trim(substr($data, $left + 1, $right - $left - 1));
59 | $first_space = strpos($tag, ' ');
60 | if ($first_space !== FALSE)
61 | $tag = substr($tag, 0, $first_space);
62 | $tag = strtoupper($tag);
63 |
64 | if (!$cut_counter) {
65 | $out .= substr($data, $i, $left - $i);
66 | if (isset($substs[$tag]))
67 | $out .= $substs[$tag];
68 | }
69 |
70 | if (isset($inner_cut[$tag]) && (!$cut_counter || $cut_tag == $tag))
71 | {
72 | if (!$cut_counter)
73 | $cut_tag = $tag;
74 | $cut_counter++;
75 | }
76 | if ($tag != '' && $tag[0] == '/' && $cut_tag == substr($tag, 1)) {
77 | $cut_counter = ($cut_counter > 0) ? $cut_counter - 1 : 0;
78 | if (!$cut_counter)
79 | $cut_tag = '';
80 | }
81 | //$close_tag = substr($tag, 1);
82 | //$out .= "
$cut_counter, $cut_tag == $close_tag";
83 |
84 | $i = $right + 1;
85 | } else
86 | break;
87 | }
88 | else
89 | break;
90 | }
91 | if ($i < $len && !$cut_counter)
92 | $out .= substr($data, $i, $len - $i);
93 | return $out;
94 | }
95 |
96 | ?>
97 |
--------------------------------------------------------------------------------
/client/quasar.js:
--------------------------------------------------------------------------------
1 | import 'quasar/dist/quasar.css';
2 | //import Quasar from 'quasar/dist/quasar.umd.prod.js';
3 |
4 | import Quasar from 'quasar/src/vue-plugin.js';
5 | //config
6 | const config = {};
7 |
8 | //components
9 | //import {QLayout} from 'quasar/src/components/layout';
10 | //import {QPageContainer, QPage} from 'quasar/src/components/page';
11 | //import {QDrawer} from 'quasar/src/components/drawer';
12 |
13 | import {QCircularProgress} from 'quasar/src/components/circular-progress';
14 | import {QInput} from 'quasar/src/components/input';
15 | import {QBtn} from 'quasar/src/components/btn';
16 | import {QBtnGroup} from 'quasar/src/components/btn-group';
17 | import {QBtnToggle} from 'quasar/src/components/btn-toggle';
18 | import {QIcon} from 'quasar/src/components/icon';
19 | import {QSlider} from 'quasar/src/components/slider';
20 | import {QTabs, QTab} from 'quasar/src/components/tabs';
21 | //import {QTabPanels, QTabPanel} from 'quasar/src/components/tab-panels';
22 | import {QSeparator} from 'quasar/src/components/separator';
23 | //import {QList} from 'quasar/src/components/item';
24 | import {QItem, QItemSection, QItemLabel} from 'quasar/src/components/item';
25 | import {QTooltip} from 'quasar/src/components/tooltip';
26 | import {QSpinner} from 'quasar/src/components/spinner';
27 | import {QTable, QTh, QTr, QTd} from 'quasar/src/components/table';
28 | import {QCheckbox} from 'quasar/src/components/checkbox';
29 | import {QSelect} from 'quasar/src/components/select';
30 | import {QColor} from 'quasar/src/components/color';
31 | import {QPopupProxy} from 'quasar/src/components/popup-proxy';
32 | import {QDialog} from 'quasar/src/components/dialog';
33 | import {QChip} from 'quasar/src/components/chip';
34 | import {QTree} from 'quasar/src/components/tree';
35 | import {QVirtualScroll} from 'quasar/src/components/virtual-scroll';
36 |
37 | //import {QExpansionItem} from 'quasar/src/components/expansion-item';
38 |
39 | const components = {
40 | //QLayout,
41 | //QPageContainer, QPage,
42 | //QDrawer,
43 |
44 | QCircularProgress,
45 | QInput,
46 | QBtn,
47 | QBtnGroup,
48 | QBtnToggle,
49 | QIcon,
50 | QSlider,
51 | QTabs, QTab,
52 | //QTabPanels, QTabPanel,
53 | QSeparator,
54 | //QList,
55 | QItem, QItemSection, QItemLabel,
56 | QTooltip,
57 | QSpinner,
58 | QTable, QTh, QTr, QTd,
59 | QCheckbox,
60 | QSelect,
61 | QColor,
62 | QPopupProxy,
63 | QDialog,
64 | QChip,
65 | QTree,
66 | //QExpansionItem,
67 | QVirtualScroll,
68 | };
69 |
70 | //directives
71 | import Ripple from 'quasar/src/directives/Ripple';
72 | import ClosePopup from 'quasar/src/directives/ClosePopup';
73 |
74 | const directives = {Ripple, ClosePopup};
75 |
76 | //plugins
77 | import AppFullscreen from 'quasar/src/plugins/AppFullscreen';
78 | import Notify from 'quasar/src/plugins/Notify';
79 |
80 | const plugins = {
81 | AppFullscreen,
82 | Notify,
83 | };
84 |
85 | //icons
86 | //import '@quasar/extras/fontawesome-v5/fontawesome-v5.css';
87 | //import fontawesomeV5 from 'quasar/icon-set/fontawesome-v5.js'
88 |
89 | import '@quasar/extras/line-awesome/line-awesome.css';
90 | import lineAwesome from 'quasar/icon-set/line-awesome.js'
91 |
92 | export default {
93 | quasar: Quasar,
94 | options: { config, components, directives, plugins },
95 | init: () => {
96 | Quasar.iconSet.set(lineAwesome);
97 | }
98 | };
--------------------------------------------------------------------------------
/client/components/Reader/HelpPage/HelpPage.vue:
--------------------------------------------------------------------------------
1 |
2 |
/);
76 | if (m)
77 | author = m[1];
78 |
79 | let book = this.getTitle(text);
80 | book = book.replace(' (fb2) | Флибуста', '');
81 |
82 | const title = `';
85 | if (text.indexOf(begin) <= 0)
86 | begin = '
';
87 |
88 | const end = '