|
| 1 | +.\" Man page generated from reStructuredText. |
| 2 | +. |
| 3 | +.TH WALRUS 1 "November 25, 2019" "v0.1.0" "" |
| 4 | +.SH NAME |
| 5 | +walrus \- back-port compiler for Python 3.8 assignment expression |
| 6 | +. |
| 7 | +.nr rst2man-indent-level 0 |
| 8 | +. |
| 9 | +.de1 rstReportMargin |
| 10 | +\\$1 \\n[an-margin] |
| 11 | +level \\n[rst2man-indent-level] |
| 12 | +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 13 | +- |
| 14 | +\\n[rst2man-indent0] |
| 15 | +\\n[rst2man-indent1] |
| 16 | +\\n[rst2man-indent2] |
| 17 | +.. |
| 18 | +.de1 INDENT |
| 19 | +.\" .rstReportMargin pre: |
| 20 | +. RS \\$1 |
| 21 | +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 22 | +. nr rst2man-indent-level +1 |
| 23 | +.\" .rstReportMargin post: |
| 24 | +.. |
| 25 | +.de UNINDENT |
| 26 | +. RE |
| 27 | +.\" indent \\n[an-margin] |
| 28 | +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 29 | +.nr rst2man-indent-level -1 |
| 30 | +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 31 | +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 32 | +.. |
| 33 | +.SH SYNOPSIS |
| 34 | +.sp |
| 35 | +walrus [\fIoptions\fP] <\fIpython source files and folders\fP> ... |
| 36 | +.SH DESCRIPTION |
| 37 | +.sp |
| 38 | +Since PEP 572, Python introduced \fIassignment expressions\fP syntax in |
| 39 | +version __3.8__. For those who wish to use \fIassignment expressions\fP |
| 40 | +in their code, \fIwalrus\fP provides an intelligent, yet imperfect, |
| 41 | +solution of a \fBbackport compiler\fP by replacing \fIassignment expressions\fP |
| 42 | +syntax with old\-fashioned assignment\-then\-conditional syntax, which |
| 43 | +guarantees you to always write \fIassignment expressions\fP in Python 3.8 |
| 44 | +flavour then compile for compatibility later. |
| 45 | +.SH OPTIONS |
| 46 | +.SS positional arguments |
| 47 | +.INDENT 0.0 |
| 48 | +.TP |
| 49 | +.B SOURCE |
| 50 | +python source files and folders to be converted |
| 51 | +.UNINDENT |
| 52 | +.SS optional arguments |
| 53 | +.INDENT 0.0 |
| 54 | +.TP |
| 55 | +.B \-h\fP,\fB \-\-help |
| 56 | +show this help message and exit |
| 57 | +.TP |
| 58 | +.B \-V\fP,\fB \-\-version |
| 59 | +show program\(aqs version number and exit |
| 60 | +.TP |
| 61 | +.B \-q\fP,\fB \-\-quiet |
| 62 | +run in quiet mode |
| 63 | +.UNINDENT |
| 64 | +.SS archive options |
| 65 | +.sp |
| 66 | +duplicate original files in case there\(aqs any issue |
| 67 | +.INDENT 0.0 |
| 68 | +.TP |
| 69 | +.BI \-n\fB a\fP,\fB \ \-\-no\-archive |
| 70 | +do not archive original files |
| 71 | +.UNINDENT |
| 72 | +.INDENT 0.0 |
| 73 | +.TP |
| 74 | +.B \-p \fIPATH\fP, \-\-archive\-path \fIPATH\fP |
| 75 | +path to archive original files |
| 76 | +.UNINDENT |
| 77 | +.SS convert options |
| 78 | +.sp |
| 79 | +compatibility configuration for none\-unicode files |
| 80 | +.INDENT 0.0 |
| 81 | +.TP |
| 82 | +.B \-c \fICODING\fP, \-\-encoding \fICODING\fP |
| 83 | +encoding to open source files |
| 84 | +.TP |
| 85 | +.B \-v \fIVERSION\fP, \-\-python \fIVERSION\fP |
| 86 | +convert against Python version |
| 87 | +.TP |
| 88 | +.B \-s \fISEP\fP, \-\-linesep \fISEP\fP |
| 89 | +line separator to process source files |
| 90 | +.UNINDENT |
| 91 | +.INDENT 0.0 |
| 92 | +.TP |
| 93 | +.BI \-n\fB l\fP,\fB \ \-\-no\-linting |
| 94 | +do not lint converted codes |
| 95 | +.UNINDENT |
| 96 | +.INDENT 0.0 |
| 97 | +.TP |
| 98 | +.B \-t \fIINDENT\fP, \-\-tabsize \fIINDENT\fP |
| 99 | +indentation tab size |
| 100 | +.UNINDENT |
| 101 | +.SH ENVIRONMENT |
| 102 | +.sp |
| 103 | +\fBwalrus\fP currently supports two environment variables. |
| 104 | +.INDENT 0.0 |
| 105 | +.TP |
| 106 | +.B WALRUS_QUIET |
| 107 | +run in quiet mode |
| 108 | +.TP |
| 109 | +.B WALRUS_ENCODING |
| 110 | +encoding to open source files |
| 111 | +.TP |
| 112 | +.B WALRUS_VERSION |
| 113 | +convert against Python version |
| 114 | +.TP |
| 115 | +.B WALRUS_LINESEP |
| 116 | +line separator to process source files |
| 117 | +.TP |
| 118 | +.B WALRUS_LINTING |
| 119 | +lint converted codes |
| 120 | +.TP |
| 121 | +.B WALRUS_TABSIZE |
| 122 | +indentation tab size |
| 123 | +.UNINDENT |
| 124 | +.SH SEE ALSO |
| 125 | +.sp |
| 126 | +babel(1), f2format(1), poseur(1), vermin(1) |
| 127 | +.SH AUTHOR |
| 128 | +Jarry Shaw, a newbie programmer, is the author, owner and maintainer |
| 129 | +of walrus. Please contact me at [email protected]. |
| 130 | +.SH COPYRIGHT |
| 131 | +walrus is licensed under the MIT License. |
| 132 | +.\" Generated by docutils manpage writer. |
| 133 | +. |
0 commit comments