-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 remove
polyfill.ts
; fix linting; bundle the lua files in main.js
- Loading branch information
Showing
25 changed files
with
672 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tag-version-prefix="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tabWidth: 2 | ||
useTabs: false | ||
semi: true | ||
singleQuote: true | ||
quoteProps: preserve | ||
trailingComma: es5 | ||
arrowParens: avoid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,5 @@ | |
|
||
## 最后 | ||
|
||
- 欢迎提供更多命令模板。 | ||
- 欢迎提供更多命令模板到[这里](src/export_command_templates.ts).。 | ||
- 有问题可以提交 Issue 给我。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
{ | ||
"id": "obsidian-enhancing-export", | ||
"name": "Obsidian Enhancing Export", | ||
"version": "1.0.1", | ||
"version": "1.0.4", | ||
"minAppVersion": "0.12.0", | ||
"description": "This is a enhancing export plugin for Obsidian. It allows to export to formats like Html, DOCX, ePub and PDF or Hugo.", | ||
"description": "This is a enhancing export plugin for Obsidian. It allows to export to formats like Html, DOCX, ePub and PDF or Markdown(Hugo) etc.", | ||
"author": "YISH", | ||
"authorUrl": "https://obsidian.md", | ||
"authorUrl": "https://github.com/mokeyish", | ||
"isDesktopOnly": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import type { ExportSetting } from './settings'; | ||
|
||
/* | ||
* Variables | ||
* /User/aaa/Documents/test.pdf | ||
* - ${outputDir} --> /User/aaa/Documents/ | ||
* - ${outputPath} --> /User/aaa/Documents/test.pdf | ||
* - ${outputFileName} --> test | ||
* - ${outputFileFullName} --> test.pdf | ||
* | ||
* /User/aaa/Documents/test.pdf | ||
* - ${currentDir} --> /User/aaa/Documents/ | ||
* - ${currentPath} --> /User/aaa/Documents/test.pdf | ||
* - ${CurrentFileName} --> test | ||
* - ${CurrentFileFullName} --> test.pdf | ||
*/ | ||
|
||
export default { | ||
'Markdown': { | ||
name: 'Markdown', | ||
type: 'pandoc', | ||
arguments: | ||
'-f markdown --resource-path="${currentDir}" --lua-filter="${pluginDir}/lua/markdown.lua" -s -o "${outputPath}" -t commonmark_x-attributes', | ||
extension: '.md', | ||
}, | ||
'Markdown (Hugo)': { | ||
name: 'Markdown (Hugo)', | ||
type: 'pandoc', | ||
arguments: | ||
'-f markdown --resource-path="${currentDir}" --lua-filter="${pluginDir}/lua/markdown+hugo.lua" -s -o "${outputPath}" -t commonmark_x-attributes', | ||
extension: '.md', | ||
}, | ||
'Html': { | ||
name: 'Html', | ||
type: 'pandoc', | ||
arguments: | ||
'-f markdown --resource-path="${currentDir}" --self-contained --metadata title="${currentFileName}" -s -o "${outputPath}" -t html', | ||
customArguments: '--mathjax="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js"', | ||
extension: '.html', | ||
}, | ||
'PDF': { | ||
name: 'PDF', | ||
type: 'pandoc', | ||
arguments: | ||
'-f markdown --resource-path="${currentDir}" --self-contained --metadata title="${currentFileName}" -s -o "${outputPath}" -t pdf', | ||
extension: '.pdf', | ||
}, | ||
'Word (.docx)': { | ||
name: 'Word (.docx)', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t docx', | ||
extension: '.docx', | ||
}, | ||
'OpenOffice': { | ||
name: 'OpenOffice', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t odt', | ||
extension: '.odt', | ||
}, | ||
'RTF': { | ||
name: 'RTF', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t rtf', | ||
extension: '.rtf', | ||
}, | ||
'Epub': { | ||
name: 'Epub', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t epub', | ||
extension: '.epub', | ||
}, | ||
'Latex': { | ||
name: 'Latex', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t latex', | ||
extension: '.latex', | ||
}, | ||
'Media Wiki': { | ||
name: 'Media Wiki', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t mediawiki', | ||
extension: '.mediawiki', | ||
}, | ||
'reStructuredText': { | ||
name: 'reStructuredText', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t rst', | ||
extension: '.rst', | ||
}, | ||
'Textile': { | ||
name: 'Textile', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t textile', | ||
extension: '.textile', | ||
}, | ||
'OPML': { | ||
name: 'OPML', | ||
type: 'pandoc', | ||
arguments: '-f markdown --resource-path="${currentDir}" -s -o "${outputPath}" -t opml', | ||
extension: '.opml', | ||
}, | ||
'Custom': { | ||
name: 'Custom', | ||
type: 'custom', | ||
command: 'your command', | ||
}, | ||
} as Record<string, ExportSetting>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,68 @@ | ||
import { strTpl } from '../utils'; | ||
|
||
export default { | ||
preparing: strTpl `generating "${0}" ......`, | ||
preparing: strTpl`generating "${0}" ......`, | ||
exportToOo: 'Export to ......', | ||
settingTabTitle: 'Export Setting', | ||
pandocPath: 'Pandoc path', | ||
pandocPathPlaceholder: '(Auto Detect)', | ||
selectExportFolder: 'Please select an export folder.', | ||
exportSuccessNotice: strTpl `Export file ${0} success!`, | ||
exportCommandOutputMessage: strTpl `Command: ${0}`, | ||
exportErrorOutputMessage: strTpl `Command: ${0},Error:${1}`, | ||
exportSuccessNotice: strTpl`Export file ${0} success!`, | ||
exportCommandOutputMessage: strTpl`Command: ${0}`, | ||
exportErrorOutputMessage: strTpl`Command: ${0},Error:${1}`, | ||
overwriteConfirmationDialog: { | ||
replace: 'Replace', | ||
title: strTpl `"${0}" already exists. Do you want to replace it?`, | ||
message: strTpl `A file or folder with the same name already exists in the folder "${0}". Replacing it will overwrite its current contents.`, | ||
title: strTpl`"${0}" already exists. Do you want to replace it?`, | ||
message: strTpl`A file or folder with the same name already exists in the folder "${0}". Replacing it will overwrite its current contents.`, | ||
}, | ||
messageBox: { | ||
yes: 'Yes', | ||
no: 'No', | ||
ok: 'Ok', | ||
cancel: 'Cancel' | ||
cancel: 'Cancel', | ||
}, | ||
|
||
general: 'General', | ||
name: 'Name', | ||
new: 'New', | ||
|
||
add: 'Add', | ||
remove: 'Remove', | ||
rename: 'Rename', | ||
chooseSetting: 'Choose setting', | ||
|
||
save: 'Save', | ||
|
||
exportDialog: { | ||
title: strTpl `Export to ${0}`, | ||
title: strTpl`Export to ${0}`, | ||
export: 'Export', | ||
}, | ||
|
||
|
||
|
||
exportTo: 'Export to', | ||
|
||
template: 'Template', | ||
|
||
fileName: 'File Name', | ||
type: 'Type', | ||
|
||
overwriteConfirmation: 'Overwrite confirmation', | ||
|
||
defaultFolderForExportedFile: 'Default Folder for Exported File', | ||
auto: 'Auto', | ||
sameFolderWithCurrentFile: 'Same folder with current file', | ||
customLocation: 'Custom location', | ||
reset: 'Reset', | ||
command: 'Command', | ||
|
||
arguments: 'Arguments', | ||
extraArguments: 'Extra arguments', | ||
targetFileExtensions: 'Target file extensions', | ||
targetFileExtensionsTip: '(Separated by whitespace)', | ||
|
||
afterExport: 'After Export', | ||
|
||
runCommand: 'Run command', | ||
showCommandOutput: 'Show command output', | ||
openExportedFileLocation: 'Open exported file location', | ||
openExportedFile: 'Open exported file', | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.