├── .github └── workflows │ └── test.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .pylintrc ├── Changelog.org ├── LICENSE ├── Makefile ├── README.org ├── __init__.py ├── completion └── _zscroll ├── poetry.lock ├── pyproject.toml ├── setup.py ├── test_zscroll.py ├── tox.ini ├── zscroll └── zscroll.1 /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test and lint 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - 'zscroll' 7 | - '**.py' 8 | - '**test.yml' 9 | - 'poetry.lock' 10 | push: 11 | paths: 12 | - 'zscroll' 13 | - '**.py' 14 | - '**test.yml' 15 | - 'poetry.lock' 16 | 17 | 18 | jobs: 19 | test: 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | python-version: [3.7, 3.8, 3.9] 24 | poetry-version: [1.1.7] 25 | os: [ubuntu-latest, macos-latest] 26 | runs-on: ${{ matrix.os }} 27 | steps: 28 | - uses: actions/checkout@v2 29 | - uses: actions/setup-python@v2 30 | with: 31 | python-version: ${{ matrix.python-version }} 32 | - name: Run image 33 | uses: abatilo/actions-poetry@v2.0.0 34 | with: 35 | poetry-version: ${{ matrix.poetry-version }} 36 | - name: Install dependencies 37 | run: make deps 38 | - name: Test 39 | run: make test-cov 40 | - name: Upload coverage to codecov 41 | if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' }} 42 | uses: codecov/codecov-action@v2 43 | with: 44 | files: ./.coverage 45 | lint: 46 | strategy: 47 | fail-fast: false 48 | matrix: 49 | python-version: [3.9] 50 | poetry-version: [1.1.7] 51 | os: [ubuntu-latest] 52 | runs-on: ${{ matrix.os }} 53 | steps: 54 | - uses: actions/checkout@v2 55 | - uses: actions/setup-python@v2 56 | with: 57 | python-version: ${{ matrix.python-version }} 58 | - name: Run image 59 | uses: abatilo/actions-poetry@v2.0.0 60 | with: 61 | poetry-version: ${{ matrix.poetry-version }} 62 | - name: Install dependencies 63 | run: make deps 64 | - name: Lint 65 | run: make lint 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .coverage 3 | .pytest_cache 4 | .mypy_cache 5 | *.pyc 6 | dist 7 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/ambv/black 3 | rev: stable 4 | hooks: 5 | - id: black 6 | language_version: python3.7 7 | - repo: https://gitlab.com/pycqa/flake8 8 | rev: 3.7.3 9 | hooks: 10 | - id: flake8 11 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [MESSAGES CONTROL] 2 | # - bad-continuation is broken and conflicts with black formatting (is this 3 | # still true? either way it shouldn't be necessary with black) 4 | # - invalid name has too many false positives (allow non all-caps globals and 5 | # 1-2 letter variables) 6 | disable=bad-continuation,invalid-name 7 | 8 | [SIMILARITIES] 9 | # ignore imports when computing similarities 10 | ignore-imports=yes 11 | 12 | [DESIGN] 13 | # Maximum number of branch for function / method body 14 | max-branches=20 15 | -------------------------------------------------------------------------------- /Changelog.org: -------------------------------------------------------------------------------- 1 | * 2.0.1 2 | ** Bug Fixes 3 | - Remove dependency on deprecated distutils 4 | 5 | * 2.0.0 6 | ** Breaking Changes 7 | - Long options are now hyphenated (e.g. =--update-check=) 8 | - All boolean options take an argument (e.g. =--scroll false=) 9 | - Newlines will be used by default (=--newline= defaults to true) as zscroll's primary use case is for panels, and this behavior is necessary for scrolling to work with polybar and lemonbar. 10 | - =-m= / =-M= syntax has changed to eliminate the previous complicated rules 11 | - The =-f= and =-c= flags have been removed. I don't see them as having a legitimate use case (the default behavior for handling fullwidth characters is much saner), but if anyone would like them back, feel free to make an issue. =-c= would count fullwidth characters as length 1, causing the scrolling text length to change. =-f= would convert all letters to fullwidth if any fullwidth letters were found. 12 | 13 | ** New Functionality 14 | - Add =-t= / =--timeout= to exit after some timeout 15 | - Add =-r= / =--reverse= to reverse scroll direction 16 | - Add =-U= / =--update-interval= to specify time to wait before running update checking commands 17 | - Add =-e= / =--eval-in-shell= to evaluate commands in a shell (to allow things like subshells, piping, etc.) 18 | 19 | ** Bug Fixes 20 | - Fix =-p= / =--scroll-padding= (see #4) 21 | - Don't exit if a shell command fails (e.g. mpd has not yet started but will later) 22 | 23 | ** Miscellaneous 24 | - Add tests and CI 25 | - Change license to GPL3 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: lint 2 | lint: 3 | $(MAKE) --keep-going pylint flake8 pydocstyle mypy black-check isort-check 4 | 5 | .PHONY: pylint 6 | pylint: 7 | @echo 8 | @echo "Linting with pylint" 9 | @poetry run pylint zscroll $(shell pwd) 10 | 11 | # pycodestyle and pyflakes 12 | .PHONY: flake8 13 | flake8: 14 | @echo 15 | @echo "Linting with flake8 (includes pycodestyle, mccabe, and pyflakes)" 16 | @poetry run flake8 zscroll . 17 | 18 | # TODO does nothing 19 | .PHONY: pydocstyle 20 | pydocstyle: 21 | @echo 22 | @echo "Linting with pydocstyle" 23 | @poetry run pydocstyle zscroll . 24 | 25 | .PHONY: mypy 26 | mypy: 27 | @echo 28 | @echo "Linting with mypy" 29 | @poetry run mypy zscroll . 30 | 31 | .PHONY: black-check 32 | black-check: 33 | @echo 34 | @echo "Checking formatting with black" 35 | @poetry run black --check zscroll . 36 | 37 | .PHONY: black-format 38 | black-format: 39 | @echo 40 | @echo "Fixing formatting with black" 41 | @poetry run black zscroll . 42 | 43 | .PHONY: isort-check 44 | isort-check: 45 | @echo 46 | @echo "Checking formatting with isort" 47 | @poetry run isort --check zscroll . 48 | 49 | .PHONY: isort-format 50 | isort-format: 51 | @echo 52 | @echo "Fixing formatting with isort" 53 | @poetry run isort zscroll . 54 | 55 | .PHONY: format 56 | format: 57 | @$(MAKE) isort-format black-format 58 | 59 | .PHONY: test 60 | test: 61 | poetry run pytest -s -vv 62 | 63 | .PHONY: test-cov 64 | test-cov: 65 | poetry run pytest -s -vv --cov=zscroll 66 | 67 | .PHONY: deps 68 | deps: 69 | poetry install 70 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | * Zscroll 2 | [[https://github.com/noctuid/zscroll/actions/workflows/test.yml][https://github.com/noctuid/zscroll/actions/workflows/test.yml/badge.svg]] 3 | [[https://codecov.io/github/noctuid/zscroll?branch=master][https://codecov.io/github/noctuid/zscroll/coverage.svg?branch=master]] 4 | [[https://github.com/ambv/black][https://img.shields.io/badge/code%20style-black-000000.svg]] 5 | 6 | The most common use cases are described in this README. For complete information on every flag, please see the man page (or the help text for basic information on every flag). 7 | 8 | ** Version 2.0 Breaking Changes 9 | - Long options are now hyphenated (e.g. =--update-check=) 10 | - All boolean options take an argument (e.g. =--scroll false=) 11 | - Newlines will be used by default (=--newline= defaults to true) as zscroll's primary use case is for panels, and this behavior is necessary for scrolling to work with polybar and lemonbar. 12 | - =-m= / =-M= syntax has changed to eliminate the previous complicated rules 13 | - The =-f= and =-c= flags have been removed. I don't see them as having a legitimate use case (the default behavior for handling fullwidth characters is much saner), but if anyone would like them back, feel free to make an issue. =-c= would count fullwidth characters as length 1, causing the scrolling text length to change. =-f= would convert all letters to fullwidth if any fullwidth letters were found. 14 | 15 | ** Simple Example 16 | Scroll the currently playing mpd song: 17 | #+begin_src sh 18 | $ zscroll -b "⮕ " "$(mpc current)" 19 | # or 20 | $ mpc current | zscroll -b "⮕ " 21 | #+end_src 22 | 23 | By default, zscroll will add " - " between the end and start of scrolling text. This can be adjusted with the ~-p~ option. Here is a zoomed in example of the above command (with a 0.4 second update delay): 24 | 25 | [[http://noctuid.github.io/zscroll/assets/example_bar.gif][http://noctuid.github.io/zscroll/assets/example_bar.gif]] 26 | 27 | ** Installation 28 | *** Arch 29 | Install [[https://aur.archlinux.org/packages/zscroll-git/][zscroll-git]] from the AUR. 30 | 31 | *** Nix 32 | [[https://nixos.org/nix/][Nix]] is a distro-independent package manager. 33 | 34 | #+begin_src sh 35 | $ nix-env -i zscroll 36 | #+end_src 37 | 38 | *** Manual 39 | #+begin_src sh 40 | $ git clone https://github.com/noctuid/zscroll 41 | $ cd zscroll 42 | $ sudo python3 setup.py install 43 | #+end_src 44 | This program will not work with Python 2. For this reason you *must* install with Python 3. This can be done in Ubuntu with =sudo python3 setup.py install= and may be the same for other distributions. If this does not work for you, please consult your distribution's documentation. 45 | 46 | /Note: [[https://github.com/asdf-vm/asdf][asdf]] users might have to run/ ~asdf reshim~ /command before using/ ~zscroll~. 47 | 48 | ** Dynamically Updating Text 49 | Zscroll can now update its text by itself. This may be nice for panels that don't allow for the user to conditionally start new processes. It also simplifies the logic necessary to change settings for the scrolling text and gets rid of the need for an [[https://github.com/noctuid/dotfiles/blob/a251c682aa71e115ca83e75f938016e2f134ed47/aesthetics/.panel_scripts/panel#L39][ugly function]] to repeatedly kill and start the scroller. 50 | 51 | A simple use case is where one might want to display the current window's title. This can be done with the ~-u~ option, which will run zscroll's positional argument as a shell command to check for changes: 52 | #+begin_src sh 53 | zscroll -b "| " -a " |" -u true "xtitle" 54 | #+end_src 55 | 56 | Zscroll even supports more complex updates by searching for a regular expression in the output of a command to determine whether certain settings should be changed. As an example, this can be useful for displaying a pause icon and prevent scrolling when the current song is paused. The following command will take these actions when "paused" is found in the output of the shell command ~mpc status~: 57 | #+begin_src sh 58 | zscroll --before-text "♪ x" --delay 0.3 \ 59 | --match-command "mpc status" \ 60 | --match-text "playing" "--before-text ' '" \ 61 | --match-text "paused" "--before-text ' ' --scroll 0" \ 62 | --update-check true "mpc current" 63 | # or shortopts 64 | zscroll -b "♪ x" -d 0.3 \ 65 | -M "mpc status" \ 66 | -m "playing" "-b ' '" \ 67 | -m "paused" "-b ' ' -s 0" \ 68 | -u t "mpc current" 69 | #+end_src 70 | 71 | New options (and possibly new scroll-text) should be specified as the second argument to every =-m=. Options not specified with an =-m= will default to the user-specified values outside of the =-m= (or the base defaults). Any option can be altered when a ~-m~ search term is found (except for =-m= and =-M=, which will be ignored). Note that when multiple ~-m~ options happen to be matched, it is the last one that will take effect. 72 | 73 | See the man page for more information. 74 | 75 | ** Fullwidth Characters 76 | Zscroll intelligently deals with fullwidth characters by default by counting them as twice the length of halfwidth characters (and phasing them in and out in two steps). This ensures that the actual visual length and speed of the scrolling text does not change. Here is a normal-sized gif of the above command that demonstrates this: 77 | 78 | [[http://noctuid.github.io/zscroll/assets/music_scroll.gif][http://noctuid.github.io/zscroll/assets/music_scroll.gif]] 79 | 80 | ** Use with Polybar 81 | Here's an example of using zscroll instead of polybar's mpd module. 82 | 83 | In polybar config: 84 | #+begin_src conf 85 | [module/mpd] 86 | type = custom/script 87 | exec = /path/to/script 88 | tail = true 89 | 90 | label-foreground = ${colors.music} 91 | #+end_src 92 | 93 | In the script: 94 | #+begin_src shell 95 | #!/usr/bin/env bash 96 | 97 | zscroll --before-text "♪ x" --delay 0.3 \ 98 | --match-command "mpc status" \ 99 | --match-text "playing" "--before-text ' '" \ 100 | --match-text "paused" "--before-text ' ' --scroll 0" \ 101 | --update-check true "mpc current" & 102 | 103 | wait 104 | #+end_src 105 | 106 | For an alternate method that does not use zscroll's dynamic updating, see [[https://github.com/jaagr/polybar/issues/353#issuecomment-273388042][here]]. 107 | 108 | ** Similar 109 | - z3bratabs' [[https://github.com/z3bratabs/skroll][skroll]] 110 | - benghaem's [[https://github.com/benghaem/dotfiles/blob/1dcbee5ed235a8e319dcc4255df10f0a6b23b6fe/bin/panel/scroller.c][scroller]] 111 | 112 | ** Why 113 | I was using benghaem's scroller for a while. I didn't like that the arguments were all positional, the lack of a right text padding option, and the lack of an option to change the scroll speed. I found skroll afterwards which is nicer since it has options and an actual man page and is in the AUR. However, it doesn't have a left text padding option which was necessary for my bar script to work properly. Also, they are both written in C, which doesn't seem practical to me for such a simple script and is the main reason I created zscroll instead of contributing. 114 | 115 | Zscroll supports the features I liked from each. It has a speed option, adds an option for right padding text, will work on text as an argument or piped into it, handles fullwidth characters intelligently, and has other advanced features. 116 | 117 | I called this zscroll because it's the last scroller I'll use... but more importantly because I couldn't think of another name. 118 | 119 | ** Contributing 120 | Zscroll is using [[https://black.readthedocs.io/en/stable/][black]] and [[https://pycqa.github.io/isort/][isort]] for automatic formatting and import sorting. [[http://flake8.pycqa.org/en/latest/][flake8]] and [[https://www.pylint.org/][pylint]], and [[http://www.pydocstyle.org/en/stable/][pydocstyle]] are used for linting. [[https://docs.pytest.org/en/latest/][pytest]] is used for testing. 121 | 122 | Development dependencies can be installed with ~make deps~ or ~poetry installed~ ([[https://python-poetry.org/][poetry]] must be installed first). If you want to make a PR, please write tests for any added or fixed functionality and make sure that the code passes ~make lint~ and ~make test~. 123 | 124 | To automatically format with black when committing and abort the commit if there are any flake8 errors, you can install [[https://pre-commit.com/][pre-commit]] and run =pre-commit install= once in the repository root after cloning. 125 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """A text scroller for panels or terminals.""" 3 | -------------------------------------------------------------------------------- /completion/_zscroll: -------------------------------------------------------------------------------- 1 | #compdef zscroll 2 | # This will still try to complete with defaults (files) for the positional arg. 3 | # I'm not sure if there's a way to override that. 4 | _gnu_generic 5 | -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "appdirs" 3 | version = "1.4.4" 4 | description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." 5 | category = "dev" 6 | optional = false 7 | python-versions = "*" 8 | 9 | [[package]] 10 | name = "astroid" 11 | version = "2.7.2" 12 | description = "An abstract syntax tree for Python with inference support." 13 | category = "dev" 14 | optional = false 15 | python-versions = "~=3.6" 16 | 17 | [package.dependencies] 18 | lazy-object-proxy = ">=1.4.0" 19 | setuptools = ">=20.0" 20 | typed-ast = {version = ">=1.4.0,<1.5", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} 21 | typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} 22 | wrapt = ">=1.11,<1.13" 23 | 24 | [[package]] 25 | name = "atomicwrites" 26 | version = "1.4.0" 27 | description = "Atomic file writes." 28 | category = "dev" 29 | optional = false 30 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 31 | 32 | [[package]] 33 | name = "attrs" 34 | version = "21.2.0" 35 | description = "Classes Without Boilerplate" 36 | category = "dev" 37 | optional = false 38 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 39 | 40 | [package.extras] 41 | dev = ["coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"] 42 | docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] 43 | tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"] 44 | tests-no-zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"] 45 | 46 | [[package]] 47 | name = "black" 48 | version = "21.7b0" 49 | description = "The uncompromising code formatter." 50 | category = "dev" 51 | optional = false 52 | python-versions = ">=3.6.2" 53 | 54 | [package.dependencies] 55 | appdirs = "*" 56 | click = ">=7.1.2" 57 | dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} 58 | mypy-extensions = ">=0.4.3" 59 | pathspec = ">=0.8.1,<1" 60 | regex = ">=2020.1.8" 61 | tomli = ">=0.2.6,<2.0.0" 62 | typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} 63 | typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} 64 | 65 | [package.extras] 66 | colorama = ["colorama (>=0.4.3)"] 67 | d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] 68 | python2 = ["typed-ast (>=1.4.2)"] 69 | uvloop = ["uvloop (>=0.15.2)"] 70 | 71 | [[package]] 72 | name = "certifi" 73 | version = "2022.12.7" 74 | description = "Python package for providing Mozilla's CA Bundle." 75 | category = "dev" 76 | optional = false 77 | python-versions = ">=3.6" 78 | 79 | [[package]] 80 | name = "charset-normalizer" 81 | version = "2.0.4" 82 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." 83 | category = "dev" 84 | optional = false 85 | python-versions = ">=3.5.0" 86 | 87 | [package.extras] 88 | unicode-backport = ["unicodedata2"] 89 | 90 | [[package]] 91 | name = "click" 92 | version = "8.0.1" 93 | description = "Composable command line interface toolkit" 94 | category = "dev" 95 | optional = false 96 | python-versions = ">=3.6" 97 | 98 | [package.dependencies] 99 | colorama = {version = "*", markers = "platform_system == \"Windows\""} 100 | importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} 101 | 102 | [[package]] 103 | name = "codecov" 104 | version = "2.1.12" 105 | description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" 106 | category = "dev" 107 | optional = false 108 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 109 | 110 | [package.dependencies] 111 | coverage = "*" 112 | requests = ">=2.7.9" 113 | 114 | [[package]] 115 | name = "colorama" 116 | version = "0.4.4" 117 | description = "Cross-platform colored terminal text." 118 | category = "dev" 119 | optional = false 120 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 121 | 122 | [[package]] 123 | name = "coverage" 124 | version = "5.5" 125 | description = "Code coverage measurement for Python" 126 | category = "dev" 127 | optional = false 128 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" 129 | 130 | [package.extras] 131 | toml = ["toml"] 132 | 133 | [[package]] 134 | name = "dataclasses" 135 | version = "0.8" 136 | description = "A backport of the dataclasses module for Python 3.6" 137 | category = "dev" 138 | optional = false 139 | python-versions = ">=3.6, <3.7" 140 | 141 | [[package]] 142 | name = "flake8" 143 | version = "3.9.2" 144 | description = "the modular source code checker: pep8 pyflakes and co" 145 | category = "dev" 146 | optional = false 147 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" 148 | 149 | [package.dependencies] 150 | importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} 151 | mccabe = ">=0.6.0,<0.7.0" 152 | pycodestyle = ">=2.7.0,<2.8.0" 153 | pyflakes = ">=2.3.0,<2.4.0" 154 | 155 | [[package]] 156 | name = "idna" 157 | version = "3.2" 158 | description = "Internationalized Domain Names in Applications (IDNA)" 159 | category = "dev" 160 | optional = false 161 | python-versions = ">=3.5" 162 | 163 | [[package]] 164 | name = "importlib-metadata" 165 | version = "4.6.4" 166 | description = "Read metadata from Python packages" 167 | category = "dev" 168 | optional = false 169 | python-versions = ">=3.6" 170 | 171 | [package.dependencies] 172 | typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} 173 | zipp = ">=0.5" 174 | 175 | [package.extras] 176 | docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] 177 | perf = ["ipython"] 178 | testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-perf (>=0.9.2)"] 179 | 180 | [[package]] 181 | name = "iniconfig" 182 | version = "1.1.1" 183 | description = "iniconfig: brain-dead simple config-ini parsing" 184 | category = "dev" 185 | optional = false 186 | python-versions = "*" 187 | 188 | [[package]] 189 | name = "isort" 190 | version = "5.9.3" 191 | description = "A Python utility / library to sort Python imports." 192 | category = "dev" 193 | optional = false 194 | python-versions = ">=3.6.1,<4.0" 195 | 196 | [package.extras] 197 | colors = ["colorama (>=0.4.3,<0.5.0)"] 198 | pipfile-deprecated-finder = ["pipreqs", "requirementslib"] 199 | plugins = ["setuptools"] 200 | requirements-deprecated-finder = ["pip-api", "pipreqs"] 201 | 202 | [[package]] 203 | name = "lazy-object-proxy" 204 | version = "1.6.0" 205 | description = "A fast and thorough lazy object proxy." 206 | category = "dev" 207 | optional = false 208 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" 209 | 210 | [[package]] 211 | name = "mccabe" 212 | version = "0.6.1" 213 | description = "McCabe checker, plugin for flake8" 214 | category = "dev" 215 | optional = false 216 | python-versions = "*" 217 | 218 | [[package]] 219 | name = "mypy" 220 | version = "0.910" 221 | description = "Optional static typing for Python" 222 | category = "dev" 223 | optional = false 224 | python-versions = ">=3.5" 225 | 226 | [package.dependencies] 227 | mypy-extensions = ">=0.4.3,<0.5.0" 228 | toml = "*" 229 | typed-ast = {version = ">=1.4.0,<1.5.0", markers = "python_version < \"3.8\""} 230 | typing-extensions = ">=3.7.4" 231 | 232 | [package.extras] 233 | dmypy = ["psutil (>=4.0)"] 234 | python2 = ["typed-ast (>=1.4.0,<1.5.0)"] 235 | 236 | [[package]] 237 | name = "mypy-extensions" 238 | version = "0.4.3" 239 | description = "Experimental type system extensions for programs checked with the mypy typechecker." 240 | category = "dev" 241 | optional = false 242 | python-versions = "*" 243 | 244 | [[package]] 245 | name = "packaging" 246 | version = "21.0" 247 | description = "Core utilities for Python packages" 248 | category = "dev" 249 | optional = false 250 | python-versions = ">=3.6" 251 | 252 | [package.dependencies] 253 | pyparsing = ">=2.0.2" 254 | 255 | [[package]] 256 | name = "pathspec" 257 | version = "0.9.0" 258 | description = "Utility library for gitignore style pattern matching of file paths." 259 | category = "dev" 260 | optional = false 261 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" 262 | 263 | [[package]] 264 | name = "pluggy" 265 | version = "0.13.1" 266 | description = "plugin and hook calling mechanisms for python" 267 | category = "dev" 268 | optional = false 269 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 270 | 271 | [package.dependencies] 272 | importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} 273 | 274 | [package.extras] 275 | dev = ["pre-commit", "tox"] 276 | 277 | [[package]] 278 | name = "py" 279 | version = "1.10.0" 280 | description = "library with cross-python path, ini-parsing, io, code, log facilities" 281 | category = "dev" 282 | optional = false 283 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 284 | 285 | [[package]] 286 | name = "pycodestyle" 287 | version = "2.7.0" 288 | description = "Python style guide checker" 289 | category = "dev" 290 | optional = false 291 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 292 | 293 | [[package]] 294 | name = "pydocstyle" 295 | version = "6.1.1" 296 | description = "Python docstring style checker" 297 | category = "dev" 298 | optional = false 299 | python-versions = ">=3.6" 300 | 301 | [package.dependencies] 302 | snowballstemmer = "*" 303 | 304 | [package.extras] 305 | toml = ["toml"] 306 | 307 | [[package]] 308 | name = "pyflakes" 309 | version = "2.3.1" 310 | description = "passive checker of Python programs" 311 | category = "dev" 312 | optional = false 313 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 314 | 315 | [[package]] 316 | name = "pylint" 317 | version = "2.10.0" 318 | description = "python code static checker" 319 | category = "dev" 320 | optional = false 321 | python-versions = "~=3.6" 322 | 323 | [package.dependencies] 324 | appdirs = ">=1.4.0" 325 | astroid = ">=2.7.2,<2.8" 326 | colorama = {version = "*", markers = "sys_platform == \"win32\""} 327 | isort = ">=4.2.5,<6" 328 | mccabe = ">=0.6,<0.7" 329 | toml = ">=0.7.1" 330 | 331 | [[package]] 332 | name = "pyparsing" 333 | version = "2.4.7" 334 | description = "Python parsing module" 335 | category = "dev" 336 | optional = false 337 | python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" 338 | 339 | [[package]] 340 | name = "pytest" 341 | version = "6.2.4" 342 | description = "pytest: simple powerful testing with Python" 343 | category = "dev" 344 | optional = false 345 | python-versions = ">=3.6" 346 | 347 | [package.dependencies] 348 | atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} 349 | attrs = ">=19.2.0" 350 | colorama = {version = "*", markers = "sys_platform == \"win32\""} 351 | importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} 352 | iniconfig = "*" 353 | packaging = "*" 354 | pluggy = ">=0.12,<1.0.0a1" 355 | py = ">=1.8.2" 356 | toml = "*" 357 | 358 | [package.extras] 359 | testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] 360 | 361 | [[package]] 362 | name = "pytest-cov" 363 | version = "2.12.1" 364 | description = "Pytest plugin for measuring coverage." 365 | category = "dev" 366 | optional = false 367 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 368 | 369 | [package.dependencies] 370 | coverage = ">=5.2.1" 371 | pytest = ">=4.6" 372 | toml = "*" 373 | 374 | [package.extras] 375 | testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] 376 | 377 | [[package]] 378 | name = "regex" 379 | version = "2021.8.3" 380 | description = "Alternative regular expression module, to replace re." 381 | category = "dev" 382 | optional = false 383 | python-versions = "*" 384 | 385 | [[package]] 386 | name = "requests" 387 | version = "2.26.0" 388 | description = "Python HTTP for Humans." 389 | category = "dev" 390 | optional = false 391 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" 392 | 393 | [package.dependencies] 394 | certifi = ">=2017.4.17" 395 | charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} 396 | idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} 397 | urllib3 = ">=1.21.1,<1.27" 398 | 399 | [package.extras] 400 | socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] 401 | use-chardet-on-py3 = ["chardet (>=3.0.2,<5)"] 402 | 403 | [[package]] 404 | name = "setuptools" 405 | version = "59.6.0" 406 | description = "Easily download, build, install, upgrade, and uninstall Python packages" 407 | category = "dev" 408 | optional = false 409 | python-versions = ">=3.6" 410 | 411 | [package.extras] 412 | docs = ["furo", "jaraco.packaging (>=8.2)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx", "sphinx-inline-tabs", "sphinxcontrib-towncrier"] 413 | testing = ["flake8-2020", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "paver", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-virtualenv (>=1.2.7)", "pytest-xdist", "sphinx", "virtualenv (>=13.0.0)", "wheel"] 414 | 415 | [[package]] 416 | name = "snowballstemmer" 417 | version = "2.1.0" 418 | description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." 419 | category = "dev" 420 | optional = false 421 | python-versions = "*" 422 | 423 | [[package]] 424 | name = "toml" 425 | version = "0.10.2" 426 | description = "Python Library for Tom's Obvious, Minimal Language" 427 | category = "dev" 428 | optional = false 429 | python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" 430 | 431 | [[package]] 432 | name = "tomli" 433 | version = "1.2.1" 434 | description = "A lil' TOML parser" 435 | category = "dev" 436 | optional = false 437 | python-versions = ">=3.6" 438 | 439 | [[package]] 440 | name = "typed-ast" 441 | version = "1.4.3" 442 | description = "a fork of Python 2 and 3 ast modules with type comment support" 443 | category = "dev" 444 | optional = false 445 | python-versions = "*" 446 | 447 | [[package]] 448 | name = "typing-extensions" 449 | version = "3.10.0.0" 450 | description = "Backported and Experimental Type Hints for Python 3.5+" 451 | category = "dev" 452 | optional = false 453 | python-versions = "*" 454 | 455 | [[package]] 456 | name = "urllib3" 457 | version = "1.26.6" 458 | description = "HTTP library with thread-safe connection pooling, file post, and more." 459 | category = "dev" 460 | optional = false 461 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" 462 | 463 | [package.extras] 464 | brotli = ["brotlipy (>=0.6.0)"] 465 | secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)"] 466 | socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] 467 | 468 | [[package]] 469 | name = "wrapt" 470 | version = "1.12.1" 471 | description = "Module for decorators, wrappers and monkey patching." 472 | category = "dev" 473 | optional = false 474 | python-versions = "*" 475 | 476 | [[package]] 477 | name = "zipp" 478 | version = "3.5.0" 479 | description = "Backport of pathlib-compatible object wrapper for zip files" 480 | category = "dev" 481 | optional = false 482 | python-versions = ">=3.6" 483 | 484 | [package.extras] 485 | docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] 486 | testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] 487 | 488 | [metadata] 489 | lock-version = "1.1" 490 | python-versions = ">=3.6.2,<4.0" 491 | content-hash = "7acd880a9aa9140fba74c19c6a8fc4c3bdc4a2eea220cd96f986481baabec7ce" 492 | 493 | [metadata.files] 494 | appdirs = [ 495 | {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, 496 | {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, 497 | ] 498 | astroid = [ 499 | {file = "astroid-2.7.2-py3-none-any.whl", hash = "sha256:ecc50f9b3803ebf8ea19aa2c6df5622d8a5c31456a53c741d3be044d96ff0948"}, 500 | {file = "astroid-2.7.2.tar.gz", hash = "sha256:b6c2d75cd7c2982d09e7d41d70213e863b3ba34d3bd4014e08f167cee966e99e"}, 501 | ] 502 | atomicwrites = [ 503 | {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, 504 | {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, 505 | ] 506 | attrs = [ 507 | {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, 508 | {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, 509 | ] 510 | black = [ 511 | {file = "black-21.7b0-py3-none-any.whl", hash = "sha256:1c7aa6ada8ee864db745b22790a32f94b2795c253a75d6d9b5e439ff10d23116"}, 512 | {file = "black-21.7b0.tar.gz", hash = "sha256:c8373c6491de9362e39271630b65b964607bc5c79c83783547d76c839b3aa219"}, 513 | ] 514 | certifi = [ 515 | {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, 516 | {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, 517 | ] 518 | charset-normalizer = [ 519 | {file = "charset-normalizer-2.0.4.tar.gz", hash = "sha256:f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"}, 520 | {file = "charset_normalizer-2.0.4-py3-none-any.whl", hash = "sha256:0c8911edd15d19223366a194a513099a302055a962bca2cec0f54b8b63175d8b"}, 521 | ] 522 | click = [ 523 | {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, 524 | {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, 525 | ] 526 | codecov = [ 527 | {file = "codecov-2.1.12-py2.py3-none-any.whl", hash = "sha256:585dc217dc3d8185198ceb402f85d5cb5dbfa0c5f350a5abcdf9e347776a5b47"}, 528 | {file = "codecov-2.1.12.tar.gz", hash = "sha256:a0da46bb5025426da895af90938def8ee12d37fcbcbbbc15b6dc64cf7ebc51c1"}, 529 | ] 530 | colorama = [ 531 | {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, 532 | {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, 533 | ] 534 | coverage = [ 535 | {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, 536 | {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, 537 | {file = "coverage-5.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669"}, 538 | {file = "coverage-5.5-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90"}, 539 | {file = "coverage-5.5-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c"}, 540 | {file = "coverage-5.5-cp27-cp27m-win32.whl", hash = "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a"}, 541 | {file = "coverage-5.5-cp27-cp27m-win_amd64.whl", hash = "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82"}, 542 | {file = "coverage-5.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905"}, 543 | {file = "coverage-5.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083"}, 544 | {file = "coverage-5.5-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5"}, 545 | {file = "coverage-5.5-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81"}, 546 | {file = "coverage-5.5-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6"}, 547 | {file = "coverage-5.5-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0"}, 548 | {file = "coverage-5.5-cp310-cp310-win_amd64.whl", hash = "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae"}, 549 | {file = "coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb"}, 550 | {file = "coverage-5.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160"}, 551 | {file = "coverage-5.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6"}, 552 | {file = "coverage-5.5-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701"}, 553 | {file = "coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793"}, 554 | {file = "coverage-5.5-cp35-cp35m-win32.whl", hash = "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e"}, 555 | {file = "coverage-5.5-cp35-cp35m-win_amd64.whl", hash = "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3"}, 556 | {file = "coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066"}, 557 | {file = "coverage-5.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a"}, 558 | {file = "coverage-5.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465"}, 559 | {file = "coverage-5.5-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb"}, 560 | {file = "coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821"}, 561 | {file = "coverage-5.5-cp36-cp36m-win32.whl", hash = "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45"}, 562 | {file = "coverage-5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184"}, 563 | {file = "coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a"}, 564 | {file = "coverage-5.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53"}, 565 | {file = "coverage-5.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d"}, 566 | {file = "coverage-5.5-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638"}, 567 | {file = "coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3"}, 568 | {file = "coverage-5.5-cp37-cp37m-win32.whl", hash = "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a"}, 569 | {file = "coverage-5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a"}, 570 | {file = "coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6"}, 571 | {file = "coverage-5.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2"}, 572 | {file = "coverage-5.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759"}, 573 | {file = "coverage-5.5-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873"}, 574 | {file = "coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a"}, 575 | {file = "coverage-5.5-cp38-cp38-win32.whl", hash = "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6"}, 576 | {file = "coverage-5.5-cp38-cp38-win_amd64.whl", hash = "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502"}, 577 | {file = "coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b"}, 578 | {file = "coverage-5.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529"}, 579 | {file = "coverage-5.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b"}, 580 | {file = "coverage-5.5-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff"}, 581 | {file = "coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b"}, 582 | {file = "coverage-5.5-cp39-cp39-win32.whl", hash = "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6"}, 583 | {file = "coverage-5.5-cp39-cp39-win_amd64.whl", hash = "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03"}, 584 | {file = "coverage-5.5-pp36-none-any.whl", hash = "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079"}, 585 | {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, 586 | {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, 587 | ] 588 | dataclasses = [ 589 | {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, 590 | {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, 591 | ] 592 | flake8 = [ 593 | {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, 594 | {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, 595 | ] 596 | idna = [ 597 | {file = "idna-3.2-py3-none-any.whl", hash = "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a"}, 598 | {file = "idna-3.2.tar.gz", hash = "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"}, 599 | ] 600 | importlib-metadata = [ 601 | {file = "importlib_metadata-4.6.4-py3-none-any.whl", hash = "sha256:ed5157fef23a4bc4594615a0dd8eba94b2bb36bf2a343fa3d8bb2fa0a62a99d5"}, 602 | {file = "importlib_metadata-4.6.4.tar.gz", hash = "sha256:7b30a78db2922d78a6f47fb30683156a14f3c6aa5cc23f77cc8967e9ab2d002f"}, 603 | ] 604 | iniconfig = [ 605 | {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, 606 | {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, 607 | ] 608 | isort = [ 609 | {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, 610 | {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, 611 | ] 612 | lazy-object-proxy = [ 613 | {file = "lazy-object-proxy-1.6.0.tar.gz", hash = "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726"}, 614 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b"}, 615 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win32.whl", hash = "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e"}, 616 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93"}, 617 | {file = "lazy_object_proxy-1.6.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741"}, 618 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587"}, 619 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4"}, 620 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win32.whl", hash = "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f"}, 621 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3"}, 622 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981"}, 623 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2"}, 624 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win32.whl", hash = "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd"}, 625 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837"}, 626 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653"}, 627 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3"}, 628 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-win32.whl", hash = "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8"}, 629 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf"}, 630 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad"}, 631 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43"}, 632 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a"}, 633 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-win32.whl", hash = "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61"}, 634 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"}, 635 | ] 636 | mccabe = [ 637 | {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, 638 | {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, 639 | ] 640 | mypy = [ 641 | {file = "mypy-0.910-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a155d80ea6cee511a3694b108c4494a39f42de11ee4e61e72bc424c490e46457"}, 642 | {file = "mypy-0.910-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b94e4b785e304a04ea0828759172a15add27088520dc7e49ceade7834275bedb"}, 643 | {file = "mypy-0.910-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:088cd9c7904b4ad80bec811053272986611b84221835e079be5bcad029e79dd9"}, 644 | {file = "mypy-0.910-cp35-cp35m-win_amd64.whl", hash = "sha256:adaeee09bfde366d2c13fe6093a7df5df83c9a2ba98638c7d76b010694db760e"}, 645 | {file = "mypy-0.910-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ecd2c3fe726758037234c93df7e98deb257fd15c24c9180dacf1ef829da5f921"}, 646 | {file = "mypy-0.910-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d9dd839eb0dc1bbe866a288ba3c1afc33a202015d2ad83b31e875b5905a079b6"}, 647 | {file = "mypy-0.910-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:3e382b29f8e0ccf19a2df2b29a167591245df90c0b5a2542249873b5c1d78212"}, 648 | {file = "mypy-0.910-cp36-cp36m-win_amd64.whl", hash = "sha256:53fd2eb27a8ee2892614370896956af2ff61254c275aaee4c230ae771cadd885"}, 649 | {file = "mypy-0.910-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b6fb13123aeef4a3abbcfd7e71773ff3ff1526a7d3dc538f3929a49b42be03f0"}, 650 | {file = "mypy-0.910-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e4dab234478e3bd3ce83bac4193b2ecd9cf94e720ddd95ce69840273bf44f6de"}, 651 | {file = "mypy-0.910-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:7df1ead20c81371ccd6091fa3e2878559b5c4d4caadaf1a484cf88d93ca06703"}, 652 | {file = "mypy-0.910-cp37-cp37m-win_amd64.whl", hash = "sha256:0aadfb2d3935988ec3815952e44058a3100499f5be5b28c34ac9d79f002a4a9a"}, 653 | {file = "mypy-0.910-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec4e0cd079db280b6bdabdc807047ff3e199f334050db5cbb91ba3e959a67504"}, 654 | {file = "mypy-0.910-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:119bed3832d961f3a880787bf621634ba042cb8dc850a7429f643508eeac97b9"}, 655 | {file = "mypy-0.910-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:866c41f28cee548475f146aa4d39a51cf3b6a84246969f3759cb3e9c742fc072"}, 656 | {file = "mypy-0.910-cp38-cp38-win_amd64.whl", hash = "sha256:ceb6e0a6e27fb364fb3853389607cf7eb3a126ad335790fa1e14ed02fba50811"}, 657 | {file = "mypy-0.910-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a85e280d4d217150ce8cb1a6dddffd14e753a4e0c3cf90baabb32cefa41b59e"}, 658 | {file = "mypy-0.910-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:42c266ced41b65ed40a282c575705325fa7991af370036d3f134518336636f5b"}, 659 | {file = "mypy-0.910-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3c4b8ca36877fc75339253721f69603a9c7fdb5d4d5a95a1a1b899d8b86a4de2"}, 660 | {file = "mypy-0.910-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:c0df2d30ed496a08de5daed2a9ea807d07c21ae0ab23acf541ab88c24b26ab97"}, 661 | {file = "mypy-0.910-cp39-cp39-win_amd64.whl", hash = "sha256:c6c2602dffb74867498f86e6129fd52a2770c48b7cd3ece77ada4fa38f94eba8"}, 662 | {file = "mypy-0.910-py3-none-any.whl", hash = "sha256:ef565033fa5a958e62796867b1df10c40263ea9ded87164d67572834e57a174d"}, 663 | {file = "mypy-0.910.tar.gz", hash = "sha256:704098302473cb31a218f1775a873b376b30b4c18229421e9e9dc8916fd16150"}, 664 | ] 665 | mypy-extensions = [ 666 | {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, 667 | {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, 668 | ] 669 | packaging = [ 670 | {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, 671 | {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, 672 | ] 673 | pathspec = [ 674 | {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, 675 | {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, 676 | ] 677 | pluggy = [ 678 | {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, 679 | {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, 680 | ] 681 | py = [ 682 | {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, 683 | {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, 684 | ] 685 | pycodestyle = [ 686 | {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, 687 | {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, 688 | ] 689 | pydocstyle = [ 690 | {file = "pydocstyle-6.1.1-py3-none-any.whl", hash = "sha256:6987826d6775056839940041beef5c08cc7e3d71d63149b48e36727f70144dc4"}, 691 | {file = "pydocstyle-6.1.1.tar.gz", hash = "sha256:1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc"}, 692 | ] 693 | pyflakes = [ 694 | {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, 695 | {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, 696 | ] 697 | pylint = [ 698 | {file = "pylint-2.10.0-py3-none-any.whl", hash = "sha256:2d01c6de5ea20443e3f7ed8ae285f75b2d4da92e840f10118ddb7da18a1e09df"}, 699 | {file = "pylint-2.10.0.tar.gz", hash = "sha256:dcf4a5dd7bc98c68790323f783d792423c1946e7a4a195e44d7b2c2d386f457d"}, 700 | ] 701 | pyparsing = [ 702 | {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, 703 | {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, 704 | ] 705 | pytest = [ 706 | {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, 707 | {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, 708 | ] 709 | pytest-cov = [ 710 | {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, 711 | {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, 712 | ] 713 | regex = [ 714 | {file = "regex-2021.8.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8764a78c5464ac6bde91a8c87dd718c27c1cabb7ed2b4beaf36d3e8e390567f9"}, 715 | {file = "regex-2021.8.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4551728b767f35f86b8e5ec19a363df87450c7376d7419c3cac5b9ceb4bce576"}, 716 | {file = "regex-2021.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:577737ec3d4c195c4aef01b757905779a9e9aee608fa1cf0aec16b5576c893d3"}, 717 | {file = "regex-2021.8.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c856ec9b42e5af4fe2d8e75970fcc3a2c15925cbcc6e7a9bcb44583b10b95e80"}, 718 | {file = "regex-2021.8.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3835de96524a7b6869a6c710b26c90e94558c31006e96ca3cf6af6751b27dca1"}, 719 | {file = "regex-2021.8.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cea56288eeda8b7511d507bbe7790d89ae7049daa5f51ae31a35ae3c05408531"}, 720 | {file = "regex-2021.8.3-cp36-cp36m-win32.whl", hash = "sha256:a4eddbe2a715b2dd3849afbdeacf1cc283160b24e09baf64fa5675f51940419d"}, 721 | {file = "regex-2021.8.3-cp36-cp36m-win_amd64.whl", hash = "sha256:57fece29f7cc55d882fe282d9de52f2f522bb85290555b49394102f3621751ee"}, 722 | {file = "regex-2021.8.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a5c6dbe09aff091adfa8c7cfc1a0e83fdb8021ddb2c183512775a14f1435fe16"}, 723 | {file = "regex-2021.8.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff4a8ad9638b7ca52313d8732f37ecd5fd3c8e3aff10a8ccb93176fd5b3812f6"}, 724 | {file = "regex-2021.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b63e3571b24a7959017573b6455e05b675050bbbea69408f35f3cb984ec54363"}, 725 | {file = "regex-2021.8.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:fbc20975eee093efa2071de80df7f972b7b35e560b213aafabcec7c0bd00bd8c"}, 726 | {file = "regex-2021.8.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:14caacd1853e40103f59571f169704367e79fb78fac3d6d09ac84d9197cadd16"}, 727 | {file = "regex-2021.8.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb350eb1060591d8e89d6bac4713d41006cd4d479f5e11db334a48ff8999512f"}, 728 | {file = "regex-2021.8.3-cp37-cp37m-win32.whl", hash = "sha256:18fdc51458abc0a974822333bd3a932d4e06ba2a3243e9a1da305668bd62ec6d"}, 729 | {file = "regex-2021.8.3-cp37-cp37m-win_amd64.whl", hash = "sha256:026beb631097a4a3def7299aa5825e05e057de3c6d72b139c37813bfa351274b"}, 730 | {file = "regex-2021.8.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:16d9eaa8c7e91537516c20da37db975f09ac2e7772a0694b245076c6d68f85da"}, 731 | {file = "regex-2021.8.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3905c86cc4ab6d71635d6419a6f8d972cab7c634539bba6053c47354fd04452c"}, 732 | {file = "regex-2021.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:937b20955806381e08e54bd9d71f83276d1f883264808521b70b33d98e4dec5d"}, 733 | {file = "regex-2021.8.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:28e8af338240b6f39713a34e337c3813047896ace09d51593d6907c66c0708ba"}, 734 | {file = "regex-2021.8.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c09d88a07483231119f5017904db8f60ad67906efac3f1baa31b9b7f7cca281"}, 735 | {file = "regex-2021.8.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:85f568892422a0e96235eb8ea6c5a41c8ccbf55576a2260c0160800dbd7c4f20"}, 736 | {file = "regex-2021.8.3-cp38-cp38-win32.whl", hash = "sha256:bf6d987edd4a44dd2fa2723fca2790f9442ae4de2c8438e53fcb1befdf5d823a"}, 737 | {file = "regex-2021.8.3-cp38-cp38-win_amd64.whl", hash = "sha256:8fe58d9f6e3d1abf690174fd75800fda9bdc23d2a287e77758dc0e8567e38ce6"}, 738 | {file = "regex-2021.8.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7976d410e42be9ae7458c1816a416218364e06e162b82e42f7060737e711d9ce"}, 739 | {file = "regex-2021.8.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9569da9e78f0947b249370cb8fadf1015a193c359e7e442ac9ecc585d937f08d"}, 740 | {file = "regex-2021.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459bbe342c5b2dec5c5223e7c363f291558bc27982ef39ffd6569e8c082bdc83"}, 741 | {file = "regex-2021.8.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4f421e3cdd3a273bace013751c345f4ebeef08f05e8c10757533ada360b51a39"}, 742 | {file = "regex-2021.8.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea212df6e5d3f60341aef46401d32fcfded85593af1d82b8b4a7a68cd67fdd6b"}, 743 | {file = "regex-2021.8.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a3b73390511edd2db2d34ff09aa0b2c08be974c71b4c0505b4a048d5dc128c2b"}, 744 | {file = "regex-2021.8.3-cp39-cp39-win32.whl", hash = "sha256:f35567470ee6dbfb946f069ed5f5615b40edcbb5f1e6e1d3d2b114468d505fc6"}, 745 | {file = "regex-2021.8.3-cp39-cp39-win_amd64.whl", hash = "sha256:bfa6a679410b394600eafd16336b2ce8de43e9b13f7fb9247d84ef5ad2b45e91"}, 746 | {file = "regex-2021.8.3.tar.gz", hash = "sha256:8935937dad2c9b369c3d932b0edbc52a62647c2afb2fafc0c280f14a8bf56a6a"}, 747 | ] 748 | requests = [ 749 | {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, 750 | {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, 751 | ] 752 | setuptools = [ 753 | {file = "setuptools-59.6.0-py3-none-any.whl", hash = "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"}, 754 | {file = "setuptools-59.6.0.tar.gz", hash = "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373"}, 755 | ] 756 | snowballstemmer = [ 757 | {file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"}, 758 | {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, 759 | ] 760 | toml = [ 761 | {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, 762 | {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, 763 | ] 764 | tomli = [ 765 | {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, 766 | {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, 767 | ] 768 | typed-ast = [ 769 | {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, 770 | {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, 771 | {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, 772 | {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, 773 | {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, 774 | {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, 775 | {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, 776 | {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, 777 | {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, 778 | {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, 779 | {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, 780 | {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, 781 | {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, 782 | {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, 783 | {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, 784 | {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, 785 | {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, 786 | {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, 787 | {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, 788 | {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, 789 | {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, 790 | {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, 791 | {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, 792 | {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, 793 | {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, 794 | {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, 795 | {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, 796 | {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, 797 | {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, 798 | {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, 799 | ] 800 | typing-extensions = [ 801 | {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, 802 | {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, 803 | {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, 804 | ] 805 | urllib3 = [ 806 | {file = "urllib3-1.26.6-py2.py3-none-any.whl", hash = "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4"}, 807 | {file = "urllib3-1.26.6.tar.gz", hash = "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"}, 808 | ] 809 | wrapt = [ 810 | {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, 811 | ] 812 | zipp = [ 813 | {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, 814 | {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, 815 | ] 816 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | # this is the default 3 | line-length = 100 4 | skip-string-normalization = true 5 | include = '\.pyi?$' 6 | exclude = ''' 7 | /( 8 | \.eggs 9 | | \.git 10 | | \.hg 11 | | \.mypy_cache 12 | | \.tox 13 | | \.venv 14 | | _build 15 | | buck-out 16 | | build 17 | | dist 18 | )/ 19 | ''' 20 | 21 | [tool.isort] 22 | # black compatible settings 23 | # https://github.com/timothycrosley/isort/issues/694 24 | multi_line_output = 3 25 | include_trailing_comma = true 26 | force_grid_wrap = 0 27 | use_parentheses = true 28 | line_length = 100 29 | 30 | [tool.pydocstyle] 31 | match = "(.*\\.py|zscroll)" 32 | 33 | [tool.poetry] 34 | name = "zscroll" 35 | version = "2.0.1" 36 | description = "A text scroller for panels or terminals" 37 | authors = ["Fox Kiester "] 38 | license = "GPL-3.0-only" 39 | readme = "README.org" 40 | repository = "https://github.com/noctuid/zscroll" 41 | keywords = ["bar", "panel", "text", "scroll", "scroller"] 42 | 43 | packages = [ 44 | { include = "zscroll" }, 45 | ] 46 | 47 | # no way to specify data_files 48 | # https://github.com/python-poetry/poetry/issues/890 49 | 50 | # doesn't work 51 | # [tool.poetry.scripts] 52 | # zscroll = "zscroll:main" 53 | 54 | [tool.poetry.dependencies] 55 | python = ">=3.6.2,<4.0" 56 | 57 | [tool.poetry.dev-dependencies] 58 | pytest = "^6.2.4" 59 | black = "^21.7b0" 60 | pytest-cov = "^2.12.1" 61 | codecov = "^2.1.12" 62 | flake8 = "^3.9.2" 63 | pylint = "^2.9.6" 64 | mypy = "^0.910" 65 | isort = "^5.9.3" 66 | pydocstyle = "^6.1.1" 67 | pycodestyle = "^2.7.0" 68 | pyflakes = "^2.3.1" 69 | mccabe = "^0.6.1" 70 | 71 | [build-system] 72 | requires = ["poetry-core>=1.0.0"] 73 | build-backend = "poetry.core.masonry.api" 74 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Zscroll setup script.""" 3 | from distutils.core import setup 4 | 5 | setup( 6 | name='zscroll', 7 | version='2.0.1', 8 | description='A text scroller for use with panels', 9 | author='Fox Kiester', 10 | author_email='noct[at]posteo[dot]net', 11 | url='https://github.com/noctuid/zscroll', 12 | license='GNU General Public License v3 (GPLv3)', 13 | keywords=["bar", "panel", "text", "scroll", "scroller"], 14 | # to the bin 15 | scripts=['zscroll'], 16 | data_files=[ 17 | ('share/man/man1', ['zscroll.1']), 18 | ('share/licenses/zscroll', ['LICENSE']), 19 | ('share/zsh/site-functions', ['completion/_zscroll']), 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /test_zscroll.py: -------------------------------------------------------------------------------- 1 | """Tests for zscroll.""" 2 | import contextlib 3 | import os 4 | from importlib.machinery import SourceFileLoader 5 | from shlex import split 6 | 7 | import pytest 8 | 9 | 10 | @pytest.fixture(name="z") 11 | def zscroll_module(): 12 | """Return zscroll module.""" 13 | # deprecated but the suggested replacement doesn't work 14 | return SourceFileLoader( # pylint: disable=deprecated-method 15 | 'zscroll', './zscroll' 16 | ).load_module("zscroll") 17 | 18 | 19 | @pytest.mark.parametrize( 20 | 'string,expected_length', 21 | [ 22 | ('foo bar', 7), 23 | ('ふば', 4), 24 | ('ふbar', 5), 25 | ], 26 | ) 27 | def test_visual_len(z, string, expected_length): 28 | """Test zscroll visual_len function.""" 29 | assert z.visual_len(string) == expected_length 30 | 31 | 32 | @pytest.mark.parametrize( 33 | 'string,new_length,new_string', 34 | [ 35 | ('foo bar', 5, 'foo b'), 36 | ('foo', 5, 'foo '), 37 | ('ふば', 3, 'ふ '), 38 | ('ふば', 2, 'ふ'), 39 | ], 40 | ) 41 | def test_make_visual_len(z, string, new_length, new_string): 42 | """Test zscroll make_visual_len function.""" 43 | assert z.make_visual_len(new_length, string) == new_string 44 | 45 | 46 | @pytest.mark.parametrize( 47 | 'command,result', 48 | [ 49 | ('echo test', 'test'), 50 | ('false', ''), 51 | ], 52 | ) 53 | def test_shell_output(z, command, result): 54 | """Test zscroll shell_output function.""" 55 | assert z.shell_output(command) == result 56 | 57 | 58 | @pytest.mark.parametrize('command,result', [('echo $(echo test)', 'test'), ('false', '')]) 59 | def test_eval_shell_output(z, command, result): 60 | """Test zscroll shell_output function with evaluation in shell.""" 61 | assert z.shell_output(command, True) == result 62 | 63 | 64 | @pytest.mark.parametrize( 65 | 'arg_string,result', 66 | [ 67 | # basic case with both fullwidth and halfwidth characters 68 | ( 69 | '-l 8 -b "b: " -a " :a" -p "|" -d 0.0000001 "aaいuえoわし"', 70 | [ 71 | 'b: aaいuえo :a', 72 | 'b: aいuえo :a', 73 | 'b: いuえoわ :a', 74 | 'b: uえoわ :a', 75 | 'b: uえoわし :a', 76 | 'b: えoわし| :a', 77 | 'b: oわし|a :a', 78 | 'b: oわし|aa :a', 79 | 'b: わし|aa :a', 80 | 'b: し|aaい :a', 81 | 'b: し|aaいu :a', 82 | 'b: |aaいu :a', 83 | 'b: |aaいuえ :a', 84 | 'b: aaいuえo :a', 85 | ], 86 | ), 87 | # test --reverse 88 | ( 89 | '-r true -l 8 -b "b: " -a " :a" -p "|" -d 0.0000001 "aaいuえoわし"', 90 | [ 91 | 'b: aaいuえo :a', 92 | 'b: |aaいuえ :a', 93 | 'b: |aaいu :a', 94 | 'b: し|aaいu :a', 95 | 'b: し|aaい :a', 96 | 'b: わし|aa :a', 97 | 'b: oわし|aa :a', 98 | 'b: oわし|a :a', 99 | 'b: えoわし| :a', 100 | 'b: uえoわし :a', 101 | 'b: uえoわ :a', 102 | 'b: いuえoわ :a', 103 | 'b: aいuえo :a', 104 | 'b: aaいuえo :a', 105 | ], 106 | ), 107 | # test --update-check 108 | ( 109 | '-l 8 -b "b: " -a " :a" -p "|" -d 0.0000001 -u true "echo aaいuえoわし"', 110 | [ 111 | 'b: aaいuえo :a', 112 | 'b: aいuえo :a', 113 | 'b: いuえoわ :a', 114 | 'b: uえoわ :a', 115 | 'b: uえoわし :a', 116 | 'b: えoわし| :a', 117 | 'b: oわし|a :a', 118 | 'b: oわし|aa :a', 119 | 'b: わし|aa :a', 120 | 'b: し|aaい :a', 121 | 'b: し|aaいu :a', 122 | 'b: |aaいu :a', 123 | 'b: |aaいuえ :a', 124 | 'b: aaいuえo :a', 125 | ], 126 | ), 127 | # test arguments that start with - 128 | ( 129 | '-l 8 -b "-b:" -a "-a" -p "--" -d 0.0000001 -- "-aいuえoわし"', 130 | [ 131 | '-b:-aいuえo-a', 132 | '-b:aいuえo -a', 133 | '-b:いuえoわ-a', 134 | '-b: uえoわ -a', 135 | '-b:uえoわし-a', 136 | '-b:えoわし--a', 137 | '-b: oわし---a', 138 | '-b:oわし----a', 139 | '-b:わし---a-a', 140 | '-b: し---a -a', 141 | '-b:し---aい-a', 142 | '-b: ---aいu-a', 143 | '-b:---aいu -a', 144 | '-b:--aいuえ-a', 145 | ], 146 | ), 147 | # test -m (and that change in -u will be immediately detected) 148 | ( 149 | '-l 8 -b "b: " -a " :a" -p "|" -d 0.0000001 -M "echo text"' 150 | + ' -m "text" "-u t -b > -a < -p \' | \' \'echo aaいuえoわし\'" "failed"', 151 | [ 152 | '>aaいuえo<', 153 | '>aいuえo <', 154 | '>いuえoわ<', 155 | '> uえoわ <', 156 | '>uえoわし<', 157 | '>えoわし <', 158 | '> oわし |<', 159 | '>oわし | <', 160 | '>わし | a<', 161 | '> し | aa<', 162 | '>し | aa <', 163 | '> | aaい<', 164 | '> | aaいu<', 165 | '>| aaいu <', 166 | ], 167 | ), 168 | # last -m should take precedence 169 | ( 170 | '-l 8 -b "b: " -a " :a" -p "|" -d 0.0000001 -M "echo txt"' 171 | + ' -m "txt" "-s no \'echo abcdefghijk\'" -M "echo text"' 172 | + ' -m "text" "-u t -b > -a < -p \' | \' \'echo aaいuえoわし\'" "failed"', 173 | [ 174 | '>aaいuえo<', 175 | '>aいuえo <', 176 | '>いuえoわ<', 177 | '> uえoわ <', 178 | '>uえoわし<', 179 | '>えoわし <', 180 | '> oわし |<', 181 | '>oわし | <', 182 | '>わし | a<', 183 | '> し | aa<', 184 | '>し | aa <', 185 | '> | aaい<', 186 | '> | aaいu<', 187 | '>| aaいu <', 188 | ], 189 | ), 190 | ], 191 | ) 192 | def test_zscroll(z, arg_string, result, capfd): 193 | """Test zscroll by output.""" 194 | argv = ['zscroll'] + split(arg_string) 195 | argv = z.pre_parse_argv(argv) 196 | z.parse_argv(argv) 197 | z.zscroll(14) 198 | out, _ = capfd.readouterr() 199 | out = out.rstrip().split('\n') 200 | assert out == result 201 | 202 | 203 | @pytest.mark.parametrize( 204 | 'arg_string', 205 | [ 206 | # no scroll-text specified 207 | ('-n true'), 208 | # no -M specified with -m 209 | ('-m match-text "-s no" scroll-text'), 210 | # number of -M > 1 but does not match number of -m 211 | ( 212 | '-M command1 -m text1 \'-s f\' -M command2 -m text2 \'-s f\'' 213 | + ' -m text3 \'-s f\' scroll-text' 214 | ), 215 | ], 216 | ) 217 | def test_validate_args(z, arg_string): 218 | """Test zscroll argument/flag validation.""" 219 | argv = ['zscroll'] + split(arg_string) 220 | argv = z.pre_parse_argv(argv) 221 | z.parse_argv(argv) 222 | with pytest.raises(SystemExit): 223 | # silence help text 224 | with contextlib.redirect_stdout( 225 | open(os.devnull, 'w') # pylint: disable=unspecified-encoding 226 | ): 227 | z.validate_args(z.args) 228 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length=100 3 | -------------------------------------------------------------------------------- /zscroll: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """A text scroller for panels or terminals.""" 3 | import argparse 4 | import sys 5 | from re import search 6 | from shlex import split 7 | from subprocess import CalledProcessError, check_output 8 | from time import sleep, time 9 | from unicodedata import east_asian_width 10 | 11 | 12 | def str_to_bool(string): 13 | """Convert a string (e.g. "true", "false", "yes", "no") to a boolean. 14 | 15 | :param string: the string to convert 16 | :type string: str 17 | 18 | :raise ValueError: raised when the string cannot be converted 19 | 20 | :return: the boolean interpretation of the string 21 | :rtype: bool 22 | """ 23 | return string.lower() in ["true", "t", "yes", "y", "1"] 24 | 25 | 26 | # pylint: disable-msg=C0103 27 | # pylint: disable-msg=W0603 28 | parser = argparse.ArgumentParser() 29 | 30 | # allow for a positional argument or piping into 31 | parser.add_argument( 32 | 'scroll_text', 33 | nargs='?', 34 | default=sys.stdin.read() if not sys.stdin.isatty() else None, 35 | help=""" 36 | text to scroll; will print in place if not longer than -l scroll 37 | length; can be read from stdin, e.g. echo text | zscroll 38 | """, 39 | ) 40 | 41 | parser.add_argument( 42 | '--always-reprint', 43 | type=str_to_bool, 44 | default=False, 45 | help="reprint text every delay even if it hasn't changed" 46 | ) 47 | 48 | parser.add_argument( 49 | '-l', 50 | '--length', 51 | type=int, 52 | default=40, 53 | help="length of scrolling text excluding padding (default: 40)", 54 | ) 55 | 56 | parser.add_argument( 57 | '-r', 58 | '--reverse', 59 | type=str_to_bool, 60 | default=False, 61 | help="whether to scroll the text from left to right (default: false)", 62 | ) 63 | 64 | parser.add_argument( 65 | '-b', 66 | '--before-text', 67 | default='', 68 | help=""" 69 | stationary padding text to display to the left of the scroll-text 70 | (default: "") 71 | """, 72 | ) 73 | 74 | parser.add_argument( 75 | '-a', 76 | '--after-text', 77 | default='', 78 | help=""" 79 | stationary padding text to display to the right of the scroll-text 80 | (default: "") 81 | """, 82 | ) 83 | 84 | parser.add_argument( 85 | '-p', 86 | '--scroll-padding', 87 | default=' - ', 88 | help=""" 89 | padding text to display between the start and end of the scroll-text 90 | only when it is scrolling (default: " - ") 91 | """, 92 | ) 93 | 94 | parser.add_argument( 95 | '-d', 96 | '--delay', 97 | type=float, 98 | default=0.4, 99 | help=""" 100 | delay (in seconds) for scrolling update; lower this for faster 101 | scrolling (default: 0.4) 102 | """, 103 | ) 104 | 105 | parser.add_argument( 106 | '-m', 107 | '--match-text', 108 | nargs=2, 109 | action='append', 110 | default=[], 111 | help=""" 112 | takes 2 arguments: the regexp to search for in match-command output to 113 | determine whether to change settings and the new settings themselves; 114 | see the man page for more info (default: none) 115 | """, 116 | ) 117 | 118 | parser.add_argument( 119 | '-M', 120 | '--match-command', 121 | action='append', 122 | default=[], 123 | help="command(s) to search output of (default: none)", 124 | ) 125 | 126 | parser.add_argument( 127 | '-t', 128 | '--timeout', 129 | type=float, 130 | default=0, 131 | help=""" 132 | time in seconds to wait before exiting; 0 means don't exit (default: 133 | 0) 134 | """, 135 | ) 136 | 137 | # no args 138 | parser.add_argument( 139 | '-s', 140 | '--scroll', 141 | type=str_to_bool, 142 | default=True, 143 | help="whether to scroll; meant to be used with -m (default: true)", 144 | ) 145 | 146 | parser.add_argument( 147 | '-u', 148 | '--update-check', 149 | type=str_to_bool, 150 | default=False, 151 | help=""" 152 | specifies that the positional argument is a command that should be 153 | checked to determine if the scroll-text should be updated; when the 154 | output changes, the scroll-text is updated to the new output (default: 155 | false) 156 | """, 157 | ) 158 | 159 | parser.add_argument( 160 | '-U', 161 | '--update-interval', 162 | type=float, 163 | default=0, 164 | help=""" 165 | time in seconds to wait in between running update checking commands 166 | (i.e. the command specified by the positional argument when 167 | -u/--update-interval is specified and commands specified with 168 | -M/--match-command) (default: 0) 169 | """, 170 | ) 171 | 172 | parser.add_argument( 173 | '-e', 174 | '--eval-in-shell', 175 | type=str_to_bool, 176 | default=False, 177 | help=""" 178 | executes -M/--match-command and the positional argument in the shell 179 | (-u/--update-check must be true too) which allows the use of 180 | environment variables (e.g. "$PWD"), subshells (e.g. 'echo 181 | "$(/path/to/script)"'), piping, etc.; watch out to quote the commands 182 | right to prevent unwanted command injection (default: false) 183 | """, 184 | ) 185 | 186 | parser.add_argument( 187 | '-n', 188 | '--newline', 189 | type=str_to_bool, 190 | default=True, 191 | help=""" 192 | print a newline after each update; printing a newline may be 193 | necessary for panels (default: true) 194 | """, 195 | ) 196 | 197 | initial_args = None 198 | args = None 199 | scroll_text = None 200 | last_text_len = None 201 | last_update_check_time = None 202 | 203 | 204 | def visual_len(text): 205 | """Determine the "visual" length of text. 206 | 207 | Halfwidth characters are counted as length 1 and fullwidth characters are 208 | counted as length 2. 209 | 210 | :param text: the text to examine 211 | :type text: str 212 | 213 | :return: the visual length of the text 214 | :rtype: int 215 | """ 216 | visual_length = 0 217 | for char in text: 218 | width = east_asian_width(char) 219 | if width in ('W', 'F'): 220 | visual_length += 2 221 | else: 222 | visual_length += 1 223 | return visual_length 224 | 225 | 226 | def make_visual_len(desired_visual_length, text): 227 | """Coerce the text to the given "visual" length. 228 | 229 | The text will be altered by removing characters and padding with spaces as 230 | necessary to reach the exact desired length. 231 | 232 | :param desired_visual_length: the desired visual length 233 | :type desired_visual_length: int 234 | 235 | :param text: the text to modify 236 | :type text: str 237 | 238 | :return: the altered text 239 | :rtype: str 240 | """ 241 | visual_length = 0 242 | altered_text = '' 243 | for char in text: 244 | if visual_length < desired_visual_length: 245 | width = east_asian_width(char) 246 | if width in ('W', 'F'): 247 | visual_length += 2 248 | else: 249 | visual_length += 1 250 | altered_text += char 251 | else: 252 | break 253 | if visual_length == desired_visual_length + 1: 254 | # remove final wide character and add a single space as padding 255 | altered_text = altered_text[:-1] + ' ' 256 | elif visual_length < desired_visual_length: 257 | altered_text += ' ' * (desired_visual_length - visual_length) 258 | return altered_text 259 | 260 | 261 | def shell_output(command, shell=False): 262 | """Get the output of a shell command as a string. 263 | 264 | If the command fails, return "". This is useful in certain cases where a 265 | command may not work initially but will work later so that zscroll does not 266 | need to be restarted (e.g. mpc command fails because mpd is not yet 267 | running). 268 | 269 | :param command: the command to run 270 | :type command: str 271 | 272 | :return: the command output 273 | :rtype: str 274 | """ 275 | try: 276 | return ( 277 | check_output(command if shell else split(command), shell=shell) 278 | .decode(encoding='UTF-8') 279 | .rstrip('\n') 280 | ) 281 | except CalledProcessError: 282 | return '' 283 | 284 | 285 | def update_check(): 286 | """Update the scroll-text if the command output has changed. 287 | 288 | :return: whether the scroll-text has changed 289 | :rtype: bool 290 | """ 291 | global scroll_text 292 | compare_text = shell_output(args.scroll_text, args.eval_in_shell) 293 | if scroll_text != compare_text: 294 | scroll_text = compare_text 295 | return True 296 | return False 297 | 298 | 299 | def set_args(new_args): 300 | """Update args without altering the match text and command lists. 301 | 302 | :param new_args: the new arguments to set args to 303 | :type new_args: argparse.Namespace 304 | """ 305 | global args 306 | args = new_args 307 | # -m and -M should never be altered 308 | args.match_command = initial_args.match_command 309 | args.match_text = initial_args.match_text 310 | 311 | 312 | def match_update_args(): 313 | """Check match-command(s) for match-text and update args if necessary. 314 | 315 | :return: whether the scroll-text was changed 316 | :rtype: bool 317 | """ 318 | match_args = None 319 | search_text = shell_output(args.match_command[0], args.eval_in_shell) 320 | text_was_updated = False 321 | for i, match_text in enumerate(args.match_text): 322 | if len(args.match_command) > 1 and i > 0: 323 | search_text = shell_output(args.match_command[i], args.eval_in_shell) 324 | if search(match_text[0], search_text): 325 | match_args = parser.parse_args(split(match_text[1])) 326 | text_was_updated = ( 327 | match_args.before_text != args.before_text 328 | or match_args.after_text != args.after_text 329 | or match_args.scroll_padding != args.scroll_padding 330 | or match_args.scroll_text != args.scroll_text 331 | ) 332 | if match_args: 333 | set_args(match_args) 334 | return text_was_updated 335 | 336 | 337 | def build_display_text(text, needs_scrolling, pad_with_space): 338 | """Shorten text if necessary and add static left and right padding to it. 339 | 340 | :param text: the text to add the left and right padding to 341 | :type text: str 342 | 343 | :param needs_scrolling: whether the text is long enough to be scrolled 344 | :type needs_scrolling: bool 345 | 346 | :param pad_with_space: whether to pad the beginning with a space (used when 347 | phasing in or out a fullwidth character) 348 | :type pad_with_space: bool 349 | 350 | :return: the altered text 351 | :rtype: str 352 | """ 353 | if needs_scrolling: 354 | if pad_with_space: 355 | text = ' ' + text 356 | text = make_visual_len(args.length, text) 357 | return args.before_text + text + args.after_text 358 | 359 | 360 | def print_text(text): 361 | """Print text in place or with newlines depending on the user's settings. 362 | 363 | :param text: the text to print 364 | :type text: str 365 | """ 366 | # flush is necessary for lemonbar/panels (but not in terminal) 367 | global last_text_len 368 | text_len = visual_len(text) 369 | if args.newline: 370 | print(text, flush=True) 371 | else: 372 | if last_text_len and text_len < last_text_len: 373 | # need to overwrite previous characters with spaces 374 | text = make_visual_len(last_text_len, text) 375 | print(text, end='\r', flush=True) 376 | last_text_len = text_len 377 | 378 | 379 | def maybe_update_text_and_settings(): 380 | """Update the scroll-text and/or settings if necessary. 381 | 382 | :return: whether the text and/or settings were updated 383 | :rtype: bool 384 | """ 385 | global last_update_check_time 386 | updated = False 387 | if ( 388 | not args.update_interval 389 | or last_update_check_time is None 390 | or last_update_check_time + args.update_interval < time() 391 | ): 392 | if len(args.match_command) >= 1 and match_update_args(): 393 | updated = True 394 | # want to always check, especially if new match (because -u setting 395 | # could have changed) 396 | if args.update_check and update_check(): 397 | updated = True 398 | last_update_check_time = time() 399 | return updated 400 | 401 | 402 | def zscroll(lines=0): 403 | """Update settings as needed and continuously prints scroll-text. 404 | 405 | :param lines: the number of lines to print (used for testing/debugging 406 | purposes) 407 | :type lines: int 408 | """ 409 | # don't modify global var when shifting; keep for comparison 410 | shift_text = scroll_text 411 | should_restart_printing = True 412 | needs_scrolling = False 413 | last_hidden_was_wide = False 414 | next_hidden_is_wide = True 415 | end_time = time() + args.timeout 416 | num_lines = 0 417 | while True: 418 | if (args.timeout and time() > end_time) or (lines > 0 and num_lines == lines): 419 | break 420 | num_lines += 1 421 | if maybe_update_text_and_settings(): 422 | should_restart_printing = True 423 | if should_restart_printing: 424 | shift_text = scroll_text 425 | last_hidden_was_wide = False 426 | next_hidden_is_wide = False 427 | needs_scrolling = visual_len(scroll_text) > args.length 428 | if needs_scrolling: 429 | shift_text += args.scroll_padding 430 | display_text = build_display_text( 431 | shift_text, 432 | needs_scrolling, 433 | (last_hidden_was_wide or next_hidden_is_wide), 434 | ) 435 | if args.always_reprint or (args.scroll and needs_scrolling) or should_restart_printing: 436 | print_text(display_text) 437 | should_restart_printing = False 438 | if args.scroll and needs_scrolling: 439 | if last_hidden_was_wide: 440 | # don't shift the text for one update 441 | last_hidden_was_wide = False 442 | elif next_hidden_is_wide: 443 | next_hidden_is_wide = False 444 | shift_text = shift_text[-1] + shift_text[0:-1] 445 | else: 446 | if args.reverse: 447 | if visual_len(shift_text[-1]) == 2: 448 | # phase in in two steps 449 | next_hidden_is_wide = True 450 | else: 451 | shift_text = shift_text[-1] + shift_text[0:-1] 452 | else: 453 | last_hidden_was_wide = visual_len(shift_text[0]) == 2 454 | shift_text = shift_text[1:] + shift_text[0] 455 | sleep(args.delay) 456 | 457 | 458 | def pre_parse_argv(argv): 459 | """Ensure that argv can be properly parsed by argparse. 460 | 461 | This is a workaround for the fact that argparse treats everything that 462 | starts with a hyphen as an option even after options that take a fixed 463 | number of arguments (https://bugs.python.org/issue9334). 464 | 465 | :param argv: the argument list as obtained from sys.argv 466 | :type argv: list 467 | 468 | :return: the pre-parsed argv list 469 | :rtype: list 470 | """ 471 | for i in range(1, len(argv)): 472 | # note: don't need to check for --opt= because these work correctly 473 | if argv[i] in { 474 | '-b', 475 | '--before-text', 476 | '-a', 477 | '--after-text', 478 | '-p', 479 | '--scroll-padding', 480 | # unlikely to be an issue 481 | '-M', 482 | '--match-command', 483 | }: 484 | argv[i + 1] = ' ' + argv[i + 1] 485 | elif argv[i] in {'-m', '--match-text'}: 486 | argv[i + 1] = ' ' + argv[i + 1] 487 | argv[i + 2] = ' ' + argv[i + 2] 488 | return argv 489 | 490 | 491 | def parse_argv(argv): 492 | """Parse command line arguments and update default values. 493 | 494 | Also remove leading spaces that wee added to arguments to prevent argparse 495 | from incorrectly parsing them. 496 | 497 | :param argv: the argument list as obtained from sys.argv 498 | :type argv: list 499 | """ 500 | global initial_args, args, scroll_text 501 | args = parser.parse_args(argv[1:]) 502 | args.before_text = args.before_text.replace(' ', '', 1) 503 | args.after_text = args.after_text.replace(' ', '', 1) 504 | if args.scroll_padding != ' - ': 505 | args.scroll_padding = args.scroll_padding.replace(' ', '', 1) 506 | args.match_text = [[j.replace(' ', '', 1) for j in i] for i in args.match_text] 507 | args.match_command = [i.replace(' ', '', 1) for i in args.match_command] 508 | 509 | initial_args = args 510 | # if -u was specified, this will be correctly updated later 511 | scroll_text = args.scroll_text 512 | # update defaults to those specified by the users 513 | parser.set_defaults(**vars(args)) 514 | 515 | 516 | def validate_args(check_args): 517 | """Ensure that user-given arguments are valid. 518 | 519 | Exit with an error message if the arguments are not valid. 520 | 521 | :param check_args: the args to check 522 | :type check_args: argparse.Namespace 523 | """ 524 | if not check_args.scroll_text: 525 | parser.print_help() 526 | sys.exit("Text to scroll must be specified.") 527 | if len(check_args.match_text) > 0 and len(check_args.match_command) == 0: 528 | parser.print_help() 529 | sys.exit("At least one -M is necessary for -m.") 530 | if len(check_args.match_command) > 1 and len(check_args.match_command) != len( 531 | check_args.match_text 532 | ): 533 | parser.print_help() 534 | sys.exit("If there is more than one '-M', the number must match the" + " number of '-m's.") 535 | 536 | 537 | def main(): 538 | """Scroll text, handling invalid opts and keyboard interrupts.""" 539 | argv = pre_parse_argv(sys.argv) 540 | parse_argv(argv) 541 | validate_args(args) 542 | for arg_string in args.match_text: 543 | arg_string = arg_string[1] 544 | match_args = parser.parse_args(split(arg_string)) 545 | # -m and -M should never be altered 546 | # ignore them if the user tries to alter them even if they are wrong 547 | match_args.match_command = args.match_command 548 | match_args.match_text = args.match_text 549 | validate_args(match_args) 550 | try: 551 | zscroll() 552 | except KeyboardInterrupt: 553 | sys.exit(0) 554 | 555 | 556 | if __name__ == '__main__': 557 | main() 558 | -------------------------------------------------------------------------------- /zscroll.1: -------------------------------------------------------------------------------- 1 | .\" Manpage for zscroll. 2 | .\" Please make an issue on the online repository if you find errors or typos. 3 | .TH ZSCROLL 1 "11 MARCH 2015" "zscroll 2.0.1" "zscroll man page" 4 | .SH NAME 5 | zscroll - A text scroller for panels or terminals 6 | .SH SYNOPSIS 7 | zscroll [\fIOPTIONS\fR] [scroll-text or shell command] 8 | .SH DESCRIPTION 9 | Zscroll is used to create continuously scrolling text (e.g. in a panel). The text to scroll can be piped into zscroll or given as a positional argument. Zscroll allows for dynamically updating what text is scrolled without having to start a new zscroll instance. 10 | .SH BOOLEAN VALUES 11 | Boolean arguments can be specified in all common ways and in upper, lower, or mixed case (true, t, yes, y, and 1; false, f, no, n, and 0). 12 | .SH OPTIONS 13 | .TP 14 | \fB-h\fR, \fB --help\fR 15 | Print help text. 16 | .TP 17 | \fB-l LENGTH\fR, \fB --length=LENGTH\fR 18 | Specify a character length for the text to be scrolled in. If the text given is less than this length, zscroll will not scroll it but just print in place. (default: 40) 19 | .TP 20 | \fB-r BOOL\fR, \fB --reverse=BOOL\fR 21 | Specify whether the text should be scrolled in reverse order (from left to right). (default: false) 22 | .TP 23 | \fB-b PADDING\fR, \fB --before-text=PADDING\fR 24 | Specify static padding text that will always be displayed to the left of the scrolling section. (default: "") 25 | .TP 26 | \fB-a PADDING\fR, \fB --after-text=PADDING\fR 27 | Specify static padding text that will always be displayed to the right of the scrolling section. (default: "") 28 | .TP 29 | \fB-p PADDING\fR, \fB --scroll-padding=PADDING\fR 30 | Specify padding text that will be displayed in between the start and end of displayed text only when it is scrolling. (default: " - ") 31 | .TP 32 | \fB-s BOOL\fR, \fB --scroll=BOOL\fR 33 | Specify whether or not the text should be scrolled. If false, the text will never be scrolled even if it is long enough. This command is primarily meant for use with -m. (default: true) 34 | .TP 35 | \fB-m REGEXP OPTIONS\fR, \fB --match-text REGEXP OPTIONS\fR 36 | Specify a regexp search term to look for in the output of the corresponding --match-command. When found, the settings will be changed. Using this flag allows the user to specify any option (besides -m and -M, which will be ignored) and optionally the positional scroll-text argument multiple times. Settings that are not specified will default to the user-specified values outside of the --match-text or the base defaults (when those options were not set by the user). (default: none) 37 | .TP 38 | \fB-M COMMAND\fR, \fB --match-command=COMMAND\fR 39 | Specify a command to search the output of. This option is required for -m to work. The user can either specify one -M for all -m searches or an equal number of both. (default: none) 40 | .TP 41 | \fB-d TIME\fR, \fB --delay=TIME\fR 42 | Specify the delay between scroll steps. (default: 0.4) 43 | .TP 44 | \fB-u BOOL\fR, \fB --update-check=BOOL\fR 45 | Specify that the positional argument refers to a command that should be run to obtain the text to scroll. Whenever the output of this command changes, the text will be updated accordingly. (default: false) 46 | .TP 47 | \fB-U TIME\fR, \fB --update-interval=TIME\fR 48 | Specify the time in seconds to wait in between running update checking commands. This applies to the positional argument when -u/--update-check is specified and to commands specified with -M/--match-command. This may be useful if the scrolling text only needs to be updated infrequently or if continuously running the update checking command(s) is resource intensive. (default: 0) 49 | .TP 50 | \fB-e BOOL\fR, \fB --eval-in-shell=BOOL\fR 51 | Executes -M/--match-command and the positional argument in the shell (-u/--update-check must be true too) which allows the use of environment variables (e.g. "$PWD"), subshells (e.g. 'echo "$(/path/to/script)"'), piping, etc. Watch out to quote the commands right to prevent unwanted command injection. See https://docs.python.org/3/library/subprocess.html#security-considerations for further shell security related information. (default: false) 52 | .TP 53 | \fB-n BOOL\fR, \fB --newline=BOOL\fR 54 | Add a newline after every update/step (may be necessary for use with panels). Takes no argument. (default: true) 55 | .TP 56 | \fB\-t TIME\fR, \fB \-\-timeout=TIME\fR 57 | Time in seconds to run before closing. An argument of zero implies infinite duration. (default: 0) 58 | \fB \-\-always\-reprint=BOOL\fR 59 | Whether to reprint unchanged text after the specified delay (default: false) 60 | .SH EXAMPLES 61 | These examples are meant for testing in the terminal (remove the "-n false" for use with panels). 62 | 63 | Scroll currently playing mpd song with mpc: 64 | .br 65 | $ zscroll -n false -b "playing: " "$(mpc current)" 66 | 67 | Continually update the playing song: 68 | .br 69 | $ zscroll -n false -u true -b "playing: " "mpc current" 70 | 71 | You can also pipe into zscroll: 72 | .br 73 | $ xtitle | zscroll -l 60 74 | 75 | Full shell instructions can be passed too: 76 | .br 77 | $ zscroll -u true -e true 'echo Unix Time: "$(date +%s)"' 78 | 79 | An example that will stop scrolling the song when it is paused and change the before padding text depending on the state of the song: 80 | .br 81 | $ zscroll -n f -u t -b "x" -d 0.3 -M "mpc status" -m "playing" \\ 82 | .br 83 | "-b 'playing: '" -m "paused" "-b 'paused: ' -s f" "mpc current" & 84 | 85 | Note that settings specified with an -m will only apply if that text was just matched. In this case, the default -s is not altered, but the default -b is. 86 | 87 | .SH SEE ALSO 88 | lemonbar(1), polybar(1) 89 | .SH BUGS 90 | If you encounter any bugs, please make an issue on the online repository's bug tracker. 91 | .SH AUTHOR 92 | Fox Kiester 93 | .br 94 | Source: https://github.com/noctuid/zscroll 95 | --------------------------------------------------------------------------------