Package: python-captains-log
IntroductionCaptain’s log is a simple command line utility to quickly write some text about jobs you have done.It’s a simple method for developers (that already have a terminal session opened) to write some stuff about jobs during a day, so they don’t have to remember what they have done and so fill their datebook !Warning, this software should contains someStarTrekquotes and vocabulary.WhatA simple command line utility to log what you do.This is not atodo listalike, there is no check/uncheck action for entries.WhereThe app install its stuff in the user home directory by default and so should be usable from anywhere.Users does not share their logs by default although you should be able to do an unique install for multiple users.WhyTo help developers to log what they did during working days, so they always have a log resuming projects they worked on and so are more able to fill their activities in datebooks.Generally, developers always have an opened shell session to work on, so a command line should be enough.LinksDownload hisPyPi package;Clone it on hisGithub repository;Requiresclick== 3.3;colorama== 0.3.2;peewee== 2.4.5;InstallJust install it from PyPi :pip install python-captains-logDependancies are quite simple and have not sub-dependancies so it should be safe enough to install it on your system using PIP.When it’s done, the app need a minimal config stuff to be installed before working, like it’s database file and config file, seeUsage - Install.UsageHere is the command line help:Usage: captains-log [OPTIONS] COMMAND [ARGS]...

Captain's log is a command line to write simple log messages

Take care to quote your texts when they contains spaces. Also, note that
some characters like "!" will be processed by Bash as some special
characters and results in unwanted behaviors, avoid them if you don't know
how to escape them.

Options:
--config-dir PATH  Path to the directory where the app config resides
--help             Show this message and exit.

Commands:
add      Add a new log entry
del      Remove an existing log entry
history  Browse your logs history
install  Install the required config
reset    Restart with a new installInstallBefore the first usage, each user have to use the following command:captains-log installThis will automatically install all needed stuff in a dedicated app directory, default is to do it in a.captains-logdirectory in the user’s home directory.If you don’t do this, the app will notify you about this missing stuff and will refuse to go further.You can use an another directory forcaptain’s logstuff but you will have to specify it, there is two ways for this :Using--config-diroption each time you invoke the command line (this is option is available for all command line actions);Set a shell environment variable namedCAPTAINSLOG_DIRthat contains the absolute path to the directory like this:export CAPTAINSLOG_DIR=/home/foo/my-captains-log-dirOr you can do it in your.bashrc.Note that this app stuff have to be created for each user that want to use it, although you should be able to share it between them if needed.ResetSometime you will need toresetyour install, so use this :captains-log resetThis willremove all your content(database and config) then re-launch the install process. Take care to backup your config before if you don’t want to lose them, the command line doesn’t care about this for you.Adding an entryAdd an entry message without a category:captains-log add HelloAdd an entry message with a category:captains-log add -c Foo HelloYou have to quote your texts if they contain spaces:captains-log add -c "Foo bar" "Hello world."Also, note that your shell can interprets some characters like!even if quoted, just avoid them if you don’t know how to escape them (when it’s possible).When an entry is created, the command line will return its ID than you can’t use to remove it if needed.Removing an entryJust use the entry ID you want to remove:captains-log del 42Removing the last created entry using the special keywordlast:captains-log del lastBe aware that there is no confirmation prompt before removing the entry.HistoryThe historybrowserallow you to see your created entries:captains-log historyThis will display your history like this:Monday, 12 December 2014
========================

 97) [10:00]                Wake up
 98) [11:15] MyCategory     Starting to do stuff

Wednesday 25 December 2014
==========================

 99) [10:00]                Coffee time
100) [11:15] MyCategory     Ping
101) [17:49] Other category Hello world
102) [18:33] MyCategory     Pong

Friday 26 December 2014
=======================

103) [09:15] MyCategory     Fix a bug
104) [10:00]                Coffee time
105) [15:40] Other category Waiting answer
106) [17:45] MyCategory     Go to productionActually, the default behavior is to display all your entries from any date period. But the command line action accepts an optional argument to give a keyword about the period you want to see:# Entries of the current year
captains-log history year

# Entries of the current month
captains-log history month

# Entries of the current day
captains-log history day

# Entries that contains "Coffee"
captains-log history -s "Coffee"The history is columnized and even have colorized parts if your shell and terminal console support them. Also you can change some formatting from your settings file if needed like changing the date format, see theSettingpart.SettingsIn your installed Captain’s log directory from theinstallaction, there is asettings.jsonfile where you can change some settings that can change some behaviors.{
    "ENTRY_TIME_FORMAT": "%H:%M",
    "LANGUAGE_CODE": "",
    "DATABASE_NAME": "database.sqlite3",
    "ENTRY_DATE_TEMPLATE": "[{0}]",
    "ENTRY_ID_TEMPLATE": "{0})",
    "ENTRY_CATEGORY_TEMPLATE": "{0}",
    "GROUP_MONTH_FORMAT": "%A, %d %B %Y",
    "ENTRY_MESSAGE_TEMPLATE": "{0}"
}Where :ENTRY_TIME_FORMATis the time format to use when displaying an entry time;LANGUAGE_CODEis a locale code that is supported on your system like “fr_FR.UTF-8”, let it to an empty string to automatically use your system locale;DATABASE_NAMEis the filename for the sqlite3 database file installed in the Captain’s log directory;ENTRY_ID_TEMPLATEis the template string to format the entry’s ID;ENTRY_CATEGORY_TEMPLATEis the template string to format the entry’s category name;ENTRY_DATE_TEMPLATEis the template string to format the entry’s day datetime (it’s string display, not the date format itself);ENTRY_MESSAGE_TEMPLATEis the template string to format the entry’s message;GROUP_MONTH_FORMATis the datetime format to use when displaying a day date (the title for each day group);