about summary refs log tree commit diff stats
path: root/src/posts.rs
Commit message (Collapse)AuthorAgeFilesLines
* extensive rewrite to use json for storage:Ben Morrison2020-05-281-125/+56
| | | | | | | | | | | | | | 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.
* clippy lintsBen Morrison2020-05-261-2/+0
|
* post ID can be specified as an argument. if absent, user will be promptedBen Morrison2020-05-261-1/+1
|
* prepopulating editor with post body when editingBen Morrison2020-05-261-3/+3
|
* editing a post calls $EDITORBen Morrison2020-05-261-6/+13
|
* removed panics and refactored error handlingBen Morrison2020-05-261-0/+3
| | | | | | | | 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.
* using in-memory db for tests, passing path to logging::init() instead of ↵Ben Morrison2020-05-261-1/+1
| | | | assuming
* trimming whitespaceBen Morrison2020-01-201-9/+15
| | | | | | both when posting new item and when displaying items. prevents posts from messing up the display of other posts with extraneous whitespace.
* removed extraneous newline on post displayBen Morrison2020-01-201-1/+1
|
* letting errors flow upBen Morrison2019-09-051-56/+49
|
* now opens $EDITOR to write post bodyBen Morrison2019-09-041-4/+2
|
* getting user name at single locationBen Morrison2019-09-041-19/+8
|
* reorganizationBen Morrison2019-09-041-4/+149
|
* moved display func to posts.rsBen Morrison2019-08-311-0/+34
|
* fixed broken test, expanded test v0.3.3Ben Morrison2019-08-301-2/+5
|
* fixed test failureBen Morrison2019-08-301-14/+1
|
* moved some functionality to module, added testsBen Morrison2019-08-301-0/+79