Преглед изворни кода

Merge branch 'release/0.8.0'

Book Pauk пре 5 година
родитељ
комит
828ac27c03

+ 106 - 0
LICENSE.md

@@ -0,0 +1,106 @@
+# CC0 1.0 Universal
+
+## Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an “owner”) of an original work of
+authorship and/or a database (each, a “Work”).
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific works
+(“Commons”) that the public can reliably and without fear of later claims of
+infringement build upon, modify, incorporate in other works, reuse and
+redistribute as freely as possible in any form whatsoever and for any purposes,
+including without limitation commercial purposes. These owners may contribute
+to the Commons to promote the ideal of a free culture and the further
+production of creative, cultural and scientific works, or to gain reputation or
+greater distribution for their Work in part through the use and efforts of
+others.
+
+For these and/or other purposes and motivations, and without any expectation of
+additional consideration or compensation, the person associating CC0 with a
+Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
+publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+	 protected by copyright and related or neighboring rights (“Copyright and
+	 Related Rights”). Copyright and Related Rights include, but are not limited
+	 to, the following:
+	1. the right to reproduce, adapt, distribute, perform, display,
+		 communicate, and translate a Work;
+	2. moral rights retained by the original author(s) and/or performer(s);
+	3. publicity and privacy rights pertaining to a person’s image or likeness
+		 depicted in a Work;
+	4. rights protecting against unfair competition in regards to a Work,
+		 subject to the limitations in paragraph 4(i), below;
+	5. rights protecting the extraction, dissemination, use and reuse of data
+		 in a Work;
+	6. database rights (such as those arising under Directive 96/9/EC of the
+		 European Parliament and of the Council of 11 March 1996 on the legal
+		 protection of databases, and under any national implementation thereof,
+		 including any amended or successor version of such directive); and
+	7. other similar, equivalent or corresponding rights throughout the world
+		 based on applicable law or treaty, and any national implementations
+		 thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer’s heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer’s express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free, non
+transferable, non sublicensable, non exclusive, irrevocable and unconditional
+license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in
+all territories worldwide, (ii) for the maximum duration provided by applicable
+law or treaty (including future time extensions), (iii) in any current or
+future medium and for any number of copies, and (iv) for any purpose
+whatsoever, including without limitation commercial, advertising or promotional
+purposes (the “License”). The License shall be deemed effective as of the date
+CC0 was applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder of the
+License, and in such case Affirmer hereby affirms that he or she will not (i)
+exercise any of his or her remaining Copyright and Related Rights in the Work
+or (ii) assert any associated claims and causes of action with respect to the
+Work, in either case contrary to Affirmer’s express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+		1. No trademark or patent rights held by Affirmer are waived, abandoned,
+			 surrendered, licensed or otherwise affected by this document.
+		2. Affirmer offers the Work as-is and makes no representations or
+			 warranties of any kind concerning the Work, express, implied, statutory
+			 or otherwise, including without limitation warranties of title,
+			 merchantability, fitness for a particular purpose, non infringement, or
+			 the absence of latent or other defects, accuracy, or the present or
+			 absence of errors, whether or not discoverable, all to the greatest
+			 extent permissible under applicable law.
+		3. Affirmer disclaims responsibility for clearing rights of other persons
+			 that may apply to the Work or any use thereof, including without
+			 limitation any person’s Copyright and Related Rights in the Work.
+			 Further, Affirmer disclaims responsibility for obtaining any necessary
+			 consents, permissions or other rights required for any use of the Work.
+		4. Affirmer understands and acknowledges that Creative Commons is not a
+			 party to this document and has no duty or obligation with respect to
+			 this CC0 or use of the Work.
+
+For more information, please see
+http://creativecommons.org/publicdomain/zero/1.0/.

+ 40 - 1
README.md

@@ -1,3 +1,42 @@
 # Liberama
 # Liberama
 
 
-Свободный обмен книгами в формате fb2
+Браузерная онлайн-читалка книг и децентрализованная библиотека.
+
+Читалка ![](https://omnireader.ru/favicon.ico)[OmniReader](https://omnireader.ru) является частью данного проекта, развернутой на VPS:
+
+![](docs/assets/face.jpg)
+![](docs/assets/reader.jpg)
+
+## VPS
+Для разворачивания читалки на чистом VPS с нуля смотрите [docs/omnireader](docs/omnireader/README.md)
+
+## Сборка проекта
+
+```
+$ git clone https://github.com/bookpauk/liberama
+$ cd liberama
+$ npm i
+```
+
+### Windows
+```
+$ npm run build:win
+```
+
+### Linux
+```
+$ npm run build:linux
+```
+
+Результат сборки будет доступен в каталоге `dist/linux|win` в виде исполнимого (standalone) файла
+
+### Разработка
+```
+$ npm run dev
+```
+
+## Помочь проекту
+
+* bitcoin: 3EbgZ7MK1UVaN38Gty5DCBtS4PknM4Ut85
+* litecoin: MP39Riec4oSNB3XMjiquKoLWxbufRYNXxZ
+* monero: 8BQPnvHcPSHM5gMQsmuypDgx9NNsYqwXKfDDuswEyF2Q2ewQSfd2pkK6ydH2wmMyq2JViZvy9DQ35hLMx7g72mFWNJTPtnz

+ 0 - 16
client/components/App.vue

@@ -215,22 +215,6 @@ class App extends Vue {
             window.history.replaceState({}, '', '/');
             window.history.replaceState({}, '', '/');
             this.$router.replace({ path: '/reader', query: q });
             this.$router.replace({ path: '/reader', query: q });
         }
         }
-
-        //yandex-метрика для omnireader
-        if (this.config.branch == 'production' && this.mode == 'omnireader' && !this.yaMetricsDone) {
-            (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
-            m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
-            (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");// eslint-disable-line no-unexpected-multiline
-
-            ym(52347334, "init", {// eslint-disable-line no-undef
-                id:52347334,
-                clickmap:true,
-                trackLinks:true,
-                accurateTrackBounce:true
-            });
-
-            this.yaMetricsDone = true;
-        }
     }
     }
 }
 }
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 128
client/components/Reader/Reader.vue

@@ -1,8 +1,5 @@
 <template>
 <template>
     <el-container>
     <el-container>
-        <div v-show="isShowMigrationWarning" style="height: 30px; overflow: hidden; white-space:nowrap;">
-            <span style="margin-left: 10px; font-size: 20px; position: relative; top: 2px" class="clickable" @click="showMigrationHttp">HTTP-версия читалки скоро станет недоступна. Подробнее...</span>
-        </div>
         <el-header v-show="toolBarActive" height='50px'>
         <el-header v-show="toolBarActive" height='50px'>
             <div ref="header" class="header">
             <div ref="header" class="header">
                 <el-tooltip content="Загрузить книгу" :open-delay="1000" effect="light">
                 <el-tooltip content="Загрузить книгу" :open-delay="1000" effect="light">
@@ -93,89 +90,7 @@
                 </span>
                 </span>
             </el-dialog>
             </el-dialog>
 
 
-            <el-dialog
-                title="Внимание!"
-                :visible.sync="migrationVisible1"
-                width="90%">
-                <div>
-                    Появилась httpS-версия сайта по адресу <a href="https://omnireader.ru" target="_blank">https://omnireader.ru</a><br>
-                    Работа по httpS-протоколу, помимо безопасности соединения, позволяет воспользоваться всеми возможностями
-                    современных браузеров, а именно, применительно к нашему ресурсу:
-
-                    <ul>
-                        <li>возможность автономной работы с читалкой (без доступа к интернету), кеширование сайта через appcache</li>
-                        <li>безопасная передача на сервер данных о настройках и читаемых книгах при включенной синхронизации; все данные шифруются на стороне
-                            браузера ключом доступа и никто (в т.ч. администратор) не имеет возможности их прочитать
-                        <li>использование встроенных в JS функций шифрования и других</li>
-                    </ul>
-
-                    Для того, чтобы перейти на новую версию с сохранением настроек и читаемых книг необходимо синхронизировать обе читалки:
-                    <ul>
-                        <li>зайти в "Настройки"->"Профили" и поставить галочку "Включить синхронизацию с сервером"</li>
-                        <li>там же добавить профиль устройства с любым именем для синхронизации настроек<br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                после этого все данные будут автоматически сохранены на сервер
-                            </span>
-                        </li>
-                        <li>далее нажать на кнопку "Показать ключ доступа" и кликнуть по ссылке "Ссылка для ввода ключа"<br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                произойдет переход на https-версию читалки и откроется окно для ввода ключа
-                            </span><br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                подтвердив ввод ключа нажатием "OK", включив синхронизацию с сервером и выбрав профиль устройства, вы восстановите все ваши настройки в новой версии
-                            </span>
-                        </li>
-                    </ul>
-
-
-                    Старая http-версия сайта будет доступна до конца 2019 года.<br>
-                    Приносим извинения за доставленные неудобства.
-                </div>
-
-                <span slot="footer" class="dialog-footer">
-                    <el-button @click="migrationDialogDisable">Больше не показывать</el-button>
-                    <el-button @click="migrationDialogRemind">Напомнить позже</el-button>
-                </span>
-            </el-dialog>
-
-            <el-dialog
-                title="Внимание!"
-                :visible.sync="migrationVisible2"
-                width="90%">
-                <div>
-                    Информация для пользователей старой версии читалки по адресу <a href="http://omnireader.ru" target="_blank">http://omnireader.ru</a><br>
-                    Для того, чтобы перейти на новую httpS-версию с сохранением настроек и читаемых книг необходимо синхронизировать обе читалки:
-                    <ul>
-                        <li>перейти на старую версию ресурса <a href="http://omnireader.ru" target="_blank">http://omnireader.ru</a></li>
-                        <li>зайти в "Настройки"->"Профили" и поставить галочку "Включить синхронизацию с сервером"</li>
-                        <li>там же добавить профиль устройства с любым именем для синхронизации настроек<br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                после этого все данные будут автоматически сохранены на сервер
-                            </span>
-                        </li>
-                        <li>далее нажать на кнопку "Показать ключ доступа" и кликнуть по ссылке "Ссылка для ввода ключа"<br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                произойдет переход на https-версию читалки и откроется окно для ввода ключа
-                            </span><br>
-                            <span style="margin-left: 20px"><i style="font-size: 90%" class="el-icon-info"></i>
-                                подтвердив ввод ключа нажатием "OK", включив синхронизацию с сервером и выбрав профиль устройства, вы восстановите все ваши настройки в новой версии
-                            </span>
-                        </li>
-                    </ul>
-
-
-                    Старая http-версия сайта будет доступна до конца 2019 года.<br>
-                    Приносим извинения за доставленные неудобства.
-                </div>
-
-                <span slot="footer" class="dialog-footer">
-                    <el-button @click="migrationDialogDisable">Больше не показывать</el-button>
-                    <el-button @click="migrationDialogRemind">Напомнить позже</el-button>
-                </span>
-            </el-dialog>
-
         </el-main>
         </el-main>
-
     </el-container>
     </el-container>
 </template>
 </template>
 
 
@@ -285,8 +200,6 @@ class Reader extends Vue {
 
 
     whatsNewVisible = false;
     whatsNewVisible = false;
     whatsNewContent = '';
     whatsNewContent = '';
-    migrationVisible1 = false;
-    migrationVisible2 = false;
 
 
     created() {
     created() {
         this.loading = true;
         this.loading = true;
@@ -346,7 +259,6 @@ class Reader extends Vue {
             this.loading = false;
             this.loading = false;
 
 
             await this.showWhatsNew();
             await this.showWhatsNew();
-            await this.showMigration();
 
 
             this.updateRoute();
             this.updateRoute();
         })();
         })();
@@ -360,7 +272,6 @@ class Reader extends Vue {
         this.clickControl = settings.clickControl;
         this.clickControl = settings.clickControl;
         this.blinkCachedLoad = settings.blinkCachedLoad;
         this.blinkCachedLoad = settings.blinkCachedLoad;
         this.showWhatsNewDialog = settings.showWhatsNewDialog;
         this.showWhatsNewDialog = settings.showWhatsNewDialog;
-        this.showMigrationDialog = settings.showMigrationDialog;
         this.showToolButton = settings.showToolButton;
         this.showToolButton = settings.showToolButton;
         this.enableSitesFilter = settings.enableSitesFilter;
         this.enableSitesFilter = settings.enableSitesFilter;
 
 
@@ -426,41 +337,6 @@ class Reader extends Vue {
         }
         }
     }
     }
 
 
-    async showMigration() {
-        await utils.sleep(3000);
-        if (!this.settingsActive &&
-            this.mode == 'omnireader' && this.showMigrationDialog && this.migrationRemindDate != utils.formatDate(new Date(), 'coDate')) {
-            if (window.location.protocol == 'http:') {
-                this.migrationVisible1 = true;
-            } else if (window.location.protocol == 'https:') {
-                this.migrationVisible2 = true;
-            }
-        }
-    }
-
-    get isShowMigrationWarning() {
-        return window.location.protocol == 'http:';
-    }
-
-    showMigrationHttp() {
-        this.migrationVisible1 = true;
-    }
-
-    migrationDialogDisable() {
-        this.migrationVisible1 = false;
-        this.migrationVisible2 = false;
-        if (this.showMigrationDialog) {
-            const newSettings = Object.assign({}, this.settings, { showMigrationDialog: false });
-            this.commit('reader/setSettings', newSettings);
-        }
-    }
-
-    migrationDialogRemind() {
-        this.migrationVisible1 = false;
-        this.migrationVisible2 = false;
-        this.commit('reader/setMigrationRemindDate', utils.formatDate(new Date(), 'coDate'));
-    }
-
     openVersionHistory() {
     openVersionHistory() {
         this.whatsNewVisible = false;
         this.whatsNewVisible = false;
         this.versionHistoryToggle();
         this.versionHistoryToggle();
@@ -579,10 +455,6 @@ class Reader extends Vue {
         return this.$store.state.reader.whatsNewContentHash;
         return this.$store.state.reader.whatsNewContentHash;
     }
     }
 
 
-    get migrationRemindDate() {
-        return this.$store.state.reader.migrationRemindDate;
-    }
-
     addAction(pos) {
     addAction(pos) {
         let a = this.actionList;
         let a = this.actionList;
         if (!a.length || a[a.length - 1] != pos) {
         if (!a.length || a[a.length - 1] != pos) {

+ 1 - 9
client/components/Reader/SettingsPage/SettingsPage.vue

@@ -471,18 +471,10 @@
                             <el-checkbox v-model="showWhatsNewDialog">Показывать уведомление "Что нового"</el-checkbox>
                             <el-checkbox v-model="showWhatsNewDialog">Показывать уведомление "Что нового"</el-checkbox>
                         </el-tooltip>
                         </el-tooltip>
                     </el-form-item>
                     </el-form-item>
-                    <el-form-item label="Уведомление">
-                        <el-tooltip :open-delay="500" effect="light">
-                            <template slot="content">
-                                Показывать диалог о переходе на httpS-версию
-                            </template>
-                            <el-checkbox v-model="showMigrationDialog">Уведомлять о переходе на httpS-версию</el-checkbox>
-                        </el-tooltip>
-                    </el-form-item>
                 </el-form>
                 </el-form>
 
 
                 <el-form :model="form" size="mini" label-width="120px" @submit.native.prevent>
                 <el-form :model="form" size="mini" label-width="120px" @submit.native.prevent>
-                    <div class="partHeader">Прочее</div>
+                    <div class="partHeader">Другое</div>
 
 
                     <el-form-item label="Парам. в URL">
                     <el-form-item label="Парам. в URL">
                         <el-tooltip :open-delay="500" effect="light">
                         <el-tooltip :open-delay="500" effect="light">

+ 9 - 7
client/components/Reader/TextPage/TextPage.vue

@@ -334,13 +334,15 @@ class TextPage extends Vue {
 
 
         this.draw();
         this.draw();
 
 
-        // шрифты хрен знает когда подгружаются в div, поэтому
-        const parsed = this.parsed;
-        await sleep(5000);
-        if (this.parsed === parsed) {
-            parsed.force = true;
-            this.draw();
-            parsed.force = false;
+        // ширина шрифта некоторое время выдается неверно, поэтому
+        if (!omitLoadFonts) {
+            const parsed = this.parsed;
+            await sleep(100);
+            if (this.parsed === parsed) {
+                parsed.force = true;
+                this.draw();
+                parsed.force = false;
+            }
         }
         }
     }
     }
 
 

+ 12 - 0
client/components/Reader/versionHistory.js

@@ -1,4 +1,16 @@
 export const versionHistory = [
 export const versionHistory = [
+{
+    showUntil: '2019-12-31',
+    header: '0.8.0 (2020-01-02)',
+    content:
+`
+<ul>
+    <li>окончательный переход на https</li>
+    <li>код проекта выложен на GitHub под лицензией cc0</li>
+</ul>
+`
+},
+
 {
 {
     showUntil: '2019-11-26',
     showUntil: '2019-11-26',
     header: '0.7.9 (2019-11-27)',
     header: '0.7.9 (2019-11-27)',

+ 0 - 5
client/store/modules/reader.js

@@ -182,7 +182,6 @@ const settingDefaults = {
     imageFitWidth: true,
     imageFitWidth: true,
     showServerStorageMessages: true,
     showServerStorageMessages: true,
     showWhatsNewDialog: true,
     showWhatsNewDialog: true,
-    showMigrationDialog: true,
     enableSitesFilter: true,
     enableSitesFilter: true,
 
 
     fontShifts: {},
     fontShifts: {},
@@ -205,7 +204,6 @@ const state = {
     profilesRev: 0,
     profilesRev: 0,
     allowProfilesSave: false,//подстраховка для разработки
     allowProfilesSave: false,//подстраховка для разработки
     whatsNewContentHash: '',
     whatsNewContentHash: '',
-    migrationRemindDate: '',
     currentProfile: '',
     currentProfile: '',
     settings: Object.assign({}, settingDefaults),
     settings: Object.assign({}, settingDefaults),
     settingsRev: {},
     settingsRev: {},
@@ -240,9 +238,6 @@ const mutations = {
     setWhatsNewContentHash(state, value) {
     setWhatsNewContentHash(state, value) {
         state.whatsNewContentHash = value;
         state.whatsNewContentHash = value;
     },
     },
-    setMigrationRemindDate(state, value) {
-        state.migrationRemindDate = value;
-    },
     setCurrentProfile(state, value) {
     setCurrentProfile(state, value) {
         state.currentProfile = value;
         state.currentProfile = value;
     },
     },

BIN
docs/assets/face.jpg


BIN
docs/assets/reader.jpg


+ 80 - 0
docs/omnireader/README.md

@@ -0,0 +1,80 @@
+## Разворачивание сервера OmniReader в Ubuntu:
+
+### git, clone
+```
+sudo apt install ssh git
+git clone https://github.com/bookpauk/liberama
+```
+
+### node.js
+```
+sudo apt install -y curl
+curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
+sudo apt install -y nodejs
+```
+
+### install packages
+```
+cd liberama
+npm i
+```
+
+### create public dir
+```
+sudo mkdir /home/liberama
+sudo chown www-data.www-data /home/liberama
+```
+
+### external converter `calibre`, download from https://download.calibre-ebook.com/
+```
+wget "https://download.calibre-ebook.com/3.39.1/calibre-3.39.1-x86_64.txz"
+sudo -u www-data mkdir -p /home/liberama/data/calibre
+sudo -u www-data tar xvf calibre-3.39.1-x86_64.txz -C /home/liberama/data/calibre
+```
+
+### external converters
+```
+sudo apt install libreoffice
+sudo apt install poppler-utils
+```
+
+### nginx, server config
+```
+sudo apt install nginx
+sudo cp docs/omnireader/omnireader /etc/nginx/sites-available/omnireader
+sudo ln -s /etc/nginx/sites-available/omnireader /etc/nginx/sites-enabled/omnireader
+sudo rm /etc/nginx/sites-enabled/default
+sudo service nginx reload
+sudo chown -R www-data.www-data /var/www
+```
+
+### old.omnireader 
+```
+sudo apt install php7.2 php7.2-curl php7.2-mbstring php7.2-fpm
+sudo service php7.2-fpm restart
+
+sudo mkdir /home/oldreader
+sudo chown www-data.www-data /home/oldreader
+sudo -u www-data cp -r docs/omnireader/old/* /home/oldreader
+```
+
+## Деплой и запуск
+```
+cd docs/omnireader
+sh deploy.sh
+sh run_server.sh
+```
+
+После первого запуска будет создан конфигурационный файл `/home/liberama/data/config.json`.
+Необходимо переключить приложение в режим omnireader, отредактировав опцию `servers`:
+```
+    "servers": [
+        {
+            "serverName": "1",
+            "mode": "omnireader",
+            "ip": "0.0.0.0",
+            "port": "44081"
+        }
+    ]
+```
+и перезапустить `run_server.sh`

+ 1 - 20
docs/omnireader/omnireader

@@ -36,26 +36,7 @@ server {
   listen 80;
   listen 80;
   server_name omnireader.ru;
   server_name omnireader.ru;
 
 
-  client_max_body_size 50m;
-
-  gzip on;
-  gzip_min_length 1024;
-  gzip_proxied expired no-cache no-store private auth;
-  gzip_types *;
-
-  location /api {
-    proxy_pass http://127.0.0.1:44081;
-  }
-
-  location /tmp {
-    root /home/liberama/public;
-    add_header Content-Type text/xml;
-    add_header Content-Encoding gzip;
-  }
-
-  location / {
-    root /home/liberama/public;
-  }
+  return 301 https://$host$request_uri;
 }
 }
 
 
 server {
 server {

+ 0 - 39
docs/omnireader/readme.txt

@@ -1,39 +0,0 @@
-sudo bash
-
-mkdir /home/liberama
-chown www-data.www-data /home/liberama
-
-### oldreader
-# ubuntu 18
-apt install php7.2 php7.2-curl php7.2-mbstring php7.2-fpm
-service php7.2-fpm restart
-
-mkdir /home/oldreader
-chown www-data /home/oldreader
-chgrp www-data /home/oldreader
-sudo -u www-data cp -r ./old/* /home/oldreader
-###
-
-### external converter
-# calibre releases https://download.calibre-ebook.com/
-# download, unpack to data/calibre
-# 3.39.1
-wget "https://download.calibre-ebook.com/3.39.1/calibre-3.39.1-x86_64.txz"
-sudo -u www-data mkdir -p /home/liberama/data/calibre
-sudo -u www-data tar xvf calibre-3.39.1-x86_64.txz -C /home/liberama/data/calibre
-
-apt install libreoffice
-apt install poppler-utils
-###
-
-apt install nginx
-
-cp omnireader /etc/nginx/sites-available/omnireader
-ln -s /etc/nginx/sites-available/omnireader /etc/nginx/sites-enabled/omnireader
-rm /etc/nginx/sites-enabled/default
-service nginx reload
-
-chown -R www-data.www-data /var/www
-
-exit
-

+ 0 - 12
docs/readme.txt

@@ -1,12 +0,0 @@
-# Разворачивание среды:
-
-# GIT REPO
-sudo apt install ssh git
-git clone
-
-#nodejs
-sudo apt install -y curl
-curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
-sudo apt install -y nodejs
-npm i
-

+ 153 - 61
package-lock.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "Liberama",
   "name": "Liberama",
-  "version": "0.7.9",
+  "version": "0.8.0",
   "lockfileVersion": 1,
   "lockfileVersion": 1,
   "requires": true,
   "requires": true,
   "dependencies": {
   "dependencies": {
@@ -2013,24 +2013,37 @@
       "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
       "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
     },
     },
     "cacache": {
     "cacache": {
-      "version": "10.0.4",
-      "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
-      "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
+      "version": "12.0.3",
+      "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz",
+      "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
-        "bluebird": "^3.5.1",
-        "chownr": "^1.0.1",
-        "glob": "^7.1.2",
-        "graceful-fs": "^4.1.11",
-        "lru-cache": "^4.1.1",
-        "mississippi": "^2.0.0",
+        "bluebird": "^3.5.5",
+        "chownr": "^1.1.1",
+        "figgy-pudding": "^3.5.1",
+        "glob": "^7.1.4",
+        "graceful-fs": "^4.1.15",
+        "infer-owner": "^1.0.3",
+        "lru-cache": "^5.1.1",
+        "mississippi": "^3.0.0",
         "mkdirp": "^0.5.1",
         "mkdirp": "^0.5.1",
         "move-concurrently": "^1.0.1",
         "move-concurrently": "^1.0.1",
         "promise-inflight": "^1.0.1",
         "promise-inflight": "^1.0.1",
-        "rimraf": "^2.6.2",
-        "ssri": "^5.2.4",
-        "unique-filename": "^1.1.0",
+        "rimraf": "^2.6.3",
+        "ssri": "^6.0.1",
+        "unique-filename": "^1.1.1",
         "y18n": "^4.0.0"
         "y18n": "^4.0.0"
+      },
+      "dependencies": {
+        "lru-cache": {
+          "version": "5.1.1",
+          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+          "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+          "dev": true,
+          "requires": {
+            "yallist": "^3.0.2"
+          }
+        }
       }
       }
     },
     },
     "cache-base": {
     "cache-base": {
@@ -2689,19 +2702,104 @@
       "dev": true
       "dev": true
     },
     },
     "copy-webpack-plugin": {
     "copy-webpack-plugin": {
-      "version": "4.6.0",
-      "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz",
-      "integrity": "sha512-Y+SQCF+0NoWQryez2zXn5J5knmr9z/9qSQt7fbL78u83rxmigOy8X5+BFn8CFSuX+nKT8gpYwJX68ekqtQt6ZA==",
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz",
+      "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
-        "cacache": "^10.0.4",
-        "find-cache-dir": "^1.0.0",
+        "cacache": "^12.0.3",
+        "find-cache-dir": "^2.1.0",
+        "glob-parent": "^3.1.0",
         "globby": "^7.1.1",
         "globby": "^7.1.1",
-        "is-glob": "^4.0.0",
-        "loader-utils": "^1.1.0",
+        "is-glob": "^4.0.1",
+        "loader-utils": "^1.2.3",
         "minimatch": "^3.0.4",
         "minimatch": "^3.0.4",
-        "p-limit": "^1.0.0",
-        "serialize-javascript": "^1.4.0"
+        "normalize-path": "^3.0.0",
+        "p-limit": "^2.2.1",
+        "schema-utils": "^1.0.0",
+        "serialize-javascript": "^2.1.2",
+        "webpack-log": "^2.0.0"
+      },
+      "dependencies": {
+        "find-cache-dir": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+          "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
+          "dev": true,
+          "requires": {
+            "commondir": "^1.0.1",
+            "make-dir": "^2.0.0",
+            "pkg-dir": "^3.0.0"
+          }
+        },
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "make-dir": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+          "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+          "dev": true,
+          "requires": {
+            "pify": "^4.0.1",
+            "semver": "^5.6.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.2.2",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
+          "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
+          "dev": true,
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+          "dev": true
+        },
+        "pify": {
+          "version": "4.0.1",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+          "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+          "dev": true
+        },
+        "pkg-dir": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+          "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
+          "dev": true,
+          "requires": {
+            "find-up": "^3.0.0"
+          }
+        }
       }
       }
     },
     },
     "core-js": {
     "core-js": {
@@ -6963,9 +7061,9 @@
       }
       }
     },
     },
     "mississippi": {
     "mississippi": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
-      "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
+      "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
         "concat-stream": "^1.5.0",
         "concat-stream": "^1.5.0",
@@ -6974,22 +7072,10 @@
         "flush-write-stream": "^1.0.0",
         "flush-write-stream": "^1.0.0",
         "from2": "^2.1.0",
         "from2": "^2.1.0",
         "parallel-transform": "^1.1.0",
         "parallel-transform": "^1.1.0",
-        "pump": "^2.0.1",
+        "pump": "^3.0.0",
         "pumpify": "^1.3.3",
         "pumpify": "^1.3.3",
         "stream-each": "^1.1.0",
         "stream-each": "^1.1.0",
         "through2": "^2.0.0"
         "through2": "^2.0.0"
-      },
-      "dependencies": {
-        "pump": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
-          "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
-          "dev": true,
-          "requires": {
-            "end-of-stream": "^1.1.0",
-            "once": "^1.3.1"
-          }
-        }
       }
       }
     },
     },
     "mixin-deep": {
     "mixin-deep": {
@@ -10883,9 +10969,9 @@
       }
       }
     },
     },
     "serialize-javascript": {
     "serialize-javascript": {
-      "version": "1.9.1",
-      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
-      "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
+      "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
       "dev": true
       "dev": true
     },
     },
     "serve-static": {
     "serve-static": {
@@ -11247,12 +11333,12 @@
       }
       }
     },
     },
     "ssri": {
     "ssri": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
-      "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==",
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
+      "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
-        "safe-buffer": "^5.1.1"
+        "figgy-pudding": "^3.5.1"
       }
       }
     },
     },
     "stable": {
     "stable": {
@@ -11780,9 +11866,9 @@
       }
       }
     },
     },
     "terser": {
     "terser": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.1.tgz",
-      "integrity": "sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==",
+      "version": "4.4.3",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.3.tgz",
+      "integrity": "sha512-0ikKraVtRDKGzHrzkCv5rUNDzqlhmhowOBqC0XqUHFpW+vJ45+20/IFBcebwKfiS2Z9fJin6Eo+F1zLZsxi8RA==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
         "commander": "^2.20.0",
         "commander": "^2.20.0",
@@ -11791,9 +11877,9 @@
       },
       },
       "dependencies": {
       "dependencies": {
         "commander": {
         "commander": {
-          "version": "2.20.0",
-          "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
-          "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
+          "version": "2.20.3",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+          "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
           "dev": true
           "dev": true
         },
         },
         "source-map": {
         "source-map": {
@@ -11803,9 +11889,9 @@
           "dev": true
           "dev": true
         },
         },
         "source-map-support": {
         "source-map-support": {
-          "version": "0.5.13",
-          "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
-          "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
+          "version": "0.5.16",
+          "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
+          "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
           "dev": true,
           "dev": true,
           "requires": {
           "requires": {
             "buffer-from": "^1.0.0",
             "buffer-from": "^1.0.0",
@@ -11815,16 +11901,16 @@
       }
       }
     },
     },
     "terser-webpack-plugin": {
     "terser-webpack-plugin": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
-      "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz",
+      "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
         "cacache": "^12.0.2",
         "cacache": "^12.0.2",
         "find-cache-dir": "^2.1.0",
         "find-cache-dir": "^2.1.0",
         "is-wsl": "^1.1.0",
         "is-wsl": "^1.1.0",
         "schema-utils": "^1.0.0",
         "schema-utils": "^1.0.0",
-        "serialize-javascript": "^1.7.0",
+        "serialize-javascript": "^2.1.2",
         "source-map": "^0.6.1",
         "source-map": "^0.6.1",
         "terser": "^4.1.2",
         "terser": "^4.1.2",
         "webpack-sources": "^1.4.0",
         "webpack-sources": "^1.4.0",
@@ -11922,9 +12008,9 @@
           }
           }
         },
         },
         "p-limit": {
         "p-limit": {
-          "version": "2.2.1",
-          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
-          "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
+          "version": "2.2.2",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
+          "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
           "dev": true,
           "dev": true,
           "requires": {
           "requires": {
             "p-try": "^2.0.0"
             "p-try": "^2.0.0"
@@ -11960,6 +12046,12 @@
             "find-up": "^3.0.0"
             "find-up": "^3.0.0"
           }
           }
         },
         },
+        "serialize-javascript": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
+          "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
+          "dev": true
+        },
         "source-map": {
         "source-map": {
           "version": "0.6.1",
           "version": "0.6.1",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",

+ 5 - 2
package.json

@@ -1,6 +1,9 @@
 {
 {
   "name": "Liberama",
   "name": "Liberama",
-  "version": "0.7.9",
+  "version": "0.8.0",
+  "author": "Book Pauk <bookpauk@gmail.com>",
+  "license": "CC0-1.0",
+  "repository": "bookpauk/liberama",
   "engines": {
   "engines": {
     "node": ">=10.0.0"
     "node": ">=10.0.0"
   },
   },
@@ -27,7 +30,7 @@
     "babel-plugin-transform-decorators-legacy": "^1.3.5",
     "babel-plugin-transform-decorators-legacy": "^1.3.5",
     "babel-preset-env": "^1.3.2",
     "babel-preset-env": "^1.3.2",
     "clean-webpack-plugin": "^1.0.1",
     "clean-webpack-plugin": "^1.0.1",
-    "copy-webpack-plugin": "^4.6.0",
+    "copy-webpack-plugin": "^5.1.1",
     "css-loader": "^1.0.0",
     "css-loader": "^1.0.0",
     "disable-output-webpack-plugin": "^1.0.1",
     "disable-output-webpack-plugin": "^1.0.1",
     "element-theme-chalk": "^2.12.0",
     "element-theme-chalk": "^2.12.0",