├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── README.md ├── components ├── __init__.py ├── globals.py ├── job_queue.py ├── keys.py ├── sources.py ├── widgets │ ├── __init__.py │ ├── nodes.py │ ├── progress.py │ └── queue.py └── windows.py ├── img ├── both.png ├── input.png ├── preview.gif └── table.png ├── licenses ├── oauthlib.txt ├── requests-oauthlib.txt ├── requests.txt └── socialreaper.txt ├── reaper.py ├── requirements.txt ├── scripts ├── mac.sh ├── setup.iss └── windows.bat ├── sources.xml ├── sources ├── deviantart.xml ├── eventbrite.xml ├── facebook.xml ├── hackernews.xml ├── imgur.xml ├── linkedin.xml ├── meetup.xml ├── newsapi.xml ├── pinterest.xml ├── reddit.xml ├── source.dtd ├── tumblr.xml ├── twitch.xml ├── twitter.xml ├── vk.xml └── youtube.xml └── ui ├── down.png ├── icon.icns ├── icon.ico ├── icon.png ├── icon.svg ├── mainwindow.py ├── mainwindow.ui ├── read.png ├── remove.png ├── splash.png └── up.png /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | dist/ 3 | build/ 4 | build_packages/ 5 | __pycache__/ 6 | *.spec 7 | *.zip 8 | *.bak 9 | *.tar.gz 10 | *.log 11 | makefile 12 | *.venv 13 | *.csv 14 | *.json 15 | Output/ 16 | .DS_Store 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.5" 4 | - "3.6" 5 | - "3.7" 6 | - "nightly" 7 | install: "pip install -r requirements.txt" 8 | script: pyinstalller reaper.py -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

Reaper

6 | 7 | 8 | [![Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=reaper.social)](https://reaper.social) 9 | ![Github All Releases](https://img.shields.io/github/downloads/scriptsmith/reaper/total.svg) 10 | [![GitHub license](https://img.shields.io/github/license/scriptsmith/reaper.svg)](https://github.com/ScriptSmith/reaper/blob/master/LICENSE.txt) 11 | [![Gitter](https://img.shields.io/gitter/room/socialreaper/socialreaper.svg)](https://gitter.im/socialreaper) 12 | 13 | Reaper is a PyQt5 GUI that scrapes Facebook, Twitter, Reddit, Youtube, Pinterest, and Tumblr APIs 14 | using [socialreaper](https://github.com/ScriptSmith/socialreaper) 15 | 16 |

17 | 18 |

19 | 20 | Are you a developer? [Try the Python package](https://github.com/ScriptSmith/socialreaper) 21 | 22 | 23 | ## Features 24 | - Support for 6 social media platforms 25 | - CSV output 26 | - Instructions for getting API keys 27 | - API key management 28 | - Download queuing system 29 | - Error management 30 | - Disk caching for big data 31 | - Ability to read a list of inputs from CSV and text files 32 | - Ability to append to exsting data 33 | - **Dark** theme 34 | - UTF-8 and ASCII support 35 | 36 | ## Download 37 | To download the latest builds for your platform, check out the [releases](https://github.com/ScriptSmith/reaper/releases) 38 | 39 | Installers and standalone versions are available for Windows and macOS 40 | 41 | ## Usage 42 | 43 | Instructions for using Reaper are available on [reaper.social](https://reaper.social) 44 | 45 | ## Run source 46 | Reaper uses string formatting that was added in Python 3.6. You need to run Reaper with Python 3.6+ or download a pre-built version from the [releases](https://github.com/ScriptSmith/reaper/releases) 47 | 48 | Download 49 | ``` 50 | git clone https://github.com/ScriptSmith/reaper.git 51 | cd reaper 52 | ``` 53 | Run 54 | ``` 55 | pip3 install -r requirements.txt 56 | python3 reaper.py 57 | ``` 58 | -------------------------------------------------------------------------------- /components/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/components/__init__.py -------------------------------------------------------------------------------- /components/globals.py: -------------------------------------------------------------------------------- 1 | import appdirs 2 | import sys 3 | import os 4 | 5 | APP_NAME = "Reaper" 6 | APP_AUTHOR = "UQ" 7 | 8 | DATA_DIR = appdirs.user_data_dir(APP_NAME, APP_AUTHOR) 9 | LOG_DIR = appdirs.user_log_dir(APP_NAME, APP_AUTHOR) 10 | CACHE_DIR = appdirs.user_cache_dir(APP_NAME, APP_AUTHOR) 11 | 12 | def _calc_path(path): 13 | head, tail = os.path.split(path) 14 | if tail == 'reaper': 15 | return path 16 | else: 17 | return _calc_path(head) 18 | 19 | BUNDLE_DIR = sys._MEIPASS if getattr(sys, "frozen", False) else \ 20 | _calc_path(os.path.dirname(os.path.abspath(__file__))) 21 | -------------------------------------------------------------------------------- /components/job_queue.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | from os import path, makedirs 3 | from shutil import rmtree 4 | from pickle import dump, load 5 | from time import sleep 6 | from traceback import format_exc 7 | from uuid import uuid4 8 | 9 | from PyQt5 import QtCore 10 | 11 | import socialreaper 12 | from socialreaper import IterError 13 | 14 | from components.globals import * 15 | 16 | 17 | class QueueState(Enum): 18 | RUNNING = "running" 19 | STOPPED = "stopped" 20 | 21 | 22 | class JobState(Enum): 23 | STOPPED = "stopped" 24 | RUNNING = "running" 25 | QUEUED = "queued" 26 | SAVING = "saving" 27 | FINISHED = "finished" 28 | 29 | 30 | class JobData: 31 | 32 | def __init__(self, cache=True): 33 | self.MAX_ROWS = 1000 34 | 35 | self.cache_enabled = cache 36 | self.location = path.join(CACHE_DIR, str(uuid4())) 37 | self.cache_count = 0 38 | self.failed = False 39 | 40 | self.data = [] 41 | self.keys = set() 42 | self.count = 0 43 | 44 | def add_row(self, row): 45 | flat_data = socialreaper.tools.flatten(row) 46 | self.data.append(flat_data) 47 | 48 | self.count += 1 49 | 50 | keys = flat_data.keys() 51 | if keys != self.keys: 52 | self.keys.update(keys) 53 | 54 | if self.cache_enabled: 55 | self.cache() 56 | 57 | def cache(self): 58 | if self.failed or (self.count % self.MAX_ROWS != 0): 59 | return 60 | else: 61 | if self.cache_count == 0: 62 | try: 63 | makedirs(self.location) 64 | except OSError: 65 | self.failed = True 66 | return 67 | 68 | location = path.join(self.location, str(self.cache_count)) 69 | try: 70 | with open(location, "wb") as f: 71 | dump(self.data, f) 72 | self.data = [] 73 | self.cache_count += 1 74 | except IOError: 75 | self.failed = True 76 | 77 | def read(self): 78 | return self.JobDataIter(self) 79 | 80 | class JobDataIter: 81 | 82 | def __init__(self, job_data): 83 | self.job_data = job_data 84 | self.cache_count = 0 85 | self.finished_cache = False 86 | 87 | self.data = [] 88 | self.i = 0 89 | 90 | def __iter__(self): 91 | return self 92 | 93 | def read_cache_i(self, i): 94 | location = path.join(self.job_data.location, str(i)) 95 | 96 | try: 97 | with open(location, "rb") as f: 98 | self.data = load(f) 99 | self.i = 0 100 | self.cache_count += 1 101 | except IOError as e: 102 | print(e) 103 | raise e 104 | 105 | def read_memory(self): 106 | self.data = self.job_data.data 107 | self.i = 0 108 | self.finished_cache = True 109 | 110 | def read_row(self): 111 | row = self.data[self.i] 112 | self.i += 1 113 | 114 | for key in self.job_data.keys: 115 | if not row.get(key): 116 | row[key] = "" 117 | 118 | return row 119 | 120 | def clean_up(self): 121 | rmtree(self.job_data.location, ignore_errors=True) 122 | 123 | def __next__(self): 124 | if not self.finished_cache: 125 | if ( 126 | self.cache_count <= self.job_data.cache_count 127 | ) and self.job_data.cache_count != 0: 128 | if self.i < len(self.data): 129 | return self.read_row() 130 | else: 131 | if self.cache_count == self.job_data.cache_count: 132 | self.cache_count += 1 133 | else: 134 | self.read_cache_i(self.cache_count) 135 | return self.__next__() 136 | else: 137 | self.read_memory() 138 | return self.__next__() 139 | else: 140 | if self.i < len(self.data): 141 | return self.read_row() 142 | else: 143 | self.clean_up() 144 | raise StopIteration 145 | 146 | 147 | class Job: 148 | error_log = QtCore.pyqtSignal(str) 149 | 150 | def __init__( 151 | self, 152 | outputPath, 153 | sourceName, 154 | sourceFunction, 155 | functionArgs, 156 | sourceKeys, 157 | append, 158 | keyColumn, 159 | encoding, 160 | cache, 161 | job_update, 162 | job_error_log, 163 | ): 164 | self.source = eval(f"socialreaper.{sourceName}(**{sourceKeys})") 165 | self.source.api.log_function = self.log 166 | self.log_function = job_error_log 167 | self.error = None 168 | 169 | self.iterator = eval(f"self.source.{sourceFunction}({functionArgs})") 170 | self.outputPath = outputPath 171 | self.sourceName = sourceName 172 | self.sourceFunction = sourceFunction 173 | self.functionArgs = functionArgs 174 | self.sourceKeys = sourceKeys 175 | 176 | self.append = append 177 | self.keyColumn = keyColumn 178 | self.encoding = encoding 179 | self.cache = cache 180 | 181 | self.state = JobState.STOPPED 182 | self.job_update = job_update 183 | self.log_data = "" 184 | self.data = JobData(cache) 185 | 186 | def log(self, string): 187 | self.log_function.emit(str(string)) 188 | 189 | def inc_data(self): 190 | self.state = JobState.RUNNING 191 | try: 192 | value = next(self.iterator) 193 | self.data.add_row(value) 194 | self.job_update.emit(self) 195 | return value 196 | except StopIteration: 197 | try: 198 | return self.end_job() 199 | except Exception as e: 200 | self.log(format_exc()) 201 | except IterError as e: 202 | self.error = e 203 | raise e 204 | 205 | def end_job(self): 206 | self.state = JobState.SAVING 207 | self.job_update.emit(self) 208 | socialreaper.tools.CSV( 209 | self.data.read(), 210 | file_name=self.outputPath, 211 | flat=False, 212 | append=self.append, 213 | key_column=self.keyColumn, 214 | encoding=self.encoding, 215 | fill_gaps=False, 216 | field_names=sorted(self.data.keys), 217 | ) 218 | self.state = JobState.FINISHED 219 | self.job_update.emit(self) 220 | return False 221 | 222 | def send_update(self): 223 | if self.state == JobState.RUNNING: 224 | if self.iterator.total % 20: 225 | self.job_update.emit(self) 226 | else: 227 | return 228 | 229 | self.job_update.emit(self) 230 | 231 | def pickle(self): 232 | self.log_function = None 233 | self.job_update = None 234 | 235 | dir = LOG_DIR 236 | 237 | if not path.exists(dir): 238 | makedirs(dir) 239 | 240 | with open(f"{dir}/out.pickle", "wb") as f: 241 | dump(self, f) 242 | 243 | 244 | class Queue(QtCore.QThread): 245 | job_update = QtCore.pyqtSignal(Job) 246 | queue_update = QtCore.pyqtSignal(list) 247 | queue_selected = QtCore.pyqtSignal(list) 248 | job_error = QtCore.pyqtSignal(Job) 249 | job_error_log = QtCore.pyqtSignal(str) 250 | 251 | def __init__(self, window): 252 | super().__init__() 253 | 254 | self.state = QueueState.STOPPED 255 | 256 | self.window = window 257 | self.jobs = [] 258 | 259 | self.currentJobState = None 260 | 261 | self.start() 262 | self.add_actions() 263 | 264 | def add_actions(self): 265 | self.window.queueStart.clicked.connect(self.start_queue) 266 | self.window.queueStop.clicked.connect(self.stop) 267 | self.window.queueClear.clicked.connect(self.clear) 268 | self.window.queueUp.clicked.connect(self.up) 269 | self.window.queueDown.clicked.connect(self.down) 270 | self.window.queueRemove.clicked.connect(self.remove) 271 | 272 | def start_queue(self): 273 | for job in self.jobs: 274 | job.state = JobState.QUEUED 275 | self.state = QueueState.RUNNING 276 | self.queue_update.emit(self.jobs) 277 | 278 | def stop(self): 279 | self.state = QueueState.STOPPED 280 | for job in self.jobs: 281 | job.state = JobState.STOPPED 282 | self.queue_update.emit(self.jobs) 283 | 284 | def clear(self): 285 | self.jobs.clear() 286 | self.queue_update.emit(self.jobs) 287 | 288 | def up(self): 289 | indexes = self.window.queue_table.selected_jobs() 290 | for i, index in enumerate(indexes): 291 | if index > 0: 292 | self.jobs.insert(index - 1, self.jobs.pop(index)) 293 | indexes[i] = indexes[i] - 1 294 | self.queue_update.emit(self.jobs) 295 | self.queue_selected.emit(indexes) 296 | 297 | def down(self): 298 | indexes = self.window.queue_table.selected_jobs() 299 | for i, index in enumerate(indexes): 300 | if index < len(self.jobs) - 1: 301 | self.jobs.insert(index + 1, self.jobs.pop(index)) 302 | indexes[i] = indexes[i] + 1 303 | self.queue_update.emit(self.jobs) 304 | self.queue_selected.emit(indexes) 305 | 306 | def remove(self): 307 | indexes = self.window.queue_table.selected_jobs() 308 | self.jobs = [job for job_i, job in enumerate(self.jobs) if job_i not in indexes] 309 | self.queue_update.emit(self.jobs) 310 | 311 | def add_jobs(self, details): 312 | try: 313 | for params in details: 314 | self.jobs.append( 315 | Job( 316 | *params, 317 | self.window.encoding, 318 | self.window.cache_enabled, 319 | self.job_update, 320 | self.job_error_log, 321 | ) 322 | ) 323 | except Exception as e: 324 | self.job_error_log.emit(format_exc()) 325 | 326 | self.queue_update.emit(self.jobs) 327 | 328 | def test(self): 329 | print("Hello") 330 | 331 | def run(self): 332 | while True: 333 | try: 334 | if self.state == QueueState.RUNNING: 335 | self.inc_job() 336 | elif self.state == QueueState.STOPPED: 337 | sleep(1) 338 | except Exception as e: 339 | if len(self.jobs) > 0: 340 | job = self.jobs.pop(0) 341 | self.job_error.emit(job) 342 | job.pickle() 343 | 344 | if not isinstance(e, IterError): 345 | self.job_error_log.emit(format_exc()) 346 | self.stop() 347 | 348 | def inc_job(self): 349 | if len(self.jobs) > 0: 350 | value = self.jobs[0].inc_data() 351 | 352 | if value: 353 | currentJobState = self.jobs[0].state 354 | if self.currentJobState != currentJobState: 355 | self.currentJobState = currentJobState 356 | self.queue_update.emit(self.jobs) 357 | else: 358 | self.jobs.pop(0) 359 | self.currentJobState = None 360 | self.queue_update.emit(self.jobs) 361 | 362 | else: 363 | self.state = QueueState.STOPPED 364 | self.queue_update.emit(self.jobs) 365 | 366 | def stop_retrying(self, _): 367 | if len(self.jobs) > 0: 368 | self.jobs[0].source.api.force_stop = True 369 | 370 | def display_value(self, value): 371 | print(value) 372 | -------------------------------------------------------------------------------- /components/keys.py: -------------------------------------------------------------------------------- 1 | import json 2 | from os import sep, makedirs, path 3 | 4 | from PyQt5 import QtWidgets 5 | 6 | 7 | class KeyLine(QtWidgets.QLineEdit): 8 | 9 | def __init__(self, name, key, sources, save): 10 | super().__init__() 11 | 12 | self.key = key 13 | self.name = name 14 | self.sources = sources 15 | self.save = save 16 | 17 | self.setText(sources[name][key]) 18 | 19 | self.textChanged.connect(self.edit_key) 20 | 21 | def edit_key(self, text): 22 | self.sources[self.name][self.key] = text.rstrip() 23 | if text: 24 | self.save() 25 | 26 | 27 | class KeyPage(QtWidgets.QWidget): 28 | 29 | def __init__(self, scrollWidget, data_dir, parent=None): 30 | super().__init__(parent=parent) 31 | 32 | self.scrollWidget = scrollWidget 33 | self.scrollWidget.layout = QtWidgets.QVBoxLayout() 34 | self.scrollWidget.setLayout(self.scrollWidget.layout) 35 | 36 | self.location = f"{data_dir}{sep}keys.json" 37 | 38 | if not path.exists(data_dir): 39 | makedirs(data_dir) 40 | 41 | self.sources = {} 42 | self.read_keys() 43 | 44 | def read_keys(self): 45 | try: 46 | with open(self.location, "r") as f: 47 | data = json.load(f) 48 | self.sources = data 49 | except (FileNotFoundError, json.decoder.JSONDecodeError): 50 | pass 51 | 52 | def write_keys(self): 53 | with open(self.location, "w") as f: 54 | json.dump(self.sources, f) 55 | 56 | def add_source(self, name, keys): 57 | if not self.sources.get(name): 58 | self.sources[name] = {} 59 | for key in keys: 60 | self.sources[name][key[1]] = "" 61 | 62 | sourceBox = QtWidgets.QGroupBox(name) 63 | sourceBox.layout = QtWidgets.QGridLayout() 64 | sourceBox.layout.setColumnMinimumWidth(0, 150) 65 | sourceBox.setLayout(sourceBox.layout) 66 | 67 | for count, key in enumerate(keys): 68 | keyLine = KeyLine(name, key[1], self.sources, self.write_keys) 69 | sourceBox.layout.addWidget(QtWidgets.QLabel(key[0]), count, 0) 70 | sourceBox.layout.addWidget(keyLine, count, 1) 71 | 72 | self.scrollWidget.layout.addWidget(sourceBox) 73 | 74 | def get_keys(self, name): 75 | keys = self.sources.get(name) 76 | if keys: 77 | for key in keys.keys(): 78 | keys[key] = keys[key].strip() 79 | return keys 80 | else: 81 | return None 82 | -------------------------------------------------------------------------------- /components/sources.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import xml.etree.ElementTree as ET 3 | from os import sep, path 4 | 5 | from components.widgets.nodes import * 6 | from components.globals import BUNDLE_DIR 7 | 8 | 9 | class NodeTree(QtWidgets.QTreeWidget): 10 | 11 | def __init__(self, sourceName, parent=None): 12 | QtWidgets.QWidget.__init__(self, parent) 13 | 14 | self.sourceName = sourceName 15 | self.pageIndex = 0 16 | 17 | self.setHeaderLabel("Nodes") 18 | 19 | # Create page when item is clicked 20 | self.itemClicked.connect(self.item_clicked) 21 | 22 | def setPage(self, stack): 23 | self.nodePage = stack 24 | 25 | def item_clicked(self, item, col_no): 26 | self.nodePage.create_page(item, self.sourceName) 27 | 28 | def add_item(self, node, parent=None): 29 | name = node.find("name").text 30 | treeItem = QtWidgets.QTreeWidgetItem() 31 | treeItem.setText(0, name) 32 | treeItem.setExpanded(True) 33 | treeItem.node = node 34 | 35 | treeItem.pageIndex = self.pageIndex 36 | self.pageIndex += 1 37 | 38 | textDescription = None 39 | 40 | if parent: 41 | textDescription = parent.textDescription 42 | treeItem.level = parent.level + 1 43 | treeItem.hierarchy = parent.hierarchy + " → " + name 44 | 45 | modifier = "'s" if textDescription[-1] != "s" else "'" 46 | textDescription = "{}{} {}".format(textDescription, modifier, name) 47 | 48 | parent.addChild(treeItem) 49 | else: 50 | textDescription = name 51 | treeItem.level = 1 52 | treeItem.hierarchy = name 53 | 54 | self.addTopLevelItem(treeItem) 55 | 56 | descriptionNode = node.find("description") 57 | if isinstance(descriptionNode, ET.Element): 58 | textDescription = descriptionNode.text 59 | 60 | treeItem.textDescription = textDescription 61 | 62 | treeItem.textContent = "I want to scrape a {} {}".format( 63 | self.sourceName, textDescription 64 | ) 65 | 66 | return treeItem 67 | 68 | 69 | class NodePageBox(QtWidgets.QGroupBox): 70 | 71 | def __init__(self, title, content=None, layout=QtWidgets.QVBoxLayout, parent=None): 72 | QtWidgets.QWidget.__init__(self, parent) 73 | 74 | self.layout = layout() 75 | self.setLayout(self.layout) 76 | 77 | self.setTitle(title) 78 | if content: 79 | self.layout.addWidget(content) 80 | 81 | def add_widget(self, widget): 82 | self.layout.addWidget(widget) 83 | 84 | 85 | class NodePage(QtWidgets.QWidget): 86 | 87 | def __init__(self, mainWindow, primaryInputWindow, parent=None): 88 | QtWidgets.QWidget.__init__(self, parent) 89 | 90 | self.mainWindow = mainWindow 91 | self.queue = mainWindow.queue 92 | self.keys = mainWindow.key_page 93 | self.queue_table = mainWindow.queue_table 94 | self.primaryInputWindow = primaryInputWindow 95 | 96 | # Add layout 97 | self.layout = QtWidgets.QVBoxLayout() 98 | self.layout.setContentsMargins(0, 0, 0, 0) 99 | self.setLayout(self.layout) 100 | 101 | # Create a scroll area 102 | self.pageScroll = QtWidgets.QScrollArea() 103 | self.pageScroll.setWidgetResizable(True) 104 | self.pageScroll.setBackgroundRole(QtGui.QPalette.Light) 105 | 106 | # Create a widget that scrolls 107 | self.pageDescription = QtWidgets.QWidget(self) 108 | self.pageDescription.layout = QtWidgets.QVBoxLayout() 109 | self.pageDescription.setLayout(self.pageDescription.layout) 110 | self.layout.addWidget(self.pageDescription) 111 | self.layout.addWidget(self.pageScroll) 112 | 113 | self.pageScroll.setWidget(self.pageDescription) 114 | 115 | def create_page(self, treeItem, sourceName): 116 | self.clearLayout(self.pageDescription.layout) 117 | node = treeItem.node 118 | 119 | # Define node information 120 | nodeName, functionName, inputs = self.get_node_info(node) 121 | 122 | # Create description stack page 123 | textContent = treeItem.textContent 124 | 125 | # Add title 126 | title = QtWidgets.QLabel(treeItem.hierarchy) 127 | title.setStyleSheet("font-weight: bold;") 128 | self.add_widget(title) 129 | 130 | # Create text description box 131 | textContentLabel = QtWidgets.QLabel(textContent) 132 | textContentLabel.setWordWrap(True) 133 | textContentLabel.setStyleSheet("font-style: italic;") 134 | textBox = NodePageBox("Text description", textContentLabel) 135 | self.add_widget(textBox) 136 | 137 | # Create socialreaper box 138 | srFunctionText = QtWidgets.QLabel("{}().{}()".format(sourceName, functionName)) 139 | srFunction = NodePageBox("Social Reaper function", srFunctionText) 140 | self.add_widget(srFunction) 141 | 142 | # Create inputs 143 | inputBox = NodePageInputBox( 144 | sourceName, self.queue, self.queue_table, self.keys, functionName 145 | ) 146 | inputBox.add_iterator.connect(self.queue.add_jobs) 147 | 148 | # Add advanced box 149 | advancedBox = AdvancedBox() 150 | inputBox.layout.addRow("Show all", advancedBox) 151 | 152 | # Add input widget 153 | self.add_inputs(inputs, inputBox, advancedBox) 154 | self.add_widget(inputBox) 155 | 156 | if self.mainWindow.advanced_mode: 157 | advancedBox.toggle() 158 | 159 | # Add download widget 160 | downloadBox = NodePageDownloadBox( 161 | inputBox, self.mainWindow.settings_window.get_save_path() 162 | ) 163 | self.add_widget(downloadBox) 164 | 165 | inputBox.path_function = downloadBox.get_path 166 | 167 | # Add primary key listener 168 | inputBox.primary[0].fileText.connect(downloadBox.set_path) 169 | 170 | self.add_widget(QtWidgets.QSplitter(QtCore.Qt.Vertical)) 171 | 172 | def clearLayout(self, layout): 173 | while layout.count(): 174 | while layout.count(): 175 | child = layout.takeAt(0) 176 | if child.widget() is not None: 177 | child.widget().deleteLater() 178 | elif child.layout() is not None: 179 | self.clearLayout(child.layout()) 180 | 181 | def add_widget(self, widget): 182 | if isinstance(widget, NodePageInputBox): 183 | self.read_values = widget.construct_job 184 | 185 | self.pageDescription.layout.addWidget(widget) 186 | 187 | def add_setters(self, setters, inputBox, table): 188 | if setters: 189 | for setter in setters: 190 | setterName = setter.find("name").text 191 | setterArg = setter.find("argument").text 192 | setterType = setter.find("type").text 193 | setterValue = setter.find("value").text 194 | 195 | setterWidget = None 196 | if setterType == "counter": 197 | setterWidget = CounterSetter(int(setterValue), table, setterArg) 198 | 199 | elif setterType == "checkbox": 200 | setterWidget = CheckboxSetter(bool(setterValue), table, setterArg) 201 | 202 | elif setterType == "list": 203 | setterWidget = ListSetter(setterValue.split(","), table, setterArg) 204 | inputBox.layout.addRow(setterName, setterWidget) 205 | 206 | def add_inputs(self, inputs, inputBox, advancedBox): 207 | for input in inputs.findall("input"): 208 | inputName = input.find("name").text 209 | inputType = input.find("type").text 210 | inputRequired = bool(input.attrib.get("required")) 211 | 212 | inputWidget = None 213 | 214 | if inputType == "primary": 215 | inputWidget = NodeInputPrimary( 216 | self.primaryInputWindow, self.mainWindow, inputBox 217 | ) 218 | 219 | elif inputType == "text": 220 | inputWidget = NodeInputLine(inputRequired, inputBox) 221 | 222 | elif inputType == "list": 223 | inputWidget = NodeInputList(inputRequired, inputBox) 224 | inputWidget.add_elements(input.find("elems")) 225 | 226 | elif inputType == "arguments": 227 | # Create table 228 | rows = input.find("rows") 229 | argumentTable = NodeInputArgs(rows, inputRequired, inputBox) 230 | 231 | # Add table setters 232 | setters = input.find("setters") 233 | self.add_setters(setters, inputBox, argumentTable) 234 | 235 | inputWidget = argumentTable 236 | 237 | else: 238 | sys.exit("UNKNOWN WIDGET") 239 | 240 | rowLabel = QtWidgets.QLabel(inputName) 241 | rowLabel.setVisible(inputWidget.required) 242 | inputBox.add_input(rowLabel, inputWidget) 243 | 244 | if not inputWidget.required: 245 | advancedBox.addRow(rowLabel, inputWidget) 246 | else: 247 | inputBox.add_required(inputWidget) 248 | 249 | @staticmethod 250 | def get_node_info(node): 251 | name = node.find("name").text 252 | functionName = node.find("function").text 253 | inputs = node.find("inputs") 254 | 255 | return name, functionName, inputs 256 | 257 | 258 | class NodePageDownloadBox(NodePageBox): 259 | 260 | def __init__(self, inputBox, save_path): 261 | super().__init__("Download", layout=QtWidgets.QFormLayout) 262 | 263 | self.setEnabled(False) 264 | self.pathWidget = PathWidget(save_path) 265 | self.layout.addRow("Folder", self.pathWidget) 266 | self.add_name() 267 | self.add_options(inputBox) 268 | self.add_button(inputBox) 269 | 270 | inputBox.downloadBox = self 271 | 272 | def add_name(self): 273 | self.fileName = QtWidgets.QLineEdit() 274 | self.fileName.setToolTip( 275 | "Adding {key} to the file name will replace the {key} with the primary key" 276 | ) 277 | self.fileName.setText(".csv") 278 | self.layout.addRow("File name", self.fileName) 279 | 280 | def add_button(self, inputBox): 281 | downloadButton = QtWidgets.QPushButton("Add job", self) 282 | 283 | downloadButton.setSizePolicy( 284 | QtWidgets.QSizePolicy( 285 | QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed 286 | ) 287 | ) 288 | downloadButton.setToolTip("Add a scraping job to the job queue") 289 | self.layout.addWidget(downloadButton) 290 | 291 | downloadButton.clicked.connect(inputBox.construct_job) 292 | 293 | def add_options(self, inputBox): 294 | appendBox = QtWidgets.QCheckBox("Append to existing file") 295 | appendBox.clicked.connect(inputBox.set_append) 296 | self.layout.addWidget(appendBox) 297 | 298 | keyBox = QtWidgets.QCheckBox("Add primary key column") 299 | keyBox.clicked.connect(inputBox.set_key_column) 300 | self.layout.addWidget(keyBox) 301 | 302 | def get_path(self): 303 | dir = self.pathWidget.get_path() 304 | file = self.fileName.text() 305 | return dir + sep + file 306 | 307 | def set_path(self, text): 308 | self.fileName.setText(text + ".csv") 309 | 310 | 311 | class NodePageInputBox(NodePageBox): 312 | add_iterator = QtCore.pyqtSignal(list) 313 | 314 | def __init__(self, sourceName, queue, queueTable, keys, functionName): 315 | super().__init__("Input", layout=QtWidgets.QFormLayout) 316 | 317 | self.queue = queue 318 | self.queueTable = queueTable 319 | 320 | self.queue.queue_update.connect(self.queueTable.display_jobs) 321 | self.queue.queue_selected.connect(self.queueTable.select_jobs) 322 | # self.queue.progress_table.connect(self.progressTable.display_value) 323 | 324 | self.keys = keys 325 | self.primary = [] 326 | 327 | self.downloadBox = None 328 | 329 | self.sourceName = sourceName 330 | self.functionName = functionName 331 | 332 | self.inputs = [] 333 | self.required = [] 334 | 335 | self.append = False 336 | self.keyColumn = None 337 | 338 | def add_input(self, name, input): 339 | if isinstance(input, NodeInputPrimary): 340 | self.primary.append(input) 341 | self.layout.addRow(name, input) 342 | self.inputs.append(input) 343 | 344 | def read_values(self): 345 | 346 | primary_keys = ( 347 | list(tup) for tup in zip(*[primary.get_value() for primary in self.primary]) 348 | ) 349 | 350 | jobs = [] 351 | for primary_tuple in primary_keys: 352 | arguments = ", ".join( 353 | [ 354 | inputWidget.get_value() 355 | for inputWidget in self.inputs[len(self.primary) :] 356 | ] 357 | ) 358 | arguments = ", ".join(primary_tuple) + ", " + arguments 359 | jobs.append(("_".join(primary_tuple).replace('"', ""), arguments)) 360 | return jobs 361 | 362 | def set_append(self, boolean): 363 | self.append = boolean 364 | 365 | def set_key_column(self, boolean): 366 | self.keyColumn = boolean 367 | 368 | def construct_job(self): 369 | filePathKey = self.path_function() 370 | 371 | details = [] 372 | 373 | for primary_key, args in self.read_values(): 374 | filePath = filePathKey.replace("{key}", primary_key) 375 | 376 | keys = self.keys.get_keys(self.sourceName) 377 | keyColumnValue = primary_key if self.keyColumn else None 378 | details.append( 379 | ( 380 | filePath, 381 | self.sourceName, 382 | self.functionName, 383 | args, 384 | keys, 385 | self.append, 386 | keyColumnValue, 387 | ) 388 | ) 389 | 390 | self.add_iterator.emit(details) 391 | 392 | def add_required(self, input): 393 | self.required.append(False) 394 | required_i = len(self.required) - 1 395 | 396 | input.containsValue.connect( 397 | lambda bool: self.required_changed(required_i, bool) 398 | ) 399 | 400 | def required_changed(self, i, bool): 401 | if i < len(self.required): 402 | self.required[i] = bool 403 | 404 | for req in self.required: 405 | if not req: 406 | self.downloadBox.setEnabled(False) 407 | return 408 | 409 | self.downloadBox.setEnabled(True) 410 | 411 | 412 | class SourceTabs: 413 | 414 | def __init__(self, mainWindow, keyPage, sourceFile, primaryInputWindow): 415 | self.mainWindow = mainWindow 416 | self.keyPage = keyPage 417 | self.primaryInputWindow = primaryInputWindow 418 | self.sourceFile = sourceFile 419 | 420 | self.sources = self.read_sources() 421 | self.add_sources() 422 | 423 | @staticmethod 424 | def tree_click(item, column_no): 425 | item.sourceDescription.setCurrentIndex(item.pageIndex) 426 | 427 | def read_sources(self): 428 | tree = ET.parse(f"{BUNDLE_DIR}{sep}{self.sourceFile}") 429 | sources_root = tree.getroot() 430 | source_files = sources_root.findall("source") 431 | 432 | sources = [] 433 | 434 | for source_file in source_files: 435 | location = source_file.find("location").text 436 | 437 | source_tree = ET.parse( 438 | f"{BUNDLE_DIR}{sep}sources/{location}" 439 | ) 440 | source_root = source_tree.getroot() 441 | sources.append(source_root) 442 | 443 | return sources 444 | 445 | def add_sources(self): 446 | for source in self.sources: 447 | sourcePage, sourceName = self.create_source_page(source) 448 | 449 | self.create_source_keys(sourceName, source) 450 | 451 | nodeTree = NodeTree(sourceName) 452 | sourcePage.layout.addWidget(nodeTree) 453 | 454 | nodePage = NodePage(self.mainWindow, self.primaryInputWindow) 455 | sourcePage.layout.addWidget(nodePage) 456 | 457 | nodeTree.setPage(nodePage) 458 | 459 | # Add source nodes to sourceTree and sourceDescription 460 | self.create_nodes(sourceName, source, nodeTree, nodePage) 461 | 462 | # Select the first node 463 | topItem = nodeTree.topLevelItem(0) 464 | if topItem: 465 | topItem.setSelected(True) 466 | nodeTree.item_clicked(topItem, 0) 467 | 468 | def create_source_page(self, source): 469 | sourcePage = QtWidgets.QWidget() 470 | sourceName = source.find("name").text 471 | self.mainWindow.sourcesTabs.addTab(sourcePage, sourceName) 472 | sourcePage.layout = QtWidgets.QHBoxLayout() 473 | sourcePage.setLayout(sourcePage.layout) 474 | 475 | return sourcePage, sourceName 476 | 477 | def create_source_keys(self, sourceName, source): 478 | keys = source.find("keys") 479 | key_list = [ 480 | (key.find("name").text, key.find("value").text) 481 | for key in keys.findall("key") 482 | ] 483 | 484 | self.keyPage.add_source(sourceName, key_list) 485 | 486 | def create_nodes( 487 | self, 488 | sourceName, 489 | parentNode, 490 | treeWidget, 491 | nodeStack, 492 | treeParentItem=None, 493 | textDescription="", 494 | ): 495 | 496 | nodes = parentNode.find("children") 497 | for node in nodes.findall("node"): 498 | # Create tree node 499 | treeItem = treeWidget.add_item(node, treeParentItem) 500 | self.create_nodes( 501 | sourceName, node, treeWidget, nodeStack, treeItem, textDescription 502 | ) 503 | 504 | @staticmethod 505 | def get_node_info(node): 506 | name = node.find("name").text 507 | functionName = node.find("function").text 508 | inputs = node.find("inputs") 509 | 510 | return name, functionName, inputs 511 | -------------------------------------------------------------------------------- /components/widgets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/components/widgets/__init__.py -------------------------------------------------------------------------------- /components/widgets/nodes.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import json 3 | from collections import OrderedDict 4 | from os import getcwd, path, sep 5 | 6 | 7 | from PyQt5 import QtWidgets, QtCore, QtGui 8 | from components.globals import BUNDLE_DIR 9 | 10 | 11 | class PrimaryInputWindow(QtWidgets.QMainWindow): 12 | 13 | def __init__(self, parent=None): 14 | super(PrimaryInputWindow, self).__init__(parent) 15 | 16 | self.csvInput = True 17 | self.filePath = "" 18 | 19 | self.setup_ui() 20 | # self.setFixedSize(300, 300) 21 | 22 | def setup_ui(self): 23 | self.setWindowTitle("Read from file") 24 | 25 | self.centralWidget = QtWidgets.QWidget(self) 26 | self.centralWidget.layout = QtWidgets.QHBoxLayout() 27 | self.centralWidget.setLayout(self.centralWidget.layout) 28 | self.setCentralWidget(self.centralWidget) 29 | 30 | # Add radio boxes 31 | self.radioBox = QtWidgets.QWidget() 32 | self.radioLayout = QtWidgets.QVBoxLayout() 33 | self.radioBox.layout = self.radioLayout 34 | self.radioBox.setLayout(self.radioBox.layout) 35 | 36 | self.radioCSV = QtWidgets.QRadioButton("Read CSV") 37 | self.radioCSV.setChecked(self.csvInput) 38 | self.radioCSV.toggled.connect(self.set_mode) 39 | self.radioLines = QtWidgets.QRadioButton("Read Text") 40 | self.radioLayout.addWidget(self.radioCSV) 41 | self.radioLayout.addWidget(self.radioLines) 42 | 43 | openButton = QtWidgets.QPushButton("Open file") 44 | openButton.setSizePolicy( 45 | QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed 46 | ) 47 | openButton.clicked.connect(self.open_file) 48 | self.radioBox.layout.addWidget(openButton) 49 | 50 | self.radioLayout.addStretch(1) 51 | 52 | self.centralWidget.layout.addWidget(self.radioBox) 53 | 54 | # Add OK button 55 | self.okButton = QtWidgets.QPushButton("OK") 56 | self.okButton.clicked.connect(self.return_data) 57 | self.radioBox.layout.addWidget(self.okButton) 58 | 59 | # Add input widget 60 | inputWidget = QtWidgets.QWidget() 61 | inputWidget.layout = QtWidgets.QFormLayout() 62 | inputWidget.setLayout(inputWidget.layout) 63 | 64 | self.filePathLabel = QtWidgets.QLabel() 65 | self.filePathLabel.setVisible(False) 66 | self.filePathLabel.setStyleSheet("font-style: italic;") 67 | inputWidget.layout.addRow(self.filePathLabel) 68 | 69 | self.columnName = QtWidgets.QComboBox() 70 | self.columnName.setEnabled(False) 71 | self.columnName.currentIndexChanged.connect(self.extract_file) 72 | 73 | inputWidget.layout.addRow(self.columnName) 74 | 75 | self.listWidget = QtWidgets.QListWidget() 76 | inputWidget.layout.addRow(self.listWidget) 77 | self.listWidget.setSelectionMode(self.listWidget.NoSelection) 78 | 79 | self.centralWidget.layout.addWidget(inputWidget) 80 | 81 | def open_file(self, _): 82 | print("opening file") 83 | options = QtWidgets.QFileDialog.Options() 84 | 85 | title = "Open file" 86 | directory = "" 87 | filter = "CSV Files (*.csv);;" if self.csvInput else "" 88 | filter += "All Files (*)" 89 | 90 | filePath, _ = QtWidgets.QFileDialog.getOpenFileName( 91 | caption=title, directory=directory, filter=filter, options=options 92 | ) 93 | if filePath: 94 | self.filePath = filePath 95 | self.filePathLabel.setVisible(True) 96 | self.filePathLabel.setText(self.filePath) 97 | 98 | if self.csvInput: 99 | self.read_csv_headings() 100 | else: 101 | self.extract_file() 102 | else: 103 | self.columnName.setEnabled(False) 104 | 105 | def set_mode(self, bool): 106 | self.csvInput = bool 107 | 108 | self.listWidget.clear() 109 | self.filePathLabel.setText("") 110 | self.columnName.setVisible(bool) 111 | self.columnName.clear() 112 | 113 | def extract_file(self): 114 | if not self.filePath: 115 | return 116 | 117 | self.listWidget.clear() 118 | self.columnName.setEnabled(self.csvInput) 119 | 120 | if self.csvInput: 121 | self.extract_csv() 122 | else: 123 | self.extract_lines() 124 | 125 | def read_csv_headings(self): 126 | self.columnName.clear() 127 | with open(self.filePath, "r", encoding="utf-8", newline="") as f: 128 | reader = csv.DictReader(f) 129 | for col in reader.fieldnames: 130 | self.columnName.insertItem(self.columnName.count(), col) 131 | self.columnName.setEnabled(True) 132 | 133 | def extract_csv(self): 134 | with open(self.filePath, "r", encoding="utf8") as f: 135 | reader = csv.DictReader(f) 136 | for row in reader: 137 | datum = row.get(self.columnName.currentText()) 138 | if datum: 139 | self.listWidget.addItem(str(datum)) 140 | 141 | def extract_lines(self): 142 | with open(self.filePath, "r", encoding="utf8") as f: 143 | lines = f.readlines() 144 | 145 | for line in lines: 146 | self.listWidget.addItem(line.strip()) 147 | 148 | def return_data(self): 149 | data = [self.listWidget.item(i).text() for i in range(self.listWidget.count())] 150 | self.read_file(data) 151 | self.hide() 152 | 153 | 154 | class NodeInputWidget: 155 | containsValue = QtCore.pyqtSignal(bool) 156 | 157 | def __init__(self, required=True): 158 | self.required = required 159 | self.setVisible(self.required) 160 | 161 | def get_value(self): 162 | pass 163 | 164 | 165 | class ArgTableItem(QtWidgets.QTableWidgetItem): 166 | 167 | def __init__(self, value, table, parent=None): 168 | super().__init__() 169 | QtWidgets.QWidget.__init__(self, parent) 170 | 171 | self.setText(value) 172 | self.table = table 173 | self.old_value = value 174 | 175 | 176 | class ArgTableArg(ArgTableItem): 177 | 178 | def __init__(self, value, table, pair, parent=None): 179 | super().__init__(value, table, parent) 180 | self.pair = pair 181 | 182 | 183 | class ArgTableVal(ArgTableItem): 184 | 185 | def __init__(self, value, table, pair, parent=None): 186 | super().__init__(value, table, parent) 187 | self.pair = pair 188 | 189 | 190 | class ArgTablePair: 191 | 192 | def __init__(self, key, value, table): 193 | self.arg = ArgTableArg(key, table, self) 194 | self.val = ArgTableVal(value, table, self) 195 | 196 | def argument(self): 197 | return self.arg 198 | 199 | def value(self): 200 | return self.val 201 | 202 | def pair(self): 203 | return self.arg, self.val 204 | 205 | 206 | class NodeInputArgs(QtWidgets.QTableWidget, NodeInputWidget): 207 | 208 | def __init__(self, rows=None, required=True, parent=None): 209 | super().__init__(0, 2, parent) 210 | NodeInputWidget.__init__(self, required=required) 211 | 212 | self.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch) 213 | self.verticalHeader().setVisible(False) 214 | self.setHorizontalHeaderLabels(["Argument", "Value"]) 215 | 216 | self.arguments = OrderedDict() 217 | 218 | self.itemChanged.connect(self.item_changed) 219 | 220 | if rows: 221 | self.read_rows(rows) 222 | 223 | self.fill_table() 224 | 225 | def read_rows(self, rows): 226 | for row in rows: 227 | argument = row[0].text 228 | value = row[1].text 229 | self.set_argument(argument, value) 230 | 231 | def item_changed(self, item): 232 | if isinstance(item, ArgTableArg): 233 | old_arg = item.old_value 234 | if old_arg != "": 235 | value = self.arguments.pop(old_arg) 236 | else: 237 | value = item.pair.value().text() 238 | new_key = item.text() 239 | if new_key: 240 | self.arguments[new_key] = value 241 | 242 | elif isinstance(item, ArgTableVal): 243 | argument = item.pair.argument().text() 244 | value = item.text() 245 | 246 | if value == "" and argument == "": 247 | self.arguments.pop("") 248 | else: 249 | self.arguments[argument] = value 250 | 251 | self.fill_table() 252 | 253 | def set_argument(self, arg, value): 254 | self.arguments[arg] = value 255 | 256 | def remove_argument(self, arg): 257 | del self.arguments[arg] 258 | 259 | def inc_rows(self): 260 | self.setRowCount(self.rowCount() + 1) 261 | return self.rowCount() 262 | 263 | def add_row(self, argument, value): 264 | self.itemChanged.disconnect(self.item_changed) 265 | rowCount = self.inc_rows() 266 | 267 | argItem, valItem = ArgTablePair(str(argument), str(value), self).pair() 268 | 269 | self.setItem(rowCount - 1, 0, argItem) 270 | self.setItem(rowCount - 1, 1, valItem) 271 | self.itemChanged.connect(self.item_changed) 272 | 273 | def fill_table(self): 274 | self.setRowCount(0) 275 | for key, value in self.arguments.items(): 276 | self.add_row(key, value) 277 | 278 | self.add_row("", "") 279 | 280 | def get_value(self): 281 | return f"**{json.dumps(self.arguments)}" 282 | 283 | 284 | class NodeInputLine(QtWidgets.QLineEdit, NodeInputWidget): 285 | 286 | def __init__(self, required=None, parent=None): 287 | QtWidgets.QWidget.__init__(self, parent) 288 | NodeInputWidget.__init__(self, required=required) 289 | 290 | self.textChanged.connect(self.value_changed) 291 | 292 | def get_value(self): 293 | return json.dumps(self.text()) 294 | 295 | def value_changed(self, text): 296 | if text: 297 | self.containsValue.emit(True) 298 | else: 299 | self.containsValue.emit(False) 300 | 301 | 302 | class NodeInputPrimary(NodeInputLine): 303 | fileText = QtCore.pyqtSignal(str) 304 | 305 | def __init__(self, primaryWindow, mainWindow, parent=None): 306 | NodeInputLine.__init__(self, required=True, parent=parent) 307 | 308 | self.primaryWindow = primaryWindow 309 | self.mainWindow = mainWindow 310 | 311 | self.readingText = "Reading from file" 312 | self.data = [] 313 | 314 | self.readAction = self.addAction( 315 | QtGui.QIcon(f"{BUNDLE_DIR}{sep}ui/read.png"), 316 | self.TrailingPosition, 317 | ) 318 | self.readAction.triggered.connect(self.add_file) 319 | 320 | self.clearAction = self.addAction( 321 | QtGui.QIcon(f"{BUNDLE_DIR}{sep}ui/remove.png"), 322 | self.TrailingPosition, 323 | ) 324 | self.clearAction.triggered.connect(self.clear_file) 325 | self.clearAction.setVisible(False) 326 | 327 | self.textChanged.connect(self.updateText) 328 | 329 | def add_file(self, _): 330 | self.primaryWindow.read_file = self.read_file 331 | self.primaryWindow.show() 332 | 333 | def clear_file(self, _): 334 | self.readAction.setVisible(True) 335 | self.clearAction.setVisible(False) 336 | self.setReadOnly(False) 337 | self.setText("") 338 | self.setStyleSheet("") 339 | self.data.clear() 340 | 341 | def read_file(self, data): 342 | self.readAction.setVisible(False) 343 | self.clearAction.setVisible(True) 344 | self.setReadOnly(True) 345 | self.setText(self.readingText) 346 | self.setStyleSheet("background-color: #d0d4db") 347 | self.data = data 348 | 349 | def get_value(self): 350 | if len(self.data) > 0: 351 | return [json.dumps(datum) for datum in self.data] 352 | else: 353 | return [json.dumps(self.text())] 354 | 355 | def updateText(self, text): 356 | if text == self.readingText: 357 | self.fileText.emit("{key}") 358 | else: 359 | self.fileText.emit(text) 360 | 361 | 362 | class NodeInputList(QtWidgets.QListWidget, NodeInputWidget): 363 | 364 | def __init__(self, required=None, parent=None): 365 | QtWidgets.QWidget.__init__(self, parent) 366 | NodeInputWidget.__init__(self, required=required) 367 | 368 | self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) 369 | self.setToolTip("Ctrl + Click to deselect list items") 370 | 371 | self.currentItemChanged.connect(self.value_changed) 372 | 373 | def add_elements(self, elements): 374 | if elements: 375 | for element in elements: 376 | listItem = QtWidgets.QListWidgetItem(element.text, self) 377 | self.addItem(listItem) 378 | 379 | emptyItem = QtWidgets.QListWidgetItem("", self) 380 | emptyItem.setFlags(emptyItem.flags() | QtCore.Qt.ItemIsEditable) 381 | self.addItem(emptyItem) 382 | 383 | def get_value(self): 384 | return json.dumps([item.text() for item in self.selectedItems()]) 385 | 386 | def value_changed(self, item): 387 | if item: 388 | self.containsValue.emit(True) 389 | else: 390 | self.containsValue.emit(False) 391 | 392 | 393 | class CounterSetter(QtWidgets.QSpinBox): 394 | 395 | def __init__(self, value, table, argument, parent=None): 396 | QtWidgets.QWidget.__init__(self, parent) 397 | 398 | self.setMinimum(0) 399 | self.setMaximum(999999999) 400 | 401 | self.table = table 402 | self.argument = argument 403 | self.valueChanged.connect(self.set_arg) 404 | self.setValue(value) 405 | 406 | def set_arg(self, value): 407 | self.table.set_argument(self.argument, value) 408 | self.table.fill_table() 409 | 410 | 411 | class CheckboxSetter(QtWidgets.QCheckBox): 412 | 413 | def __init__(self, value, table, argument, parent=None): 414 | QtWidgets.QWidget.__init__(self, parent) 415 | 416 | self.table = table 417 | self.argument = argument 418 | self.toggled.connect(self.set_arg) 419 | self.setEnabled(value) 420 | 421 | def set_arg(self, value): 422 | self.table.set_argument(self.argument, str(value)) 423 | self.table.fill_table() 424 | 425 | 426 | class ListSetter(QtWidgets.QComboBox): 427 | 428 | def __init__(self, values, table, argument, parent=None): 429 | QtWidgets.QWidget.__init__(self, parent) 430 | 431 | self.values = values 432 | self.table = table 433 | self.argument = argument 434 | self.currentIndexChanged.connect(self.set_arg) 435 | 436 | self.fill_values() 437 | 438 | def fill_values(self): 439 | for value in self.values: 440 | self.addItem(value) 441 | # self.setCurrentRow(0) 442 | 443 | def set_arg(self, row): 444 | self.table.set_argument(self.argument, self.currentText()) 445 | self.table.fill_table() 446 | 447 | 448 | class AdvancedBox(QtWidgets.QCheckBox): 449 | 450 | def __init__(self, parent=None): 451 | QtWidgets.QWidget.__init__(self, parent) 452 | 453 | self.child_items = [] 454 | 455 | self.toggled.connect(self.changeVisibility) 456 | 457 | def addRow(self, label, widget): 458 | self.child_items.append(label) 459 | self.child_items.append(widget) 460 | 461 | def changeVisibility(self, state): 462 | for item in self.child_items: 463 | item.setVisible(state) 464 | 465 | 466 | class PathWidget(QtWidgets.QWidget): 467 | path_changed = QtCore.pyqtSignal(str) 468 | 469 | def __init__(self, save_path=None, parent=None): 470 | super().__init__(parent) 471 | 472 | self.layout = QtWidgets.QHBoxLayout() 473 | self.setLayout(self.layout) 474 | self.layout.setContentsMargins(0, 0, 0, 0) 475 | 476 | self.dirPath = QtWidgets.QLabel(save_path if save_path else getcwd()) 477 | self.layout.addWidget(self.dirPath) 478 | 479 | self.layout.addStretch(1) 480 | 481 | self.pathButton = QtWidgets.QPushButton("Choose folder") 482 | self.layout.addWidget(self.pathButton) 483 | self.pathButton.clicked.connect(self.open_dir) 484 | 485 | def open_dir(self, _): 486 | options = QtWidgets.QFileDialog.Options() 487 | 488 | title = "Open folder" 489 | directory = "" 490 | 491 | dirPath = QtWidgets.QFileDialog.getExistingDirectory( 492 | caption=title, directory=directory, options=options 493 | ) 494 | if dirPath: 495 | dirPath = path.abspath(dirPath) 496 | self.dirPath.setText(dirPath) 497 | self.path_changed.emit(dirPath) 498 | 499 | def get_path(self): 500 | return self.dirPath.text() 501 | -------------------------------------------------------------------------------- /components/widgets/progress.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | from PyQt5 import QtWidgets, QtCore 4 | 5 | from ..job_queue import Job, JobState 6 | 7 | 8 | class ProgressState(Enum): 9 | PAUSED = "Continue" 10 | RUNNING = "Pause" 11 | 12 | 13 | class ProgressWidget(QtWidgets.QWidget): 14 | 15 | def __init__(self, job_signal, tabWidget, parent=None): 16 | super().__init__(parent=parent) 17 | 18 | self.tabWidget = tabWidget 19 | job_signal.connect(self.set_job) 20 | 21 | self.state = ProgressState.RUNNING 22 | self.job = None 23 | self.show_snapshot = False 24 | 25 | self.MAX_ROWS = 20 26 | 27 | self.layout = QtWidgets.QVBoxLayout() 28 | self.setLayout(self.layout) 29 | 30 | self.create_state_widget() 31 | self.create_snapshot() 32 | # self.create_dump() 33 | # self.create_headings() 34 | # self.create_log() 35 | 36 | def create_state_widget(self): 37 | stateWidget = QtWidgets.QWidget() 38 | stateWidget.layout = QtWidgets.QHBoxLayout() 39 | stateWidget.layout.setContentsMargins(11, 0, 11, 0) 40 | stateWidget.setLayout(stateWidget.layout) 41 | 42 | self.stateLabel = QtWidgets.QLabel("State: Stopped") 43 | stateWidget.layout.addWidget(self.stateLabel) 44 | 45 | self.rowCount = QtWidgets.QLabel("Rows: " + str(0)) 46 | stateWidget.layout.addWidget(self.rowCount) 47 | 48 | stateWidget.layout.addStretch(1) 49 | 50 | self.layout.addWidget(stateWidget) 51 | 52 | def create_snapshot(self): 53 | self.snapshotCheckBox = QtWidgets.QCheckBox("Show snapshot") 54 | self.snapshotCheckBox.toggled.connect(self.toggle_snapshot) 55 | self.layout.addWidget(self.snapshotCheckBox) 56 | 57 | self.snapshot = QtWidgets.QTableWidget() 58 | self.snapshot.verticalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Fixed) 59 | self.snapshot.horizontalHeader().setSectionResizeMode( 60 | QtWidgets.QHeaderView.Interactive 61 | ) 62 | self.snapshot.horizontalHeader().setCascadingSectionResizes(True) 63 | self.layout.addWidget(self.snapshot) 64 | 65 | def update_snapshot(self): 66 | state = self.job.state 67 | self.stateLabel.setText("State: " + str(state.value)) 68 | 69 | if self.tabWidget.currentIndex() != 4: 70 | return 71 | 72 | data = self.job.data.data 73 | keys = list(self.job.data.keys) 74 | # Otherwise it changes during update 75 | 76 | rows = self.job.data.count 77 | self.rowCount.setText("Rows: " + str(rows)) 78 | 79 | # Reduce update rate 80 | if ( 81 | not (rows % self.MAX_ROWS and state) == JobState.RUNNING 82 | or not self.show_snapshot 83 | ): 84 | return 85 | 86 | if rows > self.MAX_ROWS: 87 | self.snapshot.setRowCount(self.MAX_ROWS) 88 | self.snapshot.verticalHeader().setSectionResizeMode( 89 | QtWidgets.QHeaderView.Stretch 90 | ) 91 | self.snapshot.setVerticalHeaderLabels( 92 | (str(val) for val in range(rows - self.MAX_ROWS + 1, rows + 1)) 93 | ) 94 | else: 95 | self.snapshot.setRowCount(rows) 96 | 97 | self.snapshot.setColumnCount(len(keys)) 98 | self.snapshot.setHorizontalHeaderLabels(keys) 99 | 100 | for row_c, datum in enumerate(data[-25:]): 101 | for col_c, heading in enumerate(keys): 102 | text = datum.get(heading) 103 | if text: 104 | item = QtWidgets.QTableWidgetItem(text) 105 | self.snapshot.setItem(row_c, col_c, item) 106 | 107 | def clear_snapshot(self): 108 | self.snapshot.setColumnCount(0) 109 | self.snapshot.setRowCount(0) 110 | 111 | def toggle_snapshot(self, bool): 112 | self.show_snapshot = bool 113 | if not bool: 114 | self.clear_snapshot() 115 | 116 | @QtCore.pyqtSlot(Job) 117 | def set_job(self, job): 118 | self.job = job 119 | self.update_snapshot() 120 | -------------------------------------------------------------------------------- /components/widgets/queue.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from PyQt5 import QtWidgets, QtCore, QtGui 4 | 5 | from components.job_queue import JobState 6 | 7 | 8 | class QueueTable(QtWidgets.QTableWidget): 9 | 10 | def __init__(self, parent=None): 11 | super().__init__(parent) 12 | 13 | self.editEnabled = False 14 | 15 | self.setSelectionBehavior(self.SelectRows) 16 | self.setEnabled(False) 17 | self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) 18 | 19 | self.setColumnCount(10) 20 | self.setRowCount(0) 21 | self.setHorizontalHeaderLabels( 22 | [ 23 | "Source", 24 | "Function", 25 | "Parameters", 26 | "API Keys", 27 | "Path", 28 | "Status", 29 | "Write mode", 30 | "Encoding", 31 | "Caching", 32 | "Key column", 33 | ] 34 | ) 35 | # self.horizontalHeader().setStretchLastSection(True) 36 | self.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Interactive) 37 | 38 | @QtCore.pyqtSlot(list) 39 | def display_jobs(self, jobs): 40 | self.clearSelection() 41 | if len(jobs) > 0: 42 | self.setEnabled(True) 43 | else: 44 | self.setEnabled(False) 45 | self.setRowCount(len(jobs)) 46 | 47 | editing = True 48 | for row, job in enumerate(jobs): 49 | 50 | if editing and job.state == JobState.RUNNING: 51 | self.editing = False 52 | self.editEnabled = False 53 | 54 | sourceName = QtWidgets.QTableWidgetItem(job.sourceName) 55 | sourceFunction = QtWidgets.QTableWidgetItem(job.sourceFunction) 56 | functionArgs = QtWidgets.QTableWidgetItem(job.functionArgs) 57 | sourceKeys = QtWidgets.QTableWidgetItem(json.dumps(job.sourceKeys)) 58 | outputPath = QtWidgets.QTableWidgetItem(job.outputPath) 59 | status = QtWidgets.QTableWidgetItem(job.state.value) 60 | status.setBackground(self.create_brush(job.state)) 61 | write_mode = QtWidgets.QTableWidgetItem( 62 | "Append" if job.append else "Overwrite" 63 | ) 64 | encoding = QtWidgets.QTableWidgetItem(job.encoding) 65 | caching = QtWidgets.QTableWidgetItem("Enabled" if job.cache else "Disabled") 66 | key_column = QtWidgets.QTableWidgetItem( 67 | "Enabled" if job.keyColumn else "Disabled" 68 | ) 69 | 70 | self.setItem(row, 0, sourceName) 71 | self.setItem(row, 1, sourceFunction) 72 | self.setItem(row, 2, functionArgs) 73 | self.setItem(row, 3, sourceKeys) 74 | self.setItem(row, 4, outputPath) 75 | self.setItem(row, 5, status) 76 | self.setItem(row, 6, write_mode) 77 | self.setItem(row, 7, encoding) 78 | self.setItem(row, 8, caching) 79 | self.setItem(row, 9, key_column) 80 | 81 | def create_brush(self, state): 82 | colour = None 83 | if state == JobState.RUNNING: 84 | colour = QtGui.QColor(45, 201, 55, 100) 85 | elif state == JobState.STOPPED: 86 | colour = QtGui.QColor(204, 50, 50, 100) 87 | elif state == JobState.QUEUED: 88 | colour = QtGui.QColor(231, 180, 22, 100) 89 | elif state == JobState.SAVING: 90 | colour = QtGui.QColor(153, 193, 64, 100) 91 | elif state == JobState.FINISHED: 92 | colour = QtGui.QColor(45, 100, 200, 100) 93 | 94 | return QtGui.QBrush(colour) 95 | 96 | def selected_jobs(self): 97 | rows = set() 98 | for cell in self.selectedIndexes(): 99 | rows.add(cell.row()) 100 | return list(rows) 101 | 102 | @QtCore.pyqtSlot(list) 103 | def select_jobs(self, rows): 104 | for row in rows: 105 | for col in range(self.columnCount()): 106 | item = self.itemAt(row, col) 107 | item.setSelected(True) 108 | pass 109 | -------------------------------------------------------------------------------- /components/windows.py: -------------------------------------------------------------------------------- 1 | import json 2 | from os import sep 3 | from pathlib import Path 4 | from pprint import pformat 5 | from shutil import rmtree 6 | 7 | from PyQt5 import QtWidgets, QtGui, QtCore 8 | from PyQt5.QtCore import pyqtSignal 9 | 10 | from components.globals import * 11 | from .job_queue import Job 12 | from .widgets.nodes import PathWidget 13 | 14 | 15 | class PopupWindow(QtWidgets.QMessageBox): 16 | 17 | def __init__(self, title, text, details=None, width=200, height=400): 18 | super().__init__() 19 | self.setWindowTitle(title) 20 | self.setText(text) 21 | self.setDetailedText(details) 22 | self.setWindowIcon(QtGui.QIcon("ui/icon.png")) 23 | self.setMinimumWidth(width) 24 | self.setMinimumWidth(height) 25 | 26 | def pop(self, _): 27 | print("pop") 28 | self.exec_() 29 | 30 | 31 | class ScrollWindow(QtWidgets.QMainWindow): 32 | 33 | def __init__(self, title, subtitle, layout=QtWidgets.QVBoxLayout, parent=None): 34 | super().__init__(parent) 35 | self.setWindowTitle(title) 36 | 37 | self.mainWidget = QtWidgets.QWidget(self) 38 | self.mainWidget.layout = QtWidgets.QVBoxLayout(self.mainWidget) 39 | self.mainWidget.setLayout(self.mainWidget.layout) 40 | self.setCentralWidget(self.mainWidget) 41 | 42 | if subtitle: 43 | self.mainWidget.layout.addWidget(QtWidgets.QLabel(subtitle)) 44 | 45 | self.scrollArea = QtWidgets.QScrollArea(self.mainWidget) 46 | self.scrollArea.setWidgetResizable(True) 47 | 48 | self.contents = QtWidgets.QWidget(self.scrollArea) 49 | self.contents.layout = layout() 50 | self.contents.setLayout(self.contents.layout) 51 | self.mainWidget.layout.addWidget(self.contents) 52 | self.mainWidget.layout.addWidget(self.scrollArea) 53 | 54 | self.scrollArea.setWidget(self.contents) 55 | 56 | 57 | class LicenseWidget(QtWidgets.QWidget): 58 | 59 | def __init__(self, text, details, parent=None): 60 | super().__init__(parent=parent) 61 | self.setMinimumHeight(300) 62 | 63 | self.layout = QtWidgets.QVBoxLayout(self) 64 | self.setLayout(self.layout) 65 | 66 | label = QtWidgets.QLabel(text, self) 67 | self.layout.addWidget(label) 68 | 69 | browser = QtWidgets.QTextBrowser(self) 70 | browser.setText(details) 71 | self.layout.addWidget(browser) 72 | 73 | 74 | class LicenseWindow(ScrollWindow): 75 | 76 | def __init__(self, parent=None): 77 | super().__init__("Software licenses", "Licenses", parent=parent) 78 | self.setFixedWidth(400) 79 | 80 | with open(f"{BUNDLE_DIR}{sep}LICENSE.txt", "r") as f: 81 | reaper = LicenseWidget("Reaper GPL license", f.read(), self) 82 | self.contents.layout.addWidget(reaper) 83 | 84 | with open(f"{BUNDLE_DIR}{sep}licenses/socialreaper.txt", "r") as f: 85 | reaper = LicenseWidget("Social Reaper MIT license", f.read(), self) 86 | self.contents.layout.addWidget(reaper) 87 | 88 | with open(f"{BUNDLE_DIR}{sep}LICENSE.txt", "r") as f: 89 | reaper = LicenseWidget("PyQt GPL license", f.read(), self) 90 | self.contents.layout.addWidget(reaper) 91 | 92 | with open(f"{BUNDLE_DIR}{sep}licenses/requests.txt", "r") as f: 93 | reaper = LicenseWidget("Requests Apache license", f.read(), self) 94 | self.contents.layout.addWidget(reaper) 95 | 96 | with open(f"{BUNDLE_DIR}{sep}licenses/requests-oauthlib.txt", "r") as f: 97 | reaper = LicenseWidget("Requests-OAuthLib ISC license", f.read(), self) 98 | self.contents.layout.addWidget(reaper) 99 | 100 | with open(f"{BUNDLE_DIR}{sep}licenses/oauthlib.txt", "r") as f: 101 | reaper = LicenseWidget("OAuthLib BSD license", f.read(), self) 102 | self.contents.layout.addWidget(reaper) 103 | 104 | def pop(self): 105 | self.show() 106 | 107 | 108 | class ErrorWindow(QtWidgets.QMainWindow): 109 | job_error = pyqtSignal(Job) 110 | 111 | def __init__(self, parent=None): 112 | super().__init__(parent) 113 | 114 | self.job_error.connect(self.throw_job) 115 | self.job = None 116 | self.log = "" 117 | 118 | self.setWindowTitle("Error manager") 119 | self.setMinimumSize(500, 500) 120 | 121 | self.mainWidget = QtWidgets.QWidget(self) 122 | self.mainWidget.layout = QtWidgets.QVBoxLayout(self.mainWidget) 123 | self.mainWidget.setLayout(self.mainWidget.layout) 124 | self.setCentralWidget(self.mainWidget) 125 | 126 | self.tabs = QtWidgets.QTabWidget(self.mainWidget) 127 | 128 | self.console = QtWidgets.QTextBrowser() 129 | self.tabs.addTab(self.console, "Error log") 130 | 131 | self.job_browser = QtWidgets.QTextBrowser() 132 | self.tabs.addTab(self.job_browser, "Job state") 133 | 134 | self.itr_browser = QtWidgets.QTextBrowser() 135 | self.tabs.addTab(self.itr_browser, "Iterator state") 136 | 137 | self.api_browser = QtWidgets.QTextBrowser() 138 | self.tabs.addTab(self.api_browser, "API state") 139 | 140 | self.error_browser = QtWidgets.QTextBrowser() 141 | self.tabs.addTab(self.error_browser, "Error state") 142 | 143 | self.toggle_job_tabs(False) 144 | 145 | self.mainWidget.layout.addWidget(self.tabs) 146 | 147 | self.cancelButton = QtWidgets.QPushButton("Stop retrying", self.mainWidget) 148 | self.mainWidget.layout.addWidget(self.cancelButton) 149 | 150 | self.options = self.menuBar().addMenu("Options") 151 | self.clearAction = QtWidgets.QAction("Clear") 152 | self.clearAction.triggered.connect(self.clear) 153 | self.options.addAction(self.clearAction) 154 | 155 | def toggle_job_tabs(self, boolean): 156 | for i in range(1, 5): 157 | self.tabs.setTabEnabled(i, boolean) 158 | 159 | def clear(self, _): 160 | self.log = "" 161 | self.toggle_job_tabs(False) 162 | self.console.clear() 163 | self.job_browser.clear() 164 | self.itr_browser.clear() 165 | self.api_browser.clear() 166 | self.error_browser.clear() 167 | 168 | @QtCore.pyqtSlot(Job) 169 | def throw_job(self, job): 170 | self.toggle_job_tabs(True) 171 | self.job_browser.setText(pformat(vars(job))) 172 | self.itr_browser.setText(str(job.iterator)) 173 | self.api_browser.setText(str(job.source.api)) 174 | self.error_browser.setText(str(job.error)) 175 | self.show() 176 | 177 | def log_error(self, log): 178 | self.show() 179 | self.log += log + "\n" 180 | self.console.setText(self.log) 181 | scrollbar = self.console.verticalScrollBar() 182 | scrollbar.setValue(scrollbar.maximum()) 183 | 184 | 185 | class BinaryBox(QtWidgets.QGroupBox): 186 | 187 | def __init__( 188 | self, title, choices, description, default_choice, toggle_function, parent=None 189 | ): 190 | super().__init__(parent) 191 | self.toggle_function = toggle_function 192 | 193 | self.setTitle(title) 194 | 195 | self.layout = QtWidgets.QVBoxLayout(self) 196 | self.setLayout(self.layout) 197 | 198 | self.layout.addWidget(QtWidgets.QLabel(description, self)) 199 | 200 | self.option_1 = QtWidgets.QRadioButton(choices[0], self) 201 | self.layout.addWidget(self.option_1) 202 | 203 | self.option_2 = QtWidgets.QRadioButton(choices[1], self) 204 | self.layout.addWidget(self.option_2) 205 | 206 | self.option_1.toggled.connect(toggle_function) 207 | self.option_2.toggled.connect(self.invert) 208 | 209 | if default_choice: 210 | self.option_1.toggle() 211 | else: 212 | self.option_2.toggle() 213 | 214 | def invert(self, boolean): 215 | self.toggle_function(not boolean) 216 | 217 | 218 | class SettingsWindow(ScrollWindow): 219 | 220 | def __init__(self, parent): 221 | super().__init__( 222 | "Settings", None, layout=QtWidgets.QFormLayout, parent=parent.window 223 | ) 224 | self.setMinimumSize(400, 475) 225 | self.location = f"{DATA_DIR}{sep}settings.json" 226 | self.parent = parent 227 | 228 | self.data = { 229 | "save_path": f"{Path.home()}{sep}Downloads", 230 | "light": True, 231 | "utf-8": True, 232 | "cache": True, 233 | } 234 | self.load_settings() 235 | 236 | self.savePathBox = QtWidgets.QGroupBox(self) 237 | self.savePathBox.setTitle("Output directory") 238 | self.savePathBox.layout = QtWidgets.QVBoxLayout() 239 | self.savePathBox.setLayout(self.savePathBox.layout) 240 | 241 | self.savePath = PathWidget(self.data.get("save_path")) 242 | self.savePath.path_changed.connect(self.set_save_path) 243 | self.savePathBox.layout.addWidget(self.savePath) 244 | 245 | self.contents.layout.addWidget(self.savePathBox) 246 | 247 | self.themeBox = BinaryBox( 248 | "Theme", 249 | ("Light", "Dark"), 250 | "Change Reaper's Appearance", 251 | self.get_light_mode(), 252 | self.set_light_mode, 253 | ) 254 | self.contents.layout.addWidget(self.themeBox) 255 | 256 | self.encodingBox = BinaryBox( 257 | "Output encoding", 258 | ("UTF-8", "ASCII"), 259 | "Changing to ASCII will mean non-ASCII data will be lost", 260 | self.get_encoding(), 261 | self.set_encoding, 262 | ) 263 | self.contents.layout.addWidget(self.encodingBox) 264 | 265 | self.cacheBox = BinaryBox( 266 | "Cache", 267 | ("Use cache and memory", "Use memory"), 268 | "Store large data on disk", 269 | self.get_cache_mode(), 270 | self.set_cache, 271 | ) 272 | 273 | clearCacheButton = QtWidgets.QPushButton("Clear cache") 274 | clearCacheButton.clicked.connect(self.clear_cache) 275 | clearCacheButtonLayout = QtWidgets.QWidget() 276 | clearCacheButtonLayout.layout = QtWidgets.QHBoxLayout(clearCacheButtonLayout) 277 | clearCacheButtonLayout.layout.setContentsMargins(0, 0, 0, 0) 278 | clearCacheButtonLayout.setLayout(clearCacheButtonLayout.layout) 279 | clearCacheButtonLayout.layout.addWidget(clearCacheButton) 280 | clearCacheButtonLayout.layout.addStretch(1) 281 | 282 | self.cacheBox.layout.addWidget(clearCacheButtonLayout) 283 | self.contents.layout.addWidget(self.cacheBox) 284 | 285 | self.saveButtonWidget = QtWidgets.QWidget(self.contents) 286 | self.saveButtonWidget.layout = QtWidgets.QHBoxLayout(self.saveButtonWidget) 287 | self.saveButtonWidget.setLayout(self.saveButtonWidget.layout) 288 | self.contents.layout.addWidget(self.saveButtonWidget) 289 | 290 | self.saveButton = QtWidgets.QPushButton("Save", self.saveButtonWidget) 291 | self.saveButton.clicked.connect(self.save) 292 | self.saveButtonWidget.layout.addWidget(self.saveButton) 293 | self.saveButtonWidget.layout.addStretch(1) 294 | 295 | def set_light_mode(self, boolean): 296 | self.parent.enable_dark_mode(boolean) 297 | self.data["light"] = boolean 298 | 299 | def set_encoding(self, boolean): 300 | if boolean: 301 | self.parent.encoding = "utf-8" 302 | else: 303 | self.parent.encoding = "ascii" 304 | self.data["utf-8"] = boolean 305 | 306 | def set_cache(self, boolean): 307 | self.parent.cache_enabled = boolean 308 | self.data["cache"] = boolean 309 | 310 | def set_save_path(self, text): 311 | self.data["save_path"] = text 312 | 313 | def clear_cache(self, boolean): 314 | rmtree(CACHE_DIR, ignore_errors=True) 315 | 316 | def save(self, _): 317 | self.hide() 318 | self.save_settings() 319 | 320 | def save_settings(self): 321 | with open(self.location, "w") as f: 322 | json.dump(self.data, f) 323 | 324 | def load_settings(self): 325 | try: 326 | with open(self.location, "r") as f: 327 | self.data = json.load(f) 328 | except (FileNotFoundError, json.decoder.JSONDecodeError): 329 | pass 330 | 331 | def get_save_path(self): 332 | return self.data.get("save_path") 333 | 334 | def get_encoding(self): 335 | return self.data.get("utf-8") 336 | 337 | def get_light_mode(self): 338 | return self.data.get("light") 339 | 340 | def get_cache_mode(self): 341 | return self.data.get("cache") 342 | -------------------------------------------------------------------------------- /img/both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/img/both.png -------------------------------------------------------------------------------- /img/input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/img/input.png -------------------------------------------------------------------------------- /img/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/img/preview.gif -------------------------------------------------------------------------------- /img/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/img/table.png -------------------------------------------------------------------------------- /licenses/oauthlib.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Idan Gazit and contributors 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of this project nor the names of its contributors may 15 | be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /licenses/requests-oauthlib.txt: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2014 Kenneth Reitz. 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /licenses/requests.txt: -------------------------------------------------------------------------------- 1 | Copyright 2017 Kenneth Reitz 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /licenses/socialreaper.txt: -------------------------------------------------------------------------------- 1 | Copyright 2017 Adam Smith 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /reaper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (C) 2017 Adam Smith 4 | 5 | # This file is part of Reaper 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | import os 21 | import sys 22 | import traceback 23 | 24 | import qdarkstyle 25 | from PyQt5.QtCore import QUrl 26 | from PyQt5.QtGui import QIcon, QDesktopServices 27 | 28 | from components.job_queue import Queue 29 | from components.keys import KeyPage 30 | from components.sources import SourceTabs 31 | from components.widgets.nodes import PrimaryInputWindow 32 | from components.widgets.progress import ProgressWidget 33 | from components.widgets.queue import QueueTable 34 | from components.windows import * 35 | from components.globals import * 36 | from ui.mainwindow import Ui_MainWindow 37 | 38 | 39 | class Reaper(Ui_MainWindow): 40 | 41 | def __init__(self, window, app, splash, show=True): 42 | super().__init__() 43 | 44 | self.version = "v2.5.4" 45 | self.source_file = "sources.xml" 46 | self.encoding = "utf-8" 47 | self.cache_enabled = True 48 | 49 | self.window = window 50 | self.app = app 51 | self.splash = splash 52 | 53 | self.splash_msg("Setting up UI") 54 | self.setupUi(window) 55 | 56 | self.window.setWindowIcon(QIcon("ui/icon.png")) 57 | self.window.setWindowTitle(f"Reaper {self.version}") 58 | 59 | self.advanced_mode = False 60 | self.dark_mode = False 61 | 62 | self.splash_msg("Identifying app type") 63 | 64 | # Add windows and actions 65 | self.splash_msg("Connecting widgets") 66 | self.add_windows() 67 | self.add_actions() 68 | 69 | # Create queue page 70 | self.splash_msg("Creating Queue") 71 | self.queue = Queue(self) 72 | self.queue.job_error.connect(self.error_window.job_error) 73 | self.queue.job_error_log.connect(self.error_window.log_error) 74 | self.error_window.cancelButton.clicked.connect(self.queue.stop_retrying) 75 | 76 | self.splash_msg("Adding icons") 77 | self.set_icons() 78 | 79 | # Create queue table 80 | self.splash_msg("Creating job queue") 81 | self.queue_table = QueueTable() 82 | self.queueLayout.addWidget(self.queue_table) 83 | 84 | # Create window for primary key input 85 | self.splash_msg("Creating input window") 86 | self.primaryInputWindow = PrimaryInputWindow(window) 87 | 88 | # Create api key page 89 | self.splash_msg("Creating API tab") 90 | self.key_page = KeyPage(self.scrollAreaWidgetContents, DATA_DIR) 91 | 92 | # Create sources page 93 | self.splash_msg("Creating Source tab") 94 | self.source_tabs = SourceTabs( 95 | self, self.key_page, self.source_file, self.primaryInputWindow 96 | ) 97 | 98 | # Create progress page 99 | self.splash_msg("Creating progress tab") 100 | self.progress_page = ProgressWidget(self.queue.job_update, self.tabWidget) 101 | self.progressLayout.addWidget(self.progress_page) 102 | 103 | if show: 104 | self.splash_msg("Showing window") 105 | window.show() 106 | 107 | def splash_msg(self, message): 108 | self.splash.showMessage(message) 109 | 110 | def enable_advanced_mode(self, bool): 111 | self.advanced_mode = bool 112 | 113 | def enable_dark_mode(self, bool): 114 | if bool: 115 | self.app.setStyleSheet("") 116 | else: 117 | self.app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) 118 | 119 | def add_actions(self): 120 | self.actionErrorManager.triggered.connect(self.show_error_manager) 121 | self.actionAdvanced_mode.toggled.connect(self.enable_advanced_mode) 122 | self.actionDark_mode.toggled.connect( 123 | lambda x: self.settings_window.set_light_mode(not x) 124 | ) 125 | self.actionQuit.triggered.connect(self.quit) 126 | self.actionHelp.triggered.connect(self.open_website) 127 | self.actionAbout.triggered.connect(self.open_website) 128 | self.actionReport_a_bug.triggered.connect(self.open_report) 129 | self.actionWebsite.triggered.connect(self.open_website) 130 | self.actionAPI_Key_file.triggered.connect(self.import_keys) 131 | self.actionAPI_Keys.triggered.connect(self.export_keys) 132 | 133 | def add_windows(self): 134 | self.license_window = LicenseWindow(self.window) 135 | self.actionLicenses.triggered.connect(self.license_window.pop) 136 | 137 | self.error_window = ErrorWindow(self.window) 138 | 139 | self.settings_window = SettingsWindow(self) 140 | self.actionSettings.triggered.connect(self.settings_window.show) 141 | 142 | def set_icons(self): 143 | self.queueUp.setIcon(QIcon(f"{BUNDLE_DIR}{sep}ui/up.png")) 144 | self.queueDown.setIcon(QIcon(f"{BUNDLE_DIR}{sep}ui/down.png")) 145 | self.queueRemove.setIcon(QIcon(f"{BUNDLE_DIR}{sep}ui/remove.png")) 146 | self.window.setWindowIcon(QIcon(f"{BUNDLE_DIR}{sep}ui/icon.ico")) 147 | 148 | def show_error_manager(self, _): 149 | self.error_window.show() 150 | 151 | def open_website(self, _): 152 | QDesktopServices.openUrl(QUrl("http://reaper.social")) 153 | 154 | def open_report(self, _): 155 | QDesktopServices.openUrl(QUrl("https://github.com/scriptsmith/reaper/issues")) 156 | 157 | def export_keys(self, _): 158 | title = "Export Reaper keys" 159 | filter = "JSON File (*.json)" 160 | options = QtWidgets.QFileDialog.Options() 161 | 162 | filePath, _ = QtWidgets.QFileDialog.getSaveFileName( 163 | caption=title, 164 | directory=self.settings_window.get_save_path(), 165 | filter=filter, 166 | options=options, 167 | ) 168 | if filePath: 169 | with open(filePath, "w") as f: 170 | json.dump(self.key_page.sources, f) 171 | 172 | def import_keys(self, _): 173 | title = "Import Reaper keys" 174 | filter = "JSON File (*.json)" 175 | options = QtWidgets.QFileDialog.Options() 176 | 177 | filePath, _ = QtWidgets.QFileDialog.getOpenFileName( 178 | caption=title, 179 | directory=self.settings_window.get_save_path(), 180 | filter=filter, 181 | options=options, 182 | ) 183 | if filePath: 184 | with open(filePath, "r") as f: 185 | sources = json.load(f) 186 | 187 | for i in range(self.key_page.scrollWidget.layout.count()): 188 | self.key_page.scrollWidget.layout.takeAt(i) 189 | 190 | for source in sources.keys(): 191 | self.key_page.add_source(source, sources[source].keys()) 192 | 193 | def quit(self, _): 194 | self.app.quit() 195 | 196 | 197 | if __name__ == "__main__": 198 | try: 199 | app = QtWidgets.QApplication(sys.argv) 200 | 201 | pixmap = QtGui.QPixmap("ui/splash.png") 202 | splash = QtWidgets.QSplashScreen(pixmap) 203 | splash.show() 204 | splash.showMessage("Starting reaper") 205 | app.processEvents() 206 | 207 | main_window = QtWidgets.QMainWindow() 208 | ui = Reaper(main_window, app, splash) 209 | 210 | splash.finish(main_window) 211 | 212 | sys.exit(app.exec_()) 213 | except Exception as e: 214 | with open(LOG_DIR + "/log.log", "a") as f: 215 | f.write(str(e)) 216 | f.write(traceback.format_exc()) 217 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyQt5==5.9.1 2 | -e git+https://github.com/ScriptSmith/socialreaper.git#egg=socialreaper 3 | appdirs==1.4.3 4 | QDarkStyle==2.5.3 5 | sip==4.19.8 6 | -------------------------------------------------------------------------------- /scripts/mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | git pull 3 | pip3 install -r requirements.txt 4 | pip3 install git+https://github.com/ScriptSmith/socialreaper.git 5 | rm -r dist/ 6 | pyinstaller reaper.spec 7 | cd dist/ 8 | security unlock-keychain 9 | codesign -s "Developer ID Application: Adam Smith" --deep reaper.app 10 | pkgbuild --install-location /Applications --component reaper.app --identifier Reaper --version $1 --sign "Developer ID Installer: Adam Smith" Reaper.pkg 11 | zip -r reaper.zip reaper.app 12 | cd .. 13 | -------------------------------------------------------------------------------- /scripts/setup.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | #define MyAppName "Reaper" 5 | #define MyAppPublisher "The University of Queensland" 6 | #define MyAppURL "http://reaper.social" 7 | #define MyAppExeName "reaper.exe" 8 | 9 | [Setup] 10 | ; NOTE: The value of AppId uniquely identifies this application. 11 | ; Do not use the same AppId value in installers for other applications. 12 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 13 | AppId={{D200F93A-07DC-4F73-8713-18E4CDCAA43C} 14 | AppName={#MyAppName} 15 | AppVersion={#ApplicationVersion} 16 | ;AppVerName={#MyAppName} {#ApplicationVersion} 17 | AppPublisher={#MyAppPublisher} 18 | AppPublisherURL={#MyAppURL} 19 | AppSupportURL={#MyAppURL} 20 | AppUpdatesURL={#MyAppURL} 21 | DefaultDirName={pf}\{#MyAppName} 22 | DisableProgramGroupPage=yes 23 | LicenseFile=C:\Users\s4394487\src\reaper\dist\reaper\LICENSE.txt 24 | OutputDir=C:\Users\s4394487\src\reaper\dist\ 25 | OutputBaseFilename=reaper-setup 26 | SetupIconFile=C:\Users\s4394487\src\reaper\dist\reaper\ui\icon.ico 27 | Compression=lzma 28 | SolidCompression=yes 29 | 30 | [Languages] 31 | Name: "english"; MessagesFile: "compiler:Default.isl" 32 | 33 | [Tasks] 34 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 35 | Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 36 | 37 | [Files] 38 | Source: "C:\Users\s4394487\src\reaper\dist\reaper\reaper.exe"; DestDir: "{app}"; Flags: ignoreversion 39 | Source: "C:\Users\s4394487\src\reaper\dist\reaper\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 40 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files 41 | 42 | [Icons] 43 | Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" 44 | Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon 45 | Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon 46 | 47 | [Run] 48 | Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent 49 | 50 | -------------------------------------------------------------------------------- /scripts/windows.bat: -------------------------------------------------------------------------------- 1 | pip install -e ..\socialreaper 2 | rmdir build\ /s /q 3 | rmdir dist\reaper /s /q 4 | pyinstaller.exe -w -i ui/icon.ico reaper.py 5 | robocopy ui dist\reaper\ui /mir 6 | robocopy sources dist\reaper\sources /mir 7 | robocopy licenses dist\reaper\licenses /mir 8 | copy LICENSE.txt dist\reaper\LICENSE.txt 9 | copy sources.xml dist\reaper\sources.xml 10 | "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" scripts\setup.iss /DApplicationVersion==%1 11 | -------------------------------------------------------------------------------- /sources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Facebook 5 | facebook.xml 6 | 7 | 8 | Twitter 9 | twitter.xml 10 | 11 | 12 | Reddit 13 | reddit.xml 14 | 15 | 16 | YouTube 17 | youtube.xml 18 | 19 | 20 | Pinterest 21 | pinterest.xml 22 | 23 | 24 | Tumblr 25 | tumblr.xml 26 | 27 | 28 | -------------------------------------------------------------------------------- /sources/deviantart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DeviantArt 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/eventbrite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EventBrite 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/hackernews.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hacker News 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/imgur.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Imgur 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/linkedin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LinkedIn 5 | 6 | 7 | Access token 8 | access_token 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sources/meetup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Meetup 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/newsapi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NewsAPI 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/pinterest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pinterest 5 | 6 | 7 | Access token 8 | access_token 9 | 10 | 11 | 12 | 13 | User 14 | user 15 | 16 | 17 | Username 18 | primary 19 | 20 | 21 | Fields 22 | list 23 | 24 | id 25 | username 26 | first_name 27 | last_name 28 | bio 29 | created_at 30 | counts 31 | image 32 | 33 | 34 | 35 | 36 | 37 | Boards 38 | user_boards 39 | 40 | 41 | User 42 | primary 43 | 44 | 45 | Fields 46 | list 47 | 48 | id 49 | name 50 | url 51 | description 52 | creator 53 | created_at 54 | counts 55 | image 56 | 57 | 58 | 59 | 60 | 61 | 62 | Pins 63 | user_pins 64 | 65 | 66 | User 67 | primary 68 | 69 | 70 | Fields 71 | list 72 | 73 | id 74 | link 75 | url 76 | creator 77 | board 78 | created_at 79 | note 80 | color 81 | counts 82 | media 83 | attribution 84 | image 85 | metadata 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Board 95 | board 96 | 97 | 98 | User 99 | primary 100 | 101 | 102 | Board 103 | primary 104 | 105 | 106 | Fields 107 | list 108 | 109 | id 110 | name 111 | url 112 | description 113 | creator 114 | created_at 115 | counts 116 | image 117 | 118 | 119 | 120 | 121 | 122 | Pins 123 | board_pins 124 | 125 | 126 | User 127 | primary 128 | 129 | 130 | Board 131 | primary 132 | 133 | 134 | Fields 135 | list 136 | 137 | id 138 | link 139 | url 140 | creator 141 | board 142 | created_at 143 | note 144 | color 145 | counts 146 | media 147 | attribution 148 | image 149 | metadata 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | Pin 159 | pin 160 | 161 | 162 | Pin 163 | primary 164 | 165 | 166 | Fields 167 | list 168 | 169 | id 170 | link 171 | url 172 | creator 173 | board 174 | created_at 175 | note 176 | color 177 | counts 178 | media 179 | attribution 180 | image 181 | metadata 182 | 183 | 184 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /sources/reddit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reddit 5 | 6 | 7 | Application id 8 | application_id 9 | 10 | 11 | Application secret 12 | application_secret 13 | 14 | 15 | 16 | 17 | Search 18 | search 19 | Search's Threads 20 | 21 | 22 | Query 23 | primary 24 | 25 | 26 | Arguments 27 | arguments 28 | 29 | Argument 30 | Value 31 | 32 | 33 | 34 | Order 35 | order 36 | top,new,relevance,comments 37 | list 38 | 39 | 40 | Thread count 41 | count 42 | 1000 43 | counter 44 | 45 | 46 | Time period 47 | time_period 48 | all,year,month,week,today,hour 49 | list 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | Subreddit 58 | subreddit 59 | Subreddit's Threads 60 | 61 | 62 | Subreddit 63 | primary 64 | 65 | 66 | Arguments 67 | arguments 68 | 69 | Argument 70 | Value 71 | 72 | 73 | 74 | Category 75 | category 76 | top,new,hot,rising,controversial 77 | list 78 | 79 | 80 | Thread count 81 | count 82 | 1000 83 | counter 84 | 85 | 86 | Time period 87 | time_period 88 | all,year,month,week,today,hour 89 | list 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | User 98 | user 99 | User's Threads and Comments 100 | 101 | 102 | User 103 | primary 104 | 105 | 106 | Arguments 107 | arguments 108 | 109 | Argument 110 | Value 111 | 112 | 113 | 114 | Result type 115 | result_type 116 | overview,submitted,comments,guilded 117 | list 118 | 119 | 120 | Result count 121 | count 122 | 1000 123 | counter 124 | 125 | 126 | Order 127 | time_period 128 | new,hot,top,controversial 129 | list 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Thread 138 | thread 139 | 140 | 141 | Thread id 142 | primary 143 | 144 | 145 | Subreddit 146 | primary 147 | 148 | 149 | Arguments 150 | arguments 151 | 152 | Argument 153 | Value 154 | 155 | 156 | 157 | 158 | 159 | Comments 160 | thread_comments 161 | 162 | 163 | Thread id 164 | primary 165 | 166 | 167 | Subreddit 168 | primary 169 | 170 | 171 | Arguments 172 | arguments 173 | 174 | Argument 175 | Value 176 | 177 | 178 | 179 | Comment count 180 | count 181 | 500 182 | counter 183 | 184 | 185 | Comment order 186 | order 187 | top,new,best,controversial,old,q&a 188 | list 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /sources/source.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /sources/tumblr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tumblr 5 | 6 | 7 | API key 8 | api_key 9 | 10 | 11 | 12 | 13 | Blog 14 | blog_info 15 | 16 | 17 | Blog id 18 | primary 19 | 20 | 21 | Arguments 22 | arguments 23 | 24 | Argument 25 | Value 26 | 27 | 28 | 29 | 30 | 31 | Posts 32 | blog_posts 33 | 34 | 35 | Blog id 36 | primary 37 | 38 | 39 | Arguments 40 | arguments 41 | 42 | Argument 43 | Value 44 | 45 | 46 | 47 | Post type 48 | type 49 | text,quote,link,answer,video,audio,photo,char 50 | list 51 | 52 | 53 | Post count 54 | count 55 | 500 56 | counter 57 | 58 | 59 | Include reblog info 60 | reblog_info 61 | False 62 | checkbox 63 | 64 | 65 | Include notes info 66 | notes_info 67 | False 68 | checkbox 69 | 70 | 71 | Filter 72 | filter 73 | text,raw 74 | list 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Tag 85 | tag_posts 86 | Tag's Posts 87 | 88 | 89 | Tag 90 | primary 91 | 92 | 93 | Arguments 94 | arguments 95 | 96 | Argument 97 | Value 98 | 99 | 100 | 101 | Post count 102 | count 103 | 500 104 | counter 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /sources/twitch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Twitch 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/twitter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Twitter 5 | 6 | 7 | API key 8 | api_key 9 | 10 | 11 | API secret 12 | api_secret 13 | 14 | 15 | Access token 16 | access_token 17 | 18 | 19 | Access token secret 20 | access_token_secret 21 | 22 | 23 | 24 | 25 | Search 26 | Search's tweets 27 | search 28 | 29 | 30 | Query 31 | primary 32 | 33 | 34 | Arguments 35 | arguments 36 | 37 | Argument 38 | Value 39 | 40 | 41 | 42 | Tweet count 43 | count 44 | 500 45 | counter 46 | 47 | 48 | Include entities 49 | include_entities 50 | True 51 | checkbox 52 | 53 | 54 | Text length 55 | tweet_mode 56 | extended,compat 57 | list 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | User 66 | User's tweets 67 | user 68 | 69 | 70 | User 71 | primary 72 | 73 | 74 | Arguments 75 | arguments 76 | 77 | Argument 78 | Value 79 | 80 | 81 | 82 | Tweet count 83 | count 84 | 3200 85 | counter 86 | 87 | 88 | Exclude replies 89 | exclude_replies 90 | True 91 | checkbox 92 | 93 | 94 | Include retweets 95 | include_retweets 96 | False 97 | checkbox 98 | 99 | 100 | Text length 101 | tweet_mode 102 | extended,compat 103 | list 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /sources/vk.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | VK 5 | 6 | 7 | -------------------------------------------------------------------------------- /sources/youtube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YouTube 5 | 6 | 7 | API key 8 | api_key 9 | 10 | 11 | 12 | 13 | Search 14 | search 15 | Search's Videos 16 | 17 | 18 | Query 19 | primary 20 | 21 | 22 | Arguments 23 | arguments 24 | 25 | Argument 26 | Value 27 | 28 | 29 | 30 | Count 31 | count 32 | 1000 33 | counter 34 | 35 | 36 | Order 37 | order 38 | date,rating,relevance,viewCount,title 39 | list 40 | 41 | 42 | Event type 43 | event_type 44 | completed,live,upcoming 45 | list 46 | 47 | 48 | Safe search 49 | safe_search 50 | moderate,none,strict 51 | list 52 | 53 | 54 | Video caption 55 | video_caption 56 | any,closedCaption,none 57 | list 58 | 59 | 60 | Video definition 61 | video_definition 62 | any,high,standard 63 | list 64 | 65 | 66 | Video dimension 67 | video_dimension 68 | any,2d,3d 69 | list 70 | 71 | 72 | Video duration 73 | video_duration 74 | any,long,medium,short 75 | list 76 | 77 | 78 | Video license 79 | video_license 80 | any,creativeCommon,youtube 81 | list 82 | 83 | 84 | Video type 85 | video_type 86 | any,episode,movie 87 | list 88 | 89 | 90 | 91 | 92 | 93 | 94 | Comments 95 | search_comments 96 | 97 | 98 | Query 99 | primary 100 | 101 | 102 | Arguments 103 | arguments 104 | 105 | Argument 106 | Value 107 | 108 | 109 | 110 | Comment count 111 | count 112 | 1000 113 | counter 114 | 115 | 116 | Comment order 117 | order 118 | time,relevance 119 | list 120 | 121 | 122 | Comment format 123 | text_format 124 | plainText,html 125 | list 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | Channel 136 | channel 137 | Channel's Videos 138 | 139 | 140 | Channel id 141 | primary 142 | 143 | 144 | Arguments 145 | arguments 146 | 147 | Argument 148 | Value 149 | 150 | 151 | 152 | Count 153 | count 154 | 1000 155 | counter 156 | 157 | 158 | Order 159 | order 160 | date,rating,relevance,viewCount,title 161 | list 162 | 163 | 164 | Event type 165 | event_type 166 | completed,live,upcoming 167 | list 168 | 169 | 170 | Safe search 171 | safe_search 172 | moderate,none,strict 173 | list 174 | 175 | 176 | Video caption 177 | video_caption 178 | any,closedCaption,none 179 | list 180 | 181 | 182 | Video definition 183 | video_definition 184 | any,high,standard 185 | list 186 | 187 | 188 | Video dimension 189 | video_dimension 190 | any,2d,3d 191 | list 192 | 193 | 194 | Video duration 195 | video_duration 196 | any,long,medium,short 197 | list 198 | 199 | 200 | Video license 201 | video_license 202 | any,creativeCommon,youtube 203 | list 204 | 205 | 206 | Video type 207 | video_type 208 | any,episode,movie 209 | list 210 | 211 | 212 | 213 | 214 | 215 | 216 | Comments 217 | channel_comments 218 | 219 | 220 | Channel id 221 | primary 222 | 223 | 224 | Arguments 225 | arguments 226 | 227 | Argument 228 | Value 229 | 230 | 231 | 232 | Comment count 233 | count 234 | 1000 235 | counter 236 | 237 | 238 | Comment order 239 | order 240 | time,relevance 241 | list 242 | 243 | 244 | Comment format 245 | text_format 246 | plainText,html 247 | list 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | Video 258 | video 259 | 260 | 261 | Video id 262 | primary 263 | 264 | 265 | Arguments 266 | arguments 267 | 268 | Argument 269 | Value 270 | 271 | 272 | 273 | 274 | 275 | Comments 276 | video_comments 277 | 278 | 279 | Video id 280 | primary 281 | 282 | 283 | Arguments 284 | arguments 285 | 286 | Argument 287 | Value 288 | 289 | 290 | 291 | Comment count 292 | count 293 | 1000 294 | counter 295 | 296 | 297 | Comment order 298 | order 299 | time,relevance 300 | list 301 | 302 | 303 | Comment format 304 | text_format 305 | plainText,html 306 | list 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | -------------------------------------------------------------------------------- /ui/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/down.png -------------------------------------------------------------------------------- /ui/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/icon.icns -------------------------------------------------------------------------------- /ui/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/icon.ico -------------------------------------------------------------------------------- /ui/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/icon.png -------------------------------------------------------------------------------- /ui/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml -------------------------------------------------------------------------------- /ui/mainwindow.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'ui/mainwindow.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.9.2 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_MainWindow(object): 12 | def setupUi(self, MainWindow): 13 | MainWindow.setObjectName("MainWindow") 14 | MainWindow.resize(1082, 699) 15 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 16 | sizePolicy.setHorizontalStretch(0) 17 | sizePolicy.setVerticalStretch(0) 18 | sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) 19 | MainWindow.setSizePolicy(sizePolicy) 20 | self.centralwidget = QtWidgets.QWidget(MainWindow) 21 | self.centralwidget.setStatusTip("") 22 | self.centralwidget.setObjectName("centralwidget") 23 | self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) 24 | self.verticalLayout_3.setObjectName("verticalLayout_3") 25 | self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) 26 | self.tabWidget.setObjectName("tabWidget") 27 | self.introTab = QtWidgets.QWidget() 28 | self.introTab.setEnabled(True) 29 | self.introTab.setObjectName("introTab") 30 | self.gridLayout = QtWidgets.QGridLayout(self.introTab) 31 | self.gridLayout.setObjectName("gridLayout") 32 | self.horizontalLayout_6 = QtWidgets.QHBoxLayout() 33 | self.horizontalLayout_6.setObjectName("horizontalLayout_6") 34 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 35 | self.horizontalLayout_6.addItem(spacerItem) 36 | self.label_19 = QtWidgets.QLabel(self.introTab) 37 | font = QtGui.QFont() 38 | font.setPointSize(28) 39 | self.label_19.setFont(font) 40 | self.label_19.setObjectName("label_19") 41 | self.horizontalLayout_6.addWidget(self.label_19) 42 | spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 43 | self.horizontalLayout_6.addItem(spacerItem1) 44 | self.gridLayout.addLayout(self.horizontalLayout_6, 0, 0, 1, 1) 45 | self.label_28 = QtWidgets.QLabel(self.introTab) 46 | self.label_28.setText("") 47 | self.label_28.setObjectName("label_28") 48 | self.gridLayout.addWidget(self.label_28, 4, 0, 1, 1) 49 | self.label_20 = QtWidgets.QLabel(self.introTab) 50 | font = QtGui.QFont() 51 | font.setPointSize(14) 52 | self.label_20.setFont(font) 53 | self.label_20.setText("") 54 | self.label_20.setObjectName("label_20") 55 | self.gridLayout.addWidget(self.label_20, 1, 0, 1, 1) 56 | spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 57 | self.gridLayout.addItem(spacerItem2, 6, 0, 1, 1) 58 | self.label_41 = QtWidgets.QLabel(self.introTab) 59 | self.label_41.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 60 | self.label_41.setOpenExternalLinks(True) 61 | self.label_41.setObjectName("label_41") 62 | self.gridLayout.addWidget(self.label_41, 7, 0, 1, 1) 63 | self.horizontalLayout_12 = QtWidgets.QHBoxLayout() 64 | self.horizontalLayout_12.setObjectName("horizontalLayout_12") 65 | spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 66 | self.horizontalLayout_12.addItem(spacerItem3) 67 | self.verticalLayout_10 = QtWidgets.QVBoxLayout() 68 | self.verticalLayout_10.setObjectName("verticalLayout_10") 69 | self.label_22 = QtWidgets.QLabel(self.introTab) 70 | font = QtGui.QFont() 71 | font.setPointSize(14) 72 | self.label_22.setFont(font) 73 | self.label_22.setObjectName("label_22") 74 | self.verticalLayout_10.addWidget(self.label_22) 75 | self.label_38 = QtWidgets.QLabel(self.introTab) 76 | self.label_38.setText("") 77 | self.label_38.setObjectName("label_38") 78 | self.verticalLayout_10.addWidget(self.label_38) 79 | self.label_23 = QtWidgets.QLabel(self.introTab) 80 | font = QtGui.QFont() 81 | font.setPointSize(14) 82 | self.label_23.setFont(font) 83 | self.label_23.setObjectName("label_23") 84 | self.verticalLayout_10.addWidget(self.label_23) 85 | self.label_24 = QtWidgets.QLabel(self.introTab) 86 | font = QtGui.QFont() 87 | font.setPointSize(14) 88 | self.label_24.setFont(font) 89 | self.label_24.setObjectName("label_24") 90 | self.verticalLayout_10.addWidget(self.label_24) 91 | self.label_25 = QtWidgets.QLabel(self.introTab) 92 | font = QtGui.QFont() 93 | font.setPointSize(14) 94 | self.label_25.setFont(font) 95 | self.label_25.setObjectName("label_25") 96 | self.verticalLayout_10.addWidget(self.label_25) 97 | self.label_26 = QtWidgets.QLabel(self.introTab) 98 | font = QtGui.QFont() 99 | font.setPointSize(14) 100 | self.label_26.setFont(font) 101 | self.label_26.setObjectName("label_26") 102 | self.verticalLayout_10.addWidget(self.label_26) 103 | self.label_27 = QtWidgets.QLabel(self.introTab) 104 | font = QtGui.QFont() 105 | font.setPointSize(14) 106 | self.label_27.setFont(font) 107 | self.label_27.setObjectName("label_27") 108 | self.verticalLayout_10.addWidget(self.label_27) 109 | self.horizontalLayout_12.addLayout(self.verticalLayout_10) 110 | spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 111 | self.horizontalLayout_12.addItem(spacerItem4) 112 | self.gridLayout.addLayout(self.horizontalLayout_12, 3, 0, 1, 1) 113 | self.tabWidget.addTab(self.introTab, "") 114 | self.keyTab = QtWidgets.QWidget() 115 | self.keyTab.setStyleSheet("") 116 | self.keyTab.setObjectName("keyTab") 117 | self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.keyTab) 118 | self.verticalLayout_2.setObjectName("verticalLayout_2") 119 | self.label_42 = QtWidgets.QLabel(self.keyTab) 120 | font = QtGui.QFont() 121 | font.setBold(True) 122 | font.setItalic(False) 123 | font.setWeight(75) 124 | self.label_42.setFont(font) 125 | self.label_42.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 126 | self.label_42.setObjectName("label_42") 127 | self.verticalLayout_2.addWidget(self.label_42) 128 | self.scrollArea = QtWidgets.QScrollArea(self.keyTab) 129 | self.scrollArea.setEnabled(True) 130 | self.scrollArea.setStyleSheet("QAbstractScrollArea\n" 131 | "{\n" 132 | "background-color: transparent;\n" 133 | "}\n" 134 | "QWidget#scrollAreaWidgetContents{\n" 135 | "background-color: transparent; /*or a colour*/\n" 136 | "} ") 137 | self.scrollArea.setFrameShadow(QtWidgets.QFrame.Sunken) 138 | self.scrollArea.setWidgetResizable(True) 139 | self.scrollArea.setObjectName("scrollArea") 140 | self.scrollAreaWidgetContents = QtWidgets.QWidget() 141 | self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 98, 28)) 142 | self.scrollAreaWidgetContents.setStyleSheet("") 143 | self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") 144 | self.scrollArea.setWidget(self.scrollAreaWidgetContents) 145 | self.verticalLayout_2.addWidget(self.scrollArea) 146 | self.tabWidget.addTab(self.keyTab, "") 147 | self.sourceTab = QtWidgets.QWidget() 148 | self.sourceTab.setStyleSheet("") 149 | self.sourceTab.setObjectName("sourceTab") 150 | self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.sourceTab) 151 | self.verticalLayout_8.setObjectName("verticalLayout_8") 152 | self.label_14 = QtWidgets.QLabel(self.sourceTab) 153 | self.label_14.setObjectName("label_14") 154 | self.verticalLayout_8.addWidget(self.label_14) 155 | self.label_15 = QtWidgets.QLabel(self.sourceTab) 156 | self.label_15.setTextFormat(QtCore.Qt.AutoText) 157 | self.label_15.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 158 | self.label_15.setObjectName("label_15") 159 | self.verticalLayout_8.addWidget(self.label_15) 160 | self.sourcesTabs = QtWidgets.QTabWidget(self.sourceTab) 161 | self.sourcesTabs.setTabPosition(QtWidgets.QTabWidget.North) 162 | self.sourcesTabs.setTabShape(QtWidgets.QTabWidget.Rounded) 163 | self.sourcesTabs.setElideMode(QtCore.Qt.ElideNone) 164 | self.sourcesTabs.setUsesScrollButtons(True) 165 | self.sourcesTabs.setTabsClosable(False) 166 | self.sourcesTabs.setTabBarAutoHide(False) 167 | self.sourcesTabs.setObjectName("sourcesTabs") 168 | self.verticalLayout_8.addWidget(self.sourcesTabs) 169 | self.tabWidget.addTab(self.sourceTab, "") 170 | self.queueTab = QtWidgets.QWidget() 171 | self.queueTab.setObjectName("queueTab") 172 | self.verticalLayout = QtWidgets.QVBoxLayout(self.queueTab) 173 | self.verticalLayout.setObjectName("verticalLayout") 174 | self.queueLayout = QtWidgets.QVBoxLayout() 175 | self.queueLayout.setObjectName("queueLayout") 176 | self.groupBox = QtWidgets.QGroupBox(self.queueTab) 177 | self.groupBox.setObjectName("groupBox") 178 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox) 179 | self.horizontalLayout_2.setContentsMargins(9, 9, 9, 9) 180 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 181 | self.queueStart = QtWidgets.QPushButton(self.groupBox) 182 | self.queueStart.setObjectName("queueStart") 183 | self.horizontalLayout_2.addWidget(self.queueStart) 184 | self.queueStop = QtWidgets.QPushButton(self.groupBox) 185 | self.queueStop.setObjectName("queueStop") 186 | self.horizontalLayout_2.addWidget(self.queueStop) 187 | self.queueClear = QtWidgets.QPushButton(self.groupBox) 188 | self.queueClear.setObjectName("queueClear") 189 | self.horizontalLayout_2.addWidget(self.queueClear) 190 | spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 191 | self.horizontalLayout_2.addItem(spacerItem5) 192 | self.queueUp = QtWidgets.QToolButton(self.groupBox) 193 | self.queueUp.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) 194 | self.queueUp.setObjectName("queueUp") 195 | self.horizontalLayout_2.addWidget(self.queueUp) 196 | self.queueDown = QtWidgets.QToolButton(self.groupBox) 197 | self.queueDown.setObjectName("queueDown") 198 | self.horizontalLayout_2.addWidget(self.queueDown) 199 | self.queueRemove = QtWidgets.QToolButton(self.groupBox) 200 | self.queueRemove.setObjectName("queueRemove") 201 | self.horizontalLayout_2.addWidget(self.queueRemove) 202 | self.queueLayout.addWidget(self.groupBox) 203 | self.verticalLayout.addLayout(self.queueLayout) 204 | self.tabWidget.addTab(self.queueTab, "") 205 | self.progressTab = QtWidgets.QWidget() 206 | self.progressTab.setObjectName("progressTab") 207 | self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.progressTab) 208 | self.verticalLayout_6.setObjectName("verticalLayout_6") 209 | self.progressLayout = QtWidgets.QVBoxLayout() 210 | self.progressLayout.setObjectName("progressLayout") 211 | self.verticalLayout_6.addLayout(self.progressLayout) 212 | self.tabWidget.addTab(self.progressTab, "") 213 | self.verticalLayout_3.addWidget(self.tabWidget) 214 | MainWindow.setCentralWidget(self.centralwidget) 215 | self.menubar = QtWidgets.QMenuBar(MainWindow) 216 | self.menubar.setGeometry(QtCore.QRect(0, 0, 1082, 21)) 217 | self.menubar.setObjectName("menubar") 218 | self.menuFile = QtWidgets.QMenu(self.menubar) 219 | self.menuFile.setObjectName("menuFile") 220 | self.menuOpen = QtWidgets.QMenu(self.menuFile) 221 | self.menuOpen.setEnabled(False) 222 | self.menuOpen.setObjectName("menuOpen") 223 | self.menuBackups = QtWidgets.QMenu(self.menuOpen) 224 | self.menuBackups.setEnabled(False) 225 | self.menuBackups.setObjectName("menuBackups") 226 | self.menuSave = QtWidgets.QMenu(self.menuFile) 227 | self.menuSave.setEnabled(False) 228 | self.menuSave.setObjectName("menuSave") 229 | self.menuHelp = QtWidgets.QMenu(self.menubar) 230 | self.menuHelp.setObjectName("menuHelp") 231 | self.menuView = QtWidgets.QMenu(self.menubar) 232 | self.menuView.setObjectName("menuView") 233 | MainWindow.setMenuBar(self.menubar) 234 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 235 | self.statusbar.setObjectName("statusbar") 236 | MainWindow.setStatusBar(self.statusbar) 237 | self.actionQuit = QtWidgets.QAction(MainWindow) 238 | self.actionQuit.setObjectName("actionQuit") 239 | self.actionAPI_Key_file = QtWidgets.QAction(MainWindow) 240 | self.actionAPI_Key_file.setObjectName("actionAPI_Key_file") 241 | self.actionScraping_state = QtWidgets.QAction(MainWindow) 242 | self.actionScraping_state.setEnabled(False) 243 | self.actionScraping_state.setObjectName("actionScraping_state") 244 | self.actionAbout = QtWidgets.QAction(MainWindow) 245 | self.actionAbout.setObjectName("actionAbout") 246 | self.actionLicenses = QtWidgets.QAction(MainWindow) 247 | self.actionLicenses.setObjectName("actionLicenses") 248 | self.actionAPI_Keys = QtWidgets.QAction(MainWindow) 249 | self.actionAPI_Keys.setObjectName("actionAPI_Keys") 250 | self.actionJob_Queue = QtWidgets.QAction(MainWindow) 251 | self.actionJob_Queue.setEnabled(False) 252 | self.actionJob_Queue.setObjectName("actionJob_Queue") 253 | self.actionSettings = QtWidgets.QAction(MainWindow) 254 | self.actionSettings.setEnabled(True) 255 | self.actionSettings.setObjectName("actionSettings") 256 | self.actionHelp = QtWidgets.QAction(MainWindow) 257 | self.actionHelp.setObjectName("actionHelp") 258 | self.actionReport_a_bug = QtWidgets.QAction(MainWindow) 259 | self.actionReport_a_bug.setObjectName("actionReport_a_bug") 260 | self.actionScraping = QtWidgets.QAction(MainWindow) 261 | self.actionScraping.setCheckable(True) 262 | self.actionScraping.setChecked(True) 263 | self.actionScraping.setObjectName("actionScraping") 264 | self.actionHistory = QtWidgets.QAction(MainWindow) 265 | self.actionHistory.setCheckable(True) 266 | self.actionHistory.setObjectName("actionHistory") 267 | self.actionHistory_2 = QtWidgets.QAction(MainWindow) 268 | self.actionHistory_2.setEnabled(False) 269 | self.actionHistory_2.setObjectName("actionHistory_2") 270 | self.actionAPI_Key_Database = QtWidgets.QAction(MainWindow) 271 | self.actionAPI_Key_Database.setEnabled(False) 272 | self.actionAPI_Key_Database.setObjectName("actionAPI_Key_Database") 273 | self.actionAdvanced_mode = QtWidgets.QAction(MainWindow) 274 | self.actionAdvanced_mode.setCheckable(True) 275 | self.actionAdvanced_mode.setObjectName("actionAdvanced_mode") 276 | self.actionWebsite = QtWidgets.QAction(MainWindow) 277 | self.actionWebsite.setObjectName("actionWebsite") 278 | self.actionQueue = QtWidgets.QAction(MainWindow) 279 | self.actionQueue.setObjectName("actionQueue") 280 | self.actionJob = QtWidgets.QAction(MainWindow) 281 | self.actionJob.setObjectName("actionJob") 282 | self.actionDark_mode = QtWidgets.QAction(MainWindow) 283 | self.actionDark_mode.setCheckable(True) 284 | self.actionDark_mode.setObjectName("actionDark_mode") 285 | self.actionErrorManager = QtWidgets.QAction(MainWindow) 286 | self.actionErrorManager.setObjectName("actionErrorManager") 287 | self.menuBackups.addAction(self.actionQueue) 288 | self.menuBackups.addAction(self.actionJob) 289 | self.menuOpen.addAction(self.actionAPI_Key_file) 290 | self.menuOpen.addAction(self.actionJob_Queue) 291 | self.menuOpen.addAction(self.actionScraping_state) 292 | self.menuOpen.addSeparator() 293 | self.menuOpen.addAction(self.menuBackups.menuAction()) 294 | self.menuSave.addAction(self.actionAPI_Keys) 295 | self.menuFile.addAction(self.menuOpen.menuAction()) 296 | self.menuFile.addAction(self.menuSave.menuAction()) 297 | self.menuFile.addSeparator() 298 | self.menuFile.addAction(self.actionSettings) 299 | self.menuFile.addSeparator() 300 | self.menuFile.addAction(self.actionQuit) 301 | self.menuHelp.addAction(self.actionHelp) 302 | self.menuHelp.addAction(self.actionReport_a_bug) 303 | self.menuHelp.addSeparator() 304 | self.menuHelp.addAction(self.actionAbout) 305 | self.menuHelp.addAction(self.actionLicenses) 306 | self.menuHelp.addSeparator() 307 | self.menuHelp.addAction(self.actionWebsite) 308 | self.menuView.addAction(self.actionErrorManager) 309 | self.menuView.addAction(self.actionHistory_2) 310 | self.menuView.addAction(self.actionAPI_Key_Database) 311 | self.menuView.addSeparator() 312 | self.menuView.addAction(self.actionAdvanced_mode) 313 | self.menuView.addAction(self.actionDark_mode) 314 | self.menubar.addAction(self.menuFile.menuAction()) 315 | self.menubar.addAction(self.menuView.menuAction()) 316 | self.menubar.addAction(self.menuHelp.menuAction()) 317 | 318 | self.retranslateUi(MainWindow) 319 | self.tabWidget.setCurrentIndex(2) 320 | self.sourcesTabs.setCurrentIndex(-1) 321 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 322 | 323 | def retranslateUi(self, MainWindow): 324 | _translate = QtCore.QCoreApplication.translate 325 | MainWindow.setWindowTitle(_translate("MainWindow", "Reaper")) 326 | MainWindow.setStatusTip(_translate("MainWindow", "Visit http://reaper.social for help & tutorials")) 327 | self.label_19.setText(_translate("MainWindow", "Welcome to Reaper!")) 328 | self.label_41.setText(_translate("MainWindow", "

© Adam Smith, The University of Queensland

Developed by Adam Smith

")) 329 | self.label_22.setText(_translate("MainWindow", "Reaper helps you gather social media data, no coding required.")) 330 | self.label_23.setText(_translate("MainWindow", "Simply:")) 331 | self.label_24.setText(_translate("MainWindow", "1. Add & verify your API Keys")) 332 | self.label_25.setText(_translate("MainWindow", "2. Input your parameters")) 333 | self.label_26.setText(_translate("MainWindow", "3. Add your scraping instruction to the queue")) 334 | self.label_27.setText(_translate("MainWindow", "4. Download your data")) 335 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.introTab), _translate("MainWindow", "0. Introduction")) 336 | self.label_42.setText(_translate("MainWindow", "By using these platforms, you are agreeing to their terms & conditions")) 337 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.keyTab), _translate("MainWindow", "1. API Keys")) 338 | self.label_14.setText(_translate("MainWindow", "Select the source that you want to scrape from")) 339 | self.label_15.setText(_translate("MainWindow", "Double-click a node to see and select its edges")) 340 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.sourceTab), _translate("MainWindow", "2. Sources")) 341 | self.groupBox.setTitle(_translate("MainWindow", "Controls")) 342 | self.queueStart.setText(_translate("MainWindow", "Start")) 343 | self.queueStop.setText(_translate("MainWindow", "Stop")) 344 | self.queueClear.setText(_translate("MainWindow", "Clear")) 345 | self.queueUp.setText(_translate("MainWindow", "...")) 346 | self.queueDown.setText(_translate("MainWindow", "...")) 347 | self.queueRemove.setText(_translate("MainWindow", "...")) 348 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.queueTab), _translate("MainWindow", "3. Job Queue")) 349 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.progressTab), _translate("MainWindow", "4. Current Job")) 350 | self.menuFile.setTitle(_translate("MainWindow", "File")) 351 | self.menuOpen.setTitle(_translate("MainWindow", "Open")) 352 | self.menuBackups.setTitle(_translate("MainWindow", "Backups")) 353 | self.menuSave.setTitle(_translate("MainWindow", "Save")) 354 | self.menuHelp.setTitle(_translate("MainWindow", "Help")) 355 | self.menuView.setTitle(_translate("MainWindow", "View")) 356 | self.actionQuit.setText(_translate("MainWindow", "Quit")) 357 | self.actionAPI_Key_file.setText(_translate("MainWindow", "API Keys")) 358 | self.actionScraping_state.setText(_translate("MainWindow", "Scraping state")) 359 | self.actionAbout.setText(_translate("MainWindow", "About Reaper")) 360 | self.actionLicenses.setText(_translate("MainWindow", "Licenses")) 361 | self.actionAPI_Keys.setText(_translate("MainWindow", "API Keys")) 362 | self.actionJob_Queue.setText(_translate("MainWindow", "Job Queue")) 363 | self.actionSettings.setText(_translate("MainWindow", "Settings")) 364 | self.actionHelp.setText(_translate("MainWindow", "Help")) 365 | self.actionReport_a_bug.setText(_translate("MainWindow", "Report a bug")) 366 | self.actionScraping.setText(_translate("MainWindow", "Scraping")) 367 | self.actionHistory.setText(_translate("MainWindow", "History")) 368 | self.actionHistory_2.setText(_translate("MainWindow", "History")) 369 | self.actionAPI_Key_Database.setText(_translate("MainWindow", "API Key Database")) 370 | self.actionAdvanced_mode.setText(_translate("MainWindow", "Advanced mode")) 371 | self.actionWebsite.setText(_translate("MainWindow", "Website")) 372 | self.actionQueue.setText(_translate("MainWindow", "Queue")) 373 | self.actionJob.setText(_translate("MainWindow", "Job")) 374 | self.actionDark_mode.setText(_translate("MainWindow", "Dark mode")) 375 | self.actionErrorManager.setText(_translate("MainWindow", "Error manager")) 376 | 377 | 378 | if __name__ == "__main__": 379 | import sys 380 | app = QtWidgets.QApplication(sys.argv) 381 | MainWindow = QtWidgets.QMainWindow() 382 | ui = Ui_MainWindow() 383 | ui.setupUi(MainWindow) 384 | MainWindow.show() 385 | sys.exit(app.exec_()) 386 | 387 | -------------------------------------------------------------------------------- /ui/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1082 10 | 699 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Reaper 21 | 22 | 23 | Visit http://reaper.social for help & tutorials 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 2 34 | 35 | 36 | 37 | true 38 | 39 | 40 | 0. Introduction 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Qt::Horizontal 49 | 50 | 51 | 52 | 40 53 | 20 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 28 63 | 64 | 65 | 66 | Welcome to Reaper! 67 | 68 | 69 | 70 | 71 | 72 | 73 | Qt::Horizontal 74 | 75 | 76 | 77 | 40 78 | 20 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 14 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | Qt::Vertical 108 | 109 | 110 | 111 | 20 112 | 40 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | <html><head/><body><p>© Adam Smith, The University of Queensland</p><p>Developed by <a href="https://github.com/ScriptSmith"><span style=" text-decoration: underline; color:#0000ff;">Adam Smith</span></a></p></body></html> 121 | 122 | 123 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 124 | 125 | 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | Qt::Horizontal 136 | 137 | 138 | 139 | 40 140 | 20 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 14 152 | 153 | 154 | 155 | Reaper helps you gather social media data, no coding required. 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 14 171 | 172 | 173 | 174 | Simply: 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 14 183 | 184 | 185 | 186 | 1. Add & verify your API Keys 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 14 195 | 196 | 197 | 198 | 2. Input your parameters 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 14 207 | 208 | 209 | 210 | 3. Add your scraping instruction to the queue 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 14 219 | 220 | 221 | 222 | 4. Download your data 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | Qt::Horizontal 232 | 233 | 234 | 235 | 40 236 | 20 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 1. API Keys 251 | 252 | 253 | 254 | 255 | 256 | 257 | 75 258 | false 259 | true 260 | 261 | 262 | 263 | By using these platforms, you are agreeing to their terms & conditions 264 | 265 | 266 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 267 | 268 | 269 | 270 | 271 | 272 | 273 | true 274 | 275 | 276 | QAbstractScrollArea 277 | { 278 | background-color: transparent; 279 | } 280 | QWidget#scrollAreaWidgetContents{ 281 | background-color: transparent; /*or a colour*/ 282 | } 283 | 284 | 285 | QFrame::Sunken 286 | 287 | 288 | true 289 | 290 | 291 | 292 | 293 | 0 294 | 0 295 | 98 296 | 28 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 2. Sources 313 | 314 | 315 | 316 | 317 | 318 | Select the source that you want to scrape from 319 | 320 | 321 | 322 | 323 | 324 | 325 | Double-click a node to see and select its edges 326 | 327 | 328 | Qt::AutoText 329 | 330 | 331 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 332 | 333 | 334 | 335 | 336 | 337 | 338 | QTabWidget::North 339 | 340 | 341 | QTabWidget::Rounded 342 | 343 | 344 | -1 345 | 346 | 347 | Qt::ElideNone 348 | 349 | 350 | true 351 | 352 | 353 | false 354 | 355 | 356 | false 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 3. Job Queue 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | Controls 373 | 374 | 375 | 376 | 9 377 | 378 | 379 | 9 380 | 381 | 382 | 9 383 | 384 | 385 | 9 386 | 387 | 388 | 389 | 390 | Start 391 | 392 | 393 | 394 | 395 | 396 | 397 | Stop 398 | 399 | 400 | 401 | 402 | 403 | 404 | Clear 405 | 406 | 407 | 408 | 409 | 410 | 411 | Qt::Horizontal 412 | 413 | 414 | 415 | 40 416 | 20 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | ... 425 | 426 | 427 | Qt::ToolButtonIconOnly 428 | 429 | 430 | 431 | 432 | 433 | 434 | ... 435 | 436 | 437 | 438 | 439 | 440 | 441 | ... 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 4. Current Job 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 0 470 | 0 471 | 1082 472 | 21 473 | 474 | 475 | 476 | 477 | File 478 | 479 | 480 | 481 | false 482 | 483 | 484 | Open 485 | 486 | 487 | 488 | false 489 | 490 | 491 | Backups 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | false 505 | 506 | 507 | Save 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | Help 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | View 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | Quit 549 | 550 | 551 | 552 | 553 | API Keys 554 | 555 | 556 | 557 | 558 | false 559 | 560 | 561 | Scraping state 562 | 563 | 564 | 565 | 566 | About Reaper 567 | 568 | 569 | 570 | 571 | Licenses 572 | 573 | 574 | 575 | 576 | API Keys 577 | 578 | 579 | 580 | 581 | false 582 | 583 | 584 | Job Queue 585 | 586 | 587 | 588 | 589 | true 590 | 591 | 592 | Settings 593 | 594 | 595 | 596 | 597 | Help 598 | 599 | 600 | 601 | 602 | Report a bug 603 | 604 | 605 | 606 | 607 | true 608 | 609 | 610 | true 611 | 612 | 613 | Scraping 614 | 615 | 616 | 617 | 618 | true 619 | 620 | 621 | History 622 | 623 | 624 | 625 | 626 | false 627 | 628 | 629 | History 630 | 631 | 632 | 633 | 634 | false 635 | 636 | 637 | API Key Database 638 | 639 | 640 | 641 | 642 | true 643 | 644 | 645 | Advanced mode 646 | 647 | 648 | 649 | 650 | Website 651 | 652 | 653 | 654 | 655 | Queue 656 | 657 | 658 | 659 | 660 | Job 661 | 662 | 663 | 664 | 665 | true 666 | 667 | 668 | Dark mode 669 | 670 | 671 | 672 | 673 | Error manager 674 | 675 | 676 | 677 | 678 | 679 | 680 | -------------------------------------------------------------------------------- /ui/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/read.png -------------------------------------------------------------------------------- /ui/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/remove.png -------------------------------------------------------------------------------- /ui/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/splash.png -------------------------------------------------------------------------------- /ui/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptSmith/reaper/e22528ca508f3a81aa2900b5091a9e788f63e556/ui/up.png --------------------------------------------------------------------------------