getreu / tp-note Goto Github PK
View Code? Open in Web Editor NEWMinimalistic note taking: save and edit your clipboard content as a note file (Gitlab mirror)
Home Page: https://blog.getreu.net/projects/tp-note/
License: Apache License 2.0
Minimalistic note taking: save and edit your clipboard content as a note file (Gitlab mirror)
Home Page: https://blog.getreu.net/projects/tp-note/
License: Apache License 2.0
The crate confy
should be considered unsupported because of Please release more often · Issue #41 · rust-cli/confy and Expose config path · Issue #33 · rust-cli/confy which leads to problem running on mac os x 11.4 · Issue #3 · getreu/tp-note
Possible solution: replace the crate confy
.
A chapter similar to 4.2. Linux file manager configuration describing how to add the 3 context menu entries Tp-Note, View Tp-Note and Export Tp-Note to MacOS's file manager is still pending.
This could be a good start: Create Context Menu Items in Mac Finder.
os: win11
test version: v1.20.1
Building either 1.22.2 and/or 1.22.3 yields the following error:
error[E0425]: cannot find value `app_args` in this scope
--> tpnote/src/file_editor.rs:42:18
|
42 | &app_args.editor
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `app_args` in this scope
--> tpnote/src/file_editor.rs:51:27
|
51 | (None, false) => &app_args.editor,
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `app_args` in this scope
--> tpnote/src/file_editor.rs:52:23
|
52 | (_, true) => &app_args.editor_console,
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `app_args` in this scope
--> tpnote/src/viewer/web_browser.rs:52:14
|
52 | &app_args.browser
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `app_args` in this scope
--> tpnote/src/viewer/web_browser.rs:63:10
|
63 | &app_args.browser
| ^^^^^^^^ not found in this scope
warning: unused import: `crate::config::CFG`
--> tpnote/src/file_editor.rs:3:5
|
3 | use crate::config::CFG;
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `crate::config::CFG`
--> tpnote/src/viewer/web_browser.rs:2:5
|
2 | use crate::config::CFG;
| ^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0425`.
warning: `tpnote` (bin "tpnote") generated 2 warnings
error: could not compile `tpnote` (bin "tpnote") due to 5 previous errors; 2 warnings emitted
*** Error code 101
Stop.
OS: NetBSD-10.99.9 dev version
Rust: 1.72.0
So far, the viewer only serves files that are located in the notes directory or in one of its subdirectories. As by default, annotation notes are always stored in the same directory than the to be annotated file, this security feature did not manifest as a restriction.
But, as #5 shows, some people prefer to store their notes in a separate directory, which can be easily realized either by
modifying the tmpl_annotate_*
templates or by a wrapper script invoking tp-note
(see #5).
In order to better support this use case, the viewer's above security feature could be relaxed a bit: it could allow not only to follow links below the note's directory, but also allow following links that start one node above.
It should be mentioned in this context, that tp-note
comes with 2 other complementary security features:
Conclusion
Relaxing the above described restriction seems tenable.
PS
It turns out, that at least Firefox resolves http://localhost:42829/../image.jpg
to http://localhost:42829/image.jpg
.
The files
./README.md
./docs/source/tpnote--manpage.md
./docs/source/tpnote--manual.md
./src/*.rs
need proofreading by an English native speaker.
Please consider the following defaults for Linux and Windows
Lines 161 to 176 in adc8279
Lines 192 to 208 in adc8279
Lines 178 to 186 in adc8279
Lines 210 to 219 in adc8279
The same is needed for iOS. Please enumerate the best iOS text-editors (and Markdown editors) and their paths. The order should be from best/uncommon to standard. The last should be some Unicode-editor, that comes with the OS. Only free products. OSS preferred.
Make sure that the editor does not fork (so that filename synchronization also occurs when the user closes his text-editor).
Hi,
I've finished packaging tp-note for NetBSD yesterday and would like to merge the package into our repositories.
Is it possible to add the man page (tpnote.1.gz) to the GitLab repository, so we don't need to fetch sources from different locations.
I see the tpnote.1.gz for v1.16.4 hosted at https://blog.getreu.net/projects/tp-note/
But, on the GitLab I can only find https://gitlab.com/getreu/tp-note/-/raw/master/docs/source/tpnote--manpage.md
Yes, it can be converted using pandoc but, that means adding an external build dependency to the package.
So, would you be willing to consider hosting tpnote.1.gz within the repository as well?
As for the package itself, it builds and runs just fine on NetBSD. I've been test using it for some hours and I couldn't find any issues.
Thank you for providing the software.
When Tp-Note is unsed on the console, one has to write the binary name tp-note
a lot. Here, the -
is especially annoying, because it inhibits autocomplete.
Tp-Note should have a shorter binary name, maybe tpnote
or tpn
?
Are there any widely used tpn
applications out there?
Hi folks, is there a flag that I can set which changes the location to which notes are saved? ie. I would like to change the default setting which saves the note in the directory where the file that I am annotating is located.
Expose Tp-Note's core functionality for simple embedding in text editors or text editor plugins.
Requires effortful refactoring, e.g.:
note
module in note.rs
.Compilation error:
error[E0034]: multiple applicable items in scope
--> /home/getreu/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.19.4/src/order.rs:315:15
|
315 | if ct == R::BITS {
| ^^^^ multiple `BITS` found
|
note: candidate #1 is defined in the trait `BitMemory`
--> /home/getreu/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.19.4/src/mem.rs:29:2
|
29 | const BITS: u8 = mem::size_of::<Self>() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `IsNumber`
--> /home/getreu/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
315 | if ct == BitMemory::BITS {
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
315 | if ct == IsNumber::BITS {
| ^^^^^^^^^^^^^^
Compiling rand_core v0.6.2
Compiling directories v2.0.2
error: aborting due to 43 previous errors
This is a downstream issue, described here:
0.19 bitvec break by 1.2 funty, causes nom 6.1 to fail to compile · Issue #3 · myrrlyn/funty
The workaround "Downgrade funty
to 1.1.0" works for me. The following prevents cargo install
from upgrading
downstream dependencies:
cargo install --locked tp-note
I keep this issue open until funty
is fixed. Nothing can be done in tp-note
.
Hi folks, downloading the mac binary and running ./tp-note yields
Bad TOML data: missing field debug_arg_default
at line 1 column 1
Note: this error may occur after upgrading Tp-Note due
to some incompatible configuration file changes.
Configuration file not found.
Rerunning doesn't fix it. There is no config file in ~/.config/tp-note/
I tried to trick it by doing a
touch ~/.config/tp-note/tp-note.toml
and then rerunning, but unfortunately no dice.
Hi,
Updating our tp-note
package from v1.19.4 to 1.19.5 and hitting a build failure.
Any hints on what could be causing this? I see that the versions of the crates glib-sys
, glib
and glib-macros
are the same on v1.19.4 and v1.19.5, so that is not the issue.
The following warnings were emitted during compilation:
warning: `"/usr/pkgsrc/wip/tp-note/work/.tools/bin/pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48"` did not exit successfully: exit status: 1
error: failed to run custom build command for `glib-sys v0.15.10`
Caused by:
process didn't exit successfully: `/usr/pkgsrc/wip/tp-note/work/tp-note-v1.19.5-692304815256290b31ae0dcb1679ebad0dd39b9f/target/release/build/glib-sys-6373f97bac89f54f/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-netbsd
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_netbsd
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-netbsd
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_netbsd
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-netbsd
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_netbsd
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-netbsd
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_netbsd
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=`"/usr/pkgsrc/wip/tp-note/work/.tools/bin/pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48"` did not exit successfully: exit status: 1
error: could not find system library 'glib-2.0' required by the 'glib-sys' crate
--- stdout
--- stderr
Package libpcre was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre', required by 'glib-2.0', not found
Package 'libpcre', required by 'glib-2.0', not found
warning: build failed, waiting for other jobs to finish...
*** Error code 101
Stop.
For info,
/usr/pkg/lib > ls | grep libpcre
.rw-r--r-- root wheel 366 KB Mon Nov 21 01:08:42 2022 libpcre.a
.rwxr-xr-x root wheel 941 B Mon Nov 21 01:08:38 2022 libpcre.la
lrwxr-xr-x root wheel 17 B Mon Nov 21 01:08:38 2022 libpcre.so ⇒ libpcre.so.1.2.13
lrwxr-xr-x root wheel 17 B Mon Nov 21 01:08:38 2022 libpcre.so.1 ⇒ libpcre.so.1.2.13
.rwxr-xr-x root wheel 270 KB Mon Nov 21 01:08:37 2022 libpcre.so.1.2.13
.rw-r--r-- root wheel 345 KB Mon Nov 21 01:08:42 2022 libpcre16.a
.rwxr-xr-x root wheel 955 B Mon Nov 21 01:08:38 2022 libpcre16.la
lrwxr-xr-x root wheel 19 B Mon Nov 21 01:08:38 2022 libpcre16.so ⇒ libpcre16.so.0.2.13
lrwxr-xr-x root wheel 19 B Mon Nov 21 01:08:38 2022 libpcre16.so.0 ⇒ libpcre16.so.0.2.13
.rwxr-xr-x root wheel 246 KB Mon Nov 21 01:08:38 2022 libpcre16.so.0.2.13
.rw-r--r-- root wheel 467 KB Mon Nov 21 01:44:07 2022 libpcre2-16.a
.rwxr-xr-x root wheel 970 B Mon Nov 21 01:44:05 2022 libpcre2-16.la
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:44:04 2022 libpcre2-16.so ⇒ libpcre2-16.so.0.11.0
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:44:04 2022 libpcre2-16.so.0 ⇒ libpcre2-16.so.0.11.0
.rwxr-xr-x root wheel 346 KB Mon Nov 21 01:44:04 2022 libpcre2-16.so.0.11.0
.rw-r--r-- root wheel 458 KB Mon Nov 21 01:44:07 2022 libpcre2-32.a
.rwxr-xr-x root wheel 970 B Mon Nov 21 01:44:05 2022 libpcre2-32.la
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:44:05 2022 libpcre2-32.so ⇒ libpcre2-32.so.0.11.0
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:44:05 2022 libpcre2-32.so.0 ⇒ libpcre2-32.so.0.11.0
.rwxr-xr-x root wheel 334 KB Mon Nov 21 01:44:05 2022 libpcre2-32.so.0.11.0
.rw-r--r-- root wheel 507 KB Mon Nov 21 01:44:07 2022 libpcre2-8.a
.rwxr-xr-x root wheel 963 B Mon Nov 21 01:44:04 2022 libpcre2-8.la
lrwxr-xr-x root wheel 20 B Mon Nov 21 01:44:04 2022 libpcre2-8.so ⇒ libpcre2-8.so.0.11.0
lrwxr-xr-x root wheel 20 B Mon Nov 21 01:44:04 2022 libpcre2-8.so.0 ⇒ libpcre2-8.so.0.11.0
.rwxr-xr-x root wheel 382 KB Mon Nov 21 01:44:04 2022 libpcre2-8.so.0.11.0
.rw-r--r-- root wheel 5.4 KB Mon Nov 21 01:44:08 2022 libpcre2-posix.a
.rwxr-xr-x root wheel 1.0 KB Mon Nov 21 01:44:07 2022 libpcre2-posix.la
lrwxr-xr-x root wheel 23 B Mon Nov 21 01:44:07 2022 libpcre2-posix.so ⇒ libpcre2-posix.so.3.0.2
lrwxr-xr-x root wheel 23 B Mon Nov 21 01:44:06 2022 libpcre2-posix.so.3 ⇒ libpcre2-posix.so.3.0.2
.rwxr-xr-x root wheel 12 KB Mon Nov 21 01:44:06 2022 libpcre2-posix.so.3.0.2
.rw-r--r-- root wheel 51 KB Mon Nov 21 01:08:43 2022 libpcrecpp.a
.rwxr-xr-x root wheel 1008 B Mon Nov 21 01:08:42 2022 libpcrecpp.la
lrwxr-xr-x root wheel 19 B Mon Nov 21 01:08:42 2022 libpcrecpp.so ⇒ libpcrecpp.so.0.0.2
lrwxr-xr-x root wheel 19 B Mon Nov 21 01:08:42 2022 libpcrecpp.so.0 ⇒ libpcrecpp.so.0.0.2
.rwxr-xr-x root wheel 46 KB Mon Nov 21 01:08:42 2022 libpcrecpp.so.0.0.2
.rw-r--r-- root wheel 5.6 KB Mon Nov 21 01:08:43 2022 libpcreposix.a
.rwxr-xr-x root wheel 1022 B Mon Nov 21 01:08:40 2022 libpcreposix.la
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:08:40 2022 libpcreposix.so ⇒ libpcreposix.so.0.0.7
lrwxr-xr-x root wheel 21 B Mon Nov 21 01:08:40 2022 libpcreposix.so.0 ⇒ libpcreposix.so.0.0.7
.rwxr-xr-x root wheel 12 KB Mon Nov 21 01:08:40 2022 libpcreposix.so.0.0.7
> pkgin list | grep glib2
glib2-2.72.4 Some useful routines for C programming (glib2)
glib2-tools-2.72.4 GLib2/gobject python-dependent tools
OS: NetBSD 9.99.107 (GENERIC) #0: Sat Nov 26 00:25:36 UTC 2022 amd64
Rust: 1.65.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.