You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-27 20:29:45 +02:00
Compare commits
10 Commits
cli-v1.0.1
...
cli-v1.0.1
Author | SHA1 | Date | |
---|---|---|---|
|
1abff212f9 | ||
|
df63572b7c | ||
|
d89071dc03 | ||
|
95e0e8d459 | ||
|
6973952892 | ||
|
56cf5271a2 | ||
|
d679ceeb9b | ||
|
49cb391486 | ||
|
cfdde4c2ce | ||
|
57864a388a |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2
CliClient/package-lock.json
generated
2
CliClient/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "joplin",
|
||||
"version": "1.0.154",
|
||||
"version": "1.0.155",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@@ -16,11 +16,12 @@
|
||||
2016,
|
||||
2017,
|
||||
2018,
|
||||
2019
|
||||
2019,
|
||||
2020
|
||||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "1.0.154",
|
||||
"version": "1.0.155",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
|
@@ -334,6 +334,35 @@ describe('services_InteropService', function() {
|
||||
}
|
||||
}));
|
||||
|
||||
it('should export selected notes in md format', asyncTest(async () => {
|
||||
const service = new InteropService();
|
||||
let folder1 = await Folder.save({ title: 'folder1' });
|
||||
let note11 = await Note.save({ title: 'title note11', parent_id: folder1.id });
|
||||
note11 = await Note.load(note11.id);
|
||||
let note12 = await Note.save({ title: 'title note12', parent_id: folder1.id });
|
||||
note12 = await Note.load(note12.id);
|
||||
|
||||
let folder2 = await Folder.save({ title: 'folder2', parent_id: folder1.id });
|
||||
folder2 = await Folder.load(folder2.id);
|
||||
let note21 = await Note.save({ title: 'title note21', parent_id: folder2.id });
|
||||
note21 = await Note.load(note21.id);
|
||||
|
||||
let folder3 = await Folder.save({ title: 'folder3', parent_id: folder1.id });
|
||||
folder3 = await Folder.load(folder2.id);
|
||||
|
||||
const outDir = exportDir();
|
||||
|
||||
await service.export({ path: outDir, format: 'md', sourceNoteIds: [note11.id, note21.id] });
|
||||
|
||||
// verify that the md files exist
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder1`)).toBe(true);
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder1/title note11.md`)).toBe(true);
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder1/title note12.md`)).toBe(false);
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder1/folder2`)).toBe(true);
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder1/folder2/title note21.md`)).toBe(true);
|
||||
expect(await shim.fsDriver().exists(`${outDir}/folder3`)).toBe(false);
|
||||
}));
|
||||
|
||||
it('should export MD with unicode filenames', asyncTest(async () => {
|
||||
const service = new InteropService();
|
||||
let folder1 = await Folder.save({ title: 'folder1' });
|
||||
|
@@ -170,6 +170,37 @@ describe('services_InteropService_Exporter_Md', function() {
|
||||
expect(await shim.fsDriver().exists(`${exportDir}/_resources/${Resource.filename(resource2)}`)).toBe(true, 'Resource file should be copied to _resources directory.');
|
||||
}));
|
||||
|
||||
it('should create folders in fs', asyncTest(async () => {
|
||||
const exporter = new InteropService_Exporter_Md();
|
||||
await exporter.init(exportDir);
|
||||
|
||||
const itemsToExport = [];
|
||||
const queueExportItem = (itemType, itemOrId) => {
|
||||
itemsToExport.push({
|
||||
type: itemType,
|
||||
itemOrId: itemOrId,
|
||||
});
|
||||
};
|
||||
|
||||
let folder1 = await Folder.save({ title: 'folder1' });
|
||||
|
||||
let folder2 = await Folder.save({ title: 'folder2', parent_id: folder1.id });
|
||||
let note2 = await Note.save({ title: 'note2', parent_id: folder2.id });
|
||||
queueExportItem(BaseModel.TYPE_NOTE, note2);
|
||||
|
||||
let folder3 = await Folder.save({ title: 'folder3', parent_id: folder1.id });
|
||||
queueExportItem(BaseModel.TYPE_FOLDER, folder3.id);
|
||||
|
||||
await exporter.processItem(Folder, folder2);
|
||||
await exporter.processItem(Folder, folder3);
|
||||
await exporter.prepareForProcessingItemType(BaseModel.TYPE_NOTE, itemsToExport);
|
||||
await exporter.processItem(Note, note2);
|
||||
|
||||
expect(await shim.fsDriver().exists(`${exportDir}/folder1`)).toBe(true, 'Folder should be created in filesystem.');
|
||||
expect(await shim.fsDriver().exists(`${exportDir}/folder1/folder2`)).toBe(true, 'Folder should be created in filesystem.');
|
||||
expect(await shim.fsDriver().exists(`${exportDir}/folder1/folder3`)).toBe(true, 'Folder should be created in filesystem.');
|
||||
}));
|
||||
|
||||
it('should save notes in fs', asyncTest(async () => {
|
||||
const exporter = new InteropService_Exporter_Md();
|
||||
await exporter.init(exportDir);
|
||||
@@ -197,9 +228,6 @@ describe('services_InteropService_Exporter_Md', function() {
|
||||
queueExportItem(BaseModel.TYPE_FOLDER, folder3.id);
|
||||
queueExportItem(BaseModel.TYPE_NOTE, note3);
|
||||
|
||||
await exporter.processItem(Folder, folder1);
|
||||
await exporter.processItem(Folder, folder2);
|
||||
await exporter.processItem(Folder, folder3);
|
||||
await exporter.prepareForProcessingItemType(BaseModel.TYPE_NOTE, itemsToExport);
|
||||
await exporter.processItem(Note, note1);
|
||||
await exporter.processItem(Note, note2);
|
||||
|
18
ElectronClient/app/copyPluginAssets.js
Normal file
18
ElectronClient/app/copyPluginAssets.js
Normal file
@@ -0,0 +1,18 @@
|
||||
require('app-module-path').addPath(`${__dirname}`);
|
||||
|
||||
const fs = require('fs-extra');
|
||||
|
||||
const rootDir = __dirname;
|
||||
const sourceDir = `${rootDir}/../../ReactNativeClient/lib/joplin-renderer/assets`;
|
||||
const destDir = `${rootDir}/gui/note-viewer/pluginAssets`;
|
||||
|
||||
async function main() {
|
||||
await fs.remove(destDir);
|
||||
await fs.mkdirp(destDir);
|
||||
await fs.copy(sourceDir, destDir);
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
@@ -1 +0,0 @@
|
||||
version 9.12.0
|
File diff suppressed because one or more lines are too long
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
|
||||
Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage
|
||||
|
||||
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
|
||||
|
||||
*/
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
line-height: 1.3em;
|
||||
color: #abb2bf;
|
||||
background: #282c34;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.hljs-keyword, .hljs-operator {
|
||||
color: #F92672;
|
||||
}
|
||||
.hljs-pattern-match {
|
||||
color: #F92672;
|
||||
}
|
||||
.hljs-pattern-match .hljs-constructor {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-function {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-function .hljs-params {
|
||||
color: #A6E22E;
|
||||
}
|
||||
.hljs-function .hljs-params .hljs-typing {
|
||||
color: #FD971F;
|
||||
}
|
||||
.hljs-module-access .hljs-module {
|
||||
color: #7e57c2;
|
||||
}
|
||||
.hljs-constructor {
|
||||
color: #e2b93d;
|
||||
}
|
||||
.hljs-constructor .hljs-string {
|
||||
color: #9CCC65;
|
||||
}
|
||||
.hljs-comment, .hljs-quote {
|
||||
color: #b18eb1;
|
||||
font-style: italic;
|
||||
}
|
||||
.hljs-doctag, .hljs-formula {
|
||||
color: #c678dd;
|
||||
}
|
||||
.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst {
|
||||
color: #e06c75;
|
||||
}
|
||||
.hljs-literal {
|
||||
color: #56b6c2;
|
||||
}
|
||||
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string {
|
||||
color: #98c379;
|
||||
}
|
||||
.hljs-built_in, .hljs-class .hljs-title {
|
||||
color: #e6c07b;
|
||||
}
|
||||
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number {
|
||||
color: #d19a66;
|
||||
}
|
||||
.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title {
|
||||
color: #61aeee;
|
||||
}
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
|
||||
Atom One Light by Daniel Gamage
|
||||
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
|
||||
|
||||
base: #fafafa
|
||||
mono-1: #383a42
|
||||
mono-2: #686b77
|
||||
mono-3: #a0a1a7
|
||||
hue-1: #0184bb
|
||||
hue-2: #4078f2
|
||||
hue-3: #a626a4
|
||||
hue-4: #50a14f
|
||||
hue-5: #e45649
|
||||
hue-5-2: #c91243
|
||||
hue-6: #986801
|
||||
hue-6-2: #c18401
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #383a42;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #a0a1a7;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-keyword,
|
||||
.hljs-formula {
|
||||
color: #a626a4;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name,
|
||||
.hljs-selector-tag,
|
||||
.hljs-deletion,
|
||||
.hljs-subst {
|
||||
color: #e45649;
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #0184bb;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-regexp,
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-meta-string {
|
||||
color: #50a14f;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-class .hljs-title {
|
||||
color: #c18401;
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-type,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-number {
|
||||
color: #986801;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link,
|
||||
.hljs-meta,
|
||||
.hljs-selector-id,
|
||||
.hljs-title {
|
||||
color: #4078f2;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -40,16 +40,16 @@ stats['bs_BA'] = {"percentDone":91};
|
||||
stats['bg_BG'] = {"percentDone":81};
|
||||
stats['ca'] = {"percentDone":64};
|
||||
stats['hr_HR'] = {"percentDone":34};
|
||||
stats['cs_CZ'] = {"percentDone":93};
|
||||
stats['cs_CZ'] = {"percentDone":100};
|
||||
stats['da_DK'] = {"percentDone":90};
|
||||
stats['de_DE'] = {"percentDone":96};
|
||||
stats['de_DE'] = {"percentDone":100};
|
||||
stats['en_GB'] = {"percentDone":100};
|
||||
stats['en_US'] = {"percentDone":100};
|
||||
stats['es_ES'] = {"percentDone":93};
|
||||
stats['eo'] = {"percentDone":47};
|
||||
stats['fr_FR'] = {"percentDone":100};
|
||||
stats['gl_ES'] = {"percentDone":53};
|
||||
stats['it_IT'] = {"percentDone":88};
|
||||
stats['it_IT'] = {"percentDone":94};
|
||||
stats['nl_BE'] = {"percentDone":42};
|
||||
stats['nl_NL'] = {"percentDone":88};
|
||||
stats['nb_NO'] = {"percentDone":93};
|
||||
@@ -64,7 +64,7 @@ stats['tr_TR'] = {"percentDone":97};
|
||||
stats['el_GR'] = {"percentDone":99};
|
||||
stats['ru_RU'] = {"percentDone":99};
|
||||
stats['sr_RS'] = {"percentDone":79};
|
||||
stats['zh_CN'] = {"percentDone":87};
|
||||
stats['zh_CN'] = {"percentDone":99};
|
||||
stats['zh_TW'] = {"percentDone":97};
|
||||
stats['ja_JP'] = {"percentDone":99};
|
||||
stats['ko'] = {"percentDone":93};
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
ElectronClient/app/package-lock.json
generated
2
ElectronClient/app/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "1.0.181",
|
||||
"version": "1.0.184",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "1.0.181",
|
||||
"version": "1.0.184",
|
||||
"description": "Joplin for Desktop",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -8,7 +8,7 @@
|
||||
"pack": "node_modules/.bin/electron-builder --dir",
|
||||
"dist": "node_modules/.bin/electron-builder",
|
||||
"publish": "build -p always",
|
||||
"postinstall": "node compile.js && node compile-package-info.js && node electronRebuild.js",
|
||||
"postinstall": "node compile.js && node compile-package-info.js && node copyPluginAssets.js && node electronRebuild.js",
|
||||
"compile": "node compile.js && node compile-package-info.js",
|
||||
"install-141": "npm install --toolset=v141"
|
||||
},
|
||||
|
12
README.md
12
README.md
@@ -346,23 +346,23 @@ Current translations:
|
||||
 | Bulgarian | [bg_BG](https://github.com/laurent22/joplin/blob/master/CliClient/locales/bg_BG.po) | | 81%
|
||||
 | Catalan | [ca](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ca.po) | jmontane, 2019 | 64%
|
||||
 | Croatian | [hr_HR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/hr_HR.po) | Hrvoje Mandić (trbuhom@net.hr) | 34%
|
||||
 | Czech | [cs_CZ](https://github.com/laurent22/joplin/blob/master/CliClient/locales/cs_CZ.po) | Lukas Helebrandt (lukas@aiya.cz) | 93%
|
||||
 | Czech | [cs_CZ](https://github.com/laurent22/joplin/blob/master/CliClient/locales/cs_CZ.po) | Lukas Helebrandt (lukas@aiya.cz) | 100%
|
||||
 | Dansk | [da_DK](https://github.com/laurent22/joplin/blob/master/CliClient/locales/da_DK.po) | Morten Juhl-Johansen Zölde-Fejér (mjjzf@syntaktisk. | 90%
|
||||
 | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Michael Sonntag (ms@editorei.de) | 96%
|
||||
 | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Fabian (fab4x@mailbox.org) | 100%
|
||||
 | English (UK) | [en_GB](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_GB.po) | | 100%
|
||||
 | English (US) | [en_US](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_US.po) | | 100%
|
||||
 | Español | [es_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/es_ES.po) | Andros Fenollosa (andros@fenollosa.email) | 93%
|
||||
 | Esperanto | [eo](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eo.po) | Marton Paulo (martonpss@gmail.com) | 47%
|
||||
 | Esperanto | [eo](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eo.po) | Marton Paulo | 47%
|
||||
 | Français | [fr_FR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fr_FR.po) | Laurent Cozic | 100%
|
||||
 | Galician | [gl_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/gl_ES.po) | Marcos Lans (marcoslansgarza@gmail.com) | 53%
|
||||
 | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 88%
|
||||
 | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 94%
|
||||
 | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 42%
|
||||
 | Nederlands | [nl_NL](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_NL.po) | Robert (metbril@outlook.com) | 88%
|
||||
 | Norwegian | [nb_NO](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nb_NO.po) | Mats Estensen (code@mxe.no) | 93%
|
||||
 | Persian | [fa](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fa.po) | Mehrad Mahmoudian (mehrad@mahmoudian.me) | 40%
|
||||
 | Polski | [pl_PL](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pl_PL.po) | | 79%
|
||||
 | Português | [pt_PT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_PT.po) | Diogo Caveiro (diogocaveiro.pro@outlook.com) | 96%
|
||||
 | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_BR.po) | Marton Paulo (martonpss@gmail.com) | 92%
|
||||
 | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_BR.po) | Marton Paulo | 92%
|
||||
 | Română | [ro](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ro.po) | | 41%
|
||||
 | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 52%
|
||||
 | Svenska | [sv](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sv.po) | Jonatan Nyberg (jonatan@autistici.org) | 71%
|
||||
@@ -370,7 +370,7 @@ Current translations:
|
||||
 | Ελληνικά | [el_GR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/el_GR.po) | Harris Arvanitis (xaris@tuta.io) | 99%
|
||||
 | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov (artyom.karlov@gmail.com) | 99%
|
||||
 | српски језик | [sr_RS](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sr_RS.po) | | 79%
|
||||
 | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 87%
|
||||
 | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 99%
|
||||
 | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_TW.po) | Ethan Chen (ethan42411@gmail.com) | 97%
|
||||
 | 日本語 | [ja_JP](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ja_JP.po) | genneko (genneko217@gmail.com) | 99%
|
||||
 | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 93%
|
||||
|
@@ -194,11 +194,12 @@ module.exports = function(context) {
|
||||
{ name: 'fonts/KaTeX_Main-Regular.woff2' },
|
||||
{ name: 'fonts/KaTeX_Math-Italic.woff2' },
|
||||
{ name: 'fonts/KaTeX_Size1-Regular.woff2' },
|
||||
{ name: 'fonts/KaTeX_Size2-Regular.woff2' },
|
||||
{ name: 'fonts/KaTeX_AMS-Regular.woff2' },
|
||||
];
|
||||
};
|
||||
|
||||
function renderToStringWithCache(latex, options) {
|
||||
console.info('OPTSON', stringifySafe(options));
|
||||
const cacheKey = md5(escape(latex) + escape(stringifySafe(options)));
|
||||
if (cacheKey in cache_) {
|
||||
return cache_[cacheKey];
|
||||
|
@@ -49,4 +49,29 @@ function loadPluginAssets(assets) {
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Adding asset files
|
||||
|
||||
A plugin (or rule) can have any number of assets, such as CSS or font files, associated with it. To add an asset to a plugin, follow these steps:
|
||||
|
||||
- Add the file under `/assets/PLUGIN_NAME/your-asset-file.css`
|
||||
- Register this file within the plugin using `context.pluginAssets[PLUGIN_NAME] = [{ name: 'your-asset-file.css' }]`
|
||||
|
||||
See katex.js for an example of how this is done.
|
||||
|
||||
### Adding inline CSS
|
||||
|
||||
A plugin can ask for some CSS to be included inline in the rendered HTML. This is convenient as it means no extra file needs to be packaged. Use this syntax to do this:
|
||||
|
||||
```
|
||||
context.pluginAssets[PLUGIN_NAME] = [
|
||||
{
|
||||
inline: true,
|
||||
text: ".my-css { background-color: 'green' }",
|
||||
mime: 'text/css',
|
||||
},
|
||||
];
|
||||
```
|
Binary file not shown.
@@ -14,8 +14,6 @@
|
||||
"jasmine": "^3.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"//": "NOTE: due to a bug in electron-builder, the dependencies are currently copied in each client package.json: https://github.com/electron-userland/electron-builder/issues/3185",
|
||||
"///": "Any added or modified dependency should however be listed here so that the package can be installed independently",
|
||||
"base-64": "^0.1.0",
|
||||
"font-awesome-filetypes": "^2.1.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
const InteropService_Exporter_Base = require('lib/services/InteropService_Exporter_Base');
|
||||
const { basename, friendlySafeFilename } = require('lib/path-utils.js');
|
||||
const { basename, dirname, friendlySafeFilename } = require('lib/path-utils.js');
|
||||
const BaseModel = require('lib/BaseModel');
|
||||
const Folder = require('lib/models/Folder');
|
||||
const Note = require('lib/models/Note');
|
||||
@@ -119,6 +119,7 @@ class InteropService_Exporter_Md extends InteropService_Exporter_Base {
|
||||
let noteBody = await this.relaceLinkedItemIdsByRelativePaths_(item);
|
||||
const modNote = Object.assign({}, item, { body: noteBody });
|
||||
const noteContent = await Note.serializeForEdit(modNote);
|
||||
await shim.fsDriver().mkdir(dirname(noteFilePath));
|
||||
await shim.fsDriver().writeFile(noteFilePath, noteContent, 'utf-8');
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -40,16 +40,16 @@ stats['bs_BA'] = {"percentDone":91};
|
||||
stats['bg_BG'] = {"percentDone":81};
|
||||
stats['ca'] = {"percentDone":64};
|
||||
stats['hr_HR'] = {"percentDone":34};
|
||||
stats['cs_CZ'] = {"percentDone":93};
|
||||
stats['cs_CZ'] = {"percentDone":100};
|
||||
stats['da_DK'] = {"percentDone":90};
|
||||
stats['de_DE'] = {"percentDone":96};
|
||||
stats['de_DE'] = {"percentDone":100};
|
||||
stats['en_GB'] = {"percentDone":100};
|
||||
stats['en_US'] = {"percentDone":100};
|
||||
stats['es_ES'] = {"percentDone":93};
|
||||
stats['eo'] = {"percentDone":47};
|
||||
stats['fr_FR'] = {"percentDone":100};
|
||||
stats['gl_ES'] = {"percentDone":53};
|
||||
stats['it_IT'] = {"percentDone":88};
|
||||
stats['it_IT'] = {"percentDone":94};
|
||||
stats['nl_BE'] = {"percentDone":42};
|
||||
stats['nl_NL'] = {"percentDone":88};
|
||||
stats['nb_NO'] = {"percentDone":93};
|
||||
@@ -64,7 +64,7 @@ stats['tr_TR'] = {"percentDone":97};
|
||||
stats['el_GR'] = {"percentDone":99};
|
||||
stats['ru_RU'] = {"percentDone":99};
|
||||
stats['sr_RS'] = {"percentDone":79};
|
||||
stats['zh_CN'] = {"percentDone":87};
|
||||
stats['zh_CN'] = {"percentDone":99};
|
||||
stats['zh_TW'] = {"percentDone":97};
|
||||
stats['ja_JP'] = {"percentDone":99};
|
||||
stats['ko'] = {"percentDone":93};
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,8 +7,7 @@
|
||||
"linter-ci": "./node_modules/.bin/eslint --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"tsc": "tsc",
|
||||
"tsc-watch": "tsc --watch",
|
||||
"copyLib": "rsync --delete -a ReactNativeClient/lib/ ElectronClient/app/lib/",
|
||||
"postinstall": "cd ReactNativeClient && cd lib && cd joplin-renderer && npm i"
|
||||
"copyLib": "rsync --delete -a ReactNativeClient/lib/ ElectronClient/app/lib/"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
Reference in New Issue
Block a user