├── .github ├── dependabot.yml └── workflows │ └── job.yml ├── .gitignore ├── LICENSE ├── README.md ├── README.orig.md ├── flake.lock ├── flake.nix ├── iagitup ├── __init__.py └── iagitup.py ├── main.py ├── poetry.lock ├── pyproject.toml └── repositories └── list.txt /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "pip" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/job.yml: -------------------------------------------------------------------------------- 1 | on: 2 | schedule: [cron: "30 3 * * 2"] 3 | workflow_dispatch: {} 4 | 5 | jobs: 6 | run_archiver: 7 | timeout-minutes: 300 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v4 11 | 12 | - name: Set up Python 13 | uses: actions/setup-python@v5 14 | with: 15 | python-version: '3.12' 16 | 17 | - name: Install Poetry 18 | uses: snok/install-poetry@v1 19 | with: 20 | virtualenvs-create: true 21 | virtualenvs-in-project: true 22 | virtualenvs-path: .venv 23 | installer-parallel: true 24 | 25 | - name: Load cached venv 26 | id: cached-poetry-dependencies 27 | uses: actions/cache@v4 28 | with: 29 | path: .venv 30 | key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} 31 | 32 | - name: Install dependencies 33 | if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' 34 | run: poetry install --no-interaction --no-root 35 | 36 | - name: Print version 37 | run: poetry run python main.py -v 38 | 39 | - name: Archive repos 40 | run: | 41 | source .venv/bin/activate 42 | 43 | # loop through repositories/list.txt lines. Adding an empty line in case the last line didn't have \n at the end 44 | { cat repositories/list.txt; echo; } | while IFS= read -r line || [ -n "$line" ]; do 45 | echo "Processing line: $line" 46 | if ! python main.py --s3-access "${{ secrets.S3_ACCESS }}" --s3-secret "${{ secrets.S3_SECRET }}" "$line"; then 47 | echo "Error processing line: $line" >> failed_lines.txt 48 | fi 49 | done 50 | 51 | # If any errors occurred, display the log and exit with an error code 52 | if [ -f failed_lines.txt ]; then 53 | echo "Failed lines:" 54 | cat failed_lines.txt 55 | exit 1 56 | else 57 | echo "All lines processed successfully." 58 | fi 59 | 60 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv* 2 | dist* 3 | build* 4 | *pyc 5 | *egg-info 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 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 | iagitup Copyright (C) 2018 Giovanni Damiola 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 | 676 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # noql-net Git archiver 2 | 3 | This repo is used to periodically archive certain anti-censorship 4 | tools to prevent the disappearance of good and valuable code. 5 | 6 | To add a repository to the list of repositories that are archived 7 | and uploaded to archive.org, modify `repositories/list.txt` and 8 | submit a pull request. 9 | 10 | View the current Archive collection [here](https://archive.org/details/@markpash?and%5B%5D=collection%3A%22github_narabot_mirror%22) 11 | -------------------------------------------------------------------------------- /README.orig.md: -------------------------------------------------------------------------------- 1 | # iagitup - a command line tool to archive a GitHub repository to the Internet Archive 2 | 3 | The python script downloads the GitHub repository, creates a [git bundle](https://git-scm.com/docs/git-bundle) and uploads it on an Internet Archive item with metadata from the GitHub API and a description from the repository readme. 4 | 5 | 6 | ## Prerequisites 7 | This script strongly recommends Linux or some sort of POSIX system (such as Mac OS X). 8 | 9 | * **Internet Archive Account** - If you don't already have an account on archive.org, [register](https://archive.org/account/login.createaccount.php). 10 | * **Python** - This script should work with Python 3.9. 11 | * **libffi-dev and libssl-dev** 12 | * **git** 13 | 14 | ## Install iagitup 15 | 16 | Prerequisites (with Debian or Ubuntu): 17 | 18 | sudo apt update 19 | sudo apt install python python-pip python-dev libffi-dev libssl-dev git 20 | 21 | 22 | ### from source code: 23 | 24 | Clone the repo and install the package... 25 | 26 | git clone https://github.com/gdamdam/iagitup.git 27 | cd iagitup 28 | pip install . 29 | 30 | ## Usage 31 | 32 | To upload a repo: 33 | 34 | iagitup 35 | 36 | You can add also custom metadata: 37 | 38 | iagitup --metadata= 39 | 40 | To know the version: 41 | 42 | iagitup -v 43 | 44 | Example: 45 | 46 | iagitup https://github.com// 47 | 48 | The script downloads the git repo from github, creates a git bundle and uploads it on the Internet Archive. 49 | 50 | The repo will be archived in an item at url containing the repository name and the date of the last push, something like: 51 | 52 | https://archive.org/details/github.com--_-_ 53 | 54 | The git repo bundle will be available at url: 55 | 56 | https://archive.org/download/github.com--_-_/.bundle 57 | 58 | ## Restore an archived github repository 59 | 60 | Download the bundle file, form the archived item: 61 | 62 | https://archive.org/download/.../.bundle 63 | 64 | Just download the _.bundle_ file and run: 65 | 66 | git clone file.bundle 67 | 68 | 69 | ## Scheduler 70 | The workflow defined in [.github/workflows/job.yml](/.github/workflows/job.yml) runs `iagitup` on a schedule. 71 | As a one-time setup you need to copy values from https://archive.org/account/s3.php as 72 | [GitHub Secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) 73 | under names `S3_ACCESS` and `S3_SECRET`. Then update the list of repositories in 74 | [repositories/list.txt](/repositories/list.txt). 75 | 76 | ## License (GPLv3) 77 | 78 | Copyright (C) 2017-2018 Giovanni Damiola 79 | 80 | This program is free software: you can redistribute it and/or modify 81 | it under the terms of the GNU General Public License as published by 82 | the Free Software Foundation, either version 3 of the License, or 83 | (at your option) any later version. 84 | 85 | This program is distributed in the hope that it will be useful, 86 | but WITHOUT ANY WARRANTY; without even the implied warranty of 87 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 88 | GNU General Public License for more details. 89 | 90 | You should have received a copy of the GNU General Public License 91 | along with this program. If not, see . 92 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "flake-utils": { 4 | "locked": { 5 | "lastModified": 1642700792, 6 | "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", 7 | "owner": "numtide", 8 | "repo": "flake-utils", 9 | "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "numtide", 14 | "repo": "flake-utils", 15 | "type": "github" 16 | } 17 | }, 18 | "mach-nix": { 19 | "inputs": { 20 | "flake-utils": "flake-utils", 21 | "nixpkgs": [ 22 | "nixpkgs" 23 | ], 24 | "pypi-deps-db": "pypi-deps-db" 25 | }, 26 | "locked": { 27 | "lastModified": 1705470643, 28 | "narHash": "sha256-CqgkRcvOonJ2fL6542/ykZR3yL6qVLWy0pdyY5YKRlE=", 29 | "owner": "DavHau", 30 | "repo": "mach-nix", 31 | "rev": "28f563aeb8c9e679a3f2b531c728573fce7a4594", 32 | "type": "github" 33 | }, 34 | "original": { 35 | "owner": "DavHau", 36 | "repo": "mach-nix", 37 | "type": "github" 38 | } 39 | }, 40 | "nixpkgs": { 41 | "locked": { 42 | "lastModified": 1708118438, 43 | "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", 44 | "owner": "NixOS", 45 | "repo": "nixpkgs", 46 | "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", 47 | "type": "github" 48 | }, 49 | "original": { 50 | "id": "nixpkgs", 51 | "ref": "nixos-unstable", 52 | "type": "indirect" 53 | } 54 | }, 55 | "pypi-deps-db": { 56 | "flake": false, 57 | "locked": { 58 | "lastModified": 1685526402, 59 | "narHash": "sha256-V0SXx0dWlUBL3E/wHWTszrkK2dOnuYYnBc7n6e0+NQU=", 60 | "owner": "DavHau", 61 | "repo": "pypi-deps-db", 62 | "rev": "ba35683c35218acb5258b69a9916994979dc73a9", 63 | "type": "github" 64 | }, 65 | "original": { 66 | "owner": "DavHau", 67 | "repo": "pypi-deps-db", 68 | "type": "github" 69 | } 70 | }, 71 | "root": { 72 | "inputs": { 73 | "mach-nix": "mach-nix", 74 | "nixpkgs": "nixpkgs" 75 | } 76 | } 77 | }, 78 | "root": "root", 79 | "version": 7 80 | } 81 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "iagitup"; 3 | 4 | inputs = { 5 | nixpkgs.url = "nixpkgs/nixos-unstable"; 6 | mach-nix.url = "github:DavHau/mach-nix"; 7 | mach-nix.inputs.nixpkgs.follows = "nixpkgs"; 8 | # dream2nix.url = "github:nix-community/dream2nix"; 9 | # nixpkgs.follows = "dream2nix/nixpkgs"; 10 | }; 11 | 12 | outputs = { self, mach-nix, nixpkgs }: { 13 | devShells.x86_64-linux.default = mach-nix.lib.x86_64-linux.mkPythonShell { 14 | ignoreDataOutdated = true; 15 | python = "python312"; 16 | requirements = '' 17 | setuptools 18 | internetarchive 19 | git 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /iagitup/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noql-net/archiver/274da98677a5cef8a2eace568fdbbc7b7a4c065a/iagitup/__init__.py -------------------------------------------------------------------------------- /iagitup/iagitup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import unicode_literals 5 | 6 | __author__ = "Giovanni Damiola" 7 | __copyright__ = "Copyright 2018, Giovanni Damiola" 8 | __main_name__ = 'iagitup' 9 | __license__ = 'GPLv3' 10 | __version__ = "v1.8" 11 | 12 | import os 13 | import subprocess 14 | import shutil 15 | import json 16 | from internetarchive import get_session 17 | import git 18 | import requests 19 | from datetime import datetime 20 | from markdown2 import markdown_path 21 | 22 | 23 | def mkdirs(path): 24 | """Make directory, if it doesn't exist.""" 25 | if not os.path.exists(path): 26 | os.makedirs(path) 27 | 28 | # download the github repo 29 | def repo_download(github_repo_url): 30 | """Downloads a GitHub repo locally. 31 | 32 | arguments: 33 | github_repo_url -- the GitHub repo home url 34 | 35 | returns: 36 | github_repo_data, github_repo_dir - the repo details and the local repo directory 37 | """ 38 | download_dir = os.path.expanduser('~/.iagitup/downloads') 39 | mkdirs(os.path.expanduser('~/.iagitup')) 40 | mkdirs(download_dir) 41 | 42 | # parsing url to initialize the github api rul and get the repo_data 43 | gh_user, gh_repo = github_repo_url.split('/')[3:] 44 | gh_api_url = "https://api.github.com/repos/{}/{}".format(gh_user, gh_repo) 45 | 46 | # delete the temp directory if exists 47 | github_repo_dir = os.path.join(download_dir, gh_repo) 48 | if os.path.exists(github_repo_dir): 49 | shutil.rmtree(github_repo_dir) 50 | 51 | # get the data from GitHub api 52 | req = requests.get(gh_api_url) 53 | if req.status_code == 200: 54 | github_repo_data = json.loads(req.text) 55 | # download the repo from github 56 | github_repo_dir = os.path.join(download_dir, gh_repo) 57 | try: 58 | git.Git().clone(github_repo_data['clone_url'], github_repo_dir) 59 | except Exception as e: 60 | print(f'Error occurred while downloading: {github_repo_url}') 61 | print(str(e)) 62 | exit(1) 63 | else: 64 | raise ValueError(f'Error occurred while downloading: {github_repo_url}. Status code: {req.status_code}') 65 | 66 | return github_repo_data, github_repo_dir 67 | 68 | 69 | def get_description_from_readme(gh_repo_folder): 70 | """From the GitHub repo returns html description from the README.md or readme.txt 71 | 72 | arguments: 73 | gh_repo_folder -- the repo local folder path 74 | 75 | returns: 76 | description -- html description 77 | """ 78 | path = os.path.join(gh_repo_folder, 'README.md') 79 | path3 = os.path.join(gh_repo_folder, 'readme.md') 80 | path2 = os.path.join(gh_repo_folder, 'readme.txt') 81 | description = '' 82 | if os.path.exists(path): 83 | description = markdown_path(path) 84 | description = description.replace('\n', '') 85 | elif os.path.exists(path3): 86 | description = markdown_path(path3) 87 | description = description.replace('\n', '') 88 | elif os.path.exists(path2): 89 | with open(path2, 'r') as f: 90 | description = f.readlines() 91 | description =' '.join(description) 92 | return description 93 | 94 | def create_bundle(gh_repo_folder, repo_name): 95 | """creates the gir repository bundle to upload 96 | 97 | arguments: 98 | gh_repo_folder -- the repo local folder path 99 | repo_name -- the repo name 100 | 101 | returns: 102 | bundle_path -- the path to the bundle file 103 | """ 104 | print(gh_repo_folder, repo_name) 105 | if os.path.exists(gh_repo_folder): 106 | main_pwd = os.getcwd() 107 | os.chdir(gh_repo_folder) 108 | bundle_name = '{}.bundle'.format(repo_name) 109 | subprocess.check_call(['git', 'bundle', 'create', bundle_name, '--all']) 110 | bundle_path = os.path.join(gh_repo_folder, bundle_name) 111 | os.chdir(main_pwd) 112 | else: 113 | raise ValueError('Error creating bundle, directory does not exist: {}'.format(gh_repo_folder)) 114 | return bundle_path 115 | 116 | def upload_ia(*, github_repo_folder, github_repo_data, ia_session, custom_meta=None): 117 | """Uploads the bundle to the Internet Archive. 118 | 119 | arguments: 120 | github_repo_folder -- path to the bundle 121 | github_repo_data -- repository metadata 122 | custom_meta -- custom metadata 123 | 124 | returns: 125 | item_name -- Internet Archive item identifier 126 | meta -- the item metadata 127 | bundle_filename -- the git bundle filename 128 | """ 129 | # formatting some dates string 130 | pushed = datetime.strptime(github_repo_data['pushed_at'], '%Y-%m-%dT%H:%M:%SZ') 131 | pushed_date = pushed.strftime('%Y-%m-%d_%H-%M-%S') 132 | raw_pushed_date = pushed.strftime('%Y-%m-%d %H:%M:%S') 133 | date = pushed.strftime('%Y-%m-%d') 134 | year = pushed.year 135 | 136 | # preparing some names 137 | repo_name = github_repo_data['full_name'].replace('/', '-') 138 | original_url = github_repo_data['html_url'] 139 | bundle_filename = '{}_-_{}'.format(repo_name, pushed_date) 140 | 141 | # preparing some description 142 | description_footer = f'To restore the repository download the bundle
wget https://archive.org/download/github.com-{bundle_filename}/{bundle_filename}.bundle
and run:
 git clone {bundle_filename}.bundle 
' 143 | description = f'
{github_repo_data['description']}

{get_description_from_readme(github_repo_folder)}
{description_footer}' 144 | 145 | # preparing uploader metadata 146 | uploader_url = github_repo_data['owner']['html_url'] 147 | uploader_name = github_repo_data['owner']['login'] 148 | 149 | # let's grab the avatar too 150 | uploader_avatar_url = github_repo_data['owner']['avatar_url'] 151 | pic = requests.get(uploader_avatar_url, stream = True) 152 | uploader_avatar_path = os.path.join(github_repo_folder, 'cover.jpg') 153 | with open(uploader_avatar_path, 'wb') as f: 154 | pic.raw.decode_content = True 155 | shutil.copyfileobj(pic.raw, f) 156 | 157 | # some Internet Archive Metadata 158 | collection = 'open_source_software' 159 | mediatype = 'software' 160 | subject = 'GitHub;code;software;git' 161 | 162 | uploader = f'{__main_name__} - {__version__}' 163 | 164 | description = f'{description}

Source: {original_url}
Uploader: {uploader_name}
Upload date: {date}' 165 | 166 | ## Creating bundle file of the git repo 167 | try: 168 | bundle_file = create_bundle(github_repo_folder, bundle_filename) 169 | except ValueError as err: 170 | print(str(err)) 171 | shutil.rmtree(github_repo_folder) 172 | exit(1) 173 | 174 | # inizializing the internet archive item name 175 | # here we set the ia identifier 176 | item_name = f'github.com-{repo_name}_-_{pushed_date}' 177 | title = item_name 178 | 179 | #initializing the main metadata 180 | meta = dict( 181 | mediatype=mediatype, 182 | creator=uploader_name, 183 | collection=collection, 184 | title=title, 185 | year=year, 186 | date=date, 187 | subject=subject, 188 | uploaded_with=uploader, 189 | originalurl=original_url, 190 | pushed_date=raw_pushed_date, 191 | description=description 192 | ) 193 | 194 | # override default metadata with any supplemental metadata provided. 195 | if custom_meta is not None: 196 | meta.update(custom_meta) 197 | 198 | try: 199 | # upload the item to the Internet Archive 200 | print(f"Creating item on Internet Archive: {meta['title']}") 201 | item = ia_session.get_item(item_name) 202 | # checking if the item already exists: 203 | if not item.exists: 204 | print(f"Uploading file to the internet archive: {bundle_file}") 205 | item.upload(bundle_file, metadata=meta, retries=3, verbose=True, delete=False) 206 | # upload the item to the Internet Archive 207 | print("Uploading avatar...") 208 | item.upload(os.path.join(github_repo_folder, 'cover.jpg'), retries=3, verbose=True, delete=True) 209 | else: 210 | print("\nSTOP: The same repository seems already archived.") 211 | print(f"---->> Archived repository URL: \n \thttps://archive.org/details/{item_name}") 212 | print(f"---->> Archived git bundle file: \n \thttps://archive.org/download/{item_name}/{bundle_filename}.bundle \n\n") 213 | shutil.rmtree(github_repo_folder) 214 | exit(0) 215 | 216 | except Exception as e: 217 | print(str(e)) 218 | shutil.rmtree(github_repo_folder) 219 | exit(1) 220 | 221 | # return item identifier and metadata as output 222 | return item_name, meta, bundle_filename 223 | 224 | def get_ia_session(s3_keys = None): 225 | """creates an ia (Internet Archive) session. If no s3_keys is provided tries to configure ia interactively. 226 | 227 | arguments: 228 | s3_keys -- tuple (access, secret) for S3 access (optional) 229 | returns: 230 | ia session or None if no s3 keys are provided and interactive configuration fails. 231 | """ 232 | if s3_keys is not None: 233 | return get_session(config={'s3': {'access': s3_keys[0], 'secret': s3_keys[1]}}) 234 | 235 | config_file = os.path.expanduser('~/.config/ia.ini') 236 | if not os.path.exists(config_file): 237 | # fallback config file 238 | config_file = os.path.expanduser('~/.ia') 239 | 240 | if not os.path.exists(config_file): 241 | msg = '\nWARNING - It looks like you need to configure your Internet Archive account!\n \ 242 | for registration go to https://archive.org/account/login.createaccount.php\n' 243 | print(msg) 244 | try: 245 | failed = subprocess.call(["ia", "configure"]) 246 | if failed: 247 | exit(1) 248 | except Exception as e: 249 | msg = f'\nSomething went wrong trying to configure your internet archive account.\n Error - {str(e)}' 250 | print(msg) 251 | exit(1) 252 | 253 | return get_session(config_file=config_file) 254 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # iagitup - Download github repository and upload it to the Internet Archive with metadata. 4 | 5 | # Copyright (C) 2017-2018 Giovanni Damiola 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | from __future__ import unicode_literals 20 | 21 | __author__ = "Giovanni Damiola" 22 | __copyright__ = "Copyright 2018, Giovanni Damiola" 23 | __main_name__ = 'iagitup' 24 | __license__ = 'GPLv3' 25 | __status__ = "Production/Stable" 26 | __version__ = "v1.8" 27 | 28 | import shutil 29 | import argparse 30 | 31 | from iagitup import iagitup 32 | 33 | PROGRAM_DESCRIPTION = 'A tool to archive a GitHub repository to the Internet Archive. \ 34 | The script downloads the GitHub repository, creates a git bundle and uploads \ 35 | it to archive.org. https://github.com/gdamdam/iagitup' 36 | 37 | # Configure argparser 38 | parser = argparse.ArgumentParser(description=PROGRAM_DESCRIPTION) 39 | parser.add_argument('--metadata', '-m', default=None, type=str, required=False, help='custom metadata to add to the archive.org item') 40 | parser.add_argument('--s3-access', '-s3a', default=None, type=str, required=False, help='Internet Archive S3 access key (from https://archive.org/account/s3.php)') 41 | parser.add_argument('--s3-secret', '-s3s', default=None, type=str, required=False, help='Internet Archive S3 secret key (from https://archive.org/account/s3.php)') 42 | parser.add_argument('--version', '-v', action='version', version=__version__) 43 | parser.add_argument('url', type=str, help='[GITHUB REPO] to archive') 44 | args = parser.parse_args() 45 | 46 | def main(): 47 | if args.url == "": 48 | return 49 | 50 | s3_keys = None 51 | if args.s3_access is not None and args.s3_secret is not None: 52 | s3_keys = (args.s3_access, args.s3_secret) 53 | ia_session = iagitup.get_ia_session(s3_keys) 54 | 55 | repo_url = args.url 56 | custom_metadata = args.metadata 57 | custom_meta_dict = None 58 | 59 | print(f":: Downloading {repo_url} repository...") 60 | repo_data, repo_dir = iagitup.repo_download(repo_url) 61 | 62 | # parse supplemental metadata. 63 | if custom_metadata is not None: 64 | custom_meta_dict = {} 65 | for meta in custom_metadata.split(','): 66 | k, v = meta.split(':') 67 | custom_meta_dict[k] = v 68 | 69 | # upload the repo on IA 70 | identifier, meta, bundle_filename = iagitup.upload_ia( 71 | github_repo_folder=repo_dir, 72 | github_repo_data=repo_data, 73 | ia_session=ia_session, 74 | custom_meta=custom_meta_dict) 75 | 76 | # cleaning 77 | shutil.rmtree(repo_dir) 78 | 79 | # output 80 | print("\n:: Upload FINISHED. Item information:") 81 | print(f"Identifier: {meta['title']}") 82 | print(f"Archived repository URL: \n \thttps://archive.org/details/{identifier}") 83 | print(f"Archived git bundle file: \n \thttps://archive.org/download/{identifier}/{bundle_filename}.bundle \n\n") 84 | 85 | 86 | if __name__ == '__main__': 87 | main() 88 | 89 | -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "certifi" 5 | version = "2024.7.4" 6 | description = "Python package for providing Mozilla's CA Bundle." 7 | optional = false 8 | python-versions = ">=3.6" 9 | groups = ["main"] 10 | files = [ 11 | {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, 12 | {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, 13 | ] 14 | 15 | [[package]] 16 | name = "charset-normalizer" 17 | version = "3.3.2" 18 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." 19 | optional = false 20 | python-versions = ">=3.7.0" 21 | groups = ["main"] 22 | files = [ 23 | {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, 24 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, 25 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, 26 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, 27 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, 28 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, 29 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, 30 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, 31 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, 32 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, 33 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, 34 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, 35 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, 36 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, 37 | {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, 38 | {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, 39 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, 40 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, 41 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, 42 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, 43 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, 44 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, 45 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, 46 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, 47 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, 48 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, 49 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, 50 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, 51 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, 52 | {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, 53 | {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, 54 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, 55 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, 56 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, 57 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, 58 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, 59 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, 60 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, 61 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, 62 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, 63 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, 64 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, 65 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, 66 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, 67 | {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, 68 | {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, 69 | {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, 70 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, 71 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, 72 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, 73 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, 74 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, 75 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, 76 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, 77 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, 78 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, 79 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, 80 | {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, 81 | {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, 82 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, 83 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, 84 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, 85 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, 86 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, 87 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, 88 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, 89 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, 90 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, 91 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, 92 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, 93 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, 94 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, 95 | {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, 96 | {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, 97 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, 98 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, 99 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, 100 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, 101 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, 102 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, 103 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, 104 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, 105 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, 106 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, 107 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, 108 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, 109 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, 110 | {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, 111 | {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, 112 | {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, 113 | ] 114 | 115 | [[package]] 116 | name = "colorama" 117 | version = "0.4.6" 118 | description = "Cross-platform colored terminal text." 119 | optional = false 120 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 121 | groups = ["main"] 122 | markers = "platform_system == \"Windows\"" 123 | files = [ 124 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 125 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 126 | ] 127 | 128 | [[package]] 129 | name = "gitdb" 130 | version = "4.0.11" 131 | description = "Git Object Database" 132 | optional = false 133 | python-versions = ">=3.7" 134 | groups = ["main"] 135 | files = [ 136 | {file = "gitdb-4.0.11-py3-none-any.whl", hash = "sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4"}, 137 | {file = "gitdb-4.0.11.tar.gz", hash = "sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b"}, 138 | ] 139 | 140 | [package.dependencies] 141 | smmap = ">=3.0.1,<6" 142 | 143 | [[package]] 144 | name = "gitpython" 145 | version = "3.1.44" 146 | description = "GitPython is a Python library used to interact with Git repositories" 147 | optional = false 148 | python-versions = ">=3.7" 149 | groups = ["main"] 150 | files = [ 151 | {file = "GitPython-3.1.44-py3-none-any.whl", hash = "sha256:9e0e10cda9bed1ee64bc9a6de50e7e38a9c9943241cd7f585f6df3ed28011110"}, 152 | {file = "gitpython-3.1.44.tar.gz", hash = "sha256:c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269"}, 153 | ] 154 | 155 | [package.dependencies] 156 | gitdb = ">=4.0.1,<5" 157 | 158 | [package.extras] 159 | doc = ["sphinx (>=7.1.2,<7.2)", "sphinx-autodoc-typehints", "sphinx_rtd_theme"] 160 | test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3.8\"", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions ; python_version < \"3.11\""] 161 | 162 | [[package]] 163 | name = "idna" 164 | version = "3.10" 165 | description = "Internationalized Domain Names in Applications (IDNA)" 166 | optional = false 167 | python-versions = ">=3.6" 168 | groups = ["main"] 169 | files = [ 170 | {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, 171 | {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, 172 | ] 173 | 174 | [package.extras] 175 | all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] 176 | 177 | [[package]] 178 | name = "internetarchive" 179 | version = "5.4.0" 180 | description = "A Python interface to archive.org." 181 | optional = false 182 | python-versions = ">=3.9" 183 | groups = ["main"] 184 | files = [ 185 | {file = "internetarchive-5.4.0-py3-none-any.whl", hash = "sha256:4d5c9b059a68172439b2b1e00e84133ab6bc3b2f758fa2bc91f72fac552b215d"}, 186 | {file = "internetarchive-5.4.0.tar.gz", hash = "sha256:869d6606210d333c7faca709196fad9bdcb925b614c134920ce8eb24b82ecffd"}, 187 | ] 188 | 189 | [package.dependencies] 190 | jsonpatch = ">=0.4" 191 | requests = ">=2.25.0,<3.0.0" 192 | tqdm = ">=4.0.0" 193 | urllib3 = ">=1.26.0" 194 | 195 | [package.extras] 196 | all = ["black", "mypy", "pre-commit", "pytest", "pytest (==7.1.2)", "responses (==0.20.0)", "ruff (==0.8.5)", "safety", "setuptools", "tqdm-stubs (>=0.2.0)", "types-colorama", "types-jsonpatch (>=0.1.0a0)", "types-pygments", "types-requests (>=2.25.0,<3.0.0)", "types-setuptools", "types-ujson (>=4.2.0)", "types-urllib3 (>=1.26.0)"] 197 | dev = ["black", "mypy", "pre-commit", "pytest", "safety", "setuptools"] 198 | docs = ["alabaster (==0.7.12)", "docutils (<0.18)", "sphinx (==4.5.0)", "sphinx-autodoc-typehints (==1.18.1)"] 199 | test = ["pytest (==7.1.2)", "responses (==0.20.0)", "ruff (==0.8.5)"] 200 | types = ["tqdm-stubs (>=0.2.0)", "types-colorama", "types-jsonpatch (>=0.1.0a0)", "types-pygments", "types-requests (>=2.25.0,<3.0.0)", "types-setuptools", "types-ujson (>=4.2.0)", "types-urllib3 (>=1.26.0)"] 201 | 202 | [[package]] 203 | name = "jsonpatch" 204 | version = "1.33" 205 | description = "Apply JSON-Patches (RFC 6902)" 206 | optional = false 207 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" 208 | groups = ["main"] 209 | files = [ 210 | {file = "jsonpatch-1.33-py2.py3-none-any.whl", hash = "sha256:0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade"}, 211 | {file = "jsonpatch-1.33.tar.gz", hash = "sha256:9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c"}, 212 | ] 213 | 214 | [package.dependencies] 215 | jsonpointer = ">=1.9" 216 | 217 | [[package]] 218 | name = "jsonpointer" 219 | version = "2.4" 220 | description = "Identify specific nodes in a JSON document (RFC 6901)" 221 | optional = false 222 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" 223 | groups = ["main"] 224 | files = [ 225 | {file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"}, 226 | {file = "jsonpointer-2.4.tar.gz", hash = "sha256:585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"}, 227 | ] 228 | 229 | [[package]] 230 | name = "markdown2" 231 | version = "2.5.3" 232 | description = "A fast and complete Python implementation of Markdown" 233 | optional = false 234 | python-versions = "<4,>=3.9" 235 | groups = ["main"] 236 | files = [ 237 | {file = "markdown2-2.5.3-py3-none-any.whl", hash = "sha256:a8ebb7e84b8519c37bf7382b3db600f1798a22c245bfd754a1f87ca8d7ea63b3"}, 238 | {file = "markdown2-2.5.3.tar.gz", hash = "sha256:4d502953a4633408b0ab3ec503c5d6984d1b14307e32b325ec7d16ea57524895"}, 239 | ] 240 | 241 | [package.extras] 242 | all = ["latex2mathml ; python_version >= \"3.8.1\"", "pygments (>=2.7.3)", "wavedrom"] 243 | code-syntax-highlighting = ["pygments (>=2.7.3)"] 244 | latex = ["latex2mathml ; python_version >= \"3.8.1\""] 245 | wavedrom = ["wavedrom"] 246 | 247 | [[package]] 248 | name = "requests" 249 | version = "2.32.3" 250 | description = "Python HTTP for Humans." 251 | optional = false 252 | python-versions = ">=3.8" 253 | groups = ["main"] 254 | files = [ 255 | {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, 256 | {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, 257 | ] 258 | 259 | [package.dependencies] 260 | certifi = ">=2017.4.17" 261 | charset-normalizer = ">=2,<4" 262 | idna = ">=2.5,<4" 263 | urllib3 = ">=1.21.1,<3" 264 | 265 | [package.extras] 266 | socks = ["PySocks (>=1.5.6,!=1.5.7)"] 267 | use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] 268 | 269 | [[package]] 270 | name = "smmap" 271 | version = "5.0.1" 272 | description = "A pure Python implementation of a sliding window memory map manager" 273 | optional = false 274 | python-versions = ">=3.7" 275 | groups = ["main"] 276 | files = [ 277 | {file = "smmap-5.0.1-py3-none-any.whl", hash = "sha256:e6d8668fa5f93e706934a62d7b4db19c8d9eb8cf2adbb75ef1b675aa332b69da"}, 278 | {file = "smmap-5.0.1.tar.gz", hash = "sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62"}, 279 | ] 280 | 281 | [[package]] 282 | name = "tqdm" 283 | version = "4.66.3" 284 | description = "Fast, Extensible Progress Meter" 285 | optional = false 286 | python-versions = ">=3.7" 287 | groups = ["main"] 288 | files = [ 289 | {file = "tqdm-4.66.3-py3-none-any.whl", hash = "sha256:4f41d54107ff9a223dca80b53efe4fb654c67efaba7f47bada3ee9d50e05bd53"}, 290 | {file = "tqdm-4.66.3.tar.gz", hash = "sha256:23097a41eba115ba99ecae40d06444c15d1c0c698d527a01c6c8bd1c5d0647e5"}, 291 | ] 292 | 293 | [package.dependencies] 294 | colorama = {version = "*", markers = "platform_system == \"Windows\""} 295 | 296 | [package.extras] 297 | dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] 298 | notebook = ["ipywidgets (>=6)"] 299 | slack = ["slack-sdk"] 300 | telegram = ["requests"] 301 | 302 | [[package]] 303 | name = "urllib3" 304 | version = "2.2.2" 305 | description = "HTTP library with thread-safe connection pooling, file post, and more." 306 | optional = false 307 | python-versions = ">=3.8" 308 | groups = ["main"] 309 | files = [ 310 | {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, 311 | {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, 312 | ] 313 | 314 | [package.extras] 315 | brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] 316 | h2 = ["h2 (>=4,<5)"] 317 | socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] 318 | zstd = ["zstandard (>=0.18.0)"] 319 | 320 | [metadata] 321 | lock-version = "2.1" 322 | python-versions = "^3.11" 323 | content-hash = "43faa781a1c2c5f479ecf579c97e849589e8bf2a11a70d4be088c5147c1e709b" 324 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | package-mode = false 3 | 4 | [tool.poetry.dependencies] 5 | python = "^3.12" 6 | internetarchive = "^5.4.0" 7 | gitpython = "^3.1.44" 8 | markdown2 = "^2.5.3" 9 | 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /repositories/list.txt: -------------------------------------------------------------------------------- 1 | https://github.com/bepass-org/oblivion 2 | https://github.com/bepass-org/oblivion-desktop 3 | https://github.com/bepass-org/warp-plus 4 | https://github.com/ircfspace/endpoint 5 | https://github.com/ircfspace/warpkey 6 | https://github.com/ircfspace/tconfig 7 | https://github.com/ircfspace/location 8 | https://github.com/ircfspace/fragment 9 | https://github.com/soroushmirzaei/telegram-configs-collector 10 | https://github.com/Chocolate4U/Iran-sing-box-rules 11 | https://github.com/TheyCallMeSecond/config-examples 12 | https://github.com/TheyCallMeSecond/Argo 13 | https://github.com/TheyCallMeSecond/sing-box-manager 14 | https://github.com/TheyCallMeSecond/WARP-Endpoint-IP 15 | https://github.com/2dust/v2rayN 16 | https://github.com/2dust/v2rayNG 17 | https://github.com/2dust/AndroidLibV2rayLite 18 | https://github.com/2dust/AndroidLibXrayLite 19 | https://github.com/2dust/v2flyNG 20 | https://github.com/2dust/D-Tools 21 | https://github.com/2dust/clashN 22 | https://github.com/xchacha20-poly1305/airport2hell 23 | https://github.com/xchacha20-poly1305/anchor 24 | https://github.com/xchacha20-poly1305/AnPing 25 | https://github.com/xchacha20-poly1305/AnSip 26 | https://github.com/xchacha20-poly1305/antibody 27 | https://github.com/xchacha20-poly1305/husi 28 | https://github.com/xchacha20-poly1305/TLS-scribe 29 | https://github.com/tun2proxy/tun2proxy 30 | https://github.com/tun2proxy/tproxy-config 31 | https://github.com/tun2proxy/wintun-bindings 32 | https://github.com/tun2proxy/socks5-impl 33 | https://github.com/tun2proxy/slirpnetstack 34 | https://github.com/tun2proxy/dns2socks 35 | https://github.com/tun2proxy/socks-hub 36 | https://github.com/vfarid/v2ray-worker 37 | https://github.com/arshiacomplus/WarpScanner 38 | https://github.com/MortezaBashsiz/CFScanner 39 | https://github.com/GFW-knocker/MahsaNG 40 | https://github.com/GFW-knocker/Xray-core 41 | https://github.com/Surfboardv2ray/batch-fragment-scanner 42 | https://github.com/Surfboardv2ray/v2ray-refiner 43 | https://github.com/Surfboardv2ray/Trojan-worker 44 | https://github.com/Surfboardv2ray/Xray-Load-Balancer 45 | https://github.com/lord-alfred/ipranges 46 | https://github.com/ByteMysticRogue/Hiddify-Warp 47 | https://github.com/kyochikuto/sing-box-plus 48 | https://github.com/ShadowZagrosDev/oblivion-helper 49 | --------------------------------------------------------------------------------