From 449dadf3b4b3594d65baea18b328c76b0e6fd815 Mon Sep 17 00:00:00 2001 From: roger Date: Sun, 12 Jan 2020 23:06:44 +0100 Subject: [PATCH] release version 1.0.0 and update readme/man --- README.rst | 64 +++++++++++++++++-------- escrotum/main.py | 4 +- man/escrotum.1 | 121 ++++++++++++++++++++++++++++------------------- setup.py | 10 ++-- 4 files changed, 127 insertions(+), 72 deletions(-) diff --git a/README.rst b/README.rst index cb72331..eadd779 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,8 @@ Escrotum (`Help Wanted! `_) ======== -Linux screen capture using pygtk, inspired by scrot +Linux screen capture and screen recording program inspired by scrot. + Why? ---- @@ -12,41 +13,66 @@ Features -------- * fullscreen screenshots +* screen recording * partial(selection) screenshots * window screenshot(click to select) * screenshot by xid * store the image to the clipboard :: + usage: escrotum [-h] [-v] [-s] [-x XID] [-d DELAY] + [--selection-delay SELECTION_DELAY] [-c] [-C] [-e COMMAND] + [-r] + [FILENAME] - Usage: escrotum [filename] + positional arguments: + FILENAME image filename, default is + %Y-%m-%d-%H%M%S_$wx$h_escrotum.png - Options: - -h, --help show this help message and exit - -v, --version output version information and exit - -s, --select interactively choose a window or rectangle with the mouse, - cancels with Esc or Rigth Click - -x XID, --xid=XID take a screenshot of the xid window + optional arguments: + -h, --help show this help message and exit + -v, --version output version information and exit + -s, --select interactively choose a window or rectangle with the + mouse, cancels with Esc or Right Click + -x XID, --xid XID take a screenshot of the xid window + -d DELAY, --delay DELAY + wait DELAY seconds before taking a shot + --selection-delay SELECTION_DELAY + delay in milliseconds between selection/screenshot + -c, --countdown show a countdown before taking the shot (requires + delay) + -C, --clipboard store the image on the clipboard + -e COMMAND, --exec COMMAND + run the command after the image is taken + -r, --record screen recording. Alt+Ctrl+s to stop the recording - -d DELAY, --delay=DELAY wait DELAY seconds before taking a shot - -c, --countdown show a countdown before taking the shot - -C, --clipboard store the image on the clipboard SPECIAL STRINGS - filename parameters can take format specifiers + Both the --exec and filename parameters can take format specifiers that are expanded by escrotum when encountered. + There are two types of format specifier. Characters preceded by a '%' - are interpretted by strftime(2). See man strftime for examples. + are interpreted by strftime(2). See man strftime for examples. These options may be used to refer to the current date and time. - The second kind are internal to escrotum and are prefixed by '$' + + The second kind are internal to escrotum and are prefixed by '$' The following specifiers are recognised: - $w image width - $h image height + $f image path/filename (ignored when used in the filename) + $w image width + $h image height Example: - escrotum '%Y-%m-%d_$wx$h_scrotum.png' - Creates a file called something like 2013-06-17-082335_263x738_escrotum.png + escrotum '%Y-%m-%d-%H%M%S_$wx$h_escrotum.png' + Creates a file called something like 2013-06-17-082335_263x738_escrotum.png + + EXIT STATUS CODES + 1 can't get the window by xid + 2 invalid pixbuf + 3 can't save the image + 4 user canceled selection + 5 can't grab the mouse + 6 error with ffmpeg Install ------- -* on archlinux, yaourt -S escrotum-git +* on archlinux, install with your favorite aur manager, ie. yay -S escrotum-git * with pip, pip install escrotum diff --git a/escrotum/main.py b/escrotum/main.py index fc936f5..78c5d2e 100755 --- a/escrotum/main.py +++ b/escrotum/main.py @@ -481,7 +481,7 @@ def get_options(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, - description="Minimalist screenshot capture program inspired by scrot.", + description="Minimalist screenshot capture and screen recording program inspired by scrot.", epilog=epilog) parser.add_argument( @@ -511,7 +511,7 @@ def get_options(): help="run the command after the image is taken") parser.add_argument( '-r', '--record', default=False, action="store_true", - help="record video") + help="screen recording. Alt+Ctrl+s to stop the recording") parser.add_argument( 'FILENAME', type=str, nargs="?", help="image filename, default is " diff --git a/man/escrotum.1 b/man/escrotum.1 index 48d5325..790d36f 100644 --- a/man/escrotum.1 +++ b/man/escrotum.1 @@ -1,65 +1,90 @@ -.TH ESCROTUM 1 "January 2018" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.12. +.TH ESCROTUM "1" "January 2020" "escrotum 0.2.1" "User Commands" .SH NAME -escrotum \- screenshot capture program inspired by scrot -.SH SYNOPSIS -.B escrotum -[\fI\,OPTION\/\fR]... [\fI\,FILENAME\/\fR] +escrotum \- Minimalist screenshot capture and screen recording program inspired by scrot. .SH DESCRIPTION -Minimalist screenshot capture program inspired by scrot. -.PP -.I FILENAME -optional positional argument defines image filename, default is %Y-%m-%d-%H%M%S_$wx$h_escrotum.png +usage: escrotum [\-h] [\-v] [\-s] [\-x XID] [\-d DELAY] +.IP +[\-\-selection\-delay SELECTION_DELAY] [\-c] [\-C] [\-e COMMAND] +[\-r] +[FILENAME] .PP -\fB\-\-exec\fR option (see below) and \fIFILENAME\fR parameters can take format specifiers that are expanded by escrotum when encountered. - -There are two types of format specifier. Characters preceded by a '%' are interpreted by \fBstrftime\fR(2). These options may be used to refer to the current date and time. The second kind are internal to escrotum and are prefixed by '$'. The following specifiers are recognised: -.br -$f - image path/filename (ignored when used in the \fIFILENAME\fR) -.br -$h - image height -.br -$w - image width -.SH OPTIONS +Minimalist screenshot capture and screen recording program inspired by scrot. +.SS "positional arguments:" .TP -\fB\-C\fR, \fB\-\-clipboard\fR -store the image on the clipboard +FILENAME +image filename, default is +%Y\-%m\-%d\-%H%M%S_$wx$h_escrotum.png +.SS "optional arguments:" .TP -\fB\-c\fR, \fB\-\-countdown\fR -show a countdown before taking the shot (requires delay) +\fB\-h\fR, \fB\-\-help\fR +show this help message and exit .TP -\fB\-d\fR, \fB\-\-delay\fR=\fI\,SECONDS\/\fR -wait specified number of seconds before taking a shot +\fB\-v\fR, \fB\-\-version\fR +output version information and exit .TP -\fB\-e\fR, \fB\-\-exec\fR=\fI\,COMMAND\/\fR -run specified command after the image is taken +\fB\-s\fR, \fB\-\-select\fR +interactively choose a window or rectangle with the +mouse, cancels with Esc or Right Click .TP -\fB\-h\fR, \fB\-\-help\fR -show help message and exit +\fB\-x\fR XID, \fB\-\-xid\fR XID +take a screenshot of the xid window .TP -\fB\-s\fR, \fB\-\-select\fR -interactively choose a window or rectangle with the mouse, cancels with Esc or Right Click +\fB\-d\fR DELAY, \fB\-\-delay\fR DELAY +wait DELAY seconds before taking a shot .TP -\fB\-\-selection\-delay\fR=\fI\,MILLISECONDS\/\fR -wait specified number of milliseconds before taking a shot after selection +\fB\-\-selection\-delay\fR SELECTION_DELAY +delay in milliseconds between selection/screenshot .TP -\fB\-v\fR, \fB\-\-version\fR -output version information and exit +\fB\-c\fR, \fB\-\-countdown\fR +show a countdown before taking the shot (requires +delay) .TP -\fB\-x\fR, \fB\-\-xid\fR=\fI\,XID\/\fR -take a screenshot of the xid window -.SH EXIT STATUS +\fB\-C\fR, \fB\-\-clipboard\fR +store the image on the clipboard +.TP +\fB\-e\fR COMMAND, \fB\-\-exec\fR COMMAND +run the command after the image is taken +.TP +\fB\-r\fR, \fB\-\-record\fR +screen recording. Alt+Ctrl+s to stop the recording +.IP +SPECIAL STRINGS +Both the \fB\-\-exec\fR and filename parameters can take format specifiers +that are expanded by escrotum when encountered. +.IP +There are two types of format specifier. Characters preceded by a '%' +are interpreted by strftime(2). See man strftime for examples. +These options may be used to refer to the current date and time. +.IP +The second kind are internal to escrotum and are prefixed by '$' +The following specifiers are recognised: +.IP +$f image path/filename (ignored when used in the filename) +$w image width +$h image height +.IP +Example: +.IP +escrotum '%Y\-%m\-%d\-%H%M%S_$wx$h_escrotum.png' +Creates a file called something like 2013\-06\-17\-082335_263x738_escrotum.png +.IP +EXIT STATUS CODES 1 can't get the window by xid -.br 2 invalid pixbuf -.br 3 can't save the image -.br 4 user canceled selection -.br 5 can't grab the mouse -.SH AUTHOR -Roger Duran -.SH COPYRIGHT -Copyright © Roger Duran. License GPLv3+: GNU GPL version 3 or later . -.br -This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. +6 error with ffmpeg +.SH "SEE ALSO" +The full documentation for +.B escrotum +is maintained as a Texinfo manual. If the +.B info +and +.B escrotum +programs are properly installed at your site, the command +.IP +.B info escrotum +.PP +should give you access to the complete manual. diff --git a/setup.py b/setup.py index 965041a..161f3b1 100644 --- a/setup.py +++ b/setup.py @@ -2,15 +2,19 @@ setup( name="escrotum", - version="0.2.1", + version="1.0.0", author='Roger Duran', author_email='rogerduran@gmail.com', url='https://github.com/Roger/escrotum', - download_url='https://github.com/Roger/escrotum/archive/0.2.1.tar.gz', - keywords=['screenshot', 'scrot', 'cli'], + download_url='https://github.com/Roger/escrotum/archive/1.0.0.tar.gz', + keywords=['screenshot', 'screen-recording', 'scrot', 'cli'], packages=["escrotum"], include_package_data=True, zip_safe=False, + install_requires=[ + 'python-gobject', + 'xcffib', + ], entry_points={ 'console_scripts': [ 'escrotum = escrotum.main:run',