-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancements for offline use #227
Conversation
additional html rendering with alternative css - just testing modified: nvpy/nvpy-example.cfg modified: nvpy/nvpy.py modified: nvpy/view.py
…e extension txt or md is set in config file instead
def observer_view_markdown(self, view, evt_type, evt): | ||
fn = self.helper_markdown_to_html() | ||
# turn filename into URI (mac wants this) | ||
fn_uri = 'file://' + os.path.abspath(fn) | ||
webbrowser.open(fn_uri) | ||
|
||
def observer_view_markdown_raw(self, view, evt_type, evt): | ||
fn = self.helper_render_markdown_raw() | ||
subprocess.Popen([os.path.abspath(fn)],shell=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If no note is selected or the notes_as_txt feature is disabled,
abspath()
raisesTypeError
becausefn
is None. - On UNIX-like platforms,
Popen()
should fail because*.txt
or*.mkdn
files are generally not executable.
if note_markdown(note): | ||
fn += '.mkdn' | ||
else: | ||
fn += '.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Degraded. systemtags are updated by Simplenote. It is an array that contains "pinned" or "markdown". nvPY changes the file extension based on it.
The internal data model of nvpy takes a lot of work to grasp. I plan to improve it in v2.4.0 or later.
@@ -300,6 +268,46 @@ def __init__(self, config): | |||
|
|||
self.config = config | |||
|
|||
# simplenote only imported if simplenote_sync activated in config-file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting from the README.rst
:
nvpy is a simplenote-syncing note-taking tool
I developed and tested assuming that the nvPY user uses simplenote synchronization feature. I don't want to complicate source code just to decouple simplenote library dependencies.
@jkall |
Additions: