Previously we'd use the remove-markdown package to create the note
preview however this function would freeze on certain notes, and was
probably unsafe as it used regex to parse Markdown. Replaced this in
favour of Markdown-it along with htmlparser2 to strip all markup from a
note.
The implementation uses / symbol as a nesting separator. I.e. tag/subtag is a nested tag, where tag is the parent tag and subtag is its child. Creating a tag named tag/subtag/subsubtag creates three tags, one for each level. The tags are associated using parent_id field.
In the app, viewing notes with a tag will also show all notes that are associated with any of the tag's descendant tags (same for the note count). Deleting a tag will also delete all its descendant tags.
In the desktop app the tags are shown nested just like the notebooks.
The goal is to allow locking a sync target so that maintenance
operations, such as upgrading the target to a more efficient format,
can be done. For now, only the lock mechanism is in place, as a way to
evaluate it, and to see if it can cause any issue.
The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)
Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).
The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.
Could also allow creating a command palette.
* Manually refresh codemirror whenever the parent div size changes
* Set editor width through style rather than adding an extra property
* use Memo for editorStyle
- previously getLineSpan was included line text as a token (dumb
oversight)
- the regex was updated to include a space after a OL element (was
missing for some reason)
This reverts commit f432734338.
This new package has its own glitches and doesn't look good
when button labels are too large. So reverting to the less
glitchy package.
Joplin has 4 panes: side bar, notes list, code and view. Change joplin in a way that these parts can be different windows. Thus it is possible to put these windows on different screens for more space and better overview.
Reverts 468261906a
Disabling the toolbar when the editor is not in focus means it
was disabled when trying to click on one of the button, because
the editor loses focus before the click event is processed.
* Add support for editable resources
* Fixed handling of resource paths
* Add delay before saving resource
* Delete temp files and stop watching when switching notes
* Handle sync when resource has been edited
* Handle resource conflicts
* Refactoring and handle conflicts from edit watcher
* Added test unit for conflict handling when deleting resource
* Trying to fix Travis-ci test units
* Fixed typo
* Update TinyMCE.tsx
* Update AsyncActionQueue.ts
* Added German translations
- Added missing translations
- Motified a few translations
- There is the question whether to translate the English "theme" to a
German word or keep its English version.
* Adjusted translation
* Translation : translate to bahasa indonesia
* fix(translation) : change to one letter
* fix(translation) : consistency N -> T
* rm(unused) : remove unused files
* When attaching an image/resource insert it at the current cursor position
* Correct argument order
* Address code review comments
* Another code review comment
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Fix quick actions
* Receive quick actions when the app is cold-launched
* Force side menu close before creating quick note
* Fix react warning: Can't perform a react state update on an unmounted component
The warning was:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in NoteScreenComponent (created by Connect(NoteScreenComponent))
in Connect(NoteScreenComponent) (at app-nav.js:74)
* Fix auto title generation for quick notes.
The previous version created a new provisional note but then while handling NAV_BACK at reduxSharedMiddleware:35 the list of provisional note ids was cleared so when NoteScreenComponent was being mounted later the note was no longer considered provisional and Joplin would not generate the note title from its contents.
* Check for quick action data to be present before processing.
For some reason sometimes it gets called with null.
* Disable sending serialized data over the react-native bridge when attaching image or file
* Remove noData opt from DocumentPicker as it's only relevant for ImagePicker
Many users unfortunately don't care about the template asking not post support queries here, so we'll now accept questions but we'll just ignore them and let stale bot take care of them.
Also removed the "invalid" template because I believe it make people try to game the system by posting instead a bug report for their support or feature request. At least now we can hope there will less off-topic issues in the bug label.
Squashed commit of the following:
commit 5fde36f5c3fa7c7efbce6d81f48fe841c823e88c
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:43:20 2020 +0100
Cannot fix for now
commit 251284db3c8b7da6db83f3e06fd19bfdc8b8dd3f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:31:08 2020 +0100
Fixed print to multiple PDFs logic
commit 00d9557996fb984b400fe650594150ae2681e03f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:49:20 2020 +0100
Fixed local search in TinyMCE
commit 46778bf0a79f3bba9ddbc27389fadce4f8944507
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:37:31 2020 +0100
Restored note toolbar buttons
commit 3e623c98f0a1cf08bf7d0136f0c8982c5e1ddcd8
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 12:30:57 2020 +0100
Various fixes and moved note toolbar to left of title
commit 790262fe9df5b08d4a619e5244d2906047b39855
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:21:11 2020 +0100
Clean up
commit cea30f42e69014ecabda6fa5083199a1ba7b7510
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:08:23 2020 +0100
Fixed note loading in TinyMCE
As the project is active, 45 days is enough time to label the issue (and then it won't be closed). If it has not been labelled within that time it's probably not important enough to keep it open, or we don't have resources to deal with it.
If user home directory is configured to anything other than `/home/${USER}`, `Exec` command in desktop entry points to non-existing file, and desktop entry is not considered valid, thus does not appear in list of application. Standard way to get home directory is using `${HOME}` environment variable. This could also be possible root cause of https://discourse.joplinapp.org/t/joplin-not-installing-completely/5669/2
* Working on an aritim-dark theme, very WIP still
* Update aritim.js
* Added new theme "Aritim-Dark"
* removing aritim-dark "brace" theme for now
* Updating style with some changes
* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside
* Reset branch back to the original upstream state
* Moved all themes out into their own .js theme files
* Updating master to use the seperated themes stuff
* Moved themes into their own const
* Removed switch case for themes and simplified it. Thanks Laurent for the help!
* Adding Aritim-Dark to theme options
* Working on an aritim-dark theme, very WIP still
* Update aritim.js
* Added new theme "Aritim-Dark"
* removing aritim-dark "brace" theme for now
* Updating style with some changes
* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside
* Reset branch back to the original upstream state
* Moved all themes out into their own .js theme files
* Updating master to use the seperated themes stuff
* Moved themes into their own const
* Removed switch case for themes and simplified it. Thanks Laurent for the help!
* Translation: Update ko.po
* Update README.md
Both the words ‘한국어’ and ‘한국말’ are composed of two meaning blocks : Korean + language.
어, which can be written in the Chinese character 語, means “language”, and 말, which is a native Korean word, also means “language”. So basically 한국어 and 한국말 are the same meaning, but I’d say 한국어 is a little more formal word while 한국말 is a more colloquial word.
‘어’ can be found in many other language names, but ‘말’ is not so commonly used other than in the word ‘한국말’ or ‘우리말(uri mal - ‘our language’, which is a word that Korean people use to mean ‘Korean’).
Here are some examples:
English = 영어
Chinese = 중국어
Japanese = 일본어
Arabic = 아랍어
Spanish = 스페인어
French = 프랑스어
Latin = 라틴어
Russian = 러시아어
* change incorect word
* Revert "Update README.md"
This reverts commit 88199a40df.
* Add friendly default filenames to export options
* remove extension from safefilename call
* Load parent folder for all exports
* convert foldername and filename to friendly versions separatly
* Add null guards to the filename export
Make space after '"tag_name":' optional, to avoid the whole script failing without further notice.
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Cleaning up the install script
* New `--force` option always downloads the latest version
* New `--notes` option shows the release notes
* Actually print the version installed at the end
* Show download progress, but not extra garbage
* Blue logo
* refactor and cleanup
* Handle space, but no args
* md importer: decode uri encoded links to cover case of special chars in linked image names
* md importer: temp debug logs for linux test pipeline
* md importer: more temp debug logs
* md importer: tests, add special char image name on linux
* md importer: tests, use const not let
* md importer: remove debug logs
* The basic editor is working! No list continuation still though
* List continuation is working! Now to delete when entering again and not typing on line + handle ordered lists
* Supports checkboxes + attempted at setting font
* Editor font works now; now need to fix the delete (look at past state)
* Fix deletion problem
* Add ordered list handler
* Add comments
* Extract insertListLine
* End lists on enter for empty bullets
* Add MarkdownView (renders badly though)
* Save edited text from MarkdownEditor
* Cleanup
* Refactor react-native-markdown-editor/
* Rename react-native-markdown-editor/ => MarkdownEditor/
* Cleanup
* Fix preview styles; still need to fix checkbox problem
* Fix keyboard padding
* Change name back to #body_changeText
* Incorporate PR feedback from @laurent22
* wip: Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/
* Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/
* Remove log statement
* Focus TextInput in MarkdownEditor from grandparent
* Make eslint happy
* Extract textInputRefName to shared variable
* Remove accidental #setState
* Cleanup
* Cleanup
* Run linter
* Cleanup
* Update button order
* Improve styles for config descriptions
* Allow descriptions to be added to BOOL type Setting configs
* Add editorBeta Setting
* Move FailSafe details to description text
* Update descriptionText styles
* Put the editor under the beta flag toggle
* Incorporate PR feedback from @laurent22
* Refactor Markdown editor focusing
* Cleanup
* Reorder MarkdownEditor formats
* Make applyListFormat behavior more intuitive
* Add comment
* Show MarkdownEditor with preview by default
* Show preview by default, then hide on typing
* Fix MarkdownEditor selection bug
* Cleanup
* Update Markdown button styles
* Make Markdown button colors theme-conscious
* Fix merge conflict resolution mistake
* Fix broken import
* Delete package-lock.json
* Reset package-lock.json
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Turkish translations updated
* fullpaths updated
* Language string now respects the original one
* Line endings fixed
* Mysterious new lines cleaned
* Revert Readme
* Old translations added back
Adjusted and added some Chinese simplified translation text
I like Joplin very much and hope to do my best
------------
调整和新增了部分中文简体翻译文本
非常喜欢Joplin,希望能尽绵薄之力
Previously it was possible to open Joplin by clicking on the tray icon.
This functionality is no longer available due to changes in Electron.
The following key combination will show or hide Joplin in the current workspace:
- macOS: `Cmd+Opt+J`
- Linux, Windows: `Ctrl+Alt+J`
- replaced Development by Features in `4. Come up with project that you're interested in and discuss it in [Features category](https://discourse.joplinapp.org/c/features)`
-
* finished writing first script version
* added preinstall script
* removed white space and platform if statements
* remove error log
* removed install function
* corrected commands
* changed ls to list
* API: Fix updation of tags when updating a note
* Add test for fix updation of tags
* Rewrite unit test and change variable name
* Use consistent variables and function calls
* Use default function call and change variable
* Handle case when tags is empty string
* Restructure test cases and improve tags check
* Update documentation
* add button to About box to copy Joplin's information to the clipboard
On certain OS it is not possible to copy the text in the About window.
This change allows to copy that info to the Clipboard.
Due to some shortfalls in Electron, it is not possible to set `defaultId` and `cancelId` to 0.
(Actually one can set them to 0, but the result is not what one would expect.)
Thus I had to move the default `OK` button to the left.
I also added a hack to position the `OK` button approximately in the middle of the dialog box (if the copyLabel is not longer than 14 characters).
* remove hack to position button
* add a new bridge function showMessageBox
The function returns the index of the clicked button.
* we don't need the first 3 lines (product name and copyright)
* Ensure after a note is deleted the next note is given focus.
* Fix handling of focus when navigating away from multiple selections.
* Refocus after note deletion.
* Mintor refactor.
* Clean up.
* Remove accidental white space change.
* Remove accidental white space change.
* Trying to get TuiEditor to work
* Tests with TinyMCE
* Fixed build
* Improved asset loading
* Added support for Joplin source blocks
* Added support for Joplin source blocks
* Better integration
* Make sure noteDidUpdate event is always dispatched at the right time
* Minor tweaks
* Fixed tests
* Add support for checkboxes
* Minor refactoring
* Added support for file attachments
* Add support for fenced code blocks
* Fix new line issue on code block
* Added support for Fountain scripts
* Refactoring
* Better handling of saving and loading notes
* Fix saving and loading ntoes
* Handle multi-note selection and fixed new note creation issue
* Fixed newline issue in test
* Fixed newline issue in test
* Improve saving and loading
* Improve saving and loading note
* Removed undeeded prop
* Fixed issue when new note being saved is incorrectly reloaded
* Refactoring and improve saving of note when unmounting component
* Fixed TypeScript error
* Small changes
* Improved further handling of saving and loading notes
* Handle provisional notes and fixed various saving and loading bugs
* Adding back support for HTML notes
* Added support for HTML notes
* Better handling of editable nodes
* Preserve image HTML tag when the size is set
* Handle switching between editor when the note has note finished saving
* Handle templates
* Handle templates
* Handle loading note that is being saved
* Handle note being reloaded via sync
* Clean up
* Clean up and improved logging
* Fixed TS error
* Fixed a few issues
* Fixed test
* Logging
* Various improvements
* Add blockquote support
* Moved CWD operation to shim
* Removed deleted files
* Added support for Joplin commands
@@ -22,19 +25,6 @@ Then you can test the various applications:
cd ElectronClient
npm start
If you'd like to auto-reload the app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3.`watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
## Testing the Terminal application
cd CliClient
@@ -47,12 +37,12 @@ First you need to setup React Native to build projects with native code. For thi
Then:
cd ReactNativeClient
npm start-android
# Or: npm start-ios
npm run start-android
# Or: npm run start-ios
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
Normally the bundler should start automatically with the application. If it doesn't run `npm start`.
Normally the bundler should start automatically with the application. If it doesn't, run `npm start`.
## Building the clipper
@@ -80,37 +70,23 @@ You can specify additional parameters when running the desktop or CLI applicatio
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
# Troubleshooting desktop application
In the current setup, `tsc` is executed from the root of the project, and will compile everything in CliClient, ElectronClient, etc. This is more convenient to have just one place to compile everything, and it also means there's only one watch command to run. However, one drawback is that TypeScript doesn't find types defined in node_modules folders in sub-directories. For example, if you install `immer` in ElectronClient, then try to use the package, TypeScript will report that it cannot find this module. In theory using `typeRoots`, it should be possible to make it find the right modules but it doesn't seem to work in this case. Currently the workaround is to install any such package at the root of the project. By doing so, TypeScript will find the type definitions and compilation will work. It's not ideal since the module is installed at the root even though it's not used, but for now that will work.
## On Linux and macOS
## Hot reload
If there's an error `while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory`, run `sudo apt-get install libgconf-2-4`
If you'd like to auto-reload the desktop app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
If you get a node-gyp related error, you might need to manually install it: `npm install -g node-gyp`.
If you get the error `libtool: unrecognized option '-static'`, follow the instructions [in this post](https://stackoverflow.com/a/38552393/561309) to use the correct libtool version.
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
## On Windows
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3.`watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
If node-gyp does not work (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install `windows-build-tools` using `npm install --global windows-build-tools`.
# Troubleshooting
If `yarn dist` fails, it may need administrative rights.
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
## Other issues
> The application window doesn't open or is white
This is an indication that there's an early initialisation error. Try this:
- In ElectronAppWrapper, set `debugEarlyBugs` to `true`. This will force the window to show up and should open the console next to it, which should display any error.
- In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?
- Also try to delete node_modules and rebuild.
- If all else fails, switch your computer off and on again, to make sure you start clean.
> How to work on the app from Windows?
**You should not use WSL at all** because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.
So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.
Please read for the [Build Troubleshooting Document](https://github.com/laurent22/joplin/blob/master/readme/build_troubleshooting.md) for various tips on how to get the build working.
@@ -21,15 +21,13 @@ Please check that your request has not already been posted on the forum or the [
Avoid listing multiple requests in one topic. One topic per request makes it easier to track and discuss it.
Finally, when submitting a pull request, don't forget to [test your code](#unit-tests).
Finally, when submitting a pull request, don't forget to [test your code](#automated-tests).
# Contribute to the project
## Contributing to Joplin's translation
# Contributing to Joplin's translation
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
## Contributing to Joplin's code
# Contributing to Joplin's code
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
@@ -41,7 +39,7 @@ If you want to start contributing to the project's code, please follow these gui
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
### Coding style
## Coding style
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
@@ -49,44 +47,45 @@ For new React components, please use [React Hooks](https://reactjs.org/docs/hook
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
### Unit tests
## Automated tests
When submitting a pull request for a new feature or bug fix, please add unit tests for your code. Unit testing GUI changes is not always possible so it is not required, but any change in a file under /lib for example should be unit tested.
When submitting a pull request for a new feature or a bug fix, please add automated tests for your code whenever possible. Tests in Joplin are divided into **unit tests** and **feature tests**.
* **Unit tests** are used to test models, services or utility classes - they are relatively low level. Unit tests should be prefixed with the type of class that is being tested - for example "models_Folder" or "services_SearchEngine".
* **Feature tests** on the other hand are to test higher level functionalities such as interactions with the GUI and how they affect the underlying model. Often these tests would dispatch Redux actions, and inspect how the application state has been changed. The feature tests should be prefixed with "feature_", for example "feature_TagList". There's a good explanation on what qualifies as a feature test in [this post](https://github.com/laurent22/joplin/pull/2819#issuecomment-603502230).
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
```sh
npm run tsc # Build the .ts and .tsx files
cd CliClient
npm install
cd CliClient
```
To run all the test units:
```sh
npm run test
npm test
```
To run just one particular file:
```sh
npm run test -- --filter=markdownUtils # Don't add the .js extension
npm test -- --filter=markdownUtils # Don't add the .js extension
```
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
```sh
npm run test -- --filter="should handle conflict"
npm test -- --filter="should handle conflict"
```
If you get the error `Cannot find module '/joplin/CliClient/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node'`, you may need to run `npm rebuild`.
## About abandoned pull requests
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don’t hear from them again.
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don't hear from them again.
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
We’d much prefer that you complete the pull request though, so we’ll be sure to ping you a few times before that!
We'd much prefer that you complete the pull request though, so we'll be sure to ping you a few times before that!
@@ -15,6 +15,10 @@ class Command extends BaseCommand {
return'Build the API doc';
}
enabled(){
returnfalse;
}
createPropertiesTable(tableFields){
constheaders=[
{name:'name',label:'Name'},
@@ -52,7 +56,6 @@ class Command extends BaseCommand {
lines.push('# Joplin API');
lines.push('');
lines.push('When the Web Clipper service is enabled, Joplin exposes a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer) which allows third-party applications to access Joplin\'s data and to create, modify or delete notes, notebooks, resources or tags.');
lines.push('');
lines.push('In order to use it, you\'ll first need to find on which port the service is running. To do so, open the Web Clipper Options in Joplin and if the service is running it should tell you on which port. Normally it runs on port **41184**. If you want to find it programmatically, you may follow this kind of algorithm:');
lines.push('');
@@ -287,7 +290,7 @@ class Command extends BaseCommand {
lines.push('');
lines.push('### Creating a note with a specific ID');
lines.push('');
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a 32 characters long hexadecimal string. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a **32 characters long string** in hexadecimal. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
lines.push('');
lines.push(' curl --data \'{ "id": "00a87474082744c1a8515da6aa5792d2", "title": "My note with custom ID"}\' http://127.0.0.1:41184/notes');
return[['--format <format>',_('Destination format: %s',formats.join(', '))],['--note <note>',_('Exports only the given note.')],['--notebook <notebook>',_('Exports only the given notebook.')]];
@@ -19,19 +19,26 @@ class Command extends BaseCommand {
}
enabled(){
returnfalse;
returntrue;
}
options(){
return[['-n, --limit <num>',_('Displays only the first top <num> notes.')],['-s, --sort <field>',_('Sorts the item by <field> (eg. title, updated_time, created_time).')],['-r, --reverse',_('Reverses the sorting order.')],['-t, --type <type>',_('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],['-f, --format <format>',_('Either "text" or "json"')],['-l, --long',_('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')]];
return[
['-n, --limit <num>',_('Displays only the first top <num> notes.')],
['-s, --sort <field>',_('Sorts the item by <field> (eg. title, updated_time, created_time).')],
['-r, --reverse',_('Reverses the sorting order.')],
['-t, --type <type>',_('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],
['-f, --format <format>',_('Either "text" or "json"')],
['-l, --long',_('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')],
@@ -26,7 +26,7 @@ class Command extends BaseCommand {
constok=force?true:awaitthis.prompt(notes.length>1?_('%d notes match this pattern. Delete them?',notes.length):_('Delete note?'),{booleanAnswerDefault:'n'});
@@ -46,6 +46,8 @@ class NoteWidget extends TextWidget {
if(this.note_&&this.note_.encryption_applied){
this.text=_('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
this.text+='\n\n';
this.text+=_('You may also type `status` for more information.');
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.