(newest on top)
- Fixed bug with location of subdirs when specifying paths
- Made it pickleable to better enable parallel processing. Added test
- New Feature: Subdirs. Notes can now be placed in
_notefiles
or.notefiles
instead of directly in the same directory - Removed
v1
command and code. Not needed anymore. - Better tag normalization
- Bug fix for
one_file_system
- Allows you to enter tags with commas at the CLI.
- Example:
notefile mod -t "tag1,tag2" FILE
- Example:
- Added additional export formats. json and jsonl (line-delineated json).
- Cleanup documentation and code. Some Python Black commands must have gotten messed up because it was UGLY. Cleaned it up
- Saving a note makes it
.exist
- Made the
Notefile
object call.read()
automatically when needed. Added tests around this and cleaned up code that used to call.read()
- Updated documentation including in CLI
- For interactive edit, adds
--tags-only
flag and all--full
edits are in YAML regardless of format
- Added
show
andhide
as their own shortcut commands. - Added
--orphaned
flag tofind
- Repo Cleanup
- Combines
edit
andmod
to one command withedit
being a shortcut formod --edit
. This does not change any interface!
- Fixes a bug with queries grep and multiple expressions.
- Adds
gall
andgany
to query.
- Fixes bug with
pathlib.Path
objects innotefile.find
- Minor fixed and improvements. Especially around the presentation of names
New Version
Way better backend that is much more usable. Many breaking changes on both the CLI and the Python API. Most notable on the Python side is find_notes
is just find
. The CLI is much easier to support and the help documents are better since they are broken up by need (e.g. exclusions are separate from queries). Another major change is that similar behavior is unified. For example, grep
is just find
with conditions. They all follow the same code paths (with minor optimizations) making testing and coding much easier.
The older one is still included. Just call with v1
. For example:
$ notefile v1 search-tags ...
(since search-tags
is now just tags
) or
import notefile.v1 as notefile
# or
from notefile.v1 import Notefile
Some highlights:
- Updated CLI and Python API
- JSON mode. Can write the notes in JSON format which is faster to parse. Note that the extension doesn't change since YAML is a superset of JSON but the code tries to parse as JSON first.
- Better help
- Adds information to edit
- Can edit more than one file at a time
- Fixes a bug in query with multiple grep expressions
- (known bug): Cannot
edit --full
an empty note. Will fix later
- Fixes as issue with flags in the
$EDITOR
environment variables
- Adds --count-order to search-tags
- Allow multi-line queries for the args. Note that they still do not do indentation, etc. Also accepts
-
as expression and will read from stdin to enable "heredocument" specification (so you don't have to escape quotes as much)
- Minor fix for error formatting (left a debug). Minor cleanup
- Made
change-tag
allow you to change one tag to many
- Changed
ruamel.yaml
toruamel_yaml
- Allows
export
of specific paths and no longer accepts--path
for itexport
can also accept stdin if given-
. This now compliments--export
on some flags but, for now, I'll keep both
- All paths are now
normpath
ed so change "./item
" to "item
". Tests updated - Fixed python2 but I am not going to do anything else to preserve it!!!
- Adds
--export
to grep and query. More to come - Apparently breaks python2. May try to fix otherwise will update documentation
- Adds
mod
(which also encompassestag
) to add notes to multiple files at the same time.add
is now deprecated but not sure when will be removed
- Refactor CLI. Still a mess but now easier to add new commands
- Moves some of the logic for
grep
andquery
into the Notefile object. This incurs a trivial performance cost but (a) adds those to Python object interaction and (b) makes more sense from design. - note: A larger refactor of the CLI is underway
- Allow
cat
on non-string notes. Still does not allow edit
- Adds
--all-tags
tosearch-tags
result which shows all tags that match
- Changed
search-tags -t
to-c
where-c
is--count
. Show counts rather than just a list
- Fixed a minor bug with
cat -f
and the proper formatting
- If pyyaml is installed, will use that to read notefiles (~2x) and if it is linked to LibYAML, ~25x.
- Adds the function
tany()
(andt()
) andtall()
to query as a shortcut
- Fixes a bug with
vis --dry-run
and no longer silently accepts error on them.
- Adds
--empty
and--non-empty
tofind
. An empty note means it has NO field besides metadata. It is not just notes, etc.
- Adds
--allow-exception
to query.
- Adds the ability to specify the field in which notes are written. Will grep and query a string representation but will not let you add text to it.
- Does not (yet?) let you set the tags field
.1
fixes a minor bug in copy
- Adds
query
command to perform python queries. This works likesearch-tags --filter
but lets you also query the notes and other fields.- Removes
--filter
fromsearch-tags
as the query replaces it - Note that
query
can replace all ofsearch-tags
andgrep
but adds a lot of boilerplate that those two remove. Also,query
is slower thangrep
sincegrep
avoids parsing YAML on all notes
- Removes
- Tests updated to test
query
and remotesearch-tags --filter
- Adds
change-tag
command to rename specific tags.
- Fixes a bug where
.*
type exclude would exclude hidden notes on visible files. Also added a warning when using notefile on hidden files. Not recommended and untested
- Adds symlink result option to
find
,grep
andsearch-tags
. Removes the scripts that used to do this - Adds note about know issues (will be fixed in the future)
- Bug fix for mtime repair
-
Tag CLI has changed so that tags can be added or removed in one call. For example, in the past, to remove
old
and addnew
, you would do:$ notefile -t old -r file.ext $ notefile -t new file.ext
and now it is
$ notefile -t new -r old file.ext
-
Does not modify a note if nothing has changed. This includes not making a new note if not changed
- Adds
--filter
tosearch-tags
where the expression is interpreted as a Python ternary expression. Enables searches like--filter "'tag1' in tags and not 'tag2' in tags"
- Adds
--full-word
to match full words matches other. (adds\b
to each side of the expression)
- Speed improvements to
grep
. This change will drastically speed up grep when there aren't a ton of matches (as one would expect). I have some more improvements planned but this change goes a long way!
- Adds tag editing to interactive
edit
command
- Adds
-f/--full
flag toedit
command to edit the YAML file
- Improved sorting to results to sort regardless of hidden (previously, hidden were found first)
- Adds
-0,--print0
togrep
andfind
for better handling of spaces in filenames when piping toxargs -0
. Adds tests for this as well.- Note that
search-tags
is always YAML output so this isn't needed
- Note that
--debug
now prints to stderr
- Made metadata repair fix broken links if broken from changing the visibility f the the referent (and added tests)
- Moving the referent is not fixed!
- Bug fix for naming of broken linked notes
- Removed short flag for
--dry-run
- Adds a
find
command. Basically just likegrep ""
but faster since it doesn't have to read the files
- Orphan repairs no longer take
-H
or-V
and instead respect the hidden state of the original file
- Filename is no longer tracked metadata. It will not be removed from existing notes though. It was unneeded since the note itself had the filename and makes it less clear with links. See
scripts/remove_filename.py
to remove filenames - Cleared up that orphaned repairs do NOT check mtime unless
--mtime
and added appropriate test. - Bug Fixes:
- Fixed a bug where dry run metadata repair would still rewrite the notefile even without (correctly) updating the file
- Fixed a bug where a repair could overwrite an existing file
- Adds
-F
for grep (i.e.re.escape
the query) - Fixes shebang (I left
python2
for testing but python2 support will go away soon)
- Major rewrite under the hood to be more object oriented and better design. Also better non-CLI usage
- Add the ability to hide notes and, as such, adds the
--hidden
and--visible
flags as well asvis
functionality - Adds a
copy
mode (and associated tests) - Compatibility Issues:
- Removed fancy tag queries. Now just
or
unless--all
. Use the module functions (find_notes
,Notefile(filename).read().data['tags']
) - Any non-CLI usage is probably broken now. Sorry. But it should be easier to fix!
- By the new design, if the note is created with
--no-hash
, it won't get a hash unless repaired with--force-refresh
or the underlying file has been modified (This behavior is now tested)
- Removed fancy tag queries. Now just
- Other minor bug fixes and improvements
- Add
--all
mode togrep
(and internally handle multiple expressions differently). - Remove header in interactive edit
- Minor cleanup and additions to debug mode. Still WIP