Prior to this change, running smartwd in a virtualenv with Python 3 gave
a syntax error due to the script treating `print` as a keyword, rather
than a function.
This change fixes the print to work as a function, and also cleans up
some of the comments and code to better comply with PEP8
The deploy script was simply redirecting the contents of the files into
the target files, however, they were getting created without executable
permissions. Since this script is designed to deploy executables, it is
required to set the executable permissions.
This cannot be done in the deployment configuration file however,
because the script parses all the input files first before extracting
the relevant contents. Therefore, if we try to run chmod +x within the
file, it would fail because the file would not exist yet (or run deploy
twice).
This commit also cleans up the formatting when building the command line
so that each command is set up on it's own line.
Deploy files are bash scripts with a couple of extra commands - namely
the repo, target and file commands. This allows a user to specify a
deployment file with a source repository, destination folder and
specific Git version to extract.
There is a possibility that for every 0.1 stardates (8640 seconds),
the final 0.05 stardate would get rounded up (432 seconds). This kind
of inaccuracy is unacceptable by Starfleet standards, so I've reduced
the inaccuracy to 5e-10 stardates or 43.2 microseconds.
With Ruby version 1.8.5, the smartwd script would abort with an error that
the shift method would take no arguments. Therefore, I have restricted the
use of the script to ruby version 1.8.7 and above.
On older versions, it will simply behave the same as \w in PS1 of bash.
This script evaluates the commands specified on the command line and
sends a beep to the terminal after the command completes execution. In
tmux, this results in the window status bar displaying the beep signal.
check_empty for restore was trying to run a git checkout in the current
working directory, instead of in the ~/.notes directory. Fix this issue
note_show uses less to display the contents of the note file.
Fix the following issues in note
1. Always use a combo of lowercase letters, hyphen, underscore and
numbers for the file name. This is taken from the title and uses sed
to translate the uppercase letters to lowercase. Unfortunately,
sed's translation mode doesn't support ranges, so we must use the
full alphabet.
2. Add support for displaying version information.
3. Reformat the help display so it all fits in a single line.
4. Add checking to ensure that at least one argument is passed to note
so that the parse_args routine doesn't barf an error with shift.
5. Remove argument checking in notes_init. It's called only by the init
function, so there's no need to add a flag to control warnings.
This Perl script reads a valid dircolors configuration file and prints
the colorscheme used by 'ls --color' for each file type (and extension).
Error checking is non-existent. The script assumes that your dircolors
file is valid input for the dircolors program.
The existing script was rounding the computed Julian date which was
resulting in the script printing the next day for 12 hours in the day,
i.e., a date of 456314.5 was being printed as 45631.5 (due to the
division by 10 and rounding up by the print statement). Now, the script
computes the number of days since the epoch (JD 2000000) and drops the
fractional portion, so it will print the correct Julian date stardate,
i.e., a date of 456314.5 will be printed correctly as 45631.4.