summary refs log tree commit diff stats
path: root/src/posts.rs
Commit message (Collapse)AuthorAgeFilesLines
* moved hashing to shellscript to check for postsBen Morrison2020-06-161-1/+16
| | | | | | | | | | | | | | removes dependency on sha2 crate and allows users to choose their own hashing algorithm easily. now copies clinte.json to $HOME/.clinte.json once the posts are viewed. a shellscript can be used to compare the hash of the global clinte.json to the hash of the copy. an example script is supplied. on `make install` the example script is installed to /etc/profile.d/, where it will be run for users on login.
* recording hash of posts file in homedirBen Morrison2020-06-161-1/+1
| | | | | sha256. This will facilitate checking for new posts on login.
* configurable line wrapping (80 default)Ben Morrison2020-06-091-1/+24
| | | | disabled when set to a value below 10
* testing create/deleteBen Morrison2020-05-281-2/+31
|
* expanded testingBen Morrison2020-05-281-1/+47
|
* 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
#n460'>460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489