Compare commits

..
Author SHA1 Message Date
palerdot ce097957aa update yarn.lock with patch file info 2023-04-17 12:37:44 +05:30
palerdot d4731d1c4a fix(android): patch rn-fetch-blob for app sync crash 2023-04-17 11:52:07 +05:30
45 changed files with 5156 additions and 824 deletions

No files matched your search

-5
View File
@@ -396,7 +396,6 @@ packages/app-mobile/components/NoteEditor/NoteEditor.js
packages/app-mobile/components/NoteEditor/SearchPanel.js
packages/app-mobile/components/NoteEditor/SelectionFormatting.js
packages/app-mobile/components/NoteEditor/types.js
packages/app-mobile/components/NoteList.js
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
@@ -410,7 +409,6 @@ packages/app-mobile/components/biometrics/biometricAuthenticate.js
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js
packages/app-mobile/components/screens/VoskScreen.js
packages/app-mobile/components/screens/ConfigScreen.js
packages/app-mobile/components/screens/Note.js
packages/app-mobile/components/screens/Notes.js
@@ -713,7 +711,6 @@ packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/ShareService.test.js
@@ -875,8 +872,6 @@ packages/tools/website/updateDownloadPage.js
packages/tools/website/updateNews.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/applyTranslations.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/convertLinksToLocale.test.js
packages/tools/website/utils/frontMatter.js
packages/tools/website/utils/news.js
packages/tools/website/utils/openGraph.js
+1 -3
View File
@@ -71,9 +71,7 @@ jobs:
- uses: olegtarasov/get-tag@v2.1
- uses: actions/setup-node@v2
with:
# We need to pin the version to 18.15, because 18.16+ fails with this error:
# https://github.com/facebook/react-native/issues/36440
node-version: '18.15.0'
node-version: '18'
- name: Install Yarn
run: |
-5
View File
@@ -383,7 +383,6 @@ packages/app-mobile/components/NoteEditor/NoteEditor.js
packages/app-mobile/components/NoteEditor/SearchPanel.js
packages/app-mobile/components/NoteEditor/SelectionFormatting.js
packages/app-mobile/components/NoteEditor/types.js
packages/app-mobile/components/NoteList.js
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
@@ -397,7 +396,6 @@ packages/app-mobile/components/biometrics/biometricAuthenticate.js
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js
packages/app-mobile/components/screens/VoskScreen.js
packages/app-mobile/components/screens/ConfigScreen.js
packages/app-mobile/components/screens/Note.js
packages/app-mobile/components/screens/Notes.js
@@ -700,7 +698,6 @@ packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/ShareService.test.js
@@ -862,8 +859,6 @@ packages/tools/website/updateDownloadPage.js
packages/tools/website/updateNews.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/applyTranslations.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/convertLinksToLocale.test.js
packages/tools/website/utils/frontMatter.js
packages/tools/website/utils/news.js
packages/tools/website/utils/openGraph.js
-10
View File
@@ -657,16 +657,6 @@ footer .bottom-links-row p {
font-size: 1.1em;
}
.language-switcher {
display: inline;
}
.language-switcher > button {
border: none;
background-color: transparent;
color: #0557ba;
}
/*****************************************************************
WHAT'S NEW PAGE
*****************************************************************/
-7
View File
@@ -1,7 +0,0 @@
/*!
* Bootstrap v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]}},e=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},i=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},n=t=>{const e=i(t);return e&&document.querySelector(e)?e:null},s=t=>{const e=i(t);return e?document.querySelector(e):null},o=t=>{t.dispatchEvent(new Event("transitionend"))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=e=>r(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?t.findOne(e):null,l=(t,e,i)=>{Object.keys(i).forEach(n=>{const s=i[n],o=e[n],a=o&&r(o)?"element":null==(l=o)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)})},c=t=>!(!r(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),h=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},u=()=>{},f=t=>t.offsetHeight,p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},m=[],g=()=>"rtl"===document.documentElement.dir,_=t=>{var e;e=()=>{const e=p();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",()=>{m.forEach(t=>t())}),m.push(e)):e()},b=t=>{"function"==typeof t&&t()},v=(t,e,i=!0)=>{if(!i)return void b(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const r=({target:i})=>{i===e&&(s=!0,e.removeEventListener("transitionend",r),b(t))};e.addEventListener("transitionend",r),setTimeout(()=>{s||o(e)},n)},y=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},w=/[^.]*(?=\..*)\.|.*/,E=/\..*/,A=/::\d+$/,T={};let O=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},k=/^(mouseenter|mouseleave)/i,L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&`${e}::${O++}`||t.uidEvent||O++}function D(t){const e=x(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function S(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function I(t,e,i){const n="string"==typeof e,s=n?i:e;let o=M(t);return L.has(o)||(o=t),[n,s,o]}function N(t,e,i,n,s){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),k.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=I(e,i,n),l=D(t),c=l[a]||(l[a]={}),h=S(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=x(r,e.replace(w,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parLine truncated
//# sourceMappingURL=bootstrap.bundle.min.js.map
File diff suppressed because it is too large. Load diff
+7
View File
@@ -0,0 +1,7 @@
/*!
* Bootstrap v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}})),e.default=t,Object.freeze(e)}var s=e(t);const i={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const s=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(e)&&s.push(i),i=i.parentNode;return s},prev(t,e){let s=t.previousElementSibling;for(;s;){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;for(;s;){if(s.matches(e))return[s];s=s.nextElementSibling}return[]}},n=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},o=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s="#"+s.split("#")[1]),e=s&&"#"!==s?s.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{t.dispatchEvent(new Event("transitionend"))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),h=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?i.findOne(t):null,d=(t,e,s)=>{Object.keys(s).forEach(i=>{const n=s[i],o=e[i],r=o&&c(o)?"element":null==(a=o)?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${n}".`)})},u=t=>!(!c(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),g=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),p=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?p(t.parentNode):null},f=()=>{},m=t=>t.offsetHeight,_=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},b=[],v=()=>"rtl"===document.documentElement.dir,y=t=>{var e;e=()=>{const e=_();if(e){const s=t.NAME,i=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=i,t.jQueryInterface)}},"loading"===document.readyState?(b.length||document.addEventListener("DOMContentLoaded",()=>{b.forEach(t=>t())}),b.push(e)):e()},w=t=>{"function"==typeof t&&t()},E=(t,e,s=!0)=>{if(!s)return void w(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),n=Number.parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0})(e)+5;let n=!1;const o=({target:s})=>{s===e&&(n=!0,e.removeEventListener("transitionend",o),w(t))};e.addEventListener("transitionend",o),setTimeout(()=>{n||l(e)},i)},A=(t,e,s,i)=>{let n=t.indexOf(e);if(-1===n)return t[!s&&i?t.length-1:0];const o=t.length;return n+=s?1:-1,i&&(n=(n+o)%o),t[Math.max(0,Math.min(n,o-1))]},T=/[^.]*(?=\..*)\.|.*/,C=/\..*/,k=/::\d+$/,L={};let O=1;const D={mouseenter:"mouseover",mouseleave:"mouseout"},I=/^(mouseenter|mouseleave)/i,N=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function S(t,e){return e&&`${e}::${O++}`||t.uidEvent||O++}function x(t){const e=S(t);return t.uidEvent=e,L[e]=L[e]||{},L[e]}function M(t,e,s=null){const i=Object.keys(t);for(let n=0,o=i.length;n<o;n++){const o=t[i[n]];if(o.originalHandler===e&&o.delegationSelector===s)return o}return null}function P(t,e,s){const i="string"==typeof e,n=i?s:e;let o=R(t);return N.has(o)||(o=t),[i,n,o]}function j(t,e,s,i,n){if("string"!=typeof e||!t)return;if(s||(s=i,i=null),I.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTaLine truncated
//# sourceMappingURL=bootstrap.min.js.map
@@ -421,7 +421,7 @@
</div>
<script
src="{{jsBaseUrl}}/bootstrap5.0.2.bundle.min.js"
src="{{jsBaseUrl}}/bootstrap5.0.2.min.js"
rel="preload"
as="script"
></script>
@@ -85,11 +85,6 @@ https://github.com/laurent22/joplin/blob/dev/{{{sourceMarkdownFile}}}
{{> footer}}
</div>
<script
src="{{jsBaseUrl}}/bootstrap5.0.2.bundle.min.js"
rel="preload"
as="script"
></script>
<script src="{{{assetUrls.js.script}}}"></script>
{{> analytics}}
@@ -17,21 +17,6 @@
<a href="{{baseUrl}}/help/" class="fw500">Help</a>
<a href="{{forumUrl}}" class="fw500">Forum</a>
<a href="{{baseUrl}}/cn/" class="fw500">中文</a>
<!--
<div class="dropdown language-switcher">
<button class="fw500" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
Language
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
-->
{{#showJoplinCloudLinks}}
{{> joplinCloudButton}}
{{/showJoplinCloudLinks}}
-7
View File
@@ -1,7 +0,0 @@
/*!
* Bootstrap v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]}},e=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},i=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},n=t=>{const e=i(t);return e&&document.querySelector(e)?e:null},s=t=>{const e=i(t);return e?document.querySelector(e):null},o=t=>{t.dispatchEvent(new Event("transitionend"))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=e=>r(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?t.findOne(e):null,l=(t,e,i)=>{Object.keys(i).forEach(n=>{const s=i[n],o=e[n],a=o&&r(o)?"element":null==(l=o)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)})},c=t=>!(!r(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),h=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},u=()=>{},f=t=>t.offsetHeight,p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},m=[],g=()=>"rtl"===document.documentElement.dir,_=t=>{var e;e=()=>{const e=p();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",()=>{m.forEach(t=>t())}),m.push(e)):e()},b=t=>{"function"==typeof t&&t()},v=(t,e,i=!0)=>{if(!i)return void b(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const r=({target:i})=>{i===e&&(s=!0,e.removeEventListener("transitionend",r),b(t))};e.addEventListener("transitionend",r),setTimeout(()=>{s||o(e)},n)},y=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},w=/[^.]*(?=\..*)\.|.*/,E=/\..*/,A=/::\d+$/,T={};let O=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},k=/^(mouseenter|mouseleave)/i,L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&`${e}::${O++}`||t.uidEvent||O++}function D(t){const e=x(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function S(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function I(t,e,i){const n="string"==typeof e,s=n?i:e;let o=M(t);return L.has(o)||(o=t),[n,s,o]}function N(t,e,i,n,s){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),k.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=I(e,i,n),l=D(t),c=l[a]||(l[a]={}),h=S(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=x(r,e.replace(w,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parLine truncated
//# sourceMappingURL=bootstrap.bundle.min.js.map
-1
View File
@@ -27,7 +27,6 @@
},
"build": {
"appId": "net.cozic.joplin-desktop",
"compression": "maximum",
"productName": "Joplin",
"npmRebuild": false,
"afterSign": "./tools/notarizeMacApp.js",
@@ -1,7 +0,0 @@
French small model for Vosk
WER
%WER 23.95 [ 37203 / 155330, 5373 ins, 4427 del, 27403 sub ] exp/chain_a/tdnn/decode_test_cv/wer_12_0.0
%WER 19.30 [ 2975 / 15412, 683 ins, 672 del, 1620 sub ] exp/chain_a/tdnn/decode_test_mtedx/wer_10_0.0
%WER 27.25 [ 20208 / 74145, 2647 ins, 5852 del, 11709 sub ] exp/chain_a/tdnn/decode_test_podcast_reseg/wer_10_0.0
@@ -1,8 +0,0 @@
--use-energy=false
--sample-frequency=16000
--num-mel-bins=40
--num-ceps=40
--low-freq=40
--high-freq=-200
--allow-upsample=true
--allow-downsample=true
@@ -1,10 +0,0 @@
--min-active=200
--max-active=7000
--beam=13.0
--lattice-beam=4.0
--acoustic-scale=1.0
--frame-subsampling-factor=3
--endpoint.silence-phones=1:2:3:4:5:6:7:8:9:10
--endpoint.rule2.min-trailing-silence=0.5
--endpoint.rule3.min-trailing-silence=1.0
--endpoint.rule4.min-trailing-silence=2.0
@@ -1,76 +0,0 @@
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
@@ -1,154 +0,0 @@
1 nonword
2 begin
3 end
4 internal
5 singleton
6 nonword
7 begin
8 end
9 internal
10 singleton
11 begin
12 end
13 internal
14 singleton
15 begin
16 end
17 internal
18 singleton
19 begin
20 end
21 internal
22 singleton
23 begin
24 end
25 internal
26 singleton
27 begin
28 end
29 internal
30 singleton
31 begin
32 end
33 internal
34 singleton
35 begin
36 end
37 internal
38 singleton
39 begin
40 end
41 internal
42 singleton
43 begin
44 end
45 internal
46 singleton
47 begin
48 end
49 internal
50 singleton
51 begin
52 end
53 internal
54 singleton
55 begin
56 end
57 internal
58 singleton
59 begin
60 end
61 internal
62 singleton
63 begin
64 end
65 internal
66 singleton
67 begin
68 end
69 internal
70 singleton
71 begin
72 end
73 internal
74 singleton
75 begin
76 end
77 internal
78 singleton
79 begin
80 end
81 internal
82 singleton
83 begin
84 end
85 internal
86 singleton
87 begin
88 end
89 internal
90 singleton
91 begin
92 end
93 internal
94 singleton
95 begin
96 end
97 internal
98 singleton
99 begin
100 end
101 internal
102 singleton
103 begin
104 end
105 internal
106 singleton
107 begin
108 end
109 internal
110 singleton
111 begin
112 end
113 internal
114 singleton
115 begin
116 end
117 internal
118 singleton
119 begin
120 end
121 internal
122 singleton
123 begin
124 end
125 internal
126 singleton
127 begin
128 end
129 internal
130 singleton
131 begin
132 end
133 internal
134 singleton
135 begin
136 end
137 internal
138 singleton
139 begin
140 end
141 internal
142 singleton
143 begin
144 end
145 internal
146 singleton
147 begin
148 end
149 internal
150 singleton
151 begin
152 end
153 internal
154 singleton
@@ -1,3 +0,0 @@
[
1.022245e+11 -6.33291e+09 -2.480997e+09 8.290258e+09 -9.084483e+09 -8.092173e+09 -1.4735e+10 -7.041795e+09 -1.171205e+10 -2.976464e+08 -1.009425e+10 -6765179 -7.821326e+09 1.449499e+09 -6.413975e+09 -5.303802e+08 -4.998635e+09 9.521598e+07 -3.073041e+09 1.56756e+08 -1.287956e+09 1.738752e+08 -2.382392e+08 -2.716675e+07 4.404485e+08 -1.913359e+08 7.780919e+08 -4.006922e+08 7.895809e+08 -5.401082e+08 5.17605e+08 -6.227134e+08 6.58271e+08 -6.204593e+07 5.187754e+08 -4.497048e+08 4.219366e+07 -2.78742e+08 -1.797385e+07 -3.604475e+07 1.053647e+09
1.040194e+13 6.245521e+11 4.223293e+11 6.831219e+11 6.078478e+11 6.3425e+11 7.943839e+11 6.013323e+11 6.781652e+11 5.272091e+11 5.810814e+11 4.353831e+11 4.473305e+11 3.42063e+11 3.083377e+11 2.14257e+11 1.892057e+11 1.163827e+11 8.367058e+10 4.203224e+10 2.297476e+10 7.596307e+09 1.099877e+09 2.886651e+08 3.797438e+09 9.372847e+09 1.629059e+10 2.196351e+10 2.747149e+10 3.072878e+10 3.238528e+10 3.330232e+10 3.407238e+10 3.230687e+10 2.676914e+10 2.252055e+10 1.914305e+10 1.565974e+10 1.224627e+10 8.415393e+09 0 ]
@@ -1,2 +0,0 @@
--left-context=3
--right-context=3
@@ -1 +0,0 @@
b5f9c333-f2d1-4a54-9e87-628814fb747f
@@ -1,32 +1,15 @@
const React = require('react');
import { Component } from 'react';
import { connect } from 'react-redux';
import { FlatList, Text, StyleSheet, Button, View } from 'react-native';
import { FolderEntity, NoteEntity } from '@joplin/lib/services/database/types';
import { AppState } from '../utils/types';
const Component = React.Component;
const { connect } = require('react-redux');
const { FlatList, Text, StyleSheet, Button, View } = require('react-native');
const { _ } = require('@joplin/lib/locale');
const { NoteItem } = require('./note-item.js');
const time = require('@joplin/lib/time').default;
const { themeStyle } = require('./global-style.js');
interface NoteListProps {
themeId: string;
dispatch: (action: any)=> void;
notesSource: string;
items: NoteEntity[];
folders: FolderEntity[];
noteSelectionEnabled?: boolean;
selectedFolderId?: string;
}
class NoteListComponent extends Component<NoteListProps> {
private rootRef_: FlatList;
private styles_: Record<string, StyleSheet.NamedStyles<any>>;
public constructor(props: NoteListProps) {
super(props);
class NoteListComponent extends Component {
constructor() {
super();
this.state = {
items: [],
@@ -38,7 +21,7 @@ class NoteListComponent extends Component<NoteListProps> {
this.createNotebookButton_click = this.createNotebookButton_click.bind(this);
}
private styles() {
styles() {
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
@@ -64,7 +47,7 @@ class NoteListComponent extends Component<NoteListProps> {
return this.styles_[themeId];
}
private createNotebookButton_click() {
createNotebookButton_click() {
this.props.dispatch({
type: 'NAV_GO',
routeName: 'Folder',
@@ -72,14 +55,34 @@ class NoteListComponent extends Component<NoteListProps> {
});
}
public UNSAFE_componentWillReceiveProps(newProps: NoteListProps) {
filterNotes(notes) {
const todoFilter = 'all'; // Setting.value('todoFilter');
if (todoFilter === 'all') return notes;
const now = time.unixMs();
const maxInterval = 1000 * 60 * 60 * 24;
const notRecentTime = now - maxInterval;
const output = [];
for (let i = 0; i < notes.length; i++) {
const note = notes[i];
if (note.is_todo) {
if (todoFilter === 'recent' && note.user_updated_time < notRecentTime && !!note.todo_completed) continue;
if (todoFilter === 'nonCompleted' && !!note.todo_completed) continue;
}
output.push(note);
}
return output;
}
UNSAFE_componentWillReceiveProps(newProps) {
// Make sure scroll position is reset when switching from one folder to another or to a tag list.
if (this.rootRef_ && newProps.notesSource !== this.props.notesSource) {
this.rootRef_.scrollToOffset({ offset: 0, animated: false });
}
}
public render() {
render() {
// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39
if (this.props.items.length) {
@@ -106,7 +109,7 @@ class NoteListComponent extends Component<NoteListProps> {
}
}
const NoteList = connect((state: AppState) => {
const NoteList = connect(state => {
return {
items: state.notes,
folders: state.folders,
@@ -116,4 +119,4 @@ const NoteList = connect((state: AppState) => {
};
})(NoteListComponent);
export default NoteList;
module.exports = { NoteList };
@@ -2,7 +2,7 @@ const React = require('react');
import { AppState as RNAppState, View, StyleSheet, NativeEventSubscription } from 'react-native';
import { stateUtils } from '@joplin/lib/reducer';
import { connect } from 'react-redux';
import NoteList from '../NoteList';
const { NoteList } = require('../note-list.js');
import Folder from '@joplin/lib/models/Folder';
import Tag from '@joplin/lib/models/Tag';
import Note from '@joplin/lib/models/Note';
@@ -254,7 +254,7 @@ class NotesScreenComponent extends BaseScreenComponent<any> {
return (
<View style={rootStyle}>
<ScreenHeader title={iconString + title} showBackButton={false} parentComponent={thisComp} sortButton_press={this.sortButton_press} folderPickerOptions={this.folderPickerOptions()} showSearchButton={true} showSideMenuButton={true} />
<NoteList />
<NoteList style={this.styles().noteList} />
{actionButtonComp}
<DialogBox
ref={(dialogbox: any) => {
@@ -1,105 +0,0 @@
/* eslint-disable */
const React = require('react')
import { useState, useEffect, useRef, useCallback } from 'react';
import { StyleSheet, View, Text, Button } from 'react-native';
import Vosk from 'react-native-vosk';
const { ScreenHeader } = require('../ScreenHeader');
function VoskScreen() {
const [ready, setReady] = useState<Boolean>(false);
const [recognizing, setRecognizing] = useState<Boolean>(false);
const [result, setResult] = useState<String | undefined>();
const vosk = useRef(new Vosk()).current;
const load = useCallback(() => {
vosk
.loadModel('vosk-model-small-fr-0.22')
// .loadModel('model-en-us')
.then(() => setReady(true))
.catch((e: any) => console.log(e));
}, [vosk]);
const unload = useCallback(() => {
vosk.unload();
setReady(false);
}, [vosk]);
useEffect(() => {
const resultEvent = vosk.onResult((res: { data: String }) => {
console.log(res);
console.log(`A onResult event has been caught: ${res.data}`);
});
return () => {
resultEvent.remove();
};
}, [vosk]);
const grammar = ['gauche', 'droite', '[unk]'];
// const grammar = ['left', 'right', '[unk]'];
const record = () => {
if (!ready) return;
console.log('Starting recognition ...');
setRecognizing(true);
vosk
.start(grammar)
.then((res: String) => {
console.log(`Result is: ${res}`);
setResult(res);
})
.catch((e: any) => {
console.log(`Error: ${e}`);
})
.finally(() => {
setRecognizing(false);
});
};
return (
<View style={styles.container}>
<ScreenHeader title={"Vosk Test"} parentComponent={null} showSearchButton={false} />
<View style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
marginVertical: 34
}}>
<Button
onPress={ready ? unload : load}
title={ready ? 'Unload model' : 'Load model'}
color="blue"
/>
<Button
onPress={record}
title="Record"
disabled={ready === false || recognizing === true}
color="#841584"
/>
<Text>Recognized word:</Text>
<Text>{result}</Text>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
// justifyContent: 'center',
},
// box: {
// width: "100%",
// height: "100%",
// },
});
// export default VoskScreenWrapper
export default VoskScreen
@@ -237,15 +237,6 @@ const SideMenuContentComponent = (props: Props) => {
});
};
const voskButton_press = () => {
props.dispatch({ type: 'SIDE_MENU_CLOSE' });
props.dispatch({
type: 'NAV_GO',
routeName: 'Vosk',
});
};
const performSync = useCallback(async () => {
const action = props.syncStarted ? 'cancel' : 'start';
@@ -421,7 +412,6 @@ const SideMenuContentComponent = (props: Props) => {
items.push(makeDivider('divider_1'));
items.push(renderSidebarButton('newFolder_button', _('New Notebook'), 'md-folder-open', newFolderButton_press));
items.push(renderSidebarButton('vosk_button', 'Vosk', 'md-folder-open', voskButton_press));
items.push(renderSidebarButton('tag_button', _('Tags'), 'md-pricetag', tagButton_press));
+1 -2
View File
@@ -66,7 +66,6 @@
"react-native-url-polyfill": "1.3.0",
"react-native-vector-icons": "9.2.0",
"react-native-version-info": "1.1.1",
"react-native-vosk": "0.1.12",
"react-native-webview": "11.26.1",
"react-redux": "7.2.9",
"redux": "4.2.1",
@@ -117,4 +116,4 @@
"uglify-js": "3.17.4",
"webpack": "5.74.0"
}
}
}
-2
View File
@@ -57,7 +57,6 @@ import RevisionService from '@joplin/lib/services/RevisionService';
import JoplinDatabase from '@joplin/lib/JoplinDatabase';
import Database from '@joplin/lib/database';
import NotesScreen from './components/screens/Notes';
import VoskScreen from './components/screens/VoskScreen';
const { TagsScreen } = require('./components/screens/tags.js');
import ConfigScreen from './components/screens/ConfigScreen';
const { FolderScreen } = require('./components/screens/folder.js');
@@ -962,7 +961,6 @@ class AppComponent extends React.Component {
}
const appNavInit = {
Vosk: { screen: VoskScreen },
Notes: { screen: NotesScreen },
Note: { screen: NoteScreen },
Tags: { screen: TagsScreen },
@@ -431,7 +431,6 @@ describe('services_SearchEngine', () => {
['title:abcd efgh', { _: ['efgh'], title: ['abcd'] }],
['title:abcd', { title: ['abcd'] }],
['"abcd efgh"', { _: ['abcd efgh'] }],
['"abcd efgh" ijkl', { _: ['abcd efgh', 'ijkl'] }],
['title:abcd title:efgh', { title: ['abcd', 'efgh'] }],
];
@@ -5,31 +5,20 @@ import Note from '../../models/Note';
import BaseModel from '../../BaseModel';
import ItemChangeUtils from '../ItemChangeUtils';
import shim from '../../shim';
import filterParser, { Term } from './filterParser';
import filterParser from './filterParser';
import queryBuilder from './queryBuilder';
import { ItemChangeEntity, NoteEntity } from '../database/types';
const { sprintf } = require('sprintf-js');
const { pregQuote, scriptType, removeDiacritics } = require('../../string-utils.js');
enum SearchType {
Auto = 'auto',
Basic = 'basic',
Nonlatin = 'nonlatin',
Fts = 'fts',
}
interface SearchOptions {
searchType: SearchType;
}
export default class SearchEngine {
public static instance_: SearchEngine = null;
public static relevantFields = 'id, title, body, user_created_time, user_updated_time, is_todo, todo_completed, todo_due, parent_id, latitude, longitude, altitude, source_url';
public static SEARCH_TYPE_AUTO = SearchType.Auto;
public static SEARCH_TYPE_BASIC = SearchType.Basic;
public static SEARCH_TYPE_NONLATIN_SCRIPT = SearchType.Nonlatin;
public static SEARCH_TYPE_FTS = SearchType.Fts;
public static SEARCH_TYPE_AUTO = 'auto';
public static SEARCH_TYPE_BASIC = 'basic';
public static SEARCH_TYPE_NONLATIN_SCRIPT = 'nonlatin';
public static SEARCH_TYPE_FTS = 'fts';
public dispatch: Function = (_o: any) => {};
private logger_ = new Logger();
@@ -428,7 +417,7 @@ export default class SearchEngine {
const trimQuotes = (str: string) => str.startsWith('"') ? str.substr(1, str.length - 2) : str;
let allTerms: Term[] = [];
let allTerms: any[] = [];
try {
allTerms = filterParser(query);
@@ -440,20 +429,7 @@ export default class SearchEngine {
const titleTerms = allTerms.filter(x => x.name === 'title' && !x.negated).map(x => trimQuotes(x.value));
const bodyTerms = allTerms.filter(x => x.name === 'body' && !x.negated).map(x => trimQuotes(x.value));
interface ComplexTerm {
type: 'regex' | 'text';
value: string;
scriptType: any;
valueRegex?: RegExp;
}
interface Terms {
_: (string | ComplexTerm)[];
title: (string | ComplexTerm)[];
body: (string | ComplexTerm)[];
}
const terms: Terms = { _: textTerms, 'title': titleTerms, 'body': bodyTerms };
const terms: any = { _: textTerms, 'title': titleTerms, 'body': bodyTerms };
// Filter terms:
// - Convert wildcards to regex
@@ -462,9 +438,7 @@ export default class SearchEngine {
let termCount = 0;
const keys = [];
for (const col2 in terms) {
const col = col2 as '_' | 'title' | 'body';
for (const col in terms) {
if (!terms.hasOwnProperty(col)) continue;
if (!terms[col].length) {
@@ -473,7 +447,7 @@ export default class SearchEngine {
}
for (let i = terms[col].length - 1; i >= 0; i--) {
const term = terms[col][i] as string;
const term = terms[col][i];
// SQlLite FTS doesn't allow "*" queries and neither shall we
if (term === '*') {
@@ -494,16 +468,12 @@ export default class SearchEngine {
}
//
// The object "allTerms" is used for query construction purposes (this
// contains all the filter terms) Since this is used for the FTS match
// query, we need to normalize text, title and body terms. Note, we're
// not normalizing terms like tag because these are matched using SQL
// LIKE operator and so we must preserve their diacritics.
// The object "allTerms" is used for query construction purposes (this contains all the filter terms)
// Since this is used for the FTS match query, we need to normalize text, title and body terms.
// Note, we're not normalizing terms like tag because these are matched using SQL LIKE operator and so we must preserve their diacritics.
//
// The object "terms" only include text, title, body terms and is used
// for highlighting. By not normalizing the text, title, body in
// "terms", highlighting still works correctly for words with
// diacritics.
// The object "terms" only include text, title, body terms and is used for highlighting.
// By not normalizing the text, title, body in "terms", highlighting still works correctly for words with diacritics.
//
allTerms = allTerms.map(x => {
@@ -551,9 +521,9 @@ export default class SearchEngine {
const searchOptions: any = {};
for (const key of parsedQuery.keys) {
if ((parsedQuery.terms as any)[key].length === 0) continue;
if (parsedQuery.terms[key].length === 0) continue;
const term = (parsedQuery.terms as any)[key].map((x: Term) => x.value).join(' ');
const term = parsedQuery.terms[key].map((x: any) => x.value).join(' ');
if (key === '_') searchOptions.anywherePattern = `*${term}*`;
if (key === 'title') searchOptions.titlePattern = `*${term}*`;
if (key === 'body') searchOptions.bodyPattern = `*${term}*`;
@@ -591,13 +561,12 @@ export default class SearchEngine {
return SearchEngine.SEARCH_TYPE_FTS;
}
public async search(searchString: string, options: SearchOptions = null) {
public async search(searchString: string, options: any = null) {
if (!searchString) return [];
options = {
options = Object.assign({}, {
searchType: SearchEngine.SEARCH_TYPE_AUTO,
...options,
};
}, options);
const searchType = this.determineSearchType_(searchString, options.searchType);
const parsedQuery = await this.parseQuery(searchString);
@@ -1,5 +1,5 @@
export interface Term {
interface Term {
name: string;
value: string;
negated: boolean;
@@ -1,17 +0,0 @@
import gotoAnythingStyleQuery from './gotoAnythingStyleQuery';
describe('searchengine/gotoAnythingStyleQuery', () => {
it('should prepare queries', () => {
const testCases: [string, string][] = [
['hello', 'hello*'],
['hello welc', 'hello* welc*'],
];
for (const [input, expected] of testCases) {
const actual = gotoAnythingStyleQuery(input);
expect(actual).toBe(expected);
}
});
});
+75 -129
View File
@@ -1,20 +1,19 @@
import { readFileSync, readFile, mkdirpSync, writeFileSync, remove, copy, pathExistsSync, pathExists } from 'fs-extra';
import { readFileSync, readFile, mkdirpSync, writeFileSync, remove, copy, pathExistsSync } from 'fs-extra';
import { rootDir } from '../tool-utils';
import { pressCarouselItems } from './utils/pressCarousel';
import { getMarkdownIt, loadMustachePartials, markdownToPageHtml, renderMustache } from './utils/render';
import { AssetUrls, Env, Locale, Partials, PlanPageParams, TemplateParams } from './utils/types';
import { AssetUrls, Env, Partials, PlanPageParams, TemplateParams } from './utils/types';
import { createFeatureTableMd, getPlans, loadStripeConfig } from '@joplin/lib/utils/joplinCloud';
import { stripOffFrontMatter } from './utils/frontMatter';
import { dirname, basename } from 'path';
import { readmeFileTitle, replaceGitHubByWebsiteLinks } from './utils/parser';
import { extractOpenGraphTags, OpenGraphTags } from './utils/openGraph';
import { extractOpenGraphTags } from './utils/openGraph';
import { readCredentialFileJson } from '@joplin/lib/utils/credentialFiles';
import { getNewsDateString } from './utils/news';
import { parsePoFile, parseTranslations, Translations } from '../utils/translation';
import { setLocale } from '@joplin/lib/locale';
import { countryCodeOnly, setLocale } from '@joplin/lib/locale';
import applyTranslations from './utils/applyTranslations';
import { loadSponsors } from '../utils/loadSponsors';
import convertLinksToLocale from './utils/convertLinksToLocale';
interface BuildConfig {
env: Env;
@@ -24,12 +23,6 @@ const buildConfig = readCredentialFileJson<BuildConfig>('website-build.json', {
env: Env.Prod,
});
const enGbLocale: Locale = {
htmlTranslations: {},
lang: 'en-gb',
pathPrefix: '',
};
const glob = require('glob');
const path = require('path');
const md5File = require('md5-file');
@@ -48,7 +41,7 @@ const partialDir = `${websiteAssetDir}/templates/partials`;
const discussLink = 'https://discourse.joplinapp.org/c/news/9';
let tocMd_: string = null;
const tocHtml_: Record<string, string> = {};
let tocHtml_: string = null;
const tocRegex_ = /<!-- TOC -->([^]*)<!-- TOC -->/;
function tocMd() {
if (tocMd_) return tocMd_;
@@ -68,17 +61,15 @@ async function getDonateLinks() {
return `<div class="donate-links">\n\n${matches[1].trim()}\n\n</div>`;
}
function tocHtml(locale: Locale) {
if (tocHtml_[locale.lang]) return tocHtml_[locale.lang];
function tocHtml() {
if (tocHtml_) return tocHtml_;
const markdownIt = getMarkdownIt();
let md = tocMd();
md = md.replace(/# Table of contents/, '');
md = replaceGitHubByWebsiteLinks(md);
md = convertLinksToLocale(md, locale);
let output = markdownIt.render(md);
output = `<div>${output}</div>`;
tocHtml_[locale.lang] = output;
return output;
tocHtml_ = markdownIt.render(md);
tocHtml_ = `<div>${tocHtml_}</div>`;
return tocHtml_;
}
const baseUrl = '';
@@ -99,16 +90,14 @@ async function getAssetUrls(): Promise<AssetUrls> {
};
}
function defaultTemplateParams(assetUrls: AssetUrls, locale: Locale = null): TemplateParams {
if (!locale) locale = enGbLocale;
function defaultTemplateParams(assetUrls: AssetUrls): TemplateParams {
return {
env: buildConfig.env,
baseUrl,
imageBaseUrl: `${baseUrl}/images`,
cssBaseUrl,
jsBaseUrl,
tocHtml: tocHtml(locale),
tocHtml: tocHtml(),
yyyy: (new Date()).getFullYear().toString(),
templateHtml: mainTemplateHtml,
forumUrl: 'https://discourse.joplinapp.org/',
@@ -120,7 +109,6 @@ function defaultTemplateParams(assetUrls: AssetUrls, locale: Locale = null): Tem
},
assetUrls,
openGraph: null,
locale,
};
}
@@ -129,7 +117,7 @@ function renderPageToHtml(md: string, targetPath: string, templateParams: Templa
md = md.replace(/# Joplin\n/, '');
templateParams = {
...defaultTemplateParams(templateParams.assetUrls, templateParams.locale),
...defaultTemplateParams(templateParams.assetUrls),
...templateParams,
};
@@ -145,7 +133,6 @@ function renderPageToHtml(md: string, targetPath: string, templateParams: Templa
}
md = replaceGitHubByWebsiteLinks(md);
md = convertLinksToLocale(md, templateParams.locale);
if (templateParams.donateLinksMd) {
md = `${templateParams.donateLinksMd}\n\n${md}`;
@@ -174,8 +161,8 @@ function renderFileToHtml(sourcePath: string, targetPath: string, templateParams
}
}
function makeHomePageMd(readmePath: string) {
let md = readFileSync(readmePath, 'utf8');
function makeHomePageMd() {
let md = readFileSync(`${rootDir}/README.md`, 'utf8');
md = md.replace(tocRegex_, '');
// HACK: GitHub needs the \| or the inline code won't be displayed correctly inside the table,
@@ -229,20 +216,15 @@ const updatePageLanguage = (html: string, lang: string): string => {
return html.replace('<html lang="en-gb">', `<html lang="${lang}">`);
};
// TODO: Add function that process links and add prefix.
async function main() {
const supportedLocales: Record<string, Locale> = {
'en_GB': enGbLocale,
const supportedLocales = {
'en_GB': {
htmlTranslations: {},
lang: 'en-gb',
},
'zh_CN': {
htmlTranslations: parseTranslations(await parsePoFile(`${websiteAssetDir}/locales/zh_CN.po`)),
lang: 'zh-cn',
pathPrefix: 'cn',
},
'fr_FR': {
htmlTranslations: {},
lang: 'fr-fr',
pathPrefix: 'fr',
},
};
@@ -255,53 +237,34 @@ async function main() {
const partials = await loadMustachePartials(partialDir);
const assetUrls = await getAssetUrls();
const readmeMd = makeHomePageMd();
const donateLinksMd = await getDonateLinks();
// =============================================================
// HELP PAGE
// =============================================================
renderPageToHtml(readmeMd, `${docDir}/help/index.html`, {
sourceMarkdownFile: 'README.md',
donateLinksMd,
partials,
sponsors,
assetUrls,
openGraph: {
title: 'Joplin documentation',
description: '',
url: 'https://joplinapp.org/help/',
},
});
// =============================================================
// FRONT PAGE
// =============================================================
for (const [localeName, locale] of Object.entries(supportedLocales)) {
setLocale(localeName);
const pathPrefix = localeName !== 'en_GB' ? `/${locale.pathPrefix}` : '';
// =============================================================
// HELP PAGE
// =============================================================
let readmePath = `${rootDir}/README.md`;
let sourceMarkdownFile = 'README.md';
let targetDocDir = docDir;
if (localeName !== 'en_GB') {
const possibleSource = `${rootDir}/readme/_i18n/${localeName}/README.md`;
if (await pathExists(possibleSource)) {
sourceMarkdownFile = possibleSource;
readmePath = possibleSource;
} else {
console.warn(`Cannot find source file: ${possibleSource}`);
}
targetDocDir = `${docDir}/${locale.pathPrefix}`;
}
const readmeMd = makeHomePageMd(readmePath);
renderPageToHtml(readmeMd, `${targetDocDir}/help/index.html`, {
sourceMarkdownFile,
donateLinksMd,
partials,
sponsors,
assetUrls,
openGraph: {
title: 'Joplin documentation',
description: '',
url: 'https://joplinapp.org/help/',
},
locale,
});
// =============================================================
// FRONT PAGE
// =============================================================
const pathPrefix = localeName !== 'en_GB' ? `/${countryCodeOnly(localeName).toLowerCase()}` : '';
let templateHtml = updatePageLanguage(applyTranslations(frontTemplateHtml, localeName, locale.htmlTranslations), locale.lang);
if (localeName === 'zh_CN') templateHtml = templateHtml.replace(/\/plans/g, '/cn/plans');
@@ -329,16 +292,22 @@ async function main() {
url: 'https://joplinapp.org',
},
});
}
// =============================================================
// PLANS PAGE
// =============================================================
setLocale('en_GB');
// =============================================================
// PLANS PAGE
// =============================================================
for (const [localeName, locale] of Object.entries(supportedLocales)) {
setLocale(localeName);
const planPageFaqMd = await readFile(`${readmeDir}/faq_joplin_cloud.md`, 'utf8');
const planPageFaqHtml = getMarkdownIt().render(planPageFaqMd, {});
const planPageParams: PlanPageParams = {
...defaultTemplateParams(assetUrls, locale),
...defaultTemplateParams(assetUrls),
partials: translatePartials(partials, localeName, locale.htmlTranslations),
templateHtml: applyTranslations(plansTemplateHtml, localeName, locale.htmlTranslations),
plans: getPlans(stripeConfig),
@@ -349,8 +318,10 @@ async function main() {
const planPageContentHtml = renderMustache('', planPageParams);
const pathPrefix = localeName !== 'en_GB' ? `/${countryCodeOnly(localeName).toLowerCase()}` : '';
const templateParams = {
...defaultTemplateParams(assetUrls, locale),
...defaultTemplateParams(assetUrls),
pageName: 'plans',
partials,
showToc: false,
@@ -371,20 +342,10 @@ async function main() {
// Markdown files under /readme
// =============================================================
interface SourceInfo {
title: string;
donateLinksMd: string;
showToc: boolean;
openGraph: OpenGraphTags;
sourceMarkdownName?: string;
sourceMarkdownFile?: string;
locale: Locale;
}
const mdFiles = glob.sync(`${readmeDir}/**/*.md`).map((f: string) => f.substr(rootDir.length + 1));
const sources = [];
const mdFiles: string[] = glob.sync(`${readmeDir}/**/*.md`).map((f: string) => f.substr(rootDir.length + 1));
const sources: [string, string, SourceInfo][] = [];
const makeTargetBasename = (input: string, pathPrefix: string): string => {
const makeTargetBasename = (input: string): string => {
if (isNewsFile(input)) {
const filenameNoExt = basename(input, '.md');
return `news/${filenameNoExt}/index.html`;
@@ -403,49 +364,34 @@ async function main() {
s = s.replace(/readme\//, '');
if (pathPrefix) s = `${pathPrefix}/${s}`;
return s;
}
};
const makeTargetFilePath = (input: string, pathPrefix: string): string => {
return `${docDir}/${makeTargetBasename(input, pathPrefix)}`;
const makeTargetFilePath = (input: string): string => {
return `${docDir}/${makeTargetBasename(input)}`;
};
const makeTargetUrl = (input: string, pathPrefix: string) => {
return `https://joplinapp.org/${makeTargetBasename(input, pathPrefix)}`;
const makeTargetUrl = (input: string) => {
return `https://joplinapp.org/${makeTargetBasename(input)}`;
};
const newsFilePaths: string[] = [];
for (const mdFile of mdFiles) {
if (mdFile.startsWith('readme/_i18n')) continue;
const title = await readmeFileTitle(`${rootDir}/${mdFile}`);
const targetFilePath = makeTargetFilePath(mdFile);
const openGraph = await extractOpenGraphTags(mdFile, makeTargetUrl(mdFile));
for (const [localeName, locale] of Object.entries(supportedLocales)) {
const title = await readmeFileTitle(`${rootDir}/${mdFile}`);
const targetFilePath = makeTargetFilePath(mdFile, locale.pathPrefix);
const openGraph = await extractOpenGraphTags(mdFile, makeTargetUrl(mdFile, locale.pathPrefix));
const isNews = isNewsFile(mdFile);
if (isNews) newsFilePaths.push(mdFile);
const isNews = isNewsFile(mdFile);
if (isNews) newsFilePaths.push(mdFile);
let sourceFile = mdFile;
if (localeName !== 'en_GB') {
let temp = mdFile.replace(/readme\//, '');
temp = `readme/_i18n/${localeName}/${temp}`;
if (await pathExists(temp)) sourceFile = temp;
}
sources.push([sourceFile, targetFilePath, {
title: title,
donateLinksMd: mdFile === 'readme/donate.md' ? '' : donateLinksMd,
showToc: mdFile !== 'readme/download.md' && !isNews,
openGraph,
locale,
}]);
}
sources.push([mdFile, targetFilePath, {
title: title,
donateLinksMd: mdFile === 'readme/donate.md' ? '' : donateLinksMd,
showToc: mdFile !== 'readme/download.md' && !isNews,
openGraph,
}]);
}
for (const source of sources) {
@@ -472,7 +418,7 @@ async function main() {
});
await makeNewsFrontPage(newsFilePaths, `${docDir}/news/index.html`, {
...defaultTemplateParams(assetUrls, null),
...defaultTemplateParams(assetUrls),
title: 'What\'s new',
pageName: 'news',
partials,
@@ -1,25 +0,0 @@
import convertLinksToLocale from './convertLinksToLocale';
describe('convertLinksToLocale', () => {
it('should convert links', async () => {
const tests: [string, any, string][] = [
[
'test [link](/help/link)',
{ pathPrefix: 'fr' },
'test [link](/fr/help/link)',
],
[
'test [link](/help/link) [link2](/link2)',
{ pathPrefix: 'fr' },
'test [link](/fr/help/link) [link2](/fr/link2)',
],
];
for (const [input, locale, expected] of tests) {
const actual = convertLinksToLocale(input, locale);
expect(actual).toBe(expected);
}
});
});
@@ -1,9 +0,0 @@
import { Locale } from './types';
export default (md: string, locale: Locale) => {
if (locale.lang === 'en-gb') return md;
md = md.replace(/\(\//g, `(/${locale.pathPrefix}/`);
return md;
};
-7
View File
@@ -7,12 +7,6 @@ export enum Env {
Prod = 'prod',
}
export interface Locale {
htmlTranslations: Record<string, string>;
lang: string;
pathPrefix: string;
}
export interface GithubUser {
id: string;
}
@@ -68,7 +62,6 @@ export interface TemplateParams {
showBottomLinks?: boolean;
openGraph: OpenGraphTags;
isNews?: boolean;
locale?: Locale;
}
export interface PlanPageParams extends TemplateParams {
-74
View File
@@ -1,74 +0,0 @@
<!-- DONATELINKS -->
[! [Faire un don via PayPal] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=E8JMYD2LQ8MMA&lc=GB&item_name=Joplin+Development¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) [! [Sponsor sur GitHub] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/GitHub-Badge.svg)](https://github.com/sponsors/laurent22/) [! [Devenez mécène] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Patreon-Badge.svg)](https://www.patreon.com/joplin) [! [Faire un don en utilisant un IBAN] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-IBAN.svg)](https://joplinapp.org/donate/#donations)
<!-- DONATELINKS -->
* * *
**TEST ONLY**
* * *
[test link](/spec/e2ee)
<img width="64" src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/LinuxIcons/256x256.png" align="left" />**Joplin** est une application gratuite et open source de prise de notes et de tâches, qui peut gérer un grand nombre de notes organisées dans des carnets de notes. Les notes sont consultables, peuvent être copiées, balisées et modifiées directement depuis les applications ou depuis votre propre éditeur de texte. Les notes sont au format [Markdown] (#markdown).
Les notes exportées depuis Evernote [peuvent être importées] (#importing) dans Joplin, y compris le contenu formaté (qui est converti en Markdown), les ressources (images, pièces jointes, etc.) et les métadonnées complètes (géolocalisation, heure de mise à jour, heure de création, etc.). Les fichiers Markdown simples peuvent également être importés.
Les notes peuvent être [synchronisées] (#synchronisation) en toute sécurité à l'aide du [chiffrement de bout en bout] (#encryption) avec divers services cloud, notamment Nextcloud, Dropbox, OneDrive et [Joplin Cloud] (https://joplinapp.org/plans/).
La recherche en texte intégral est disponible sur toutes les plateformes pour trouver rapidement les informations dont vous avez besoin. L'application peut être personnalisée à l'aide de plugins et de thèmes, et vous pouvez également créer facilement le vôtre.
L'application est disponible pour Windows, Linux, macOS, Android et iOS. Un [Web Clipper] (https://github.com/laurent22/joplin/blob/dev/readme/clipper.md), qui permet d'enregistrer des pages Web et des captures d'écran depuis votre navigateur, est également disponible pour [Firefox] (https://addons.mozilla.org/firefox/addon/joplin-web-clipper/) et [Chrome] (https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek?hl=en-GB).
<div class="top-screenshot"></div><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/home-top-img.png" style="max-width: 100%; max-height: 35em;">
# Installation
Trois types d'applications sont disponibles : pour **bureau** (Windows, macOS et Linux), pour **mobile** (Android et iOS) et pour **terminal** (Windows, macOS, Linux et FreeBSD). Toutes les applications disposent d'interfaces utilisateur similaires et peuvent se synchroniser entre elles.
## Applications de bureau
Système d'exploitation | Télécharger
---|---
Windows (32 et 64 bits) | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-Setup-2.9.17.exe'><img alt='Get it on Windows' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeWindows.png'/></a>
MacOS | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-2.9.17.dmg'><img alt='Get it on macOS' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeMacOS.png'/></a>
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-2.9.17.AppImage'><img alt='Get it on Linux' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeLinux.png'/></a>
<a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/JoplinPortable.exe'>**Sous Windows**, vous pouvez également utiliser la version portable.</a> L' [application portable] (https://en.wikipedia.org/wiki/Portable_application) permet d'installer le logiciel sur un appareil portable tel qu'une clé USB. Copiez simplement le fichier JoplinPortable.exe dans n'importe quel répertoire de cette clé USB ; l'application créera alors un répertoire appelé « JoplinProfile » à côté du fichier exécutable.
**Sous Linux**, la méthode recommandée est d'utiliser le script d'installation suivant car il gérera également l'icône du bureau :
<pre><code style="word-break: break-all">wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash</code></pre>
## Applications mobiles
Système d'exploitation | Télécharger | Alt. Télécharger
---|---|---
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a>| ou téléchargez le fichier APK : [64 bits] (https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8.apk) [32 bits] ( https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8-32bit.apk)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeIOS.png'/></a>| -
## Application du terminal
Système d'exploitation | Méthode
-----------------|----------------
macOS, Linux ou Windows (via [WSL] (https://msdn.microsoft.com/en-us/commandline/wsl/faq?f=255&MSPPError=-2147217396)) | **Important :** Tout d'abord, [installez Node 12+] (https://nodejs.org/en/download/package-manager/). <br/><br/><br><br>`NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin` `sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin `Par défaut, le binaire de l'application sera installé sous <br/> `~/.joplin-bin`. Vous pouvez modifier ce répertoire si nécessaire. Sinon, si vos autorisations npm sont configurées comme décrit [ici] (https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory) (Option 2), il suffit d'exécuter `npm -g install joplin`.
Pour le démarrer, tapez `joplin`.
Pour des informations d'utilisation, veuillez consulter la [Documentation complète de l'application Joplin Terminal] (https://joplinapp.org/terminal/).
## Web Clipper
Le Web Clipper est une extension de navigateur qui vous permet d'enregistrer des pages Web et des captures d'écran à partir de votre navigateur. Pour plus d'informations sur son installation et son utilisation, consultez la [Page d'aide de Web Clipper] (https://github.com/laurent22/joplin/blob/dev/readme/clipper.md).
## Distributions alternatives non officielles
Il existe un certain nombre de distributions alternatives non officielles de Joplin. Si vous ne voulez pas ou ne pouvez pas utiliser appimages ou l'une des autres versions officiellement prises en charge, vous pouvez envisager de les utiliser.
Cependant, ils sont assortis d'une mise en garde dans la mesure où ils ne sont pas officiellement pris en charge, de sorte que certains problèmes peuvent ne pas être pris en charge par le projet principal. Les demandes d'assistance, les rapports de bogues et les conseils généraux devraient plutôt être adressés aux responsables de ces distributions.
Une liste de ces distributions gérée par la communauté est disponible ici : [Distributions Joplin non officielles] (https://discourse.joplinapp.org/t/unofficial-alternative-joplin-distributions/23703)
# Sponsors
<!-- SPONSORS-ORG -->
</a><a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/><a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&mtm_kwd=joplinapp&mtm_source=joplinapp-webseite&mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a><a href="https://residence-greece.com/"><img title="Greece Golden Visa" width="256" src="https://joplinapp.org/images/sponsors/ResidenceGreece.jpg"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a>
<!-- SPONSORS-ORG -->
-5
View File
@@ -1,5 +0,0 @@
# Application de bureau
<img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/DemoDesktop.png" style="width: 100%">
Pour des informations générales relatives à toutes les applications, voir aussi [la page de garde](https://joplinapp.org).
-24
View File
@@ -447,30 +447,6 @@
"created_at": "2023-04-11T19:02:23Z",
"repoId": 79162682,
"pullRequestNo": 8042
},
{
"name": "Wladefant",
"id": 79611093,
"comment_id": 1514649134,
"created_at": "2023-04-19T12:28:22Z",
"repoId": 79162682,
"pullRequestNo": 8069
},
{
"name": "DeeJayLSP",
"id": 60024671,
"comment_id": 1519381301,
"created_at": "2023-04-24T04:56:51Z",
"repoId": 79162682,
"pullRequestNo": 8077
},
{
"name": "djunho",
"id": 11857950,
"comment_id": 1519828258,
"created_at": "2023-04-24T10:05:20Z",
"repoId": 79162682,
"pullRequestNo": 8079
}
]
}
-11
View File
@@ -4990,7 +4990,6 @@ __metadata:
react-native-url-polyfill: 1.3.0
react-native-vector-icons: 9.2.0
react-native-version-info: 1.1.1
react-native-vosk: ^0.1.12
react-native-webview: 11.26.1
react-redux: 7.2.9
redux: 4.2.1
@@ -27558,16 +27557,6 @@ __metadata:
languageName: node
linkType: hard
"react-native-vosk@npm:^0.1.12":
version: 0.1.12
resolution: "react-native-vosk@npm:0.1.12"
peerDependencies:
react: "*"
react-native: "*"
checksum: 49dd234d0822d7f3deb9563a903260a8478bb78eb20367b50284df40e1e64e23dc52d632b329176883c048b8224182eee000fd7dbd3c42401a9a03bd0ce1ae10
languageName: node
linkType: hard
"react-native-webview@npm:11.26.1":
version: 11.26.1
resolution: "react-native-webview@npm:11.26.1"