Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions DOCUMENTATION.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:four: [Encrypting your notes](#en)
:five: [Note taking features](#nt)
:six: [Changing Notebook password](#cp)
:seven: [Customizing which folders are encrypted](#custen)
:seven: [Customizing which folders and files are encrypted](#custen)
:eight: [Automatic git backups](#git)
:nine: [FAQ](#faq)

Expand All @@ -33,7 +33,7 @@ Then you extract the zip file and put the contents in a cloud synced or local fo

Done! You can now create any number of notes in that folder. For hierarchy, you can use folders and sub-folders.

Notes can be `txt` or `md` files and they will be encrypted with your password.
Notes [by default](#custen), can be `txt` or `md` files and they will be encrypted with your password.

By default, only `diary` folder (if it exists) is encrypted. You can learn more about changing this setting [here](#custen).

Expand Down Expand Up @@ -108,7 +108,7 @@ Then start `manager.py` again to re-encrypt your notes. This time you will be as


<a name="custen"></a>
## :seven: Customizing which folders are encrypted
## :seven: Customizing which folders and files are encrypted
:point_up_2: [[back to top](#docs)]

To customize which folders are encrypted, use the `settings.json` file in `vscode_notebook/` directory.
Expand All @@ -131,6 +131,20 @@ You can also use the "*" symbol to select all folders. For example, in the follo
}
```

----

You can also change which files are to be considered as notes, and thus encrypted. For that, change the `note_extensions` setting.

```json
{
"note_extensions": [
"txt",
"md",
"rst"
]
}
```

**NOTE** - You should edit `settings.json` file only when the notebook is in a decrypted state. Changing it when notebook is encrypted can cause
unintentional side-effects. `"is_encrypted": false` will be present in `settings.json` when notebook is decrypted.

Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VSCode Notebook :memo:
</h1>

**v2.0**
**v2.1**

VSCode Notebook is an attempt to use VSCode as a complete note taking application.
This is a VSCode port of the popular [SublimeNotebook](https://github.com/aviaryan/SublimeNotebook) project.
Expand Down
2 changes: 1 addition & 1 deletion vscode_notebook/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SETTINGS_PATH = 'vscode_notebook/settings.json'
VERSION = 2.0
VERSION = 2.1
3 changes: 2 additions & 1 deletion vscode_notebook/cryptlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def decode(key, enc):
def get_file_list():
listFiles = []
sts = Settings()
exts = tuple(sts.json['note_extensions'])
# loop through directory
for dirpath, dnames, fnames in os.walk('./'):
dirname = dirpath.replace('./', '', 1)
Expand All @@ -95,7 +96,7 @@ def get_file_list():
if not sts.check_folder_private(dirname):
continue
for f in fnames:
if not (f.endswith('.txt') or f.endswith('.md')):
if not f.endswith(exts):
continue
listFiles.append(os.path.join(dirpath, f))
# print(listFiles)
Expand Down
3 changes: 2 additions & 1 deletion vscode_notebook/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class Settings:
'version': VERSION,
'do_git_backup': False,
'git_push_interval_minutes': 1440,
'last_git_push': 0
'last_git_push': 0,
'note_extensions': ['txt', 'md']
}
json = default_json.copy()
where_star = 'public'
Expand Down