Merge pull request #793 from matthiasbeyer/libimagstore/store-tests-integration
libimagstore/store-tests: integration
This commit is contained in:
commit
bbdb86b1d0
225 changed files with 5329 additions and 367 deletions
|
@ -26,9 +26,6 @@ path = "../libimagentrylist"
|
||||||
[dependencies.libimagentrymarkdown]
|
[dependencies.libimagentrymarkdown]
|
||||||
path = "../libimagentrymarkdown"
|
path = "../libimagentrymarkdown"
|
||||||
|
|
||||||
[dependencies.libimagentryselect]
|
|
||||||
path = "../libimagentryselect"
|
|
||||||
|
|
||||||
[dependencies.libimagentrytag]
|
[dependencies.libimagentrytag]
|
||||||
path = "../libimagentrytag"
|
path = "../libimagentrytag"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
//! # imag
|
//! # imag
|
||||||
//!
|
//!
|
||||||
//! This is the _developer_ documentation for the imag personal information management suite for the
|
//! This is the _developer_ documentation for the imag personal information management suite for the
|
||||||
|
|
52
.travis.yml
52
.travis.yml
|
@ -20,49 +20,24 @@ before_script:
|
||||||
export PATH=$HOME/.local/bin:$PATH
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
travis_cargo_run_in() {
|
if [[ "$TEST_SUITE" == "binaries" ]]; then
|
||||||
echo ":: Trying to run cargo in $1"
|
make bin-test
|
||||||
[[ -d "$1" ]] &&
|
else # $TEST_SUITE == "libraries"
|
||||||
cd "$1" &&
|
make lib-test
|
||||||
{
|
fi
|
||||||
{
|
|
||||||
if [[ $(echo "$1" | grep lib) ]]; then
|
|
||||||
travis-cargo -q test
|
|
||||||
else
|
|
||||||
travis-cargo -q build
|
|
||||||
fi
|
|
||||||
} &&
|
|
||||||
cd -
|
|
||||||
} || exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
run_sh_test() {
|
|
||||||
echo "--- Running test script: '$1'"
|
|
||||||
bash $1 || { echo "--- Test failed. Exiting"; exit 1; }
|
|
||||||
echo "--- Test script $1 executed successfully"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<< Changes in ./doc are not build by CI >>"
|
|
||||||
|
|
||||||
for d in $(find -name "Cargo.toml" | grep -vE "^./Cargo.toml$"); do
|
|
||||||
echo ":: Working on $d"
|
|
||||||
dir=$(dirname $d)
|
|
||||||
{ \
|
|
||||||
echo -e "\n--- Running in $d ---\n" && \
|
|
||||||
travis_cargo_run_in $dir && \
|
|
||||||
echo "--- Running test scripts ---" && \
|
|
||||||
for testsh in $(find $dir -iname "*test.sh"); do
|
|
||||||
run_sh_test $testsh
|
|
||||||
done && \
|
|
||||||
echo -e "--- Done with test scripts ---\n\n"
|
|
||||||
} || true
|
|
||||||
done
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
|
- cmake
|
||||||
- libcurl4-openssl-dev
|
- libcurl4-openssl-dev
|
||||||
- libelf-dev
|
|
||||||
- libdw-dev
|
- libdw-dev
|
||||||
|
- libelf-dev
|
||||||
|
- libzzip-dev
|
||||||
|
- make
|
||||||
|
- tree
|
||||||
|
sources:
|
||||||
|
- kalakris-cmake
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
pushd .imag-documentation &&
|
pushd .imag-documentation &&
|
||||||
|
@ -78,6 +53,9 @@ notifications:
|
||||||
template:
|
template:
|
||||||
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
|
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
|
||||||
env:
|
env:
|
||||||
|
matrix:
|
||||||
|
- TEST_SUITE=binaries
|
||||||
|
- TEST_SUITE=libraries
|
||||||
global:
|
global:
|
||||||
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
|
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
|
||||||
- secure: D+3exBnbvzFvk7fvLOxkF7UotCc4gBbvvOW4xGr9u6dDjEjV5y6CdDy/OQAkhfKhvSou+lIC22g5MuCBQXFEf/ua7A1XzwBAFeVLK4cWZSa7+ql6LdHKqOg3oF6pQlh095WeWr8S2PYJFFJFg8RGUPnbjqdu1J4KSXqe/7GoZ3lYS69mx7D5Hb93KEN084/KGfBuvyJtMjO1fK3spltL2zV8oqegFpv0gLG5GY4LsJ/7ij4Mc6wepXSyyQbaiA1eKMMwQZDvoi4V1mCulo/jeC3pucGxvgnMV5DZs8aa8R7votltGvSpHCgU78LW19dg8oZqwShQQ+XUYw27H+QK5V1lz1l1MaJLbwS3ySyZBPGH8qUuOzQ3bLp9xhAIRgCui3kX/UDhmeME7nJI6k3UZydh+/ydNB1BZHTKn76XS/yFj0Gcibxg7f5fcAYA6Ge5Sg+YPozuwbcKnKe6IpN2M7qNgWa+6MCSXJ1v4BgPb7kN74EynJUM8+yWEFN7MZtWEUQ4ZsHdCs8Pub4C/zHpYGV8qGenZwQzosAFq56YwoGCvJezz35yg4BDd3IMKenOzNnXLBrdxxqX8ySgwt5B3zBqwve/64Lx6OXjae2m8wZKlsmeqad/s6K7nx0zG15/qqRIzyvgcLXq3jwBaHkteq49FRFWvHQFpBQcsPZ2uH4=
|
- secure: D+3exBnbvzFvk7fvLOxkF7UotCc4gBbvvOW4xGr9u6dDjEjV5y6CdDy/OQAkhfKhvSou+lIC22g5MuCBQXFEf/ua7A1XzwBAFeVLK4cWZSa7+ql6LdHKqOg3oF6pQlh095WeWr8S2PYJFFJFg8RGUPnbjqdu1J4KSXqe/7GoZ3lYS69mx7D5Hb93KEN084/KGfBuvyJtMjO1fK3spltL2zV8oqegFpv0gLG5GY4LsJ/7ij4Mc6wepXSyyQbaiA1eKMMwQZDvoi4V1mCulo/jeC3pucGxvgnMV5DZs8aa8R7votltGvSpHCgU78LW19dg8oZqwShQQ+XUYw27H+QK5V1lz1l1MaJLbwS3ySyZBPGH8qUuOzQ3bLp9xhAIRgCui3kX/UDhmeME7nJI6k3UZydh+/ydNB1BZHTKn76XS/yFj0Gcibxg7f5fcAYA6Ge5Sg+YPozuwbcKnKe6IpN2M7qNgWa+6MCSXJ1v4BgPb7kN74EynJUM8+yWEFN7MZtWEUQ4ZsHdCs8Pub4C/zHpYGV8qGenZwQzosAFq56YwoGCvJezz35yg4BDd3IMKenOzNnXLBrdxxqX8ySgwt5B3zBqwve/64Lx6OXjae2m8wZKlsmeqad/s6K7nx0zG15/qqRIzyvgcLXq3jwBaHkteq49FRFWvHQFpBQcsPZ2uH4=
|
||||||
|
|
29
Makefile
29
Makefile
|
@ -4,21 +4,24 @@ bin = $@/target/debug/$@
|
||||||
doc-crate-toml=./.imag-documentation/Cargo.toml
|
doc-crate-toml=./.imag-documentation/Cargo.toml
|
||||||
|
|
||||||
ECHO=$(shell which echo) -e
|
ECHO=$(shell which echo) -e
|
||||||
|
MAKE=$(shell which make)
|
||||||
|
BASH=$(shell which bash)
|
||||||
CARGO=$(shell which cargo)
|
CARGO=$(shell which cargo)
|
||||||
|
|
||||||
BINS=$(shell find -maxdepth 1 -name "imag-*" -type d)
|
BINS=$(shell find -maxdepth 1 -name "imag-*" -type d | sort)
|
||||||
LIBS=$(shell find -maxdepth 1 -name "libimag*" -type d)
|
LIBS=$(shell find -maxdepth 1 -name "libimag*" -type d | sort)
|
||||||
|
|
||||||
BIN_TARGETS=$(patsubst imag-%,,$(BINS))
|
BIN_TARGETS=$(patsubst imag-%,,$(BINS))
|
||||||
|
BIN_TARGET_TESTS=$(foreach x,$(BIN_TARGETS),$(x)-test)
|
||||||
LIB_TARGETS=$(LIBS)
|
LIB_TARGETS=$(LIBS)
|
||||||
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x))
|
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),$(x)-test)
|
||||||
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
||||||
RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release)
|
RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release)
|
||||||
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
||||||
UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update)
|
UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update)
|
||||||
CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS) imag-bin
|
||||||
@$(ECHO) "\t[ALL ]"
|
@$(ECHO) "\t[ALL ]"
|
||||||
|
|
||||||
imag-bin:
|
imag-bin:
|
||||||
|
@ -27,7 +30,7 @@ imag-bin:
|
||||||
|
|
||||||
imag-bin-release:
|
imag-bin-release:
|
||||||
@$(ECHO) "\t[IMAG ][RELEASE]"
|
@$(ECHO) "\t[IMAG ][RELEASE]"
|
||||||
@$(CARGO) release --manifest-path ./bin/Cargo.toml
|
@$(CARGO) build --release --manifest-path ./bin/Cargo.toml
|
||||||
|
|
||||||
imag-bin-update:
|
imag-bin-update:
|
||||||
@$(ECHO) "\t[IMAG ][UPDATE ]"
|
@$(ECHO) "\t[IMAG ][UPDATE ]"
|
||||||
|
@ -47,15 +50,19 @@ release: $(RELEASE_TARGETS) imag-bin-release
|
||||||
bin: $(BIN_TARGETS) imag-bin
|
bin: $(BIN_TARGETS) imag-bin
|
||||||
@$(ECHO) "\t[ALLBIN ]"
|
@$(ECHO) "\t[ALLBIN ]"
|
||||||
|
|
||||||
|
bin-test: $(BIN_TARGET_TESTS)
|
||||||
|
|
||||||
lib: $(LIB_TARGETS)
|
lib: $(LIB_TARGETS)
|
||||||
@$(ECHO) "\t[ALLLIB ]"
|
@$(ECHO) "\t[ALLLIB ]"
|
||||||
|
|
||||||
lib-test: $(LIB_TARGETS_TEST)
|
lib-test: $(LIB_TARGETS_TEST)
|
||||||
|
|
||||||
install: $(INSTALL_TARGETS)
|
test: bin-test lib-test
|
||||||
|
|
||||||
|
install: $(INSTALL_TARGETS) imag-bin-install
|
||||||
@$(ECHO) "\t[INSTALL]"
|
@$(ECHO) "\t[INSTALL]"
|
||||||
|
|
||||||
update: $(UPDATE_TARGETS)
|
update: $(UPDATE_TARGETS) imag-bin-update
|
||||||
@$(ECHO) "\t[UPDATE ]"
|
@$(ECHO) "\t[UPDATE ]"
|
||||||
|
|
||||||
clean: $(CLEAN_TARGETS) imag-bin-clean
|
clean: $(CLEAN_TARGETS) imag-bin-clean
|
||||||
|
@ -65,13 +72,19 @@ $(TARGETS): %: .FORCE
|
||||||
@$(ECHO) "\t[CARGO ]:\t$@"
|
@$(ECHO) "\t[CARGO ]:\t$@"
|
||||||
@$(CARGO) build --manifest-path ./$@/Cargo.toml
|
@$(CARGO) build --manifest-path ./$@/Cargo.toml
|
||||||
|
|
||||||
|
$(BIN_TARGET_TESTS): %-test: % .FORCE
|
||||||
|
@$(ECHO) "\t[BINTEST]:\t$@"
|
||||||
|
if [ -f $(subst -test,,$@)/tests/Makefile ]; then \
|
||||||
|
$(MAKE) -C $(subst -test,,$@)/tests || exit 1;\
|
||||||
|
fi;
|
||||||
|
|
||||||
$(RELEASE_TARGETS): %: .FORCE
|
$(RELEASE_TARGETS): %: .FORCE
|
||||||
@$(ECHO) "\t[RELEASE]:\t$(subst -release,,$@)"
|
@$(ECHO) "\t[RELEASE]:\t$(subst -release,,$@)"
|
||||||
@$(CARGO) build --release --manifest-path ./$(subst -release,,$@)/Cargo.toml
|
@$(CARGO) build --release --manifest-path ./$(subst -release,,$@)/Cargo.toml
|
||||||
|
|
||||||
$(LIB_TARGETS_TEST): %: .FORCE
|
$(LIB_TARGETS_TEST): %: .FORCE
|
||||||
@$(ECHO) "\t[TEST ]:\t$@"
|
@$(ECHO) "\t[TEST ]:\t$@"
|
||||||
@$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml
|
@$(CARGO) test --manifest-path ./$(subst -test,,$@)/Cargo.toml
|
||||||
|
|
||||||
$(INSTALL_TARGETS): %: .FORCE imag-bin-install
|
$(INSTALL_TARGETS): %: .FORCE imag-bin-install
|
||||||
@$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)"
|
@$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)"
|
||||||
|
|
203
README.md
203
README.md
|
@ -1,148 +1,95 @@
|
||||||
# imag - [imag-pim.org](http://imag-pim.org)
|
# imag - [imag-pim.org](http://imag-pim.org)
|
||||||
|
|
||||||
Imag is a CLI PIM suite you can
|
`imag` is a commandline personal information management suite.
|
||||||
integrate in your tools of choice (Editor, MUA, RSS reader, etc etc).
|
|
||||||
|
**This application is in early development. There are _some_ things that work,
|
||||||
|
but we do not consider anything stable or usable at this moment. Feel free to
|
||||||
|
play around anyways.**
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/matthiasbeyer/imag.svg?branch=master)](https://travis-ci.org/matthiasbeyer/imag)
|
[![Build Status](https://travis-ci.org/matthiasbeyer/imag.svg?branch=master)](https://travis-ci.org/matthiasbeyer/imag)
|
||||||
[![Issue Stats](http://www.issuestats.com/github/matthiasbeyer/imag/badge/pr?style=flat-square)](http://www.issuestats.com/github/matthiasbeyer/imag)
|
[![Issue Stats](http://www.issuestats.com/github/matthiasbeyer/imag/badge/pr?style=flat-square)](http://www.issuestats.com/github/matthiasbeyer/imag)
|
||||||
[![Issue Stats](http://www.issuestats.com/github/matthiasbeyer/imag/badge/issue?style=flat-square)](http://www.issuestats.com/github/matthiasbeyer/imag)
|
[![Issue Stats](http://www.issuestats.com/github/matthiasbeyer/imag/badge/issue?style=flat-square)](http://www.issuestats.com/github/matthiasbeyer/imag)
|
||||||
[![license](https://img.shields.io/github/license/matthiasbeyer/imag.svg?maxAge=2592000?style=flat-square)]()
|
[![license](https://img.shields.io/github/license/matthiasbeyer/imag.svg?maxAge=2592000?style=flat-square)]()
|
||||||
|
|
||||||
## Please contribute!
|
## What is this / Goal and Functionality
|
||||||
|
|
||||||
We are looking work contributors!
|
Our (long-term) goal is to
|
||||||
|
|
||||||
There is always a number of
|
> Create a fast, reliable commandline personal
|
||||||
[complexity/easy tagged issues](https://github.com/matthiasbeyer/imag/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%2Feasy)
|
|
||||||
available in the issue tracker you can start with and we are open to questions!
|
|
||||||
|
|
||||||
Feel free to open issues for asking questions, suggesting features or other
|
|
||||||
things!
|
|
||||||
|
|
||||||
Also have a look at [the CONTRIBUTING.md file](./CONTRIBUTING.md)!
|
|
||||||
|
|
||||||
## Goal
|
|
||||||
|
|
||||||
Our goal is to
|
|
||||||
|
|
||||||
> Create a fast, reliable, forwards/backwards compatible commandline personal
|
|
||||||
> information management suite which covers all aspects of personal information
|
> information management suite which covers all aspects of personal information
|
||||||
> management, consists of reusable parts and integrates well with known
|
> management, consists of reusable parts and integrates well with known
|
||||||
> commandline tools.
|
> commandline tools.
|
||||||
|
|
||||||
We try to accomplish these requirements:
|
We try to implement as many aspects of personal information management (PIM),
|
||||||
|
but re-use existing commandline tools.
|
||||||
|
We do this by tracking/referring to the data the tools create.
|
||||||
|
A user can now link pieces of data (from different tools), tag this data and
|
||||||
|
query/search this data using imag.
|
||||||
|
So `imag` is more like a data-mining helper than an actual PIM tool, but we
|
||||||
|
implement some of the PIM aspects directly in `imag`.
|
||||||
|
Parts of PIM (we call them "modules") that are already implemented and basically
|
||||||
|
working:
|
||||||
|
|
||||||
* "fast": We use the awesome, fast and safe programming language "Rust"
|
* todo (via taskwarrior, we track the tasks one creates in taskwarrior)
|
||||||
* "reliable": We try to test every aspect of our software. Our build process
|
* diary
|
||||||
ensures that the build breaks whenever a library interface changes and the
|
* notes
|
||||||
modules which use the library are not updated.
|
* bookmarks
|
||||||
* "forwards/backwards compatible:" Our (plain text) on-disk data format and
|
* counter (just an example, nothing that usable)
|
||||||
storage library both ensure that incompatibilities are captured and resolved
|
|
||||||
([using](https://crates.io/crates/semver) [semver](https://semver.org))
|
|
||||||
* "commandline": We ensure that everything can be done by commandline calls, for
|
|
||||||
some modules there might be a curses-like UI, but there are no graphical
|
|
||||||
clients and there never will be any within this codebase. We use
|
|
||||||
[clap](https://crates.io/crates/clap) for commandline-interface building and
|
|
||||||
we try to keep the interface easy and consistent between modules.
|
|
||||||
* "personal": We store everything as plain text in a store inside the users
|
|
||||||
`$HOME` directory. There will be a version-control (most surely `git`) hook
|
|
||||||
integrated to sync between several machines. There are no multi-user features
|
|
||||||
included or planned at the time of writing.
|
|
||||||
* "information management": We want to give the user the possibility to put
|
|
||||||
every single information about their personal lives into the store and we try
|
|
||||||
hard to provide a sane interface to query and retrieve data from this
|
|
||||||
database.
|
|
||||||
* "covers all the aspects of personal information management": We want to
|
|
||||||
provide modules for:
|
|
||||||
* contact management
|
|
||||||
* calendar
|
|
||||||
* diary
|
|
||||||
* notes
|
|
||||||
* personal wiki
|
|
||||||
* news (rss)
|
|
||||||
* passwords
|
|
||||||
* images
|
|
||||||
* music
|
|
||||||
* movies
|
|
||||||
* personal project management
|
|
||||||
* podcast management
|
|
||||||
* ledger
|
|
||||||
* mail
|
|
||||||
* bibliography management
|
|
||||||
* ... and many, many more.
|
|
||||||
* "constists of reusable parts": Every functionality is implemented as library.
|
|
||||||
The binaries we ship are just commandline-interace-to-library-interface
|
|
||||||
translators
|
|
||||||
* "integrates well with known commandline tools": We do not re-invent the wheel.
|
|
||||||
**We do not implement "yet another password manager", but use
|
|
||||||
[the standard unix password manager](https://www.passwordstore.org/), do not
|
|
||||||
implement a news reader, but use [newsbeuter](http://www.newsbeuter.org/),
|
|
||||||
do not reimplement a mail reader, etc etc.**
|
|
||||||
We do not copy images, movies or other data to the store but "link" them into
|
|
||||||
the store, so you can use imag tools to query and access this data, but still
|
|
||||||
live with your beloved commandline apps. We do not want to duplicate work but
|
|
||||||
reuse as much as possible.
|
|
||||||
You don't like one of the applications we use (for example `pass` as password
|
|
||||||
manager)? Sure, feel free to submit patches so the user is able to switch the
|
|
||||||
used tool, as long as it doesn't break the workflow. We will happily merge
|
|
||||||
them!
|
|
||||||
|
|
||||||
## Current state of development
|
Helper modules that come with `imag` but are not "PIM aspects":
|
||||||
|
|
||||||
**This application is in _really_ early development.**
|
* linking entries
|
||||||
|
* viewing entries
|
||||||
We have implemented the very core of the system, though some more utility work
|
* tagging entries
|
||||||
is to be done.
|
* creating misc entries
|
||||||
We have the store working, a hooks API and some default hooks are in
|
* creating entries that refer to files/directories
|
||||||
development.
|
|
||||||
Basic features like tagging and linking entries is possible as well as viewing
|
|
||||||
entries.
|
|
||||||
Some small things are implemented, like a note-taking module, a basic diary
|
|
||||||
module, a counter module and a bookmark module.
|
|
||||||
These modules contain basic features and are subject to change.
|
|
||||||
More modules are about to be implemented.
|
|
||||||
|
|
||||||
Though, the very core of the system is stable and nothing prevents _you_ from
|
|
||||||
contributing and implementing a module.
|
|
||||||
|
|
||||||
## Building/Running
|
## Building/Running
|
||||||
|
|
||||||
Here goes how to try imag out.
|
Here goes how to try `imag` out.
|
||||||
|
|
||||||
|
`imag` is a _suite_ of tools and you can build them individually.
|
||||||
|
All subdirectories prefixed with "`libimag"` are libraries for the respective
|
||||||
|
binaries.
|
||||||
|
All subdirectories prefixed with `"imag-"` are binaries and compiling them will
|
||||||
|
give you a commandline application.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
By now, there are several targets in the Makefile, fulfilling following roles:
|
By now, there are several targets in the Makefile, fulfilling following roles:
|
||||||
* `all` Is the default and builds every crate in debug mode. This is the same as
|
|
||||||
traversing every directory yourself and calling `cargo build` in it.
|
* `all` is the default and builds every crate in debug mode.
|
||||||
To build a single crate, call `make <crate>`, for example
|
To build a single module, call `make <module>`, for example `make imag-store`.
|
||||||
`make imag-store`
|
* `release`, as the name implies, builds every module in release mode.
|
||||||
* `release`, as the name implies, builds every crate in release mode. Following
|
E.G.: `make imag-store-release` to build "imag-store" in release mode.
|
||||||
the example above, to build `imag-store` in release mode, call
|
* `install` will install all commandline modules to the default installation
|
||||||
`make imag-store-release`.
|
root (see `man cargo-install`).
|
||||||
* `install` will install all binary crates to the default installation root (see
|
To install a single module, run `make <module>-install`,
|
||||||
`man cargo-install`). To install a single module, run `make <module>-install`,
|
E.G.: `make imag-store-install`
|
||||||
again, for example: `make imag-store-install`
|
|
||||||
* `bin`/`lib` are separate targets for either building all binaries or
|
* `bin`/`lib` are separate targets for either building all binaries or
|
||||||
libraries.
|
libraries.
|
||||||
* `lib-test` runs `cargo test` for all libraries. For testing a single library,
|
* `lib-test` runs `cargo test` for all libraries.
|
||||||
run `make test-libimagstore` for example.
|
For testing a single library, E.G.: `make test-libimagstore`.
|
||||||
* `clean` will run `cargo clean` in every crate. Again, for cleaning a single
|
* `clean` will run `cargo clean` in every crate.
|
||||||
crate, use `make imag-store-clean` for example.
|
For cleaning a single crate, use `make imag-store-clean` for example.
|
||||||
* to build _only_ the `imag` binary, use the target `imag-bin`
|
* to build _only_ the `imag` binary, use the target `imag-bin`
|
||||||
(`imag-bin-release` for release build, `imag-bin-update` for
|
(`imag-bin-release` for release build, `imag-bin-clean` for `cargo clean`ing).
|
||||||
`cargo update`ing, `imag-bin-clean` for `cargo clean`ing).
|
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
To test out a single module, simply using `cargo run -- <options>` in the
|
To test out a single module, simply using `cargo run -- <options>` in the
|
||||||
respective directory will do the trick. For using it "normally", install the
|
respective directory will do the trick.
|
||||||
|
But you can also `make <module>` and call the binary on the commandline.
|
||||||
|
For using it "normally", install the
|
||||||
binaries as described above, as well as the imag-binary:
|
binaries as described above, as well as the imag-binary:
|
||||||
|
|
||||||
```
|
```
|
||||||
$> make install
|
$> make install
|
||||||
```
|
```
|
||||||
The installation root of the binaries (a.k.a. where they are installed to), may
|
|
||||||
not yet be in your $PATH. To see, where this installation root is, check out
|
The installation root of the binaries may not yet be in your $PATH.
|
||||||
`man cargo-install`. To change the $PATH in bash:
|
To see where this installation root is check out `man cargo-install`.
|
||||||
|
To change the $PATH in bash:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$> PATH=$PATH:~/.cargo/bin
|
$> PATH=$PATH:~/.cargo/bin
|
||||||
|
@ -155,20 +102,46 @@ To test, simply add `--help` to one of the above commands:
|
||||||
$> imag counter --help
|
$> imag counter --help
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that $PATH will be reset in a new shell. To make these changes
|
## Staying up-to-date
|
||||||
permanent, see the User Guide of your shell.
|
|
||||||
|
Despite we have a [official site for imag](http://imag-pim.org), I do not push
|
||||||
|
updates to this site, yet. Anyways, I post a blog articles about what happened
|
||||||
|
in the last two weeks every other week.
|
||||||
|
|
||||||
|
You can find them
|
||||||
|
[on my personal blog, tagged "imag"](http://beyermatthias.de/tags/imag.html)
|
||||||
|
|
||||||
|
I also post these blog posts
|
||||||
|
[on reddit](https://www.reddit.com/r/rust/search?q=What%27s+coming+up+in+imag&restrict_sr=on)
|
||||||
|
and submit them to [this-week-in-rust](https://this-week-in-rust.org/).
|
||||||
|
|
||||||
|
From time to time I publish an article about imag which does not focus on some
|
||||||
|
things that are happening, but rather about something more general.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
For detailed information, please read [the documentation](./doc/) (You can
|
For detailed information, please read [the documentation](./doc/).
|
||||||
either read the Markdown files or compile it to HTML/PDF using
|
You can either read the Markdown files or compile it to HTML/PDF using
|
||||||
[pandoc](http://pandoc.org)).
|
[pandoc](http://pandoc.org).
|
||||||
Developer documentation is also available
|
Developer documentation is also available
|
||||||
[online on github.io](https://matthiasbeyer.github.io/imag/imag_documentation/index.html).
|
[online on github.io](https://matthiasbeyer.github.io/imag/imag_documentation/index.html).
|
||||||
|
|
||||||
Please note that the documentation is work in progress as well and may be
|
Please note that the documentation is work in progress as well and may be
|
||||||
outdated.
|
outdated.
|
||||||
|
|
||||||
|
## Please contribute!
|
||||||
|
|
||||||
|
We are looking for contributors!
|
||||||
|
|
||||||
|
There is always a number of
|
||||||
|
[complexity/easy tagged issues](https://github.com/matthiasbeyer/imag/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%2Feasy)
|
||||||
|
available in the issue tracker you can start with and we are open to questions!
|
||||||
|
|
||||||
|
Feel free to open issues for asking questions, suggesting features or other
|
||||||
|
things!
|
||||||
|
|
||||||
|
Also have a look at [the CONTRIBUTING.md file](./CONTRIBUTING.md)!
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
Have a look at [our website](http://imag-pim.org) where you can find some
|
Have a look at [our website](http://imag-pim.org) where you can find some
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
extern crate crossbeam;
|
extern crate crossbeam;
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
#[macro_use] extern crate version;
|
#[macro_use] extern crate version;
|
||||||
|
|
|
@ -5,6 +5,12 @@ let
|
||||||
rustc
|
rustc
|
||||||
cargo
|
cargo
|
||||||
];
|
];
|
||||||
|
|
||||||
|
dependencies = with pkgs; [
|
||||||
|
openssl
|
||||||
|
zlib
|
||||||
|
cmake
|
||||||
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation rec {
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
@ -12,7 +18,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
version = "0.0.0";
|
version = "0.0.0";
|
||||||
|
|
||||||
buildInputs = [ env ];
|
buildInputs = [ env dependencies ];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
The Tagging module.
|
The Tagging module.
|
||||||
|
|
||||||
|
A valid tag matches the regex `[a-zA-Z][0-9a-zA-Z]*`.
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
||||||
<!-- Description of the module -->
|
<!-- Description of the module -->
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
#[macro_use] extern crate version;
|
#[macro_use] extern crate version;
|
||||||
|
|
|
@ -1,6 +1,26 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, SubCommand};
|
use clap::{Arg, App, SubCommand};
|
||||||
|
|
||||||
use libimagentrytag::ui::tag_add_arg;
|
use libimagentrytag::ui::tag_add_arg;
|
||||||
|
use libimagutil::cli_validators::*;
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
app
|
app
|
||||||
|
@ -22,6 +42,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.required(true)
|
.required(true)
|
||||||
.multiple(true)
|
.multiple(true)
|
||||||
.value_name("URL")
|
.value_name("URL")
|
||||||
|
.validator(is_url)
|
||||||
.help("Add this URL, multiple possible"))
|
.help("Add this URL, multiple possible"))
|
||||||
.arg(tag_add_arg())
|
.arg(tag_add_arg())
|
||||||
)
|
)
|
||||||
|
@ -44,6 +65,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.required(true)
|
.required(true)
|
||||||
.multiple(true)
|
.multiple(true)
|
||||||
.value_name("URL")
|
.value_name("URL")
|
||||||
|
.validator(is_url)
|
||||||
.help("Remove these urls, regex supported"))
|
.help("Remove these urls, regex supported"))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagerror::trace::trace_error_exit;
|
use libimagerror::trace::trace_error_exit;
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::fmt::{Display, Formatter, Error};
|
use std::fmt::{Display, Formatter, Error};
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagerror::trace::{MapErrTrace, trace_error};
|
use libimagerror::trace::{MapErrTrace, trace_error};
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, SubCommand};
|
use clap::{Arg, App, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
|
|
@ -21,9 +21,6 @@ path = "../libimagentryedit"
|
||||||
[dependencies.libimagentrylist]
|
[dependencies.libimagentrylist]
|
||||||
path = "../libimagentrylist"
|
path = "../libimagentrylist"
|
||||||
|
|
||||||
[dependencies.libimagentryview]
|
|
||||||
path = "../libimagentryview"
|
|
||||||
|
|
||||||
[dependencies.libimagerror]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagerror"
|
path = "../libimagerror"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use libimagdiary::diary::Diary;
|
use libimagdiary::diary::Diary;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use chrono::naive::datetime::NaiveDateTime;
|
use chrono::naive::datetime::NaiveDateTime;
|
||||||
|
|
||||||
use libimagdiary::diary::Diary;
|
use libimagdiary::diary::Diary;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use chrono::naive::datetime::NaiveDateTime;
|
use chrono::naive::datetime::NaiveDateTime;
|
||||||
|
|
||||||
use libimagdiary::diary::Diary;
|
use libimagdiary::diary::Diary;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagdiary::diary::Diary;
|
use libimagdiary::diary::Diary;
|
||||||
use libimagdiary::error::DiaryErrorKind as DEK;
|
use libimagdiary::error::DiaryErrorKind as DEK;
|
||||||
use libimagdiary::error::MapErrInto;
|
use libimagdiary::error::MapErrInto;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
@ -21,7 +40,6 @@ extern crate chrono;
|
||||||
extern crate libimagdiary;
|
extern crate libimagdiary;
|
||||||
extern crate libimagentryedit;
|
extern crate libimagentryedit;
|
||||||
extern crate libimagentrylist;
|
extern crate libimagentrylist;
|
||||||
extern crate libimagentryview;
|
|
||||||
extern crate libimaginteraction;
|
extern crate libimaginteraction;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, ArgGroup, App, SubCommand};
|
use clap::{Arg, ArgGroup, App, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
|
|
||||||
pub fn get_diary_name(rt: &Runtime) -> Option<String> {
|
pub fn get_diary_name(rt: &Runtime) -> Option<String> {
|
||||||
|
|
|
@ -1,30 +1,38 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagdiary::diary::Diary;
|
use libimagdiary::diary::Diary;
|
||||||
use libimagentryview::viewer::Viewer;
|
use libimagdiary::viewer::DiaryViewer as DV;
|
||||||
use libimagentryview::builtin::plain::PlainViewer;
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagerror::trace::trace_error;
|
use libimagerror::trace::MapErrTrace;
|
||||||
use libimagutil::warn_exit::warn_exit;
|
use libimagutil::warn_exit::warn_exit;
|
||||||
|
|
||||||
use util::get_diary_name;
|
use util::get_diary_name;
|
||||||
|
|
||||||
pub fn view(rt: &Runtime) {
|
pub fn view(rt: &Runtime) {
|
||||||
let diaryname = get_diary_name(rt).unwrap_or_else(|| warn_exit("No diary name", 1));
|
let diaryname = get_diary_name(rt).unwrap_or_else(|| warn_exit("No diary name", 1));
|
||||||
let diary = Diary::open(rt.store(), &diaryname[..]);
|
let diary = Diary::open(rt.store(), &diaryname[..]);
|
||||||
let show_header = rt.cli().subcommand_matches("view").unwrap().is_present("show-header");
|
let hdr = rt.cli().subcommand_matches("view").unwrap().is_present("show-header");
|
||||||
|
|
||||||
match diary.entries() {
|
diary.entries()
|
||||||
Ok(entries) => {
|
.and_then(|entries| DV::new(hdr).view_entries(entries.into_iter().filter_map(Result::ok)))
|
||||||
let pv = PlainViewer::new(show_header);
|
.map_err_trace()
|
||||||
for entry in entries.into_iter().filter_map(Result::ok) {
|
.ok();
|
||||||
let id = entry.diary_id();
|
|
||||||
println!("{} :\n", id);
|
|
||||||
if let Err(e) = pv.view_entry(&entry) {
|
|
||||||
trace_error(&e);
|
|
||||||
};
|
|
||||||
println!("\n---\n");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Err(e) => trace_error(&e),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, ArgGroup, App, SubCommand};
|
use clap::{Arg, ArgGroup, App, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
|
13
imag-link/tests/Makefile
Normal file
13
imag-link/tests/Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
ECHO=$(shell which echo) -e
|
||||||
|
TARGETS=$(shell find -name "*test.sh" -type f)
|
||||||
|
BASH=$(shell which bash)
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
@$(ECHO) $(TARGETS)
|
||||||
|
|
||||||
|
$(TARGETS): %: .FORCE
|
||||||
|
@$(ECHO) "\t[BASH ]:\t$@"
|
||||||
|
@$(BASH) $@
|
||||||
|
|
||||||
|
.FORCE:
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, SubCommand};
|
use clap::{Arg, App, SubCommand};
|
||||||
|
|
||||||
use libimagentrytag::ui::tag_argument;
|
use libimagentrytag::ui::tag_argument;
|
||||||
|
|
|
@ -27,3 +27,6 @@ path = "../libimaginteraction"
|
||||||
[dependencies.libimagentrylist]
|
[dependencies.libimagentrylist]
|
||||||
path = "../libimagentrylist"
|
path = "../libimagentrylist"
|
||||||
|
|
||||||
|
[dependencies.libimagutil]
|
||||||
|
path = "../libimagutil"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
#[macro_use] extern crate version;
|
#[macro_use] extern crate version;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
|
@ -9,6 +28,7 @@ extern crate libimagref;
|
||||||
extern crate libimagerror;
|
extern crate libimagerror;
|
||||||
extern crate libimagentrylist;
|
extern crate libimagentrylist;
|
||||||
extern crate libimaginteraction;
|
extern crate libimaginteraction;
|
||||||
|
extern crate libimagutil;
|
||||||
|
|
||||||
mod ui;
|
mod ui;
|
||||||
use ui::build_ui;
|
use ui::build_ui;
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, SubCommand};
|
use clap::{Arg, App, SubCommand};
|
||||||
|
|
||||||
|
use libimagutil::cli_validators::is_existing_path;
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
app
|
app
|
||||||
.subcommand(SubCommand::with_name("add")
|
.subcommand(SubCommand::with_name("add")
|
||||||
|
@ -11,6 +32,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("The path of the file")
|
.help("The path of the file")
|
||||||
|
.validator(is_existing_path)
|
||||||
.value_name("PATH"))
|
.value_name("PATH"))
|
||||||
.arg(Arg::with_name("track-content")
|
.arg(Arg::with_name("track-content")
|
||||||
.long("content-hash")
|
.long("content-hash")
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::io::stdin;
|
use std::io::stdin;
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
generate_error_module!(
|
generate_error_module!(
|
||||||
generate_error_types!(StoreError, StoreErrorKind,
|
generate_error_types!(StoreError, StoreErrorKind,
|
||||||
BackendError => "Backend Error",
|
BackendError => "Backend Error",
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, ArgGroup, SubCommand};
|
use clap::{Arg, App, ArgGroup, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::collections::btree_map::{BTreeMap, Entry};
|
use std::collections::btree_map::{BTreeMap, Entry};
|
||||||
use std::str::Split;
|
use std::str::Split;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::warn_exit::warn_exit;
|
use libimagutil::warn_exit::warn_exit;
|
||||||
|
|
||||||
|
|
14
imag-store/tests/Makefile
Normal file
14
imag-store/tests/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
ECHO=$(shell which echo) -e
|
||||||
|
TARGETS=$(shell find -name "*test.sh" -type f)
|
||||||
|
BASH=$(shell which bash)
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
@$(ECHO) $(TARGETS)
|
||||||
|
|
||||||
|
$(TARGETS): %: .FORCE
|
||||||
|
@$(ECHO) "\t[BASH ]:\t$@"
|
||||||
|
@$(BASH) $@
|
||||||
|
|
||||||
|
.FORCE:
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, ArgGroup, SubCommand};
|
use clap::{Arg, App, ArgGroup, SubCommand};
|
||||||
|
|
||||||
use libimagentrytag::ui::{tag_add_arg, tag_remove_arg};
|
use libimagentrytag::ui::{tag_add_arg, tag_remove_arg};
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
extern crate glob;
|
extern crate glob;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, ArgGroup, SubCommand};
|
use clap::{Arg, App, ArgGroup, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagentryview::builtin::editor::EditorView;
|
use libimagentryview::builtin::editor::EditorView;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
@ -48,14 +67,6 @@ fn main() {
|
||||||
let view_header = rt.cli().is_present("view-header");
|
let view_header = rt.cli().is_present("view-header");
|
||||||
let view_content = rt.cli().is_present("view-content");
|
let view_content = rt.cli().is_present("view-content");
|
||||||
|
|
||||||
let scmd = match rt.cli().subcommand_matches("view-in") {
|
|
||||||
None => {
|
|
||||||
debug!("No commandline call");
|
|
||||||
exit(1); // we can afford not-executing destructors here
|
|
||||||
}
|
|
||||||
Some(s) => s,
|
|
||||||
};
|
|
||||||
|
|
||||||
let entry = match rt.store().get(PathBuf::from(entry_id)) {
|
let entry = match rt.store().get(PathBuf::from(entry_id)) {
|
||||||
Ok(Some(fle)) => fle,
|
Ok(Some(fle)) => fle,
|
||||||
Ok(None) => {
|
Ok(None) => {
|
||||||
|
@ -68,19 +79,27 @@ fn main() {
|
||||||
};
|
};
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
if scmd.is_present("view-in-stdout") {
|
match rt.cli().subcommand_matches("view-in") {
|
||||||
} else if scmd.is_present("view-in-ui") {
|
None => {
|
||||||
warn!("Viewing in UI is currently not supported, switch to stdout");
|
debug!("No commandline call");
|
||||||
} else if scmd.is_present("view-in-browser") {
|
debug!("Assuming to view in cli (stdout)");
|
||||||
warn!("Viewing in browser is currently not supported, switch to stdout");
|
},
|
||||||
} else if scmd.is_present("view-in-texteditor") {
|
Some(s) => {
|
||||||
if let Err(e) = Editor::new(&rt, &entry).show() {
|
if s.is_present("view-in-stdout") {
|
||||||
error!("Cannot view in editor: {}", e);
|
} else if s.is_present("view-in-ui") {
|
||||||
trace_error_exit(&e, 1);
|
warn!("Viewing in UI is currently not supported, switch to stdout");
|
||||||
}
|
} else if s.is_present("view-in-browser") {
|
||||||
} else if scmd.is_present("view-in-custom") {
|
warn!("Viewing in browser is currently not supported, switch to stdout");
|
||||||
warn!("Viewing in custom is currently not supported, switch to stdout");
|
} else if s.is_present("view-in-texteditor") {
|
||||||
}
|
if let Err(e) = Editor::new(&rt, &entry).show() {
|
||||||
|
error!("Cannot view in editor: {}", e);
|
||||||
|
trace_error_exit(&e, 1);
|
||||||
|
}
|
||||||
|
} else if s.is_present("view-in-custom") {
|
||||||
|
warn!("Viewing in custom is currently not supported, switch to stdout");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
StdoutViewer::new(view_header, view_content).view_entry(&entry)
|
StdoutViewer::new(view_header, view_content).view_entry(&entry)
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use clap::{Arg, App, ArgGroup, SubCommand};
|
use clap::{Arg, App, ArgGroup, SubCommand};
|
||||||
|
|
||||||
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
|
@ -50,12 +69,11 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.value_name("BROWSER"))
|
.value_name("BROWSER"))
|
||||||
|
|
||||||
.arg(Arg::with_name("view-in-texteditor")
|
.arg(Arg::with_name("view-in-texteditor")
|
||||||
.long("editor")
|
.long("in-editor")
|
||||||
.short("e")
|
.short("e")
|
||||||
.takes_value(true) // optional, which editor
|
.takes_value(false)
|
||||||
.required(false)
|
.required(false)
|
||||||
.help("View content in $EDITOR")
|
.help("View content in $EDITOR (can be passed via --editor)"))
|
||||||
.value_name("EDITOR"))
|
|
||||||
|
|
||||||
.arg(Arg::with_name("view-in-custom")
|
.arg(Arg::with_name("view-in-custom")
|
||||||
.long("custom")
|
.long("custom")
|
||||||
|
|
82
imagrc.toml
82
imagrc.toml
|
@ -12,25 +12,91 @@ implicit-create = false
|
||||||
# store, so these hooks should be chosen carefully.
|
# store, so these hooks should be chosen carefully.
|
||||||
store-unload-hook-aspects = [ "debug" ]
|
store-unload-hook-aspects = [ "debug" ]
|
||||||
|
|
||||||
pre-create-hook-aspects = [ "debug" ]
|
pre-create-hook-aspects = [ "debug", "vcs" ]
|
||||||
post-create-hook-aspects = [ "debug" ]
|
post-create-hook-aspects = [ "debug", "vcs" ]
|
||||||
|
|
||||||
pre-move-hook-aspects = [ "debug" ]
|
pre-move-hook-aspects = [ "debug" ]
|
||||||
post-move-hook-aspects = [ "debug" ]
|
post-move-hook-aspects = [ "debug" ]
|
||||||
|
|
||||||
pre-retrieve-hook-aspects = [ "debug" ]
|
pre-retrieve-hook-aspects = [ "debug", "vcs" ]
|
||||||
post-retrieve-hook-aspects = [ "debug" ]
|
post-retrieve-hook-aspects = [ "debug", "vcs" ]
|
||||||
|
|
||||||
pre-update-hook-aspects = [ "debug" ]
|
pre-update-hook-aspects = [ "debug", "vcs" ]
|
||||||
post-update-hook-aspects = [ "debug" ]
|
post-update-hook-aspects = [ "debug", "vcs" ]
|
||||||
|
|
||||||
pre-delete-hook-aspects = [ "debug" ]
|
pre-delete-hook-aspects = [ "debug", "vcs" ]
|
||||||
post-delete-hook-aspects = [ "debug" ]
|
post-delete-hook-aspects = [ "debug", "vcs" ]
|
||||||
|
|
||||||
[store.aspects.debug]
|
[store.aspects.debug]
|
||||||
parallel = false
|
parallel = false
|
||||||
mutable_hooks = true
|
mutable_hooks = true
|
||||||
|
|
||||||
|
[store.aspects.vcs]
|
||||||
|
parallel = false
|
||||||
|
mutable_hooks = false
|
||||||
|
|
||||||
[store.hooks.stdhook_debug]
|
[store.hooks.stdhook_debug]
|
||||||
aspect = "debug"
|
aspect = "debug"
|
||||||
|
|
||||||
|
[store.hooks.stdhook_git_update]
|
||||||
|
aspect = "vcs"
|
||||||
|
|
||||||
|
# set to false to disable
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
# Fail if the repository cannot be opened. If this is set to `false`, the error
|
||||||
|
# will be printed, but will not abort the store operation. `true` will print the
|
||||||
|
# error and abort the store action.
|
||||||
|
abort_on_repo_init_failure = true
|
||||||
|
|
||||||
|
# Ensure to be on this branche before doing anything.
|
||||||
|
ensure_branch = "refs/heads/master"
|
||||||
|
|
||||||
|
# Try to checkout the ensure_branch if it isn't checked out
|
||||||
|
try_checkout_ensure_branch = true
|
||||||
|
|
||||||
|
# Commit configuration
|
||||||
|
[store.hooks.stdhook_git_update.commit]
|
||||||
|
|
||||||
|
# Whether to do the commit interactively
|
||||||
|
interactive = false
|
||||||
|
|
||||||
|
# Set to true to use the $EDITOR for the commit, to false to do on commandline
|
||||||
|
# When committing without editor, only a single line is allowed as commit
|
||||||
|
# message
|
||||||
|
interactive_editor = false
|
||||||
|
|
||||||
|
# Commit message if the commit is not interactive
|
||||||
|
message = "Update"
|
||||||
|
|
||||||
|
[store.hooks.stdhook_git_delete]
|
||||||
|
aspect = "vcs"
|
||||||
|
|
||||||
|
# set to false to disable
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
# Fail if the repository cannot be opened. If this is set to `false`, the error
|
||||||
|
# will be printed, but will not abort the store operation. `true` will print the
|
||||||
|
# error and abort the store action.
|
||||||
|
abort_on_repo_init_failure = true
|
||||||
|
|
||||||
|
# Ensure to be on this branche before doing anything.
|
||||||
|
ensure_branch = "refs/heads/master"
|
||||||
|
|
||||||
|
# Try to checkout the ensure_branch if it isn't checked out
|
||||||
|
try_checkout_ensure_branch = true
|
||||||
|
|
||||||
|
# Commit configuration
|
||||||
|
[store.hooks.stdhook_git_delete.commit]
|
||||||
|
|
||||||
|
# Whether to do the commit interactively
|
||||||
|
interactive = false
|
||||||
|
|
||||||
|
# Set to true to use the $EDITOR for the commit, to false to do on commandline
|
||||||
|
# When committing without editor, only a single line is allowed as commit
|
||||||
|
# message
|
||||||
|
interactive_editor = false
|
||||||
|
|
||||||
|
# Commit message if the commit is not interactive
|
||||||
|
message = "Deleted"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
//! BookmarkCollection module
|
//! BookmarkCollection module
|
||||||
//!
|
//!
|
||||||
//! A BookmarkCollection is nothing more than a simple store entry. One can simply call functions
|
//! A BookmarkCollection is nothing more than a simple store entry. One can simply call functions
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
generate_error_module!(
|
generate_error_module!(
|
||||||
generate_error_types!(BookmarkError, BookmarkErrorKind,
|
generate_error_types!(BookmarkError, BookmarkErrorKind,
|
||||||
StoreReadError => "Store read error",
|
StoreReadError => "Store read error",
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
use result::Result;
|
use result::Result;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
use error::BookmarkError;
|
use error::BookmarkError;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
|
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
generate_error_module!(
|
generate_error_module!(
|
||||||
generate_error_types!(CounterError, CounterErrorKind,
|
generate_error_types!(CounterError, CounterErrorKind,
|
||||||
StoreIdError => "StoreId error",
|
StoreIdError => "StoreId error",
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
non_snake_case,
|
non_snake_case,
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
use error::CounterError;
|
use error::CounterError;
|
||||||
|
|
|
@ -27,3 +27,6 @@ path = "../libimagrt"
|
||||||
[dependencies.libimagentryedit]
|
[dependencies.libimagentryedit]
|
||||||
path = "../libimagentryedit"
|
path = "../libimagentryedit"
|
||||||
|
|
||||||
|
[dependencies.libimagentryview]
|
||||||
|
path = "../libimagentryview"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::convert::Into;
|
use std::convert::Into;
|
||||||
use std::fmt::{Display, Formatter, Error as FmtError};
|
use std::fmt::{Display, Formatter, Error as FmtError};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
generate_error_module!(
|
generate_error_module!(
|
||||||
generate_error_types!(DiaryError, DiaryErrorKind,
|
generate_error_types!(DiaryError, DiaryErrorKind,
|
||||||
StoreWriteError => "Error writing store",
|
StoreWriteError => "Error writing store",
|
||||||
|
@ -7,7 +26,8 @@ generate_error_module!(
|
||||||
DiaryEditError => "Cannot edit diary entry",
|
DiaryEditError => "Cannot edit diary entry",
|
||||||
PathConversionError => "Error while converting paths internally",
|
PathConversionError => "Error while converting paths internally",
|
||||||
EntryNotInDiary => "Entry not in Diary",
|
EntryNotInDiary => "Entry not in Diary",
|
||||||
IOError => "IO Error"
|
IOError => "IO Error",
|
||||||
|
ViewError => "Error viewing diary entry"
|
||||||
);
|
);
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::fmt::{Debug, Formatter, Error as FmtError};
|
use std::fmt::{Debug, Formatter, Error as FmtError};
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
|
@ -26,6 +45,7 @@ extern crate itertools;
|
||||||
#[macro_use] extern crate libimagutil;
|
#[macro_use] extern crate libimagutil;
|
||||||
#[macro_use] extern crate libimagerror;
|
#[macro_use] extern crate libimagerror;
|
||||||
extern crate libimagentryedit;
|
extern crate libimagentryedit;
|
||||||
|
extern crate libimagentryview;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
|
|
||||||
module_entry_path_mod!("diary");
|
module_entry_path_mod!("diary");
|
||||||
|
@ -38,3 +58,5 @@ pub mod is_in_diary;
|
||||||
pub mod entry;
|
pub mod entry;
|
||||||
pub mod iter;
|
pub mod iter;
|
||||||
pub mod result;
|
pub mod result;
|
||||||
|
pub mod viewer;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
use error::DiaryError;
|
use error::DiaryError;
|
||||||
|
|
64
libimagdiary/src/viewer.rs
Normal file
64
libimagdiary/src/viewer.rs
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
|
//! A diary viewer built on libimagentryview.
|
||||||
|
|
||||||
|
use entry::Entry;
|
||||||
|
use error::DiaryErrorKind as DEK;
|
||||||
|
use error::MapErrInto;
|
||||||
|
use result::Result;
|
||||||
|
|
||||||
|
use libimagentryview::viewer::Viewer;
|
||||||
|
use libimagentryview::builtin::plain::PlainViewer;
|
||||||
|
|
||||||
|
/// This viewer does _not_ implement libimagentryview::viewer::Viewer because we need to be able to
|
||||||
|
/// call some diary-type specific functions on the entries passed to this.
|
||||||
|
///
|
||||||
|
/// This type is mainly just written to be constructed-called-deleted in one go:
|
||||||
|
///
|
||||||
|
/// ```ignore
|
||||||
|
/// DiaryViewer::new(show_header).view_entries(entries);
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
pub struct DiaryViewer(PlainViewer);
|
||||||
|
|
||||||
|
impl DiaryViewer {
|
||||||
|
|
||||||
|
pub fn new(show_header: bool) -> DiaryViewer {
|
||||||
|
DiaryViewer(PlainViewer::new(show_header))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// View all entries from the iterator, or stop immediately if an error occurs, returning that
|
||||||
|
/// error.
|
||||||
|
pub fn view_entries<'a, I: Iterator<Item = Entry<'a>>>(&self, entries: I) -> Result<()> {
|
||||||
|
for entry in entries {
|
||||||
|
let id = entry.diary_id();
|
||||||
|
println!("{} :\n", id);
|
||||||
|
let _ = try!(self.0
|
||||||
|
.view_entry(&entry)
|
||||||
|
.map_err_into(DEK::ViewError)
|
||||||
|
.map_err_into(DEK::IOError));
|
||||||
|
println!("\n---\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ version = "0.2.0"
|
||||||
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
|
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tempfile = "2.1.1"
|
|
||||||
|
|
||||||
[dependencies.libimagerror]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagerror"
|
path = "../libimagerror"
|
||||||
|
@ -15,3 +14,6 @@ path = "../libimagrt"
|
||||||
[dependencies.libimagstore]
|
[dependencies.libimagstore]
|
||||||
path = "../libimagstore"
|
path = "../libimagstore"
|
||||||
|
|
||||||
|
[dependencies.libimagutil]
|
||||||
|
path = "../libimagutil"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
|
|
||||||
use libimagerror::into::IntoError;
|
use libimagerror::into::IntoError;
|
||||||
|
@ -39,39 +58,20 @@ impl<'a> Edit for FileLockEntry<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn edit_in_tmpfile(rt: &Runtime, s: &mut String) -> Result<()> {
|
pub fn edit_in_tmpfile(rt: &Runtime, s: &mut String) -> Result<()> {
|
||||||
use tempfile::NamedTempFile;
|
use libimagutil::edit::edit_in_tmpfile_with_command;
|
||||||
use std::io::Seek;
|
|
||||||
use std::io::Read;
|
|
||||||
use std::io::SeekFrom;
|
|
||||||
use std::io::Write;
|
|
||||||
|
|
||||||
let file = try!(NamedTempFile::new().map_err_into(EditErrorKind::IOError));
|
rt.editor()
|
||||||
let file_path = file.path();
|
.ok_or(EditErrorKind::NoEditor.into_error())
|
||||||
let mut file = try!(file.reopen().map_err_into(EditErrorKind::IOError));
|
.and_then(|editor| {
|
||||||
|
edit_in_tmpfile_with_command(editor, s)
|
||||||
try!(file.write_all(&s.clone().into_bytes()[..]).map_err_into(EditErrorKind::IOError));
|
.map_err_into(EditErrorKind::IOError)
|
||||||
try!(file.sync_data().map_err_into(EditErrorKind::IOError));
|
.and_then(|worked| {
|
||||||
|
if !worked {
|
||||||
if let Some(mut editor) = rt.editor() {
|
Err(EditErrorKind::ProcessExitFailure.into())
|
||||||
let exit_status = editor.arg(file_path).status();
|
} else {
|
||||||
|
Ok(())
|
||||||
match exit_status.map(|s| s.success()).map_err(Box::new) {
|
}
|
||||||
Ok(true) => {
|
})
|
||||||
file.sync_data()
|
})
|
||||||
.and_then(|_| file.seek(SeekFrom::Start(0)))
|
|
||||||
.and_then(|_| {
|
|
||||||
let mut new_s = String::new();
|
|
||||||
let res = file.read_to_string(&mut new_s);
|
|
||||||
*s = new_s;
|
|
||||||
res
|
|
||||||
})
|
|
||||||
.map(|_| ())
|
|
||||||
.map_err_into(EditErrorKind::IOError)
|
|
||||||
},
|
|
||||||
Ok(false) => Err(EditErrorKind::ProcessExitFailure.into()),
|
|
||||||
Err(e) => Err(EditErrorKind::IOError.into_error_with_cause(e)),
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Err(EditErrorKind::InstantiateError.into())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,26 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
generate_error_module!(
|
generate_error_module!(
|
||||||
generate_error_types!(EditError, EditErrorKind,
|
generate_error_types!(EditError, EditErrorKind,
|
||||||
IOError => "IO Error",
|
IOError => "IO Error",
|
||||||
|
NoEditor => "No editor set",
|
||||||
ProcessExitFailure => "Process did not exit properly",
|
ProcessExitFailure => "Process did not exit properly",
|
||||||
InstantiateError => "Instantation error"
|
InstantiateError => "Instantation error"
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,7 +1,26 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
#[macro_use] extern crate libimagerror;
|
#[macro_use] extern crate libimagerror;
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate tempfile;
|
extern crate libimagutil;
|
||||||
|
|
||||||
pub mod edit;
|
pub mod edit;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
use error::EditError;
|
use error::EditError;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use filters::filter::Filter;
|
use filters::filter::Filter;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use filters::filter::Filter;
|
use filters::filter::Filter;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use regex::Error as RError;
|
use regex::Error as RError;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use filters::filter::Filter;
|
use filters::filter::Filter;
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use filters::filter::Filter;
|
use filters::filter::Filter;
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,21 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub mod is_over;
|
pub mod is_over;
|
||||||
pub mod is_under;
|
pub mod is_under;
|
||||||
|
|
|
@ -1,2 +1,21 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub mod grep;
|
pub mod grep;
|
||||||
pub mod length;
|
pub mod length;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1 +1,20 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub type FieldPath = String;
|
pub type FieldPath = String;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
||||||
use builtin::header::field_path::FieldPath;
|
use builtin::header::field_path::FieldPath;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub mod field_eq;
|
pub mod field_eq;
|
||||||
pub mod field_exists;
|
pub mod field_exists;
|
||||||
pub mod field_grep;
|
pub mod field_grep;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub mod eq;
|
pub mod eq;
|
||||||
pub mod gt;
|
pub mod gt;
|
||||||
pub mod lt;
|
pub mod lt;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
||||||
pub mod content;
|
pub mod content;
|
||||||
pub mod header;
|
pub mod header;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// imag - the personal information management suite for the commandline
|
||||||
|
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; version
|
||||||
|
// 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
//
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue