summary refs log tree commit diff stats
path: root/src/main.rs
Commit message (Collapse)AuthorAgeFilesLines
* extensive rewrite to use json for storage:Ben Morrison2020-05-281-8/+6
| | | | | | | | | | | | | | sqlite3 requires the directory where the database resides to be writeable by the user. This presents a problem on multiuser UNIX systems where they may want to limit areas where users have write access. This rewrite totally scraps the sqlite3 database in favor of a pretty simple json file consisting of an array of posts. flock(2) locking is used to synchronize access to the file and make sure two clients aren't trying to write to it at once. The locking is fairly granular right now, but later I may change it to using a single lock for the duration of execution since race conditions are *possible*, if unlikely for the purposes of clinte's intended use.
* post ID can be specified as an argument. if absent, user will be promptedBen Morrison2020-05-261-12/+6
|
* removed panics and refactored error handlingBen Morrison2020-05-261-45/+22
| | | | | | | | Using a helper function to handle fatal errors error::helper() Displays the simplified message if an error condition occurs. Displays both the simplified and the raw error message if -v verbose logging is enabled.
* cleaner error handling and verbose logging in main()Ben Morrison2020-05-261-11/+47
|
* hiding some log messages behind -v flagBen Morrison2020-05-261-14/+8
|
* changed author lineBen Morrison2020-05-261-1/+1
|
* using in-memory db for tests, passing path to logging::init() instead of ↵Ben Morrison2020-05-261-1/+2
| | | | assuming
* logging changes:Ben Morrison2020-05-261-6/+5
| | | | | | | | | | Rather than using a new logfile for each invocation, a single logfile called `/tmp/clinte_$USER.log` will be used, with later invocations appending to the previous messages. Also removed some unnecessary `use` statements relating to the `log` crate and its macros. Leaving the macro calls namespaced to `log::` makes it clearer what the behavior is.
* letting errors flow upBen Morrison2019-09-051-8/+10
|
* fixed subcommands v0.4.1Ben Morrison2019-09-041-8/+4
|
* now opens $EDITOR to write post bodyBen Morrison2019-09-041-0/+1
|
* getting user name at single locationBen Morrison2019-09-041-0/+2
|
* reorganizationBen Morrison2019-09-041-146/+15
|
* logging reflects executing username v0.3.4Ben Morrison2019-09-041-25/+38
|
* moved display func to posts.rsBen Morrison2019-08-311-35/+1
|
* fixed test failureBen Morrison2019-08-301-12/+0
|
* moved some functionality to module, added testsBen Morrison2019-08-301-17/+16
|
* moved display to 15 posts v0.3.2Ben Morrison2019-08-301-1/+1
|
* moved str_to_utf8 on post, rather than display v0.3.1Ben Morrison2019-08-301-4/+2
|
* ensure submitted posts are utf8Ben Morrison2019-08-301-4/+19
|
* enabled deletion of posts v0.3.0Ben Morrison2019-08-301-2/+36
|
* added functionality to update posts v0.2.0Ben Morrison2019-08-301-3/+63
|
* redundant code removedBen Morrison2019-08-301-3/+0
|
* delintingBen Morrison2019-08-301-5/+2
|
* limit number of displayed posts to 30 v0.1.0Ben Morrison2019-08-291-4/+12
|
* formatting outputBen Morrison2019-08-281-0/+2
|
* cleanupBen Morrison2019-08-281-1/+2
|
* made list the default behaviorBen Morrison2019-08-271-6/+4
|
* formatting outputBen Morrison2019-08-271-0/+1
|
* minor syntax errorBen Morrison2019-08-271-2/+2
|
* finished posting and displayBen Morrison2019-08-271-5/+81
|
* added subtype to db::Cmd. Fleshed out cli args.Ben Morrison2019-08-271-1/+22
|
* db connected, logging upBen Morrison2019-08-271-0/+11
|
* fleshing out typesBen Morrison2019-08-271-0/+2
|
* initBen Morrison2019-08-271-0/+4