├── .flake8 ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── python-ci.yml │ └── python-packages.yml ├── .gitignore ├── COPYING ├── MANIFEST.in ├── README.rst ├── RELEASE.rst ├── calcleaner ├── __init__.py ├── __main__.py ├── about_dialog.py ├── account_edit_dialog.py ├── accounts.py ├── accounts_manage_dialog.py ├── application.py ├── caldav_helpers.py ├── calendar_store.py ├── data │ ├── images │ │ ├── calcleaner.svg │ │ ├── calcleaner_128.png │ │ ├── calcleaner_256.png │ │ ├── calcleaner_32.png │ │ └── calcleaner_64.png │ ├── style │ │ └── calcleaner.css │ └── ui │ │ ├── account-edit-dialog.glade │ │ ├── accounts-manage-dialog.glade │ │ └── main-window.glade ├── data_helpers.py ├── helpers.py ├── main_window.py └── translation.py ├── linuxpkg ├── README.rst ├── calcleaner.1 ├── copy-data.sh ├── org.flozz.calcleaner.desktop └── org.flozz.calcleaner.metainfo.xml ├── locales ├── de.po ├── fr.po ├── hr.po ├── it.po ├── messages.pot ├── nl.po ├── pt_BR.po └── tr.po ├── noxfile.py ├── screenshot.png └── setup.py /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E203, E241, W503, E501 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: flozz 2 | custom: 3 | - https://www.paypal.me/0xflozz 4 | - https://www.buymeacoffee.com/flozz 5 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/python-ci.yml: -------------------------------------------------------------------------------- 1 | name: Lint and Tests 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | 7 | test: 8 | 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] 14 | 15 | steps: 16 | 17 | - name: "Pull the repository" 18 | uses: actions/checkout@v4 19 | 20 | - name: "Install OS Dependencies" 21 | run: | 22 | sudo apt-get update 23 | sudo apt-get install -y libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 gettext 24 | 25 | - name: "Set up Python ${{ matrix.python-version }}" 26 | uses: actions/setup-python@v5 27 | with: 28 | python-version: ${{ matrix.python-version }} 29 | 30 | - name: "Install Nox" 31 | run: | 32 | pip3 install setuptools 33 | pip3 install nox 34 | 35 | - name: "Lint with Flake8 and Black" 36 | run: | 37 | python3 -m nox --session lint 38 | 39 | - name: "Test with pytest" 40 | run: | 41 | python3 -m nox --session test-${{ matrix.python-version }} 42 | 43 | - name: "Check locales" 44 | run: | 45 | python3 -m nox --session locales_update 46 | python3 -m nox --session locales_compile 47 | -------------------------------------------------------------------------------- /.github/workflows/python-packages.yml: -------------------------------------------------------------------------------- 1 | name: "Build and Publish Python Packages" 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v[0-9]+\\.[0-9]+\\.[0-9]+" 7 | - "v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+" 8 | 9 | jobs: 10 | 11 | build_sdist_wheel: 12 | 13 | name: "Source and wheel distribution" 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | 18 | - name: "Checkout the repository" 19 | uses: actions/checkout@v4 20 | with: 21 | submodules: true 22 | 23 | - name: "Install build dependencies" 24 | run: | 25 | sudo apt-get install -y gettext 26 | 27 | - name: "Set up Python" 28 | uses: actions/setup-python@v5 29 | with: 30 | python-version: "3.13" 31 | 32 | - name: "Install Python build dependencies" 33 | run: | 34 | pip install setuptools wheel nox 35 | 36 | - name: "Compile locales" 37 | run: | 38 | nox -s locales_compile 39 | 40 | - name: "Build source distribution" 41 | run: | 42 | python setup.py sdist 43 | 44 | - name: "Build wheel" 45 | run: | 46 | python setup.py bdist_wheel 47 | 48 | - name: "Upload artifacts" 49 | uses: actions/upload-artifact@v4 50 | with: 51 | name: calcleaner-dist 52 | path: dist/ 53 | retention-days: 1 54 | 55 | publish_pypi: 56 | 57 | name: "Publish packages on PyPI" 58 | runs-on: ubuntu-latest 59 | needs: 60 | - build_sdist_wheel 61 | 62 | steps: 63 | 64 | - name: "Download artifacts" 65 | uses: actions/download-artifact@v4 66 | 67 | - name: "Move packages to the dist/ folder" 68 | run: | 69 | mkdir dist/ 70 | mv calcleaner-dist/* dist/ 71 | 72 | - name: "Publish packages on PyPI" 73 | uses: pypa/gh-action-pypi-publish@release/v1 74 | with: 75 | password: ${{ secrets.PYPI_API_TOKEN }} 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | dist/ 3 | __env__/ 4 | *.egg* 5 | __pycache__ 6 | .nox 7 | *~ 8 | *# 9 | *.mo 10 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include COPYING 3 | recursive-include calcleaner/data/ui/ *.glade 4 | recursive-include calcleaner/data/images/ *.svg 5 | recursive-include calcleaner/data/images/ *.png 6 | recursive-include calcleaner/data/locales/ *.mo 7 | recursive-include calcleaner/data/style/ *.css 8 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | CalCleaner 2 | ========== 3 | 4 | |Github| |Discord| |Github Actions| |Black| |License| 5 | 6 | A simple graphical tool to purge old events from CalDAV calendars 7 | 8 | .. figure:: ./screenshot.png 9 | :alt: Screenshot of Calcleaner 10 | 11 | 12 | Requirements 13 | ------------ 14 | 15 | Python: 16 | 17 | * `PyGObject `_ 18 | * `caldav `_ 19 | 20 | 21 | Install 22 | ------- 23 | 24 | Flatpak (Linux) 25 | ~~~~~~~~~~~~~~~ 26 | 27 | A Flatpak package is available on Flathub. This is currently the simplest way 28 | to install CalCleaner on all major Linux distributions: 29 | 30 | * https://flathub.org/apps/details/org.flozz.calcleaner 31 | 32 | 33 | Linux (source) 34 | ~~~~~~~~~~~~~~ 35 | 36 | First, you will need to install some dependencies on your system. On Debian and 37 | Ubuntu this can be achieved with the following command:: 38 | 39 | sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev pkg-config gir1.2-gtk-3.0 40 | 41 | Then clone this repository and navigate to it:: 42 | 43 | git clone https://github.com/flozz/calcleaner.git 44 | cd calcleaner 45 | 46 | Then install CalCleaner using pip:: 47 | 48 | sudo pip3 install . 49 | 50 | Finally, you can install desktop file, icons and manual using the following 51 | command:: 52 | 53 | sudo ./linuxpkg/copy-data.sh /usr 54 | 55 | 56 | Linux (PyPI) 57 | ~~~~~~~~~~~~ 58 | 59 | First, you will need to install some dependencies on your system. On Debian and 60 | Ubuntu this can be achieved with the following command:: 61 | 62 | sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev pkg-config gir1.2-gtk-3.0 63 | 64 | Then install CalCleaner using pip:: 65 | 66 | sudo pip3 install calcleaner 67 | 68 | **NOTE:** Installing from PyPI will not install ``.desktop`` file and man page. 69 | You will not be able to run the software from your graphical app menu (GNOME 70 | Shell,...). 71 | 72 | 73 | Contributing / Hacking 74 | ---------------------- 75 | 76 | Questions 77 | ~~~~~~~~~ 78 | 79 | If you have any question, you can: 80 | 81 | * `open an issue `_ on Github, 82 | * or `ask on Discord `_ (I am not always 83 | available for chatting but I try to answer to everyone). 84 | 85 | 86 | Bugs 87 | ~~~~ 88 | 89 | If you found a bug, please `open an issue 90 | `_ on Github with as much 91 | information as possible: 92 | 93 | * What is your operating system / Linux distribution (and its version), 94 | * How you installed the software, 95 | * All the logs and message outputted by the software, 96 | * ... 97 | 98 | 99 | Pull Requests 100 | ~~~~~~~~~~~~~ 101 | 102 | Please consider `filing a bug `_ 103 | before starting to work on a new feature. This will allow us to discuss the 104 | best way to do it. This is of course not necessary if you just want to fix some 105 | typo or small errors in the code. 106 | 107 | Please note that your code must pass tests and follow the coding style defined 108 | by the `pep8 `_. `Flake8 109 | `_ and `Black 110 | `_ are used on this project to enforce 111 | coding style. 112 | 113 | 114 | Translating Calcleaner 115 | ~~~~~~~~~~~~~~~~~~~~~~ 116 | 117 | If the software is not available in your language, you can help translate it. 118 | 119 | To translate Calcleaner, you can submit your translations using a Pull Request 120 | on Github, 121 | 122 | Do not forget to add your name as the translation of the ``translator-credits`` 123 | key (one name per line, e-mail is optional):: 124 | 125 | msgid "translator-credits" 126 | msgstr "" 127 | "John DOE\n" 128 | "Other TRANSLATOR \n" 129 | 130 | 131 | Running the project 132 | ~~~~~~~~~~~~~~~~~~~ 133 | 134 | First, install dependencies (preferably in a virtualenv):: 135 | 136 | pip install -e ".[dev]" 137 | 138 | Then run:: 139 | 140 | python -m calcleaner 141 | 142 | 143 | Coding Style / Lint 144 | ~~~~~~~~~~~~~~~~~~~ 145 | 146 | This project follows `Black's `_ coding style. 147 | 148 | To check coding style, you will first have to install `nox `_:: 149 | 150 | pip3 install nox 151 | 152 | Then you can check for lint error (Flake8 and Black):: 153 | 154 | nox --session lint 155 | 156 | You can fix automatically coding style with:: 157 | 158 | nox -s black_fix 159 | 160 | 161 | Tests 162 | ~~~~~ 163 | 164 | Tu run tests, you will first have to install `nox `_:: 165 | 166 | pip3 install nox 167 | 168 | Then run the following command:: 169 | 170 | nox -s test 171 | 172 | 173 | Extract, Update or Build Translations 174 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 175 | 176 | You will first have to install `nox `_:: 177 | 178 | pip3 install nox 179 | 180 | To extract messages and update locales run:: 181 | 182 | nox --session locales_update 183 | 184 | To compile locales, run:: 185 | 186 | nox --session locales_compile 187 | 188 | **NOTE:** you will need to have ``xgettext``, ``msgmerge`` and ``msgfmt`` 189 | executable installed on your system to run the above commands. On Debian / 190 | Ubuntu, they can be installed with the following command:: 191 | 192 | sudo apt install gettext 193 | 194 | 195 | Regenerating Icons 196 | ~~~~~~~~~~~~~~~~~~ 197 | 198 | To regenerate icons, Inkscape must be installed. On Debian and Ubuntu you can 199 | install it with the following command:: 200 | 201 | sudo apt install inkscape 202 | 203 | You will also need `nox `_ to run the generation 204 | command:: 205 | 206 | pip3 install nox 207 | 208 | Once everithing installed, you can regenerate icons with the following command:: 209 | 210 | nox -s gen_icons 211 | 212 | 213 | Supporting this project 214 | ----------------------- 215 | 216 | Wanna support this project? 217 | 218 | * `☕️ Buy me a coffee `__, 219 | * `❤️ sponsor me on Github `__, 220 | * `💵️ or give me a tip on PayPal `__. 221 | 222 | 223 | Changelog 224 | --------- 225 | 226 | * **[NEXT]** (changes on ``master`` but not released yet): 227 | 228 | * misc: Added Python 3.12, 3.13 support (@flozz) 229 | * misc!: Removed Python 3.7, 3.8 support (@flozz) 230 | 231 | * **v1.1.3:** 232 | 233 | * Added Turkish translation (@sabriunal, #8) 234 | 235 | * **v1.1.2:** 236 | 237 | * Added Croatian translation (@milotype, #7) 238 | * Added Python 3.11 support 239 | 240 | * **v1.1.1:** 241 | 242 | * Added German translation (Jürgen Benvenuti) 243 | 244 | * **v1.1.0:** 245 | 246 | * UI improvements: 247 | 248 | * Double border removed in calendar view 249 | * Accessibility improved by changing the widgets used to build the "pages" 250 | of the main window 251 | 252 | * Translations: 253 | 254 | * Dutch (#5, @Vistaus) 255 | * Brazilian Portuguese (incomplete) 256 | 257 | * **v1.0.0:** 258 | 259 | * Allow to disable SSL certificate validation (self-signed certificate, etc.) 260 | * Improve error message on SSL errors 261 | * Set the user agent string to "CalCleaner/" 262 | * Fix calendar of removed account still displayed after closing account 263 | management dialog 264 | * Fix a crash when cleaning an empty (malformed) event 265 | * Italian translation (#1, @albanobattistella) 266 | 267 | * **v0.9.1 (beta):** 268 | 269 | * Fix data not included in packages 270 | 271 | * **v0.9.0 (beta):** 272 | 273 | * Initial release 274 | * French translation 275 | 276 | 277 | .. |Github| image:: https://img.shields.io/github/stars/flozz/calcleaner?label=Github&logo=github 278 | :target: https://github.com/flozz/calcleaner 279 | 280 | .. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff 281 | :target: https://discord.gg/P77sWhuSs4 282 | 283 | .. |Github Actions| image:: https://github.com/flozz/calcleaner/actions/workflows/python-ci.yml/badge.svg 284 | :target: https://github.com/flozz/calcleaner/actions 285 | 286 | .. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg 287 | :target: https://black.readthedocs.io/en/stable/ 288 | 289 | .. |License| image:: https://img.shields.io/github/license/flozz/calcleaner 290 | :target: https://github.com/flozz/calcleaner/blob/master/COPYING 291 | -------------------------------------------------------------------------------- /RELEASE.rst: -------------------------------------------------------------------------------- 1 | Things to do while releasing a new version 2 | ========================================== 3 | 4 | This file is a memo for the maintainer. 5 | 6 | 7 | 0. Checks 8 | --------- 9 | 10 | * Check Copyright years in the About dialog 11 | * Update screenshots 12 | * Check screenshot links in ``linuxpkg/org.flozz.yoga-image-optimizer.metainfo.xml`` 13 | 14 | 15 | 1. Release 16 | ---------- 17 | 18 | * Update version number in ``setup.py`` 19 | * Update version number in ``calcleaner/__init__.py`` 20 | * Edit / update changelog in ``README.rst`` 21 | * Add release in ``linuxpkg/org.flozz.calcleaner.metainfo.xml`` 22 | * Check appstream file: ``appstream-util validate-relax linuxpkg/org.flozz.calcleaner.metainfo.xml`` 23 | * Commit / tag (``git commit -m vX.Y.Z && git tag vX.Y.Z && git push && git push --tags``) 24 | 25 | 26 | 2. Publish PyPI package 27 | ----------------------- 28 | 29 | Publish source dist and wheels on PyPI. 30 | 31 | → Automated with Github Actions :) 32 | 33 | 34 | 3. Publish Github Release 35 | ------------------------- 36 | 37 | * Make a release on Github 38 | * Add changelog 39 | 40 | 41 | 4. Publish the Flatpak package 42 | ------------------------------ 43 | 44 | Package repo: https://github.com/flathub/org.flozz.calcleaner 45 | 46 | * Update commit **tag and hash** in ``org.flozz.calcleaner.yml`` 47 | * Update dependencies (``./update-dependencies.sh``) 48 | * Test the package: 49 | 50 | * Install the SDK: ``flatpak install flathub org.gnome.Sdk//45`` 51 | * Install the runtime: ``flatpak install flathub org.gnome.Platform//45`` 52 | * Build/install: ``flatpak-builder --force-clean --install --user build org.flozz.calcleaner.yml`` 53 | * Run: ``flatpak run --user org.flozz.calcleaner`` 54 | * Clean ``flatpak remove --user org.flozz.calcleaner`` 55 | 56 | * Create branch: ``git checkout -b release-vX.Y.Z`` 57 | * Publish: commit / tag / push: ``git commit -m vX.Y.Z && git tag vX.Y.Z && git push && git push --tags`` 58 | * Create Pull Request 59 | * Merge Pull Request once tests passed 60 | -------------------------------------------------------------------------------- /calcleaner/__init__.py: -------------------------------------------------------------------------------- 1 | import gi 2 | 3 | gi.require_version("Gtk", "3.0") 4 | gi.require_version("Secret", "1") 5 | 6 | APPLICATION_ID = "org.flozz.calcleaner" 7 | APPLICATION_NAME = "Calendar Cleaner" 8 | VERSION = "1.1.3" 9 | -------------------------------------------------------------------------------- /calcleaner/__main__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import argparse 3 | 4 | from .application import CalcleanerApplication 5 | from . import VERSION 6 | 7 | 8 | def main(args=sys.argv): 9 | # Basic CLI using argparse (simpler than using GTK Application CLI) 10 | cli_parser = argparse.ArgumentParser() 11 | cli_parser.add_argument( 12 | "-v", 13 | "--version", 14 | action="version", 15 | version=VERSION, 16 | ) 17 | cli_parser.parse_args(args[1:]) 18 | 19 | # GTK Application 20 | app = CalcleanerApplication() 21 | app.run(args) 22 | 23 | 24 | if __name__ == "__main__": 25 | main() 26 | -------------------------------------------------------------------------------- /calcleaner/about_dialog.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Gtk 2 | from gi.repository import GdkPixbuf 3 | 4 | from . import APPLICATION_NAME 5 | from . import VERSION 6 | from . import data_helpers 7 | from .translation import gettext as _ 8 | 9 | 10 | class AboutDialog(Gtk.AboutDialog): 11 | def __init__(self, parent=None): 12 | Gtk.AboutDialog.__init__( 13 | self, 14 | parent=parent, 15 | program_name=APPLICATION_NAME, 16 | comments=_( 17 | "A simple graphical tool to purge old events from CalDAV calendars" 18 | ), 19 | version=VERSION, 20 | copyright="Copyright (c) 2022-2023 Fabien LOISON", 21 | website_label="github.com/flozz/calcleaner", 22 | website="https://github.com/flozz/calcleaner", 23 | license_type=Gtk.License.GPL_3_0, 24 | ) 25 | 26 | logo = GdkPixbuf.Pixbuf.new_from_file( 27 | data_helpers.find_data_path("images/calcleaner_128.png") 28 | ) 29 | self.set_logo(logo) 30 | 31 | self.set_translator_credits(_("translator-credits")) 32 | -------------------------------------------------------------------------------- /calcleaner/account_edit_dialog.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from gi.repository import Gtk 4 | 5 | from . import APPLICATION_ID 6 | from . import data_helpers 7 | from . import caldav_helpers 8 | 9 | 10 | class AccountEditDialog(object): 11 | def __init__( 12 | self, 13 | url="", 14 | verify_cert=True, 15 | username="", 16 | password="", 17 | parent_window=None, 18 | ): 19 | self._response = None 20 | 21 | self._builder = Gtk.Builder() 22 | self._builder.set_translation_domain(APPLICATION_ID) 23 | self._builder.add_from_file( 24 | data_helpers.find_data_path("ui/account-edit-dialog.glade") 25 | ) 26 | self._builder.connect_signals(self) 27 | 28 | self._dialog = self._builder.get_object("account-edit-dialog") 29 | self._dialog.set_transient_for(parent_window) 30 | 31 | self._url_entry = self._builder.get_object("url-entry") 32 | self._disable_verify_cert_checkbutton = self._builder.get_object( 33 | "disable-verify-cert-checkbutton" 34 | ) 35 | self._username_entry = self._builder.get_object("username-entry") 36 | self._password_entry = self._builder.get_object("password-entry") 37 | self._ok_button = self._builder.get_object("ok-button") 38 | 39 | self._url_entry.set_text(url) 40 | self._disable_verify_cert_checkbutton.set_active(not verify_cert) 41 | self._username_entry.set_text(username) 42 | self._password_entry.set_text(password) 43 | 44 | self._validate_inputs() 45 | 46 | def run(self): 47 | self._dialog.run() 48 | return self._response 49 | 50 | def _validate_inputs(self, *args): 51 | inputs_ok = True 52 | 53 | if not re.match(r"https?://.+", self._url_entry.get_text()): 54 | inputs_ok = False 55 | 56 | if not self._username_entry.get_text(): 57 | inputs_ok = False 58 | 59 | if not self._password_entry.get_text(): 60 | inputs_ok = False 61 | 62 | self._ok_button.set_sensitive(inputs_ok) 63 | 64 | def _on_cancel(self, *args): 65 | self._dialog.destroy() 66 | 67 | def _on_validate(self, *args): 68 | self._response = { 69 | "name": caldav_helpers.readable_account_url( 70 | self._url_entry.get_text(), 71 | self._username_entry.get_text(), 72 | ), 73 | "url": self._url_entry.get_text(), 74 | "verify_cert": not self._disable_verify_cert_checkbutton.get_active(), 75 | "username": self._username_entry.get_text(), 76 | "password": self._password_entry.get_text(), 77 | } 78 | self._dialog.destroy() 79 | -------------------------------------------------------------------------------- /calcleaner/accounts.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Secret 2 | 3 | from . import APPLICATION_ID 4 | 5 | 6 | _SECRET_SCHEMA = Secret.Schema.new( 7 | APPLICATION_ID, 8 | Secret.SchemaFlags.NONE, 9 | { 10 | "account_name": Secret.SchemaAttributeType.STRING, 11 | "url": Secret.SchemaAttributeType.STRING, 12 | "verify_cert": Secret.SchemaAttributeType.BOOLEAN, 13 | "username": Secret.SchemaAttributeType.STRING, 14 | }, 15 | ) 16 | 17 | 18 | class Accounts(object): 19 | """Manage accounts.""" 20 | 21 | def __init__(self): 22 | self._accounts = {} 23 | 24 | def load(self): 25 | secrets = Secret.password_search_sync( 26 | _SECRET_SCHEMA, 27 | {}, 28 | Secret.SearchFlags.ALL, 29 | None, 30 | ) 31 | for secret in secrets: 32 | attr = secret.get_attributes() 33 | verify_cert = True 34 | if "verify_cert" in attr: 35 | verify_cert = False if attr["verify_cert"] == "false" else True 36 | self._accounts[attr["account_name"]] = { 37 | "url": attr["url"], 38 | "verify_cert": verify_cert, 39 | "username": attr["username"], 40 | "password": secret.retrieve_secret_sync().get_text(), 41 | } 42 | 43 | def add(self, account_name, url="", verify_cert=True, username="", password=""): 44 | if not account_name or not url or not username or not password: 45 | raise ValueError() 46 | 47 | self._accounts[account_name] = { 48 | "url": url, 49 | "verify_cert": verify_cert, 50 | "username": username, 51 | "password": password, 52 | } 53 | Secret.password_store_sync( 54 | _SECRET_SCHEMA, 55 | { 56 | "account_name": account_name, 57 | "url": url, 58 | "verify_cert": str(verify_cert).lower(), 59 | "username": username, 60 | }, 61 | Secret.COLLECTION_DEFAULT, 62 | "Calcleaner: password for %s" % account_name, 63 | password, 64 | None, 65 | ) 66 | 67 | def remove(self, account_name): 68 | del self._accounts[account_name] 69 | 70 | Secret.password_clear_sync( 71 | _SECRET_SCHEMA, 72 | {"account_name": account_name}, 73 | None, 74 | ) 75 | 76 | def get(self, account_name): 77 | return self._accounts[account_name] 78 | 79 | def update(self, account_name, **kwargs): 80 | account = self.get(account_name) 81 | account.update(kwargs) 82 | self.remove(account_name) 83 | self.add(account_name, **account) 84 | 85 | def list(self): 86 | return self._accounts.keys() 87 | -------------------------------------------------------------------------------- /calcleaner/accounts_manage_dialog.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Gtk 2 | 3 | from . import APPLICATION_ID 4 | from . import data_helpers 5 | 6 | 7 | class AccountsManageDialog(object): 8 | def __init__(self, app, parent_window=None): 9 | self._app = app 10 | self._account_store = Gtk.ListStore(str) 11 | 12 | self._builder = Gtk.Builder() 13 | self._builder.set_translation_domain(APPLICATION_ID) 14 | self._builder.add_from_file( 15 | data_helpers.find_data_path("ui/accounts-manage-dialog.glade") 16 | ) 17 | self._builder.connect_signals(self) 18 | 19 | self._dialog = self._builder.get_object("account-manage-dialog") 20 | self._dialog.set_application(app) 21 | self._dialog.set_transient_for(parent_window) 22 | 23 | self._initialize_treeview() 24 | self._update_accounts() 25 | self._update_ui() 26 | 27 | def run(self): 28 | self._dialog.run() 29 | 30 | def get_selected_accounts_iter(self): 31 | accounts_treeview = self._builder.get_object("accounts-treeview") 32 | selection = accounts_treeview.get_selection() 33 | model = accounts_treeview.get_model() 34 | 35 | _, tree_paths = selection.get_selected_rows() 36 | return [model.get_iter(tree_path) for tree_path in tree_paths] 37 | 38 | def _initialize_treeview(self): 39 | accounts_treeview = self._builder.get_object("accounts-treeview") 40 | 41 | accounts_treeview.set_model(self._account_store) 42 | 43 | column = Gtk.TreeViewColumn( 44 | cell_renderer=Gtk.CellRendererText(), 45 | text=0, 46 | ) 47 | accounts_treeview.append_column(column) 48 | 49 | def _update_accounts(self): 50 | self._account_store.clear() 51 | for account_name in self._app.accounts.list(): 52 | self._account_store.append([account_name]) 53 | 54 | def _update_ui(self): 55 | selected = self.get_selected_accounts_iter() 56 | 57 | remove_button = self._builder.get_object("remove-button") 58 | remove_button.set_sensitive(len(selected) > 0) 59 | 60 | edit_button = self._builder.get_object("edit-button") 61 | edit_button.set_sensitive(len(selected) == 1) 62 | 63 | def _on_close(self, *args): 64 | self._dialog.destroy() 65 | 66 | def _on_treeview_selection_changed(self, selection): 67 | self._update_ui() 68 | 69 | def _on_add_button_clicked(self, widget): 70 | self._app.add_account(update=False) 71 | self._update_accounts() 72 | 73 | def _on_remove_button_clicked(self, widget): 74 | selected = self.get_selected_accounts_iter() 75 | for iter_ in selected: 76 | account_name = self._account_store[iter_][0] 77 | self._app.accounts.remove(account_name) 78 | self._update_accounts() 79 | 80 | def _on_edit_button_clicked(self, widget): 81 | selected = self.get_selected_accounts_iter() 82 | account_name = self._account_store[selected[0]][0] 83 | self._app.edit_account(account_name) 84 | self._update_accounts() 85 | -------------------------------------------------------------------------------- /calcleaner/application.py: -------------------------------------------------------------------------------- 1 | from concurrent.futures import ThreadPoolExecutor 2 | 3 | from gi.repository import Gtk 4 | from gi.repository import Gio 5 | from gi.repository import GLib 6 | import requests.exceptions 7 | import caldav.lib.error 8 | 9 | from . import APPLICATION_ID 10 | from .main_window import MainWindow 11 | from .account_edit_dialog import AccountEditDialog 12 | from .accounts_manage_dialog import AccountsManageDialog 13 | from . import caldav_helpers 14 | from .about_dialog import AboutDialog 15 | from .calendar_store import CalendarStore 16 | from .accounts import Accounts 17 | from .translation import gettext as _ 18 | from .helpers import load_gtk_custom_css 19 | from .data_helpers import find_data_path 20 | 21 | 22 | class CalcleanerApplication(Gtk.Application): 23 | accounts = None 24 | calendar_store = None 25 | 26 | def __init__(self): 27 | Gtk.Application.__init__( 28 | self, 29 | application_id=APPLICATION_ID, 30 | flags=Gio.ApplicationFlags.HANDLES_OPEN, 31 | ) 32 | self._stop_cleanning_requested = False 33 | self._main_window = None 34 | self.accounts = Accounts() 35 | self.calendar_store = CalendarStore() 36 | 37 | def do_startup(self): 38 | Gtk.Application.do_startup(self) 39 | self.accounts.load() 40 | 41 | load_gtk_custom_css(find_data_path("style/calcleaner.css")) 42 | 43 | # Action: app.add-account 44 | action = Gio.SimpleAction.new("add-account", None) 45 | action.connect("activate", lambda a, p: self.add_account()) 46 | self.add_action(action) 47 | 48 | # Action: app.manage-accounts 49 | action = Gio.SimpleAction.new("manage-accounts", None) 50 | action.connect("activate", lambda a, p: self.manage_accounts()) 51 | self.add_action(action) 52 | 53 | # Action: app.refresh 54 | action = Gio.SimpleAction.new("refresh", None) 55 | action.connect("activate", lambda a, p: self.fetch_calendars()) 56 | self.add_action(action) 57 | 58 | # Action: app.clean 59 | action = Gio.SimpleAction.new("clean", None) 60 | action.connect("activate", lambda a, p: self.clean_calendars()) 61 | self.add_action(action) 62 | 63 | # Action: app.about 64 | action = Gio.SimpleAction.new("about", None) 65 | action.connect("activate", lambda a, p: self.about()) 66 | self.add_action(action) 67 | 68 | # Action: app.quit 69 | action = Gio.SimpleAction.new("quit", None) 70 | action.connect("activate", lambda a, p: self.quit()) 71 | self.add_action(action) 72 | self.set_accels_for_action("app.quit", ["Q", "W"]) 73 | 74 | # Action: app.stop-cleanning 75 | action = Gio.SimpleAction.new("stop-cleanning", None) 76 | action.connect("activate", lambda a, p: self.stop_cleanning()) 77 | self.add_action(action) 78 | 79 | def do_activate(self): 80 | if not self._main_window: 81 | self._main_window = MainWindow(self) 82 | if len(self.accounts.list()) > 0: 83 | self.fetch_calendars() 84 | 85 | self._main_window.show() 86 | self._main_window.present() 87 | 88 | def quit(self): 89 | self.stop_cleanning() 90 | Gtk.Application.quit(self) 91 | 92 | def about(self): 93 | about_dialog = AboutDialog(parent=self._main_window) 94 | about_dialog.run() 95 | about_dialog.destroy() 96 | 97 | def display_error(self, error): 98 | if hasattr(error, "account"): 99 | title = error.account 100 | else: 101 | title = _("An error occured...") 102 | 103 | if isinstance(error, requests.exceptions.SSLError): 104 | description = _( 105 | "Unable to connect to the server: the SSL certificate is invalid.\n\n" 106 | "🞄 Check that there is no error in the CalDAV server URL\n" 107 | "🞄 If you are using a self-signed certificate, disable the SSL " 108 | "verification in the parameters of the account" 109 | ) 110 | elif isinstance(error, requests.exceptions.ConnectionError): 111 | description = _( 112 | "Unable to connect to the server.\n\n" 113 | "🞄 Check that there is no error in the CalDAV server URL\n" 114 | "🞄 Check that the server is currently available\n" 115 | "🞄 Check you are connected to the internet" 116 | ) 117 | elif isinstance(error, caldav.lib.error.AuthorizationError): 118 | description = _( 119 | "You are not authorized to access this resource.\n\n" 120 | "🞄 Check your login and password\n" 121 | "🞄 Check you are allowed to access the server" 122 | ) 123 | elif isinstance(error, caldav.lib.error.PropfindError): 124 | description = _( 125 | "Unable to read calendars.\n\n" 126 | "🞄 Check that there is no error in the CalDAV server URL" 127 | ) 128 | else: 129 | description = _("Unknown error") 130 | 131 | self._main_window.set_error( 132 | title=title, 133 | description=description, 134 | detail=str(error), 135 | ) 136 | self._main_window.set_state(self._main_window.STATE_ERROR) 137 | 138 | def add_account(self, update=True): 139 | dialog = AccountEditDialog(parent_window=self._main_window) 140 | account = dialog.run() 141 | 142 | if account: 143 | self.accounts.add( 144 | account["name"], 145 | url=account["url"], 146 | verify_cert=account["verify_cert"], 147 | username=account["username"], 148 | password=account["password"], 149 | ) 150 | if update: 151 | self.calendar_store.clear() 152 | self.fetch_calendars() 153 | 154 | def edit_account(self, account_name): 155 | orig_account = self.accounts.get(account_name) 156 | dialog = AccountEditDialog( 157 | url=orig_account["url"], 158 | verify_cert=orig_account["verify_cert"], 159 | username=orig_account["username"], 160 | password=orig_account["password"], 161 | parent_window=self._main_window, 162 | ) 163 | new_account = dialog.run() 164 | 165 | if not new_account: 166 | return 167 | 168 | if new_account["name"] != account_name: 169 | self.accounts.remove(account_name) 170 | self.accounts.add( 171 | new_account["name"], 172 | url=new_account["url"], 173 | verify_cert=new_account["verify_cert"], 174 | username=new_account["username"], 175 | password=new_account["password"], 176 | ) 177 | else: 178 | self.accounts.update( 179 | account_name, 180 | url=new_account["url"], 181 | verify_cert=new_account["verify_cert"], 182 | username=new_account["username"], 183 | password=new_account["password"], 184 | ) 185 | 186 | def manage_accounts(self): 187 | dialog = AccountsManageDialog(self, parent_window=self._main_window) 188 | dialog.run() 189 | if len(self.accounts.list()) > 0: 190 | self.calendar_store.clear() 191 | self.fetch_calendars() 192 | else: 193 | self._main_window.set_state(self._main_window.STATE_INITIAL) 194 | 195 | def fetch_calendars(self): 196 | self._main_window.set_state(self._main_window.STATE_UPDATING) 197 | 198 | errors = [] 199 | 200 | def _async_fetch_calendars(): 201 | for account_name in self.accounts.list(): 202 | account = self.accounts.get(account_name) 203 | try: 204 | calendars = caldav_helpers.fetch_calendars( 205 | account["url"], 206 | account["username"], 207 | account["password"], 208 | account["verify_cert"], 209 | ) 210 | for calendar in calendars: 211 | iter_ = self.calendar_store.find_calendar_by_url( 212 | calendar["url"] 213 | ) 214 | 215 | if not iter_: 216 | iter_ = self.calendar_store.append() 217 | 218 | self.calendar_store.update( 219 | iter_, 220 | account_name=account_name, 221 | calendar_url=calendar["url"], 222 | calendar_name=calendar["name"], 223 | calendar_color=calendar["color"], 224 | event_count=calendar["event_count"], 225 | ) 226 | except Exception as error: 227 | error.account = account_name 228 | errors.append(error) 229 | print(error) 230 | raise error 231 | 232 | executor = ThreadPoolExecutor(max_workers=1) 233 | future = executor.submit(_async_fetch_calendars) 234 | 235 | def _async_wait_loop(): 236 | if future.done(): 237 | if errors: 238 | self.display_error(errors[0]) 239 | else: 240 | self._main_window.set_state(self._main_window.STATE_CALENDAR_LIST) 241 | return 242 | GLib.timeout_add_seconds(0.1, _async_wait_loop) 243 | 244 | _async_wait_loop() 245 | 246 | def clean_calendars(self): 247 | self._main_window.set_state(self._main_window.STATE_CLEANING) 248 | 249 | self._stop_cleanning_requested = False 250 | max_age = int(self._main_window.max_age_spinbutton.get_value()) 251 | keep_recurring_events = ( 252 | self._main_window.keep_recurring_checkbutton.get_active() 253 | ) 254 | 255 | for index in range(self.calendar_store.length): 256 | calendar = self.calendar_store.get(index) 257 | if calendar["clean_enabled"]: 258 | self.calendar_store.update( 259 | index, 260 | clean_progress=0, 261 | clean_progress_text="-", 262 | ) 263 | else: 264 | self.calendar_store.update( 265 | index, 266 | clean_progress=0, 267 | clean_progress_text=_("Skipped"), 268 | ) 269 | 270 | errors = [] 271 | 272 | def _async_clean_calendars(): 273 | try: 274 | for index in range(self.calendar_store.length): 275 | if self._stop_cleanning_requested: 276 | break 277 | 278 | calendar = self.calendar_store.get(index) 279 | account = self.accounts.get(calendar["account_name"]) 280 | 281 | if not calendar["clean_enabled"]: 282 | continue 283 | 284 | self.calendar_store.update( 285 | index, 286 | clean_progress=0, 287 | clean_progress_text=_("Reading..."), 288 | ) 289 | 290 | for cleaned_count, to_clean_count in caldav_helpers.clean_calendar( 291 | calendar["calendar_url"], 292 | account["username"], 293 | account["password"], 294 | verify_cert=account["verify_cert"], 295 | max_age=max_age, 296 | keep_recurring_events=keep_recurring_events, 297 | ): 298 | if self._stop_cleanning_requested: 299 | break 300 | if to_clean_count > 0: 301 | progress = cleaned_count / to_clean_count * 100 302 | else: 303 | progress = 100 304 | 305 | self.calendar_store.update( 306 | index, 307 | clean_progress=progress, 308 | clean_progress_text="%i / %i" 309 | % (cleaned_count, to_clean_count), 310 | ) 311 | except Exception as error: 312 | error.account = calendar["account_name"] 313 | errors.append(error) 314 | print(error) 315 | raise error 316 | 317 | executor = ThreadPoolExecutor(max_workers=1) 318 | future = executor.submit(_async_clean_calendars) 319 | 320 | def _async_wait_loop(): 321 | if future.done(): 322 | if errors: 323 | self.display_error(errors[0]) 324 | else: 325 | self.fetch_calendars() 326 | return 327 | GLib.timeout_add_seconds(0.1, _async_wait_loop) 328 | 329 | _async_wait_loop() 330 | 331 | def stop_cleanning(self): 332 | self._stop_cleanning_requested = True 333 | -------------------------------------------------------------------------------- /calcleaner/caldav_helpers.py: -------------------------------------------------------------------------------- 1 | from urllib.parse import urlparse 2 | from datetime import datetime, timedelta 3 | 4 | from caldav import DAVClient 5 | from caldav.elements import ical 6 | 7 | from . import VERSION 8 | 9 | 10 | USER_AGENT = "CalCleaner/%s" % VERSION 11 | 12 | 13 | def fetch_calendars(url, username, password, verify_cert=True): 14 | with DAVClient( 15 | url, username=username, password=password, ssl_verify_cert=verify_cert 16 | ) as dav_client: 17 | dav_client.headers["User-Agent"] = USER_AGENT 18 | dav_principal = dav_client.principal() 19 | for calendar in dav_principal.calendars(): 20 | color = calendar.get_properties([ical.CalendarColor()]).get( 21 | "{http://apple.com/ns/ical/}calendar-color", "#888888" 22 | ) 23 | yield { 24 | "url": calendar.canonical_url, 25 | "name": calendar.name, 26 | "color": color, 27 | "event_count": len(calendar.events()), 28 | } 29 | 30 | 31 | def clean_calendar( 32 | url, 33 | username, 34 | password, 35 | verify_cert=True, 36 | max_age=16, 37 | keep_recurring_events=True, 38 | ): 39 | """Purge old events of given calendar. 40 | 41 | :param str url: The exactu URL of the calendar to clean (not the DAV principal URL). 42 | :param str username: The username of the CalDAV account. 43 | :param str password: The password of the CalDAV account. 44 | :param bool verify_cert: Enable or disable SSL certificate verification (to 45 | allow self signed certificates) 46 | :param int max_age: The maximum age of events to keep (in weeks). All 47 | events older than the given age will be deleted. 48 | :param bool keep_recurring_events: If true, recurring events will be skipped. 49 | 50 | :rtype: Generator 51 | :return: ``(cleaned_count, to_clean_clount)`` 52 | """ 53 | start_date = datetime(year=1900, month=1, day=1) 54 | end_date = datetime.now() - timedelta(weeks=max_age) 55 | 56 | with DAVClient( 57 | url, username=username, password=password, ssl_verify_cert=verify_cert 58 | ) as dav_client: 59 | dav_client.headers["User-Agent"] = USER_AGENT 60 | dav_principal = dav_client.principal() 61 | old_events = None 62 | 63 | for calendar in dav_principal.calendars(): 64 | if calendar.canonical_url == url: 65 | old_events = calendar.date_search(start=start_date, end=end_date) 66 | break 67 | 68 | if old_events: 69 | cleaned_count = 0 70 | for event in old_events: 71 | cleaned_count += 1 72 | if ( 73 | hasattr(event.vobject_instance, "vevent") 74 | and hasattr(event.vobject_instance.vevent, "recurrence_id") 75 | and keep_recurring_events 76 | ): 77 | print( 78 | "Skipped a recurring event: '%s'" 79 | % event.vobject_instance.vevent.summary.value 80 | ) 81 | else: 82 | event.delete() 83 | yield (cleaned_count, len(old_events)) 84 | else: 85 | yield (0, 0) 86 | 87 | 88 | def readable_account_url(url, username): 89 | return "@".join([username, urlparse(url).netloc]) 90 | -------------------------------------------------------------------------------- /calcleaner/calendar_store.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Gtk 2 | 3 | 4 | class CalendarStore(object): 5 | # fmt: off 6 | FIELDS = { 7 | "account_name": {"id": 0, "type": str, "default": ""}, 8 | "calendar_url": {"id": 1, "type": str, "default": ""}, 9 | "calendar_name": {"id": 2, "type": str, "default": ""}, 10 | "calendar_color": {"id": 3, "type": str, "default": "#888888"}, 11 | "event_count": {"id": 4, "type": int, "default": 0}, 12 | "clean_enabled": {"id": 5, "type": bool, "default": True}, 13 | "clean_progress": {"id": 6, "type": int, "default": 0}, 14 | "clean_progress_text": {"id": 7, "type": str, "default": "-"}, 15 | } 16 | # fmt: on 17 | 18 | gtk_list_store = None 19 | 20 | def __init__(self): 21 | store_fields = sorted(self.FIELDS.values(), key=lambda v: v["id"]) 22 | self.gtk_list_store = Gtk.ListStore(*[f["type"] for f in store_fields]) 23 | 24 | @property 25 | def length(self): 26 | """The length of the store.""" 27 | return len(self.gtk_list_store) 28 | 29 | def append(self, **kwargs): 30 | """Appends a row to the store. 31 | 32 | :param **kwargs: The columns key/value of the row. 33 | 34 | :rtype: gtk.TreeIter 35 | :return: the iter of the inserted value. 36 | 37 | >>> store = CalendarStore() 38 | >>> store.length 39 | 0 40 | >>> store.append( 41 | ... account_name="user@example.org", 42 | ... ) 43 | 44 | >>> store.length 45 | 1 46 | >>> store.append(foo="bar") 47 | Traceback (most recent call last): 48 | ... 49 | KeyError: "Invalid field 'foo'" 50 | """ 51 | for key in kwargs: 52 | if key not in self.FIELDS: 53 | raise KeyError("Invalid field '%s'" % key) 54 | 55 | row = [None] * len(self.FIELDS) 56 | 57 | for key in self.FIELDS: 58 | field_info = self.FIELDS[key] 59 | row[field_info["id"]] = field_info["default"] 60 | 61 | iter_ = self.gtk_list_store.append(row) 62 | self.update(iter_, **kwargs) 63 | return iter_ 64 | 65 | def clear(self): 66 | """Clears the store. 67 | 68 | >>> store = CalendarStore() 69 | >>> store.append() 70 | 71 | >>> store.length 72 | 1 73 | >>> store.clear() 74 | >>> store.length 75 | 0 76 | """ 77 | self.gtk_list_store.clear() 78 | 79 | def get(self, index_or_iter): 80 | """Get row data. 81 | 82 | :param int,gtk.TreeIter index_or_iter: The index of the row. 83 | 84 | :rtype: dict 85 | :returns: The row data (e.g. ``{"field_name": "value"}``. 86 | 87 | >>> store = CalendarStore() 88 | >>> store.append() 89 | 90 | >>> store.get(0) 91 | {...} 92 | >>> store.get(1) 93 | Traceback (most recent call last): 94 | ... 95 | IndexError: ... 96 | """ 97 | row = self.gtk_list_store[index_or_iter] 98 | result = {} 99 | 100 | for field_name, field_info in self.FIELDS.items(): 101 | result[field_name] = row[field_info["id"]] 102 | 103 | return result 104 | 105 | def get_all(self): 106 | """Get all rows of the store. 107 | 108 | :rtype: generator 109 | 110 | >>> store = CalendarStore() 111 | >>> store.get_all() 112 | 113 | """ 114 | for i in range(self.length): 115 | yield self.get(i) 116 | 117 | def find_calendar_by_url(self, url): 118 | """Find the calendar with the given URL and returns its iter_. 119 | 120 | :param str url: The calendar URL. 121 | 122 | :rtype: Gtk.TreeIter,None 123 | :returns: The TreeIter of the calendar or ``None`` if not found. 124 | 125 | >>> store = CalendarStore() 126 | >>> store.append(calendar_url="http://foo.bar/baz") 127 | 128 | >>> store.find_calendar_by_url("http://foo.bar/baz") 129 | 130 | >>> store.find_calendar_by_url("http://example.org/") 131 | """ 132 | for i in range(self.length): 133 | calendar = self.get(i) 134 | if calendar["calendar_url"] == url: 135 | iter_ = self.gtk_list_store.get_iter(i) 136 | return iter_ 137 | return None 138 | 139 | def update(self, index_or_iter, **kwargs): 140 | """Updates a row. 141 | 142 | :param int,Gtk.TreeIter index_or_iter: The index of the row. 143 | :param **kwargs: The columns key/value of the row. 144 | 145 | >>> store = CalendarStore() 146 | >>> store.append( 147 | ... calendar_name="Cal1", 148 | ... ) 149 | 150 | >>> store.get(0)["calendar_name"] 151 | 'Cal1' 152 | >>> store.update(0, calendar_name="NewName") 153 | >>> store.get(0)["calendar_name"] 154 | 'NewName' 155 | >>> store.update(0, foo="bar") 156 | Traceback (most recent call last): 157 | ... 158 | KeyError: "Invalid field 'foo'" 159 | >>> store.update(1, calendar_name="MyCalendar") 160 | Traceback (most recent call last): 161 | ... 162 | IndexError: ... 163 | """ 164 | for key in kwargs: 165 | if key not in self.FIELDS: 166 | raise KeyError("Invalid field '%s'" % key) 167 | 168 | for key in kwargs: 169 | if key == "calendar_color": 170 | color_str = '\n' % kwargs["calendar_color"] 171 | self._update_field(index_or_iter, key, color_str) 172 | else: 173 | self._update_field(index_or_iter, key, kwargs[key]) 174 | 175 | def _update_field(self, index_or_iter, field_name, value): 176 | row = self.gtk_list_store[index_or_iter] 177 | row[self.FIELDS[field_name]["id"]] = value 178 | -------------------------------------------------------------------------------- /calcleaner/data/images/calcleaner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /calcleaner/data/images/calcleaner_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flozz/calcleaner/964c47d9075e656b02f924f5c7a8d12fb01f8b19/calcleaner/data/images/calcleaner_128.png -------------------------------------------------------------------------------- /calcleaner/data/images/calcleaner_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flozz/calcleaner/964c47d9075e656b02f924f5c7a8d12fb01f8b19/calcleaner/data/images/calcleaner_256.png -------------------------------------------------------------------------------- /calcleaner/data/images/calcleaner_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flozz/calcleaner/964c47d9075e656b02f924f5c7a8d12fb01f8b19/calcleaner/data/images/calcleaner_32.png -------------------------------------------------------------------------------- /calcleaner/data/images/calcleaner_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flozz/calcleaner/964c47d9075e656b02f924f5c7a8d12fb01f8b19/calcleaner/data/images/calcleaner_64.png -------------------------------------------------------------------------------- /calcleaner/data/style/calcleaner.css: -------------------------------------------------------------------------------- 1 | .calcleaner-scrolledwindow { 2 | border-top: none; 3 | border-left: none; 4 | border-right: none; 5 | } 6 | -------------------------------------------------------------------------------- /calcleaner/data/ui/account-edit-dialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 550 7 | False 8 | CalDAV Account 9 | False 10 | dialog 11 | 12 | 13 | 14 | False 15 | vertical 16 | 2 17 | 18 | 19 | False 20 | end 21 | 22 | 23 | gtk-cancel 24 | True 25 | True 26 | True 27 | True 28 | 29 | 30 | 31 | True 32 | True 33 | 0 34 | 35 | 36 | 37 | 38 | gtk-ok 39 | True 40 | True 41 | True 42 | True 43 | 44 | 47 | 48 | 49 | True 50 | True 51 | 1 52 | 53 | 54 | 55 | 56 | False 57 | False 58 | 0 59 | 60 | 61 | 62 | 63 | 64 | True 65 | False 66 | 18 67 | 18 68 | 18 69 | 18 70 | 6 71 | 12 72 | 73 | 74 | True 75 | False 76 | end 77 | CalDAV URL 78 | 79 | 80 | 0 81 | 0 82 | 83 | 84 | 85 | 86 | True 87 | True 88 | True 89 | https://nextcloud.example.org/remote.php/dav 90 | url 91 | GTK_INPUT_HINT_NO_SPELLCHECK | GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NONE 92 | 93 | 94 | 95 | 1 96 | 0 97 | 98 | 99 | 100 | 101 | True 102 | False 103 | end 104 | Password 105 | 106 | 107 | 0 108 | 3 109 | 110 | 111 | 112 | 113 | True 114 | False 115 | end 116 | Username 117 | 118 | 119 | 0 120 | 2 121 | 122 | 123 | 124 | 125 | True 126 | True 127 | start 128 | False 129 | password 130 | GTK_INPUT_HINT_NO_SPELLCHECK | GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NONE 131 | 132 | 133 | 134 | 1 135 | 3 136 | 137 | 138 | 139 | 140 | True 141 | True 142 | start 143 | GTK_INPUT_HINT_NO_SPELLCHECK | GTK_INPUT_HINT_NO_EMOJI | GTK_INPUT_HINT_NONE 144 | 145 | 146 | 147 | 1 148 | 2 149 | 150 | 151 | 152 | 153 | Disable SSL certificate validation (self-signed certificate, etc.) 154 | True 155 | True 156 | False 157 | True 158 | 159 | 160 | 1 161 | 1 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | False 170 | True 171 | 1 172 | 173 | 174 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /calcleaner/data/ui/accounts-manage-dialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 250 7 | 200 8 | False 9 | CalDAV Accounts 10 | dialog 11 | 12 | 13 | 14 | False 15 | 8 16 | 8 17 | 8 18 | 8 19 | vertical 20 | 21 | 22 | False 23 | end 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | False 33 | False 34 | 0 35 | 36 | 37 | 38 | 39 | True 40 | False 41 | vertical 42 | 43 | 44 | True 45 | True 46 | in 47 | 48 | 49 | True 50 | True 51 | False 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | True 62 | True 63 | 0 64 | 65 | 66 | 67 | 68 | True 69 | False 70 | 71 | 72 | True 73 | False 74 | start 75 | 76 | 77 | True 78 | True 79 | True 80 | Add account 81 | 82 | 83 | 84 | True 85 | False 86 | list-add-symbolic 87 | 88 | 89 | 92 | 93 | 94 | True 95 | True 96 | 0 97 | True 98 | 99 | 100 | 101 | 102 | True 103 | True 104 | True 105 | Remove selected account 106 | 107 | 108 | 109 | True 110 | False 111 | list-remove-symbolic 112 | 113 | 114 | 117 | 118 | 119 | True 120 | True 121 | 1 122 | True 123 | 124 | 125 | 129 | 130 | 131 | False 132 | True 133 | 0 134 | 135 | 136 | 137 | 138 | True 139 | False 140 | end 141 | 142 | 143 | True 144 | True 145 | True 146 | Edit selected account... 147 | end 148 | 149 | 150 | 151 | True 152 | False 153 | edit-symbolic 154 | 155 | 156 | 159 | 160 | 161 | False 162 | True 163 | end 164 | 0 165 | 166 | 167 | 168 | 169 | True 170 | True 171 | 1 172 | 173 | 174 | 177 | 178 | 179 | False 180 | True 181 | 1 182 | 183 | 184 | 185 | 186 | True 187 | True 188 | 1 189 | 190 | 191 | 192 | 193 | 194 | 195 | -------------------------------------------------------------------------------- /calcleaner/data/ui/main-window.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 1 7 | 1000 8 | 16 9 | 1 10 | 10 11 | 12 | 13 | True 14 | True 15 | False 16 | False 17 | 18 | 19 | True 20 | False 21 | center 22 | center 23 | 18 24 | 18 25 | 18 26 | 18 27 | vertical 28 | 24 29 | 30 | 36 | 37 | False 38 | True 39 | 0 40 | 41 | 42 | 43 | 44 | True 45 | False 46 | Start by connecting to a CalDAV account to get some calendars to cleanup... 47 | center 48 | True 49 | 50 | 51 | False 52 | True 53 | 1 54 | 55 | 56 | 57 | 58 | Add account... 59 | True 60 | True 61 | True 62 | center 63 | center 64 | app.add-account 65 | 66 | 67 | False 68 | False 69 | 2 70 | 71 | 72 | 73 | 74 | 75 | 76 | True 77 | False 78 | Initial Setup 79 | 80 | 81 | False 82 | 83 | 84 | 85 | 86 | True 87 | False 88 | center 89 | center 90 | 18 91 | 18 92 | 18 93 | 18 94 | 12 95 | 96 | 97 | True 98 | False 99 | True 100 | 101 | 102 | False 103 | True 104 | 0 105 | 106 | 107 | 108 | 109 | True 110 | False 111 | Reading calendars... 112 | 113 | 114 | False 115 | True 116 | 1 117 | 118 | 119 | 120 | 121 | 1 122 | 123 | 124 | 125 | 126 | True 127 | False 128 | Updating 129 | 130 | 131 | 1 132 | False 133 | 134 | 135 | 136 | 137 | 138 | True 139 | False 140 | center 141 | 18 142 | 18 143 | 18 144 | 18 145 | 6 146 | 12 147 | 148 | 149 | True 150 | False 151 | start 152 | dialog-error 153 | 6 154 | 155 | 156 | 0 157 | 0 158 | 3 159 | 160 | 161 | 162 | 163 | True 164 | True 165 | 12 166 | True 167 | 168 | 169 | True 170 | False 171 | 6 172 | 0 173 | 174 | 175 | True 176 | False 177 | 6 178 | 6 179 | 6 180 | 6 181 | 6 182 | 6 183 | True 184 | True 185 | True 186 | True 187 | 80 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | True 201 | False 202 | More... 203 | 204 | 205 | 206 | 207 | 1 208 | 2 209 | 210 | 211 | 212 | 213 | True 214 | False 215 | start 216 | An error occured when fetching calendars... 217 | True 218 | 219 | 220 | 221 | 222 | 223 | 1 224 | 0 225 | 226 | 227 | 228 | 229 | True 230 | False 231 | start 232 | Unknown error 233 | True 234 | True 235 | 236 | 237 | 1 238 | 1 239 | 240 | 241 | 242 | 243 | True 244 | False 245 | 12 246 | 12 247 | center 248 | 249 | 250 | Retry 251 | True 252 | True 253 | True 254 | app.refresh 255 | 256 | 257 | True 258 | True 259 | 0 260 | 261 | 262 | 263 | 264 | Edit accounts... 265 | True 266 | True 267 | True 268 | center 269 | app.manage-accounts 270 | 271 | 272 | True 273 | True 274 | 1 275 | 276 | 277 | 278 | 279 | 1 280 | 3 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 2 289 | 290 | 291 | 292 | 293 | True 294 | False 295 | Error 296 | 297 | 298 | 2 299 | False 300 | 301 | 302 | 303 | 304 | True 305 | False 306 | 18 307 | vertical 308 | 18 309 | 310 | 311 | True 312 | True 313 | True 314 | in 315 | 316 | 317 | True 318 | False 319 | False 320 | horizontal 321 | 322 | 323 | 326 | 327 | 328 | True 329 | True 330 | 0 331 | 332 | 333 | 334 | 335 | True 336 | False 337 | center 338 | 18 339 | 18 340 | 12 341 | 342 | 343 | True 344 | False 345 | Purge events older than 346 | 347 | 348 | False 349 | True 350 | 0 351 | 352 | 353 | 354 | 355 | True 356 | True 357 | adjustment1 358 | 359 | 360 | False 361 | True 362 | 1 363 | 364 | 365 | 366 | 367 | True 368 | False 369 | weeks 370 | 371 | 372 | False 373 | True 374 | 2 375 | 376 | 377 | 378 | 379 | False 380 | True 381 | 1 382 | 383 | 384 | 385 | 386 | Do not delete recurring events 387 | True 388 | True 389 | False 390 | center 391 | True 392 | True 393 | 394 | 395 | False 396 | False 397 | 2 398 | 399 | 400 | 401 | 402 | True 403 | False 404 | vertical 405 | start 406 | 407 | 408 | Clean Now! 409 | True 410 | True 411 | True 412 | app.clean 413 | 416 | 417 | 418 | False 419 | True 420 | 0 421 | 422 | 423 | 424 | 425 | Stop 426 | True 427 | True 428 | True 429 | app.stop-cleanning 430 | 433 | 434 | 435 | True 436 | True 437 | 1 438 | 439 | 440 | 441 | 442 | False 443 | True 444 | 3 445 | 446 | 447 | 448 | 449 | 3 450 | 451 | 452 | 453 | 454 | True 455 | False 456 | Calendar Selection 457 | 458 | 459 | 3 460 | False 461 | 462 | 463 | 464 | 465 | 150 466 | False 467 | 468 | 469 | True 470 | False 471 | 6 472 | 6 473 | 6 474 | 6 475 | vertical 476 | 477 | 478 | True 479 | True 480 | True 481 | app.manage-accounts 482 | Accounts 483 | 484 | 485 | False 486 | True 487 | 0 488 | 489 | 490 | 491 | 492 | True 493 | True 494 | True 495 | app.about 496 | About 497 | 498 | 499 | False 500 | True 501 | 1 502 | 503 | 504 | 505 | 506 | True 507 | True 508 | True 509 | app.quit 510 | Quit 511 | 512 | 513 | False 514 | True 515 | 2 516 | 517 | 518 | 519 | 520 | 521 | 522 | True 523 | False 524 | Calendar Cleaner 525 | True 526 | 527 | 528 | True 529 | True 530 | True 531 | Refresh calendars 532 | app.refresh 533 | none 534 | 535 | 536 | True 537 | False 538 | view-refresh-symbolic 539 | 540 | 541 | 542 | 543 | 544 | 545 | True 546 | True 547 | False 548 | True 549 | menu-popover 550 | 551 | 552 | True 553 | False 554 | open-menu-symbolic 555 | 556 | 557 | 558 | 559 | end 560 | 1 561 | 562 | 563 | 564 | 565 | -------------------------------------------------------------------------------- /calcleaner/data_helpers.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | def find_data_path(path): 5 | path_file = Path(__file__) 6 | root = path_file.parent.resolve() 7 | return root.joinpath("data", path).as_posix() 8 | -------------------------------------------------------------------------------- /calcleaner/helpers.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Gtk 2 | from gi.repository import Gdk 3 | 4 | 5 | def load_gtk_custom_css(path): 6 | """Load custom GTK CSS from path. 7 | 8 | :param str path: Path to the CSS file. 9 | """ 10 | css_provider = Gtk.CssProvider() 11 | css_provider.load_from_path(path) 12 | screen = Gdk.Screen.get_default() 13 | style_context = Gtk.StyleContext() 14 | style_context.add_provider_for_screen( 15 | screen, 16 | css_provider, 17 | Gtk.STYLE_PROVIDER_PRIORITY_USER, 18 | ) 19 | -------------------------------------------------------------------------------- /calcleaner/main_window.py: -------------------------------------------------------------------------------- 1 | from gi.repository import Gtk 2 | from gi.repository import GdkPixbuf 3 | 4 | from . import APPLICATION_NAME, APPLICATION_ID 5 | from . import data_helpers 6 | from .translation import gettext as _ 7 | 8 | 9 | class MainWindow(Gtk.ApplicationWindow): 10 | STATE_INITIAL = "state-initial" 11 | STATE_UPDATING = "state-updating" 12 | STATE_ERROR = "state-error" 13 | STATE_CALENDAR_LIST = "state-calendar-list" 14 | STATE_CLEANING = "state-cleaning" 15 | 16 | def __init__(self, app): 17 | Gtk.ApplicationWindow.__init__( 18 | self, 19 | application=app, 20 | title=APPLICATION_NAME, 21 | default_width=400, 22 | default_height=350, 23 | resizable=True, 24 | ) 25 | 26 | self.connect("destroy", self._on_main_window_destroyed) 27 | 28 | self._builder = Gtk.Builder() 29 | self._builder.set_translation_domain(APPLICATION_ID) 30 | self._builder.add_from_file(data_helpers.find_data_path("ui/main-window.glade")) 31 | self._builder.connect_signals(self) 32 | 33 | content = self._builder.get_object("main-window-content") 34 | self.add(content) 35 | 36 | self._header = self._builder.get_object("main-window-header") 37 | self.set_titlebar(self._header) 38 | 39 | initial_logo = self._builder.get_object("initial-logo") 40 | initial_logo.set_from_pixbuf( 41 | GdkPixbuf.Pixbuf.new_from_file( 42 | data_helpers.find_data_path("images/calcleaner_128.png") 43 | ) 44 | ) 45 | 46 | self._column_checkbox = None 47 | self._column_progress = None 48 | self._initialize_treeview() 49 | 50 | self.max_age_spinbutton = self._builder.get_object("max-age-spinbutton") 51 | self.keep_recurring_checkbutton = self._builder.get_object( 52 | "keep-recurring-checkbutton" 53 | ) 54 | 55 | self.set_state(self.STATE_INITIAL) 56 | 57 | def set_state(self, state): 58 | notebook = self._builder.get_object("main-window-content") 59 | refresh_button = self._builder.get_object("refresh-button") 60 | accounts_modelbutton = self._builder.get_object("accounts-modelbutton") 61 | clean_start_button = self._builder.get_object("clean-start-button") 62 | clean_stop_button = self._builder.get_object("clean-stop-button") 63 | 64 | if state == self.STATE_INITIAL: 65 | notebook.set_current_page(0) 66 | refresh_button.set_visible(False) 67 | accounts_modelbutton.set_sensitive(True) 68 | elif state == self.STATE_UPDATING: 69 | notebook.set_current_page(1) 70 | refresh_button.set_visible(False) 71 | accounts_modelbutton.set_sensitive(False) 72 | elif state == self.STATE_ERROR: 73 | notebook.set_current_page(2) 74 | refresh_button.set_visible(False) 75 | accounts_modelbutton.set_sensitive(True) 76 | elif state == self.STATE_CALENDAR_LIST: 77 | notebook.set_current_page(3) 78 | refresh_button.set_visible(True) 79 | accounts_modelbutton.set_sensitive(True) 80 | self.max_age_spinbutton.set_sensitive(True) 81 | self.keep_recurring_checkbutton.set_sensitive(True) 82 | clean_start_button.set_visible(True) 83 | clean_stop_button.set_visible(False) 84 | self._column_checkbox.set_visible(True) 85 | self._column_progress.set_visible(False) 86 | elif state == self.STATE_CLEANING: 87 | notebook.set_current_page(3) 88 | refresh_button.set_visible(False) 89 | accounts_modelbutton.set_sensitive(False) 90 | self.max_age_spinbutton.set_sensitive(False) 91 | self.keep_recurring_checkbutton.set_sensitive(False) 92 | clean_start_button.set_visible(False) 93 | clean_stop_button.set_visible(True) 94 | self._column_checkbox.set_visible(False) 95 | self._column_progress.set_visible(True) 96 | 97 | def set_error(self, title="", description="", detail=""): 98 | title_label = self._builder.get_object("error-title-label") 99 | description_label = self._builder.get_object("error-description-label") 100 | detail_label = self._builder.get_object("error-detail-label") 101 | more_expander = self._builder.get_object("error-more-expander") 102 | 103 | title_label.set_text(title) 104 | description_label.set_text(description) 105 | detail_label.set_text(detail) 106 | 107 | more_expander.set_visible(bool(detail)) 108 | 109 | def _initialize_treeview(self): 110 | app = self.get_application() 111 | calendar_treeview = self._builder.get_object("calendar-treeview") 112 | calendar_treeview.set_model(app.calendar_store.gtk_list_store) 113 | 114 | # Color 115 | column = Gtk.TreeViewColumn( 116 | cell_renderer=Gtk.CellRendererText(), 117 | markup=app.calendar_store.FIELDS["calendar_color"]["id"], 118 | ) 119 | column.set_expand(False) 120 | calendar_treeview.append_column(column) 121 | 122 | # Caldendar Name | Account Name 123 | column = Gtk.TreeViewColumn(_("Calendar")) 124 | column.set_expand(True) 125 | calendar_name_renderer = Gtk.CellRendererText(weight=700) 126 | account_name_renderer = Gtk.CellRendererText(weight=300, scale=0.75) 127 | column.pack_start(calendar_name_renderer, True) 128 | column.pack_start(account_name_renderer, True) 129 | column.get_area().set_orientation(Gtk.Orientation.VERTICAL) 130 | column.add_attribute( 131 | calendar_name_renderer, 132 | "text", 133 | app.calendar_store.FIELDS["calendar_name"]["id"], 134 | ) 135 | column.add_attribute( 136 | account_name_renderer, 137 | "text", 138 | app.calendar_store.FIELDS["account_name"]["id"], 139 | ) 140 | calendar_treeview.append_column(column) 141 | 142 | # Event Count 143 | column = Gtk.TreeViewColumn( 144 | _("Events"), 145 | cell_renderer=Gtk.CellRendererText(), 146 | text=app.calendar_store.FIELDS["event_count"]["id"], 147 | ) 148 | column.set_expand(True) 149 | calendar_treeview.append_column(column) 150 | 151 | # Clean Enabled 152 | renderer = Gtk.CellRendererToggle() 153 | renderer.connect("toggled", self._toggle_treeview_checkbox) 154 | self._column_checkbox = Gtk.TreeViewColumn( 155 | _("Purge"), 156 | cell_renderer=renderer, 157 | active=app.calendar_store.FIELDS["clean_enabled"]["id"], 158 | ) 159 | self._column_checkbox.set_expand(False) 160 | calendar_treeview.append_column(self._column_checkbox) 161 | 162 | # Clean Progress 163 | self._column_progress = Gtk.TreeViewColumn( 164 | _("Cleaning"), 165 | cell_renderer=Gtk.CellRendererProgress(), 166 | value=app.calendar_store.FIELDS["clean_progress"]["id"], 167 | text=app.calendar_store.FIELDS["clean_progress_text"]["id"], 168 | ) 169 | self._column_progress.set_expand(True) 170 | calendar_treeview.append_column(self._column_progress) 171 | 172 | def _toggle_treeview_checkbox(self, widget, index): 173 | app = self.get_application() 174 | calendar = app.calendar_store.get(index) 175 | app.calendar_store.update(index, clean_enabled=not calendar["clean_enabled"]) 176 | 177 | def _on_main_window_destroyed(self, widget): 178 | app = self.get_application() 179 | app.quit() 180 | -------------------------------------------------------------------------------- /calcleaner/translation.py: -------------------------------------------------------------------------------- 1 | import os 2 | import locale 3 | import gettext 4 | 5 | from . import APPLICATION_ID 6 | from . import data_helpers 7 | 8 | 9 | if "LANG" not in os.environ: 10 | language, encoding = locale.getlocale() 11 | os.environ["LANG"] = language 12 | 13 | translation = gettext.translation( 14 | APPLICATION_ID, 15 | localedir=data_helpers.find_data_path("locales"), 16 | fallback=True, 17 | ) 18 | 19 | if hasattr(locale, "bindtextdomain"): 20 | locale.bindtextdomain(APPLICATION_ID, data_helpers.find_data_path("locales")) 21 | else: 22 | print("W: Unable to bind text domaine") 23 | 24 | gettext = translation.gettext 25 | -------------------------------------------------------------------------------- /linuxpkg/README.rst: -------------------------------------------------------------------------------- 1 | Packaging CalCleaner 2 | ==================== 3 | 4 | In addition to the Python package itself, you will find in this folder various 5 | useful files for Linux packaging, such as .desktop file to launch the 6 | application or a man page file. 7 | 8 | This folder also contains a script to copy all required files (desktop, icons 9 | and manual) at the right location. 10 | 11 | USAGE:: 12 | 13 | ./copy-data.sh 14 | 15 | Where ```` is the prefix directory for the installation. For a real 16 | installation, the prefix will be ``/usr``:: 17 | 18 | ./copy-data.sh /usr 19 | 20 | For a package, it may be your package's build folder:: 21 | 22 | ./copy-data.sh /tmp/build-package/usr 23 | 24 | 25 | Packaging 26 | --------- 27 | 28 | Here we will see how to package CalCleaner for Linux. 29 | 30 | To simplify commands, I will use a ``$ROOT`` varaible that contain the path 31 | where the file will be installed. For a real installation this variable should 32 | contain ``/``, for packaging it may be something like 33 | ``/tmp/my-packaging-build``. 34 | 35 | All commands are run from the project root directory (the one that contains the 36 | ``setup.py`` file. 37 | 38 | 39 | Build Dependencies 40 | ~~~~~~~~~~~~~~~~~~ 41 | 42 | Packaging will require some build dependencies: 43 | 44 | * Python 3 45 | * setuptools (search for a ``python3-setuptools`` package) 46 | * nox (search for a ``python3-nox`` package) 47 | * gettext 48 | 49 | Except Python 3, the other dependencies are no more needed once the package is 50 | built. 51 | 52 | 53 | Release Tarball 54 | ~~~~~~~~~~~~~~~ 55 | 56 | You can get the release tarball on the `release page 57 | `_. For example: 58 | 59 | * https://github.com/flozz/calcleaner/archive/refs/tags/v1.0.0.tar.gz 60 | 61 | 62 | Building the package 63 | ~~~~~~~~~~~~~~~~~~~~ 64 | 65 | The first step is to build the locales:: 66 | 67 | nox -s locales_compile 68 | 69 | Then the the Python package can be installed to the output directory:: 70 | 71 | python3 setup.py install -O1 --skip-build --root $ROOT 72 | 73 | And finally we can add additional files (.desktop, icons, man page,...):: 74 | 75 | ./linuxpkg/copy-data.sh $ROOT/usr 76 | -------------------------------------------------------------------------------- /linuxpkg/calcleaner.1: -------------------------------------------------------------------------------- 1 | .TH CALCLEANER 1 2022-08-03 "Calendar Cleaner {VERSION}" "General Commands Manual" 2 | 3 | 4 | .SH NAME 5 | 6 | calclaner \- purge old events from CalDAV calendars 7 | 8 | 9 | .SH SYNOPSIS 10 | 11 | .B calcleaner 12 | .RI [ -h ] 13 | .RI [ -v ] 14 | 15 | 16 | .SH DESCRIPTION 17 | 18 | CalCleaner is a simple utility to purge old events from CalDAV calendars. 19 | 20 | .SH OPTIONS 21 | 22 | .TP 23 | \fB-h\fR, \fB--help\fR 24 | show the help message and exit 25 | 26 | .TP 27 | \fB-v\fR, \fB--version\fR 28 | show program's version number and exit 29 | 30 | .SH WEB SITE 31 | 32 | https://github.com/flozz/calcleaner/ 33 | 34 | 35 | .SH REPORTING BUGS 36 | 37 | Report bugs to . 38 | 39 | 40 | .SH COPYRIGHT 41 | 42 | Copyright © 2022 Fabien Loison 43 | 44 | CalCleaner is free software under GNU GPL v3+ licence 45 | , you are free to modify and redistribute it 46 | under the terms of the license. 47 | -------------------------------------------------------------------------------- /linuxpkg/copy-data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APP_ID=org.flozz.calcleaner 4 | APP_NAME=calcleaner 5 | 6 | # Print usage and exit if we have not arguments 7 | if [ -z "$1" ] ; then 8 | echo "USAGE:" 9 | echo " ./copy-data.sh " 10 | echo 11 | echo "EXAMPLE:" 12 | echo " ./copy-data.sh /usr" 13 | exit 1 14 | fi 15 | 16 | PREFIX=$(realpath $1) 17 | 18 | # Go to the script directory 19 | cd "${0%/*}" 1> /dev/null 2> /dev/null 20 | 21 | # Copy desktop file 22 | mkdir -pv "$PREFIX/share/applications/" 23 | cp -v "./$APP_ID.desktop" "$PREFIX/share/applications/" 24 | 25 | # Copy icons 26 | for size in 32 64 128 256 ; do 27 | mkdir -pv "$PREFIX/share/icons/hicolor/${size}x${size}/apps/" 28 | cp -v "../$APP_NAME/data/images/${APP_NAME}_${size}.png" \ 29 | "$PREFIX/share/icons/hicolor/${size}x${size}/apps/$APP_ID.png" 30 | done 31 | mkdir -pv "$PREFIX/share/icons/hicolor/scalable/apps/" 32 | cp -v "../$APP_NAME/data/images/${APP_NAME}.svg" \ 33 | "$PREFIX/share/icons/hicolor/scalable/apps/$APP_ID.svg" 34 | 35 | # Update icon cache for real installation 36 | if [ "$PREFIX" == "/usr" ] ; then 37 | update-icon-caches /usr/share/icons/* 38 | fi 39 | 40 | # Copy man page 41 | mkdir -pv "$PREFIX/share/man/man1/" 42 | cp -v "./$APP_NAME.1" "$PREFIX/share/man/man1/$APP_NAME.1" 43 | sed -i "s/{VERSION}/$(python3 ../setup.py --version)/g" "$PREFIX/share/man/man1/$APP_NAME.1" 44 | 45 | # Copy the Appstream file 46 | mkdir -pv "$PREFIX/share/metainfo/" 47 | cp -v "./$APP_ID.metainfo.xml" "$PREFIX/share/metainfo/$APP_ID.metainfo.xml" 48 | -------------------------------------------------------------------------------- /linuxpkg/org.flozz.calcleaner.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Calendar Cleaner 3 | Name[fr]=Nettoyeur de calendrier 4 | Name[hr]=Čistač kalendara 5 | Comment=Purge old events from CalDAV calendars 6 | Comment[fr]=Supprime les vieux événements des calendriers CalDAV 7 | Comment[hr]=Izbriši stare događaje iz CalDAV kalendara 8 | TryExec=calcleaner 9 | Exec=calcleaner 10 | Icon=org.flozz.calcleaner 11 | StartupNotify=true 12 | Terminal=false 13 | Type=Application 14 | Categories=GTK;Utility;Office 15 | Keywords=CalCleaner;Calendar;Cleaner;Purge;Cleanup;CalDAV 16 | -------------------------------------------------------------------------------- /linuxpkg/org.flozz.calcleaner.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.flozz.calcleaner 4 | CalCleaner 5 | A simple graphical tool to purge old events from CalDAV calendars 6 | Jednostavan grafički alat za brisanje starih događaja iz CalDAV kalendara 7 | GPL-3.0-or-later 8 | Fabien LOISON 9 | 10 | https://calcleaner.flozz.org/ 11 | https://github.com/flozz/calcleaner/issues 12 | https://contact.flozz.fr/ 13 | https://github.com/flozz/calcleaner#supporting-this-project 14 | 15 | 16 | Utility 17 | Office 18 | 19 | org.flozz.calcleaner.desktop 20 | 21 | calcleaner 22 | 23 | 24 | 25 |

26 | CalCleaner is a simple utility to purge old events from CalDAV calendars. 27 |

28 |

29 | Connect one or multiple CalDAV accounts (Nextcloud, Google Calendar, iCloud,...), 30 | select which calendars to clean, define the max age of events you want 31 | to keep and hit the "Clean Now!" button to let CalCleaner purge old 32 | events from your calendars. 🗓️🧹️ 33 |

34 |

35 | Čistač kalendara (CalCleaner) je jednostavan alat za brisanje starih događaja iz CalDAV kalendara. 36 |

37 |

38 | Poveži se s jednim ili više CalDAV računa (Nextcloud, Google Calendar, iCloud, …), odaberi kalendare za čišćenje, odredi željenu maksimalnu starost događaja koje želiš zadržati i pritisnuti gumb „Očisti sada!” kako bi aplikacija „Čistač kalendara” izbrisala stare događaje iz tvojih kalendara. 🗓️🧹️ 39 |

40 |
41 | 42 | 43 | 44 | Main window 45 | https://raw.githubusercontent.com/flozz/calcleaner/master/screenshot.png 46 | 47 | 48 | First start (no account configured) 49 | https://calcleaner.flozz.org/images/calcleaner_first_start.png 50 | 51 | 52 | Adding first account 53 | https://calcleaner.flozz.org/images/calcleaner_adding_first_account.png 54 | 55 | 56 | Selection of calendar to clean 57 | https://calcleaner.flozz.org/images/calcleaner_calendar_selection.png 58 | 59 | 60 | Cleaning in progress 61 | https://calcleaner.flozz.org/images/calcleaner_cleaning_in_progress.png 62 | 63 | 64 | Main menu 65 | https://calcleaner.flozz.org/images/calcleaner_main_menu.png 66 | 67 | 68 | Account management 69 | https://calcleaner.flozz.org/images/calcleaner_account_management.png 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
    78 |
  • Added Turkish translation (@sabriunal, #8)
  • 79 |
80 |
81 |
82 | 83 | 84 | 85 |
    86 |
  • Added Croatian translation (@milotype, #7)
  • 87 |
  • Added Python 3.11 support
  • 88 |
89 |
90 |
91 | 92 | 93 | 94 |
    95 |
  • Added German translation (Jürgen Benvenuti)
  • 96 |
97 |
98 |
99 | 100 | 101 | 102 |

UI Improvements:

103 |
    104 |
  • Double border removed in calendar view
  • 105 |
  • Accessibility improved by changing the widgets used to build 106 | the "pages" of the main window
  • 107 |
108 |

Translations:

109 |
    110 |
  • Dutch
  • 111 |
  • Brazilian Portuguese (incomplete)
  • 112 |
113 |
114 |
115 | 116 | 117 | 118 | 119 | 120 |
121 | 122 | CC0-1.0 123 | 124 | 125 |
126 | -------------------------------------------------------------------------------- /locales/de.po: -------------------------------------------------------------------------------- 1 | # GERMAN translation for calcleaner. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # Jürgen Benvenuti , 2022. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: calcleaner\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 11 | "PO-Revision-Date: 2022-10-04 21:08+0200\n" 12 | "Last-Translator: Jürgen Benvenuti \n" 13 | "Language-Team: gnome-de@gnome.org\n" 14 | "Language: de\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 3.1.1\n" 20 | 21 | #: calcleaner/data/ui/main-window.glade:46 22 | msgid "" 23 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 24 | msgstr "" 25 | "Beginnen Sie, indem Sie sich mit einem CalDav-Konto verbinden, um einige " 26 | "Kalender zum Aufräumen zu beziehen …" 27 | 28 | #: calcleaner/data/ui/main-window.glade:58 29 | msgid "Add account..." 30 | msgstr "Konto hinzufügen …" 31 | 32 | #: calcleaner/data/ui/main-window.glade:106 33 | msgid "Reading calendars..." 34 | msgstr "Kalender werden gelesen …" 35 | 36 | #: calcleaner/data/ui/main-window.glade:188 37 | msgid "More..." 38 | msgstr "Weitere …" 39 | 40 | #: calcleaner/data/ui/main-window.glade:202 41 | msgid "An error occured when fetching calendars..." 42 | msgstr "Beim Holen der Kalender ist ein Fehler aufgetreten …" 43 | 44 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 45 | msgid "Unknown error" 46 | msgstr "Unbekannter Fehler" 47 | 48 | #: calcleaner/data/ui/main-window.glade:236 49 | msgid "Retry" 50 | msgstr "Erneut versuchen" 51 | 52 | #: calcleaner/data/ui/main-window.glade:250 53 | msgid "Edit accounts..." 54 | msgstr "Konten bearbeiten …" 55 | 56 | #: calcleaner/data/ui/main-window.glade:322 57 | msgid "Purge events older than" 58 | msgstr "Termine bereinigen, die älter sind als" 59 | 60 | #: calcleaner/data/ui/main-window.glade:346 61 | msgid "weeks" 62 | msgstr "Wochen" 63 | 64 | #: calcleaner/data/ui/main-window.glade:363 65 | msgid "Do not delete recurring events" 66 | msgstr "Wiederkehrende Termine nicht löschen" 67 | 68 | #: calcleaner/data/ui/main-window.glade:385 69 | msgid "Clean Now!" 70 | msgstr "Jetzt aufräumen!" 71 | 72 | #: calcleaner/data/ui/main-window.glade:402 73 | msgid "Stop" 74 | msgstr "Stopp" 75 | 76 | #: calcleaner/data/ui/main-window.glade:450 77 | msgid "Accounts" 78 | msgstr "Konten" 79 | 80 | #: calcleaner/data/ui/main-window.glade:464 81 | msgid "About" 82 | msgstr "Info" 83 | 84 | #: calcleaner/data/ui/main-window.glade:478 85 | msgid "Quit" 86 | msgstr "Beenden" 87 | 88 | #: calcleaner/data/ui/main-window.glade:492 89 | msgid "Calendar Cleaner" 90 | msgstr "Kalender-Bereiniger" 91 | 92 | #: calcleaner/data/ui/main-window.glade:499 93 | msgid "Refresh calendars" 94 | msgstr "Kalender aktualisieren" 95 | 96 | #: calcleaner/data/ui/account-edit-dialog.glade:8 97 | msgid "CalDAV Account" 98 | msgstr "CalDAV-Konto" 99 | 100 | #: calcleaner/data/ui/account-edit-dialog.glade:77 101 | msgid "CalDAV URL" 102 | msgstr "CalDAV-Adresse" 103 | 104 | #: calcleaner/data/ui/account-edit-dialog.glade:104 105 | msgid "Password" 106 | msgstr "Passwort" 107 | 108 | #: calcleaner/data/ui/account-edit-dialog.glade:116 109 | msgid "Username" 110 | msgstr "Nutzername" 111 | 112 | #: calcleaner/data/ui/account-edit-dialog.glade:153 113 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 114 | msgstr "" 115 | "Überprüfung von SSL-Zertifikat deaktivieren (selbst-signiertes Zertifikat, " 116 | "etc.)" 117 | 118 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 119 | msgid "CalDAV Accounts" 120 | msgstr "CalDAV-Konten" 121 | 122 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 123 | msgid "Add account" 124 | msgstr "Konto hinzufügen" 125 | 126 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 127 | msgid "Remove selected account" 128 | msgstr "Ausgewähltes Konto entfernen" 129 | 130 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 131 | msgid "Edit selected account..." 132 | msgstr "Ausgewähltes Konto bearbeiten …" 133 | 134 | #: calcleaner/main_window.py:117 135 | msgid "Calendar" 136 | msgstr "Kalender" 137 | 138 | #: calcleaner/main_window.py:138 139 | msgid "Events" 140 | msgstr "Termine" 141 | 142 | #: calcleaner/main_window.py:149 143 | msgid "Purge" 144 | msgstr "Bereinigen" 145 | 146 | #: calcleaner/main_window.py:158 147 | msgid "Cleaning" 148 | msgstr "Aufräumen" 149 | 150 | #: calcleaner/about_dialog.py:17 151 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 152 | msgstr "" 153 | "Ein einfaches grafisches Werkzeug zum Bereinigen alter Termine aus CalDAV-" 154 | "Kalendern" 155 | 156 | #: calcleaner/about_dialog.py:31 157 | msgid "translator-credits" 158 | msgstr "Jürgen Benvenuti , 2022" 159 | 160 | #: calcleaner/application.py:98 161 | msgid "An error occured..." 162 | msgstr "Ein Fehler ist aufgetreten …" 163 | 164 | #: calcleaner/application.py:102 165 | msgid "" 166 | "Unable to connect to the server: the SSL certificate is invalid.\n" 167 | "\n" 168 | "🞄 Check that there is no error in the CalDAV server URL\n" 169 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 170 | "in the parameters of the account" 171 | msgstr "" 172 | "Verbindung zum Server konnte nicht hergestellt werden: Das SSL-Zertifikat " 173 | "ist ungültig.\n" 174 | "\n" 175 | "🞄 Prüfen Sie, ob die Adresse des CalDAV-Servers einen Fehler enthält\n" 176 | "🞄 Wenn Sie ein selbst-signiertes Zertifikat verwenden, deaktivieren Sie " 177 | "die SSL-Überprüfung in den Parametern des Kontos" 178 | 179 | #: calcleaner/application.py:109 180 | msgid "" 181 | "Unable to connect to the server.\n" 182 | "\n" 183 | "🞄 Check that there is no error in the CalDAV server URL\n" 184 | "🞄 Check that the server is currently available\n" 185 | "🞄 Check you are connected to the internet" 186 | msgstr "" 187 | "Verbindung zum Server konnte nicht hergestellt werden.\n" 188 | "\n" 189 | "🞄 Prüfen Sie, ob die Adresse des CalDAV-Servers einen Fehler enthält\n" 190 | "🞄 Prüfen Sie, ob der Server derzeit verfügbar ist\n" 191 | "🞄 Prüfen Sie, ob Sie mit dem Internet verbunden sind" 192 | 193 | #: calcleaner/application.py:116 194 | msgid "" 195 | "You are not authorized to access this resource.\n" 196 | "\n" 197 | "🞄 Check your login and password\n" 198 | "🞄 Check you are allowed to access the server" 199 | msgstr "" 200 | "Sie sind nicht legitimiert, auf diese Ressource zuzugreifen.\n" 201 | "\n" 202 | "🞄 Prüfen Sie Ihre Anmeldedaten und Ihr Passwort\n" 203 | "🞄 Prüfen Sie, ob Sie die Erlaubnis besitzen, auf den Server zuzugreifen" 204 | 205 | #: calcleaner/application.py:122 206 | msgid "" 207 | "Unable to read calendars.\n" 208 | "\n" 209 | "🞄 Check that there is no error in the CalDAV server URL" 210 | msgstr "" 211 | "Kalender konnten nicht gelesen werden.\n" 212 | "\n" 213 | "🞄 Prüfen Sie, ob die Adresse des CalDAV-Servers einen Fehler enthält" 214 | 215 | #: calcleaner/application.py:264 216 | msgid "Skipped" 217 | msgstr "Übersprungen" 218 | 219 | #: calcleaner/application.py:284 220 | msgid "Reading..." 221 | msgstr "Wird gelesen …" 222 | -------------------------------------------------------------------------------- /locales/fr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 11 | "PO-Revision-Date: 2022-08-19 14:08+0200\n" 12 | "Last-Translator: \n" 13 | "Language-Team: \n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 3.0.1\n" 19 | 20 | #: calcleaner/data/ui/main-window.glade:46 21 | msgid "" 22 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 23 | msgstr "" 24 | "Pour commencer, ajoutez un compte CalDAV afin de récupérer quelques " 25 | "calendriers à nettoyer..." 26 | 27 | #: calcleaner/data/ui/main-window.glade:58 28 | msgid "Add account..." 29 | msgstr "Ajouter un compte..." 30 | 31 | #: calcleaner/data/ui/main-window.glade:106 32 | msgid "Reading calendars..." 33 | msgstr "Lecture des calendriers..." 34 | 35 | #: calcleaner/data/ui/main-window.glade:188 36 | msgid "More..." 37 | msgstr "Plus..." 38 | 39 | #: calcleaner/data/ui/main-window.glade:202 40 | msgid "An error occured when fetching calendars..." 41 | msgstr "Une erreur est survenue lors de la récupération des calendriers..." 42 | 43 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 44 | msgid "Unknown error" 45 | msgstr "Erreur inconnue" 46 | 47 | #: calcleaner/data/ui/main-window.glade:236 48 | msgid "Retry" 49 | msgstr "Réessayer" 50 | 51 | #: calcleaner/data/ui/main-window.glade:250 52 | msgid "Edit accounts..." 53 | msgstr "Modifier les comptes..." 54 | 55 | #: calcleaner/data/ui/main-window.glade:322 56 | msgid "Purge events older than" 57 | msgstr "Supprimer les événements qui ont plus de" 58 | 59 | #: calcleaner/data/ui/main-window.glade:346 60 | msgid "weeks" 61 | msgstr "semaines" 62 | 63 | #: calcleaner/data/ui/main-window.glade:363 64 | msgid "Do not delete recurring events" 65 | msgstr "Ne pas supprimer les événements récurrents" 66 | 67 | #: calcleaner/data/ui/main-window.glade:385 68 | msgid "Clean Now!" 69 | msgstr "Nettoyer maintenant !" 70 | 71 | #: calcleaner/data/ui/main-window.glade:402 72 | msgid "Stop" 73 | msgstr "Arrêter" 74 | 75 | #: calcleaner/data/ui/main-window.glade:450 76 | msgid "Accounts" 77 | msgstr "Comptes" 78 | 79 | #: calcleaner/data/ui/main-window.glade:464 80 | msgid "About" 81 | msgstr "À propos" 82 | 83 | #: calcleaner/data/ui/main-window.glade:478 84 | msgid "Quit" 85 | msgstr "Quitter" 86 | 87 | #: calcleaner/data/ui/main-window.glade:492 88 | msgid "Calendar Cleaner" 89 | msgstr "Nettoyeur de calendriers" 90 | 91 | #: calcleaner/data/ui/main-window.glade:499 92 | msgid "Refresh calendars" 93 | msgstr "Actualiser les calendriers" 94 | 95 | #: calcleaner/data/ui/account-edit-dialog.glade:8 96 | msgid "CalDAV Account" 97 | msgstr "Compte CalDAV" 98 | 99 | #: calcleaner/data/ui/account-edit-dialog.glade:77 100 | msgid "CalDAV URL" 101 | msgstr "URL CalDAV" 102 | 103 | #: calcleaner/data/ui/account-edit-dialog.glade:104 104 | msgid "Password" 105 | msgstr "Mot de passe" 106 | 107 | #: calcleaner/data/ui/account-edit-dialog.glade:116 108 | msgid "Username" 109 | msgstr "Utilisateur" 110 | 111 | #: calcleaner/data/ui/account-edit-dialog.glade:153 112 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 113 | msgstr "" 114 | "Désactiver la vérification des certificats SSL (certificat autosigné, etc.)" 115 | 116 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 117 | msgid "CalDAV Accounts" 118 | msgstr "Comptes CalDAV" 119 | 120 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 121 | msgid "Add account" 122 | msgstr "Ajouter un compte" 123 | 124 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 125 | msgid "Remove selected account" 126 | msgstr "Supprimer le compte sélectionné" 127 | 128 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 129 | msgid "Edit selected account..." 130 | msgstr "Modifier le compte sélectionné..." 131 | 132 | #: calcleaner/main_window.py:117 133 | msgid "Calendar" 134 | msgstr "Calendrier" 135 | 136 | #: calcleaner/main_window.py:138 137 | msgid "Events" 138 | msgstr "Événements" 139 | 140 | #: calcleaner/main_window.py:149 141 | msgid "Purge" 142 | msgstr "Nettoyer" 143 | 144 | #: calcleaner/main_window.py:158 145 | msgid "Cleaning" 146 | msgstr "Nettoyage" 147 | 148 | #: calcleaner/about_dialog.py:17 149 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 150 | msgstr "" 151 | "Un outil simple pour nettoyer les vieux événements des calendriers CalDAV" 152 | 153 | #: calcleaner/about_dialog.py:31 154 | msgid "translator-credits" 155 | msgstr "Fabien LOISON (@flozz)" 156 | 157 | #: calcleaner/application.py:98 158 | msgid "An error occured..." 159 | msgstr "Une erreur est survenue..." 160 | 161 | #: calcleaner/application.py:102 162 | msgid "" 163 | "Unable to connect to the server: the SSL certificate is invalid.\n" 164 | "\n" 165 | "🞄 Check that there is no error in the CalDAV server URL\n" 166 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 167 | "in the parameters of the account" 168 | msgstr "" 169 | "Impossible de se connecter au serveur : le certificat SSL n'est pas " 170 | "valide.\n" 171 | "\n" 172 | "🞄 Vérifiez que l'URL du serveur CalDAV ne contient pas d'erreur\n" 173 | "🞄 Si vous utilisez un certificat autosigné, désactivez la vérification SSL " 174 | "dans les paramètres du compte" 175 | 176 | #: calcleaner/application.py:109 177 | msgid "" 178 | "Unable to connect to the server.\n" 179 | "\n" 180 | "🞄 Check that there is no error in the CalDAV server URL\n" 181 | "🞄 Check that the server is currently available\n" 182 | "🞄 Check you are connected to the internet" 183 | msgstr "" 184 | "Impossible de se connecter au serveur.\n" 185 | "\n" 186 | "🞄 Vérifiez que l'URL du serveur CalDAV ne contient pas d'erreur\n" 187 | "🞄 Vérifiez que le serveur est actuellement joignable\n" 188 | "🞄 Vérifiez que vous êtes connectés à internet" 189 | 190 | #: calcleaner/application.py:116 191 | msgid "" 192 | "You are not authorized to access this resource.\n" 193 | "\n" 194 | "🞄 Check your login and password\n" 195 | "🞄 Check you are allowed to access the server" 196 | msgstr "" 197 | "Vous n'êtes pas autorisés à accéder à cette ressource.\n" 198 | "\n" 199 | "🞄 Vérifiez votre nom d'utilisateur et votre mot de passe\n" 200 | "🞄 Vérifiez que vous êtes autorisés à accéder à ce serveur" 201 | 202 | #: calcleaner/application.py:122 203 | msgid "" 204 | "Unable to read calendars.\n" 205 | "\n" 206 | "🞄 Check that there is no error in the CalDAV server URL" 207 | msgstr "" 208 | "Impossible de lire les calendriers.\n" 209 | "\n" 210 | "🞄 Vérifiez que l'URL du serveur CalDAV ne contient pas d'erreur" 211 | 212 | #: calcleaner/application.py:264 213 | msgid "Skipped" 214 | msgstr "Ignoré" 215 | 216 | #: calcleaner/application.py:284 217 | msgid "Reading..." 218 | msgstr "Lecture..." 219 | -------------------------------------------------------------------------------- /locales/hr.po: -------------------------------------------------------------------------------- 1 | # Croatian translation for calcleaner. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # Milo Ivir , 2023. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: calcleaner\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 11 | "PO-Revision-Date: 2023-05-13 12:36+0200\n" 12 | "Last-Translator: Milo Ivir \n" 13 | "Language-Team: \n" 14 | "Language: hr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 20 | "X-Generator: Poedit 3.0\n" 21 | 22 | #: calcleaner/data/ui/main-window.glade:46 23 | msgid "" 24 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 25 | msgstr "Započni povezivanjem s CalDAV računom za čišćenje kalendara …" 26 | 27 | #: calcleaner/data/ui/main-window.glade:58 28 | msgid "Add account..." 29 | msgstr "Dodaj račun …" 30 | 31 | #: calcleaner/data/ui/main-window.glade:106 32 | msgid "Reading calendars..." 33 | msgstr "Čitanje kalendara …" 34 | 35 | #: calcleaner/data/ui/main-window.glade:188 36 | msgid "More..." 37 | msgstr "Više …" 38 | 39 | #: calcleaner/data/ui/main-window.glade:202 40 | msgid "An error occured when fetching calendars..." 41 | msgstr "Došlo je do greške prilikom dohvaćanja kalendara …" 42 | 43 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 44 | msgid "Unknown error" 45 | msgstr "Nepoznata greška" 46 | 47 | #: calcleaner/data/ui/main-window.glade:236 48 | msgid "Retry" 49 | msgstr "Pokušaj ponovo" 50 | 51 | #: calcleaner/data/ui/main-window.glade:250 52 | msgid "Edit accounts..." 53 | msgstr "Uredi račune …" 54 | 55 | #: calcleaner/data/ui/main-window.glade:322 56 | msgid "Purge events older than" 57 | msgstr "Izbriši događaje starije od" 58 | 59 | #: calcleaner/data/ui/main-window.glade:346 60 | msgid "weeks" 61 | msgstr "tjedna" 62 | 63 | #: calcleaner/data/ui/main-window.glade:363 64 | msgid "Do not delete recurring events" 65 | msgstr "Nemoj brisati ponavljajuće događaje" 66 | 67 | #: calcleaner/data/ui/main-window.glade:385 68 | msgid "Clean Now!" 69 | msgstr "Očisti sada!" 70 | 71 | #: calcleaner/data/ui/main-window.glade:402 72 | msgid "Stop" 73 | msgstr "Prekini" 74 | 75 | #: calcleaner/data/ui/main-window.glade:450 76 | msgid "Accounts" 77 | msgstr "Računi" 78 | 79 | #: calcleaner/data/ui/main-window.glade:464 80 | msgid "About" 81 | msgstr "O aplikaciji" 82 | 83 | #: calcleaner/data/ui/main-window.glade:478 84 | msgid "Quit" 85 | msgstr "Zatvori aplikaciju" 86 | 87 | #: calcleaner/data/ui/main-window.glade:492 88 | msgid "Calendar Cleaner" 89 | msgstr "Čistač kalendara" 90 | 91 | #: calcleaner/data/ui/main-window.glade:499 92 | msgid "Refresh calendars" 93 | msgstr "Aktualiziraj kalendare" 94 | 95 | #: calcleaner/data/ui/account-edit-dialog.glade:8 96 | msgid "CalDAV Account" 97 | msgstr "CalDAV račun" 98 | 99 | #: calcleaner/data/ui/account-edit-dialog.glade:77 100 | msgid "CalDAV URL" 101 | msgstr "CalDAV URL" 102 | 103 | #: calcleaner/data/ui/account-edit-dialog.glade:104 104 | msgid "Password" 105 | msgstr "Lozinka" 106 | 107 | #: calcleaner/data/ui/account-edit-dialog.glade:116 108 | msgid "Username" 109 | msgstr "Korisničko ime" 110 | 111 | #: calcleaner/data/ui/account-edit-dialog.glade:153 112 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 113 | msgstr "" 114 | "Deaktiviraj provjeru SSL certifikata (samopotpisani certifikat, itd.)" 115 | 116 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 117 | msgid "CalDAV Accounts" 118 | msgstr "CalDAV računi" 119 | 120 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 121 | msgid "Add account" 122 | msgstr "Dodaj račun" 123 | 124 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 125 | msgid "Remove selected account" 126 | msgstr "Ukloni odabrani račun" 127 | 128 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 129 | msgid "Edit selected account..." 130 | msgstr "Uredi odabrani račun …" 131 | 132 | #: calcleaner/main_window.py:117 133 | msgid "Calendar" 134 | msgstr "Kalendar" 135 | 136 | #: calcleaner/main_window.py:138 137 | msgid "Events" 138 | msgstr "Događaji" 139 | 140 | #: calcleaner/main_window.py:149 141 | msgid "Purge" 142 | msgstr "Izbriši" 143 | 144 | #: calcleaner/main_window.py:158 145 | msgid "Cleaning" 146 | msgstr "Čišćenje" 147 | 148 | #: calcleaner/about_dialog.py:17 149 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 150 | msgstr "" 151 | "Jednostavan grafički alat za brisanje starih događaja iz CalDAV kalendara" 152 | 153 | #: calcleaner/about_dialog.py:31 154 | msgid "translator-credits" 155 | msgstr "Milo Ivir " 156 | 157 | #: calcleaner/application.py:98 158 | msgid "An error occured..." 159 | msgstr "Došlo je do greške …" 160 | 161 | #: calcleaner/application.py:102 162 | msgid "" 163 | "Unable to connect to the server: the SSL certificate is invalid.\n" 164 | "\n" 165 | "🞄 Check that there is no error in the CalDAV server URL\n" 166 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 167 | "in the parameters of the account" 168 | msgstr "" 169 | "Neuspjelo povezivanje s poslužiteljem: SSL certifikat je neispravan.\n" 170 | "\n" 171 | "🞄 Provjeri da u URL-u CalDAV poslužitelja nema greške\n" 172 | "🞄 Ako koristiš samopotpisani certifikat, deaktiviraj SSL provjeru u " 173 | "parametrima računa" 174 | 175 | #: calcleaner/application.py:109 176 | msgid "" 177 | "Unable to connect to the server.\n" 178 | "\n" 179 | "🞄 Check that there is no error in the CalDAV server URL\n" 180 | "🞄 Check that the server is currently available\n" 181 | "🞄 Check you are connected to the internet" 182 | msgstr "" 183 | "Neuspjelo povezivanje s poslužiteljem.\n" 184 | "\n" 185 | "🞄 Provjeri da u URL-u CalDAV poslužitelja nema greške\n" 186 | "🞄 Provjeri dostupnost poslužitelja\n" 187 | "🞄 Provjeri vezu s internetom" 188 | 189 | #: calcleaner/application.py:116 190 | msgid "" 191 | "You are not authorized to access this resource.\n" 192 | "\n" 193 | "🞄 Check your login and password\n" 194 | "🞄 Check you are allowed to access the server" 195 | msgstr "" 196 | "Nemaš autorizaciju za pristup ovom resursu.\n" 197 | "\n" 198 | "🞄 Provjeri svoju prijavu i lozinku\n" 199 | "🞄 Provjeri dozvolu za pristup poslužitelju" 200 | 201 | #: calcleaner/application.py:122 202 | msgid "" 203 | "Unable to read calendars.\n" 204 | "\n" 205 | "🞄 Check that there is no error in the CalDAV server URL" 206 | msgstr "" 207 | "Neuspjelo čitanje kalendara.\n" 208 | "\n" 209 | "🞄 Provjeri da u URL-u CalDAV poslužitelja nema greške" 210 | 211 | #: calcleaner/application.py:264 212 | msgid "Skipped" 213 | msgstr "Preskočeno" 214 | 215 | #: calcleaner/application.py:284 216 | msgid "Reading..." 217 | msgstr "Učitavanje …" 218 | -------------------------------------------------------------------------------- /locales/it.po: -------------------------------------------------------------------------------- 1 | # ITALIAN TRANSLATION FOR CALCLEANER. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # ALBANO BATTISTELLA , 2022. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 11 | "PO-Revision-Date: 2022-08-19 15:40+0200\n" 12 | "Last-Translator: Albano Battistella \n" 13 | "Language-Team: Italian \n" 14 | "Language: it\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 3.0.1\n" 19 | 20 | #: calcleaner/data/ui/main-window.glade:46 21 | msgid "" 22 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 23 | msgstr "" 24 | "Inizia connettendoti a un account CalDAV per ottenere alcuni calendari da " 25 | "pulire..." 26 | 27 | #: calcleaner/data/ui/main-window.glade:58 28 | msgid "Add account..." 29 | msgstr "Aggiungi account.." 30 | 31 | #: calcleaner/data/ui/main-window.glade:106 32 | msgid "Reading calendars..." 33 | msgstr "Lettura dei calendari..." 34 | 35 | #: calcleaner/data/ui/main-window.glade:188 36 | msgid "More..." 37 | msgstr "Di più..." 38 | 39 | #: calcleaner/data/ui/main-window.glade:202 40 | msgid "An error occured when fetching calendars..." 41 | msgstr "Si è verificato un errore durante il recupero dei calendari..." 42 | 43 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 44 | msgid "Unknown error" 45 | msgstr "Errore sconosciuto" 46 | 47 | #: calcleaner/data/ui/main-window.glade:236 48 | msgid "Retry" 49 | msgstr "Riprova" 50 | 51 | #: calcleaner/data/ui/main-window.glade:250 52 | msgid "Edit accounts..." 53 | msgstr "Modifica account..." 54 | 55 | #: calcleaner/data/ui/main-window.glade:322 56 | msgid "Purge events older than" 57 | msgstr "Elimina gli eventi più vecchi di" 58 | 59 | #: calcleaner/data/ui/main-window.glade:346 60 | msgid "weeks" 61 | msgstr "settimane" 62 | 63 | #: calcleaner/data/ui/main-window.glade:363 64 | msgid "Do not delete recurring events" 65 | msgstr "Non eliminare gli eventi ricorrenti" 66 | 67 | #: calcleaner/data/ui/main-window.glade:385 68 | msgid "Clean Now!" 69 | msgstr "Pulisci ora!" 70 | 71 | #: calcleaner/data/ui/main-window.glade:402 72 | msgid "Stop" 73 | msgstr "Ferma" 74 | 75 | #: calcleaner/data/ui/main-window.glade:450 76 | msgid "Accounts" 77 | msgstr "Account" 78 | 79 | #: calcleaner/data/ui/main-window.glade:464 80 | msgid "About" 81 | msgstr "Informazioni" 82 | 83 | #: calcleaner/data/ui/main-window.glade:478 84 | msgid "Quit" 85 | msgstr "Esci" 86 | 87 | #: calcleaner/data/ui/main-window.glade:492 88 | msgid "Calendar Cleaner" 89 | msgstr "Pulitore per calendario" 90 | 91 | #: calcleaner/data/ui/main-window.glade:499 92 | msgid "Refresh calendars" 93 | msgstr "Aggiorna i calendari" 94 | 95 | #: calcleaner/data/ui/account-edit-dialog.glade:8 96 | msgid "CalDAV Account" 97 | msgstr "Account CalDAV" 98 | 99 | #: calcleaner/data/ui/account-edit-dialog.glade:77 100 | msgid "CalDAV URL" 101 | msgstr "URL CalDAV" 102 | 103 | #: calcleaner/data/ui/account-edit-dialog.glade:104 104 | msgid "Password" 105 | msgstr "Password" 106 | 107 | #: calcleaner/data/ui/account-edit-dialog.glade:116 108 | msgid "Username" 109 | msgstr "Nome utente" 110 | 111 | #: calcleaner/data/ui/account-edit-dialog.glade:153 112 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 113 | msgstr "" 114 | "Disabilita la convalida del certificato SSL (certificato autofirmato, ecc.)" 115 | 116 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 117 | msgid "CalDAV Accounts" 118 | msgstr "Account CalDAV" 119 | 120 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 121 | msgid "Add account" 122 | msgstr "Aggiungi account" 123 | 124 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 125 | msgid "Remove selected account" 126 | msgstr "Rimuovi l'account selezionato" 127 | 128 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 129 | msgid "Edit selected account..." 130 | msgstr "Modifica account selezionato..." 131 | 132 | #: calcleaner/main_window.py:117 133 | msgid "Calendar" 134 | msgstr "Calendario" 135 | 136 | #: calcleaner/main_window.py:138 137 | msgid "Events" 138 | msgstr "Eventi" 139 | 140 | #: calcleaner/main_window.py:149 141 | msgid "Purge" 142 | msgstr "Rimuovere" 143 | 144 | #: calcleaner/main_window.py:158 145 | msgid "Cleaning" 146 | msgstr "Pulizia" 147 | 148 | #: calcleaner/about_dialog.py:17 149 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 150 | msgstr "" 151 | "Un semplice strumento grafico per eliminare i vecchi eventi dai calendari " 152 | "CalDAV" 153 | 154 | #: calcleaner/about_dialog.py:31 155 | msgid "translator-credits" 156 | msgstr "Albano Battistella" 157 | 158 | #: calcleaner/application.py:98 159 | msgid "An error occured..." 160 | msgstr "Si è verificato un errore..." 161 | 162 | #: calcleaner/application.py:102 163 | msgid "" 164 | "Unable to connect to the server: the SSL certificate is invalid.\n" 165 | "\n" 166 | "🞄 Check that there is no error in the CalDAV server URL\n" 167 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 168 | "in the parameters of the account" 169 | msgstr "" 170 | "Impossibile connettersi al server: il certificato SSL non è valido.\n" 171 | "\n" 172 | "🞄 Verifica che non ci siano errori nell'URL del server CalDAV\n" 173 | "🞄 Se stai utilizzando un certificato autofirmato, disabilita la verifica " 174 | "SSL nei parametri dell'account" 175 | 176 | #: calcleaner/application.py:109 177 | msgid "" 178 | "Unable to connect to the server.\n" 179 | "\n" 180 | "🞄 Check that there is no error in the CalDAV server URL\n" 181 | "🞄 Check that the server is currently available\n" 182 | "🞄 Check you are connected to the internet" 183 | msgstr "" 184 | "Impossibile connettersi al server.\n" 185 | "\n" 186 | "🞄 Verifica che non ci siano errori nell'URL del server CalDAV\n" 187 | "🞄 Verifica che il server sia attualmente disponibile\n" 188 | "🞄 Verifica di essere connesso a Internet" 189 | 190 | #: calcleaner/application.py:116 191 | msgid "" 192 | "You are not authorized to access this resource.\n" 193 | "\n" 194 | "🞄 Check your login and password\n" 195 | "🞄 Check you are allowed to access the server" 196 | msgstr "" 197 | "Non sei autorizzato ad accedere a questa risorsa.\n" 198 | "\n" 199 | "🞄 Verifica login e password\n" 200 | "🞄 Verifica di essere autorizzato ad accedere al server" 201 | 202 | #: calcleaner/application.py:122 203 | msgid "" 204 | "Unable to read calendars.\n" 205 | "\n" 206 | "🞄 Check that there is no error in the CalDAV server URL" 207 | msgstr "" 208 | "Impossibile leggere i calendari.\n" 209 | "\n" 210 | "🞄 Verifica che non ci siano errori nell'URL del server CalDAV" 211 | 212 | #: calcleaner/application.py:264 213 | msgid "Skipped" 214 | msgstr "Saltato" 215 | 216 | #: calcleaner/application.py:284 217 | msgid "Reading..." 218 | msgstr "In lettura..." 219 | -------------------------------------------------------------------------------- /locales/messages.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: calcleaner/data/ui/main-window.glade:46 21 | msgid "" 22 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 23 | msgstr "" 24 | 25 | #: calcleaner/data/ui/main-window.glade:58 26 | msgid "Add account..." 27 | msgstr "" 28 | 29 | #: calcleaner/data/ui/main-window.glade:106 30 | msgid "Reading calendars..." 31 | msgstr "" 32 | 33 | #: calcleaner/data/ui/main-window.glade:188 34 | msgid "More..." 35 | msgstr "" 36 | 37 | #: calcleaner/data/ui/main-window.glade:202 38 | msgid "An error occured when fetching calendars..." 39 | msgstr "" 40 | 41 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 42 | msgid "Unknown error" 43 | msgstr "" 44 | 45 | #: calcleaner/data/ui/main-window.glade:236 46 | msgid "Retry" 47 | msgstr "" 48 | 49 | #: calcleaner/data/ui/main-window.glade:250 50 | msgid "Edit accounts..." 51 | msgstr "" 52 | 53 | #: calcleaner/data/ui/main-window.glade:322 54 | msgid "Purge events older than" 55 | msgstr "" 56 | 57 | #: calcleaner/data/ui/main-window.glade:346 58 | msgid "weeks" 59 | msgstr "" 60 | 61 | #: calcleaner/data/ui/main-window.glade:363 62 | msgid "Do not delete recurring events" 63 | msgstr "" 64 | 65 | #: calcleaner/data/ui/main-window.glade:385 66 | msgid "Clean Now!" 67 | msgstr "" 68 | 69 | #: calcleaner/data/ui/main-window.glade:402 70 | msgid "Stop" 71 | msgstr "" 72 | 73 | #: calcleaner/data/ui/main-window.glade:450 74 | msgid "Accounts" 75 | msgstr "" 76 | 77 | #: calcleaner/data/ui/main-window.glade:464 78 | msgid "About" 79 | msgstr "" 80 | 81 | #: calcleaner/data/ui/main-window.glade:478 82 | msgid "Quit" 83 | msgstr "" 84 | 85 | #: calcleaner/data/ui/main-window.glade:492 86 | msgid "Calendar Cleaner" 87 | msgstr "" 88 | 89 | #: calcleaner/data/ui/main-window.glade:499 90 | msgid "Refresh calendars" 91 | msgstr "" 92 | 93 | #: calcleaner/data/ui/account-edit-dialog.glade:8 94 | msgid "CalDAV Account" 95 | msgstr "" 96 | 97 | #: calcleaner/data/ui/account-edit-dialog.glade:77 98 | msgid "CalDAV URL" 99 | msgstr "" 100 | 101 | #: calcleaner/data/ui/account-edit-dialog.glade:104 102 | msgid "Password" 103 | msgstr "" 104 | 105 | #: calcleaner/data/ui/account-edit-dialog.glade:116 106 | msgid "Username" 107 | msgstr "" 108 | 109 | #: calcleaner/data/ui/account-edit-dialog.glade:153 110 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 111 | msgstr "" 112 | 113 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 114 | msgid "CalDAV Accounts" 115 | msgstr "" 116 | 117 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 118 | msgid "Add account" 119 | msgstr "" 120 | 121 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 122 | msgid "Remove selected account" 123 | msgstr "" 124 | 125 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 126 | msgid "Edit selected account..." 127 | msgstr "" 128 | 129 | #: calcleaner/main_window.py:117 130 | msgid "Calendar" 131 | msgstr "" 132 | 133 | #: calcleaner/main_window.py:138 134 | msgid "Events" 135 | msgstr "" 136 | 137 | #: calcleaner/main_window.py:149 138 | msgid "Purge" 139 | msgstr "" 140 | 141 | #: calcleaner/main_window.py:158 142 | msgid "Cleaning" 143 | msgstr "" 144 | 145 | #: calcleaner/about_dialog.py:17 146 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 147 | msgstr "" 148 | 149 | #: calcleaner/about_dialog.py:31 150 | msgid "translator-credits" 151 | msgstr "" 152 | 153 | #: calcleaner/application.py:98 154 | msgid "An error occured..." 155 | msgstr "" 156 | 157 | #: calcleaner/application.py:102 158 | msgid "" 159 | "Unable to connect to the server: the SSL certificate is invalid.\n" 160 | "\n" 161 | "🞄 Check that there is no error in the CalDAV server URL\n" 162 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 163 | "in the parameters of the account" 164 | msgstr "" 165 | 166 | #: calcleaner/application.py:109 167 | msgid "" 168 | "Unable to connect to the server.\n" 169 | "\n" 170 | "🞄 Check that there is no error in the CalDAV server URL\n" 171 | "🞄 Check that the server is currently available\n" 172 | "🞄 Check you are connected to the internet" 173 | msgstr "" 174 | 175 | #: calcleaner/application.py:116 176 | msgid "" 177 | "You are not authorized to access this resource.\n" 178 | "\n" 179 | "🞄 Check your login and password\n" 180 | "🞄 Check you are allowed to access the server" 181 | msgstr "" 182 | 183 | #: calcleaner/application.py:122 184 | msgid "" 185 | "Unable to read calendars.\n" 186 | "\n" 187 | "🞄 Check that there is no error in the CalDAV server URL" 188 | msgstr "" 189 | 190 | #: calcleaner/application.py:264 191 | msgid "Skipped" 192 | msgstr "" 193 | 194 | #: calcleaner/application.py:284 195 | msgid "Reading..." 196 | msgstr "" 197 | -------------------------------------------------------------------------------- /locales/nl.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 2 | # This file is distributed under the same license as the PACKAGE package. 3 | # 4 | # Heimen Stoffels , 2022. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 10 | "PO-Revision-Date: 2022-09-19 20:34+0200\n" 11 | "Last-Translator: Heimen Stoffels \n" 12 | "Language-Team: Dutch\n" 13 | "Language: nl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | "X-Generator: Lokalize 22.08.1\n" 19 | 20 | #: calcleaner/data/ui/main-window.glade:46 21 | msgid "" 22 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 23 | msgstr "Voeg een CalDAV-account toe om aan de slag te gaan." 24 | 25 | #: calcleaner/data/ui/main-window.glade:58 26 | msgid "Add account..." 27 | msgstr "Account toevoegen…" 28 | 29 | #: calcleaner/data/ui/main-window.glade:106 30 | msgid "Reading calendars..." 31 | msgstr "Bezig met uitlezen van agenda's…" 32 | 33 | #: calcleaner/data/ui/main-window.glade:188 34 | msgid "More..." 35 | msgstr "Meer…" 36 | 37 | #: calcleaner/data/ui/main-window.glade:202 38 | msgid "An error occured when fetching calendars..." 39 | msgstr "Er is een fout opgetreden tijdens het ophalen." 40 | 41 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 42 | msgid "Unknown error" 43 | msgstr "Onbekende foutmelding" 44 | 45 | #: calcleaner/data/ui/main-window.glade:236 46 | msgid "Retry" 47 | msgstr "Opnieuw" 48 | 49 | #: calcleaner/data/ui/main-window.glade:250 50 | msgid "Edit accounts..." 51 | msgstr "Accounts bewerken…" 52 | 53 | #: calcleaner/data/ui/main-window.glade:322 54 | msgid "Purge events older than" 55 | msgstr "Afspraken verwijderen die ouder zijn dan" 56 | 57 | #: calcleaner/data/ui/main-window.glade:346 58 | msgid "weeks" 59 | msgstr "weken" 60 | 61 | #: calcleaner/data/ui/main-window.glade:363 62 | msgid "Do not delete recurring events" 63 | msgstr "Geen herhaalafspraken verwijderen" 64 | 65 | #: calcleaner/data/ui/main-window.glade:385 66 | msgid "Clean Now!" 67 | msgstr "Opruimen!" 68 | 69 | #: calcleaner/data/ui/main-window.glade:402 70 | msgid "Stop" 71 | msgstr "Afbreken" 72 | 73 | #: calcleaner/data/ui/main-window.glade:450 74 | msgid "Accounts" 75 | msgstr "Accounts" 76 | 77 | #: calcleaner/data/ui/main-window.glade:464 78 | msgid "About" 79 | msgstr "Over" 80 | 81 | #: calcleaner/data/ui/main-window.glade:478 82 | msgid "Quit" 83 | msgstr "Afsluiten" 84 | 85 | #: calcleaner/data/ui/main-window.glade:492 86 | msgid "Calendar Cleaner" 87 | msgstr "Agenda-opruiming" 88 | 89 | #: calcleaner/data/ui/main-window.glade:499 90 | msgid "Refresh calendars" 91 | msgstr "Agenda's herladen" 92 | 93 | #: calcleaner/data/ui/account-edit-dialog.glade:8 94 | msgid "CalDAV Account" 95 | msgstr "CalDAV-account" 96 | 97 | #: calcleaner/data/ui/account-edit-dialog.glade:77 98 | msgid "CalDAV URL" 99 | msgstr "CalDAV-url" 100 | 101 | #: calcleaner/data/ui/account-edit-dialog.glade:104 102 | msgid "Password" 103 | msgstr "Wachtwoord" 104 | 105 | #: calcleaner/data/ui/account-edit-dialog.glade:116 106 | msgid "Username" 107 | msgstr "Gebruikersnaam" 108 | 109 | #: calcleaner/data/ui/account-edit-dialog.glade:153 110 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 111 | msgstr "" 112 | "SSL-certificaatcontrole uitschakelen (bijv. bij een zelf-ondertekend" 113 | " certificaat)" 114 | 115 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 116 | msgid "CalDAV Accounts" 117 | msgstr "CalDAV-accounts" 118 | 119 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 120 | msgid "Add account" 121 | msgstr "Account toevoegen" 122 | 123 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 124 | msgid "Remove selected account" 125 | msgstr "Gekozen account verwijderen" 126 | 127 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 128 | msgid "Edit selected account..." 129 | msgstr "Gekozen account bewerken…" 130 | 131 | #: calcleaner/main_window.py:117 132 | msgid "Calendar" 133 | msgstr "Agenda" 134 | 135 | #: calcleaner/main_window.py:138 136 | msgid "Events" 137 | msgstr "Afspraken" 138 | 139 | #: calcleaner/main_window.py:149 140 | msgid "Purge" 141 | msgstr "Verwijderen" 142 | 143 | #: calcleaner/main_window.py:158 144 | msgid "Cleaning" 145 | msgstr "Bezig met opruimen…" 146 | 147 | #: calcleaner/about_dialog.py:17 148 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 149 | msgstr "" 150 | "Een eenvoudige toepassing voor het verwijderen van oude afspraken uit" 151 | " CalDAV-agenda's" 152 | 153 | #: calcleaner/about_dialog.py:31 154 | msgid "translator-credits" 155 | msgstr "Heimen Stoffels " 156 | 157 | #: calcleaner/application.py:98 158 | msgid "An error occured..." 159 | msgstr "Er is een fout opgetreden." 160 | 161 | #: calcleaner/application.py:102 162 | msgid "" 163 | "Unable to connect to the server: the SSL certificate is invalid.\n" 164 | "\n" 165 | "🞄 Check that there is no error in the CalDAV server URL\n" 166 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 167 | "in the parameters of the account" 168 | msgstr "" 169 | "Er kan geen verbinding worden gemaakt met de server: het ssl-certificaat is" 170 | " ongeldig.\n" 171 | "\n" 172 | "🞄 Controleer de CalDAV-server-url;\n" 173 | "🞄 Als u gebruikmaakt van een zelf-ondertekend certificaat, schakel" 174 | " SSL-controle " 175 | "dan uit in de accountvoorkeuren" 176 | 177 | #: calcleaner/application.py:109 178 | msgid "" 179 | "Unable to connect to the server.\n" 180 | "\n" 181 | "🞄 Check that there is no error in the CalDAV server URL\n" 182 | "🞄 Check that the server is currently available\n" 183 | "🞄 Check you are connected to the internet" 184 | msgstr "" 185 | "Er kan geen verbinding worden gemaakt met de server.\n" 186 | "\n" 187 | "🞄 Controleer de CalDAV-server-url;\n" 188 | "🞄 Controleer de serververbinding;\n" 189 | "🞄 Controleer uw internetverbinding." 190 | 191 | #: calcleaner/application.py:116 192 | msgid "" 193 | "You are not authorized to access this resource.\n" 194 | "\n" 195 | "🞄 Check your login and password\n" 196 | "🞄 Check you are allowed to access the server" 197 | msgstr "" 198 | "U heeft geen toegang tot deze bron.\n" 199 | "\n" 200 | "🞄 Controleer uw inloggegevens;\n" 201 | "🞄 Controleer de servertoegang." 202 | 203 | #: calcleaner/application.py:122 204 | msgid "" 205 | "Unable to read calendars.\n" 206 | "\n" 207 | "🞄 Check that there is no error in the CalDAV server URL" 208 | msgstr "" 209 | "De agenda's kunnen niet worden uitgelezen.\n" 210 | "\n" 211 | "Controleer de CalDAV-server-url." 212 | 213 | #: calcleaner/application.py:264 214 | msgid "Skipped" 215 | msgstr "Overgeslagen" 216 | 217 | #: calcleaner/application.py:284 218 | msgid "Reading..." 219 | msgstr "Bezig met uitlezen…" 220 | -------------------------------------------------------------------------------- /locales/pt_BR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Content-Transfer-Encoding: 8bit\n" 6 | "X-Generator: POEditor.com\n" 7 | "Project-Id-Version: CalCleaner\n" 8 | "Language: pt-br\n" 9 | 10 | #: calcleaner/data/ui/main-window.glade:46 11 | msgid "Start by connecting to a CalDAV account to get some calendars to cleanup..." 12 | msgstr "" 13 | 14 | #: calcleaner/data/ui/main-window.glade:58 15 | msgid "Add account..." 16 | msgstr "Adicionar conta..." 17 | 18 | #: calcleaner/data/ui/main-window.glade:106 19 | msgid "Reading calendars..." 20 | msgstr "Lendo calendários..." 21 | 22 | #: calcleaner/data/ui/main-window.glade:188 23 | msgid "More..." 24 | msgstr "Mais..." 25 | 26 | #: calcleaner/data/ui/main-window.glade:202 27 | msgid "An error occured when fetching calendars..." 28 | msgstr "" 29 | 30 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 31 | msgid "Unknown error" 32 | msgstr "Erro desconhecido" 33 | 34 | #: calcleaner/data/ui/main-window.glade:236 35 | msgid "Retry" 36 | msgstr "Tente novamente" 37 | 38 | #: calcleaner/data/ui/main-window.glade:250 39 | msgid "Edit accounts..." 40 | msgstr "Editar contas..." 41 | 42 | #: calcleaner/data/ui/main-window.glade:322 43 | msgid "Purge events older than" 44 | msgstr "" 45 | 46 | #: calcleaner/data/ui/main-window.glade:346 47 | msgid "weeks" 48 | msgstr "semanas" 49 | 50 | #: calcleaner/data/ui/main-window.glade:363 51 | msgid "Do not delete recurring events" 52 | msgstr "" 53 | 54 | #: calcleaner/data/ui/main-window.glade:385 55 | msgid "Clean Now!" 56 | msgstr "" 57 | 58 | #: calcleaner/data/ui/main-window.glade:402 59 | msgid "Stop" 60 | msgstr "Stop" 61 | 62 | #: calcleaner/data/ui/main-window.glade:450 63 | msgid "Accounts" 64 | msgstr "Contas" 65 | 66 | #: calcleaner/data/ui/main-window.glade:464 67 | msgid "About" 68 | msgstr "Sobre" 69 | 70 | #: calcleaner/data/ui/main-window.glade:478 71 | msgid "Quit" 72 | msgstr "" 73 | 74 | #: calcleaner/data/ui/main-window.glade:492 75 | msgid "Calendar Cleaner" 76 | msgstr "" 77 | 78 | #: calcleaner/data/ui/main-window.glade:499 79 | msgid "Refresh calendars" 80 | msgstr "" 81 | 82 | #: calcleaner/data/ui/account-edit-dialog.glade:8 83 | msgid "CalDAV Account" 84 | msgstr "" 85 | 86 | #: calcleaner/data/ui/account-edit-dialog.glade:77 87 | msgid "CalDAV URL" 88 | msgstr "" 89 | 90 | #: calcleaner/data/ui/account-edit-dialog.glade:104 91 | msgid "Password" 92 | msgstr "Senha" 93 | 94 | #: calcleaner/data/ui/account-edit-dialog.glade:116 95 | msgid "Username" 96 | msgstr "" 97 | 98 | #: calcleaner/data/ui/account-edit-dialog.glade:153 99 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 100 | msgstr "" 101 | 102 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 103 | msgid "CalDAV Accounts" 104 | msgstr "" 105 | 106 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 107 | msgid "Add account" 108 | msgstr "Adicionar conta" 109 | 110 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 111 | msgid "Remove selected account" 112 | msgstr "" 113 | 114 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 115 | msgid "Edit selected account..." 116 | msgstr "" 117 | 118 | #: calcleaner/main_window.py:117 119 | msgid "Calendar" 120 | msgstr "Calendário" 121 | 122 | #: calcleaner/main_window.py:138 123 | msgid "Events" 124 | msgstr "Eventos" 125 | 126 | #: calcleaner/main_window.py:149 127 | msgid "Purge" 128 | msgstr "" 129 | 130 | #: calcleaner/main_window.py:158 131 | msgid "Cleaning" 132 | msgstr "" 133 | 134 | #: calcleaner/about_dialog.py:17 135 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 136 | msgstr "" 137 | 138 | #: calcleaner/about_dialog.py:31 139 | msgid "translator-credits" 140 | msgstr "Kevin CARY " 141 | 142 | #: calcleaner/application.py:98 143 | msgid "An error occured..." 144 | msgstr "Um erro aconteceu..." 145 | 146 | #: calcleaner/application.py:102 147 | msgid "Unable to connect to the server: the SSL certificate is invalid.\n" 148 | "\n" 149 | "🞄 Check that there is no error in the CalDAV server URL\n" 150 | "🞄 If you are using a self-signed certificate, disable the SSL verification in the parameters of the account" 151 | msgstr "" 152 | 153 | #: calcleaner/application.py:109 154 | msgid "Unable to connect to the server.\n" 155 | "\n" 156 | "🞄 Check that there is no error in the CalDAV server URL\n" 157 | "🞄 Check that the server is currently available\n" 158 | "🞄 Check you are connected to the internet" 159 | msgstr "" 160 | 161 | #: calcleaner/application.py:116 162 | msgid "You are not authorized to access this resource.\n" 163 | "\n" 164 | "🞄 Check your login and password\n" 165 | "🞄 Check you are allowed to access the server" 166 | msgstr "" 167 | 168 | #: calcleaner/application.py:122 169 | msgid "Unable to read calendars.\n" 170 | "\n" 171 | "🞄 Check that there is no error in the CalDAV server URL" 172 | msgstr "" 173 | 174 | #: calcleaner/application.py:264 175 | msgid "Skipped" 176 | msgstr "" 177 | 178 | #: calcleaner/application.py:284 179 | msgid "Reading..." 180 | msgstr "" 181 | 182 | -------------------------------------------------------------------------------- /locales/tr.po: -------------------------------------------------------------------------------- 1 | # Turkish translation for org.flozz.calcleaner. 2 | # Copyright (C) 2023 org.flozz.calcleaner's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the org.flozz.calcleaner package. 4 | # 5 | # Sabri Ünal , 2023. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: \n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2022-08-19 14:05+0200\n" 12 | "PO-Revision-Date: 2023-05-25 06:39+0300\n" 13 | "Last-Translator: Sabri Ünal \n" 14 | "Language-Team: Turkish \n" 15 | "Language: tr\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=1; plural=0;\n" 20 | "X-Generator: Poedit 3.2.2\n" 21 | 22 | #: calcleaner/data/ui/main-window.glade:46 23 | msgid "" 24 | "Start by connecting to a CalDAV account to get some calendars to cleanup..." 25 | msgstr "" 26 | "Takvimlerin temizlenmesi için bir CalDAV hesabına bağlanarak başlayın..." 27 | 28 | #: calcleaner/data/ui/main-window.glade:58 29 | msgid "Add account..." 30 | msgstr "Hesap ekle..." 31 | 32 | #: calcleaner/data/ui/main-window.glade:106 33 | msgid "Reading calendars..." 34 | msgstr "Takvimler okunuyor..." 35 | 36 | #: calcleaner/data/ui/main-window.glade:188 37 | msgid "More..." 38 | msgstr "Daha fazla..." 39 | 40 | #: calcleaner/data/ui/main-window.glade:202 41 | msgid "An error occured when fetching calendars..." 42 | msgstr "Takvimler alınırken bir hata oluştu..." 43 | 44 | #: calcleaner/data/ui/main-window.glade:218 calcleaner/application.py:126 45 | msgid "Unknown error" 46 | msgstr "Bilinmeyen hata" 47 | 48 | #: calcleaner/data/ui/main-window.glade:236 49 | msgid "Retry" 50 | msgstr "Yeniden Dene" 51 | 52 | #: calcleaner/data/ui/main-window.glade:250 53 | msgid "Edit accounts..." 54 | msgstr "Hesapları düzenle..." 55 | 56 | #: calcleaner/data/ui/main-window.glade:322 57 | msgid "Purge events older than" 58 | msgstr "Şu tarihten eski olayları sil" 59 | 60 | #: calcleaner/data/ui/main-window.glade:346 61 | msgid "weeks" 62 | msgstr "hafta" 63 | 64 | #: calcleaner/data/ui/main-window.glade:363 65 | msgid "Do not delete recurring events" 66 | msgstr "Tekrar eden olayları silme" 67 | 68 | #: calcleaner/data/ui/main-window.glade:385 69 | msgid "Clean Now!" 70 | msgstr "Şimdi Temizle!" 71 | 72 | #: calcleaner/data/ui/main-window.glade:402 73 | msgid "Stop" 74 | msgstr "Durdur" 75 | 76 | #: calcleaner/data/ui/main-window.glade:450 77 | msgid "Accounts" 78 | msgstr "Hesaplar" 79 | 80 | #: calcleaner/data/ui/main-window.glade:464 81 | msgid "About" 82 | msgstr "Hakkında" 83 | 84 | #: calcleaner/data/ui/main-window.glade:478 85 | msgid "Quit" 86 | msgstr "Çık" 87 | 88 | #: calcleaner/data/ui/main-window.glade:492 89 | msgid "Calendar Cleaner" 90 | msgstr "Takvim Temizleyici" 91 | 92 | #: calcleaner/data/ui/main-window.glade:499 93 | msgid "Refresh calendars" 94 | msgstr "Takvimleri yenile" 95 | 96 | #: calcleaner/data/ui/account-edit-dialog.glade:8 97 | msgid "CalDAV Account" 98 | msgstr "CalDAV Hesabı" 99 | 100 | #: calcleaner/data/ui/account-edit-dialog.glade:77 101 | msgid "CalDAV URL" 102 | msgstr "CalDAV URL" 103 | 104 | #: calcleaner/data/ui/account-edit-dialog.glade:104 105 | msgid "Password" 106 | msgstr "Parola" 107 | 108 | #: calcleaner/data/ui/account-edit-dialog.glade:116 109 | msgid "Username" 110 | msgstr "Kullanıcı adı" 111 | 112 | #: calcleaner/data/ui/account-edit-dialog.glade:153 113 | msgid "Disable SSL certificate validation (self-signed certificate, etc.)" 114 | msgstr "" 115 | "SSL sertifikası doğrulamasını devre dışı bırak (kendinden imzalı sertifika " 116 | "vb.)" 117 | 118 | #: calcleaner/data/ui/accounts-manage-dialog.glade:9 119 | msgid "CalDAV Accounts" 120 | msgstr "CalDAV Hesapları" 121 | 122 | #: calcleaner/data/ui/accounts-manage-dialog.glade:80 123 | msgid "Add account" 124 | msgstr "Hesap ekle" 125 | 126 | #: calcleaner/data/ui/accounts-manage-dialog.glade:105 127 | msgid "Remove selected account" 128 | msgstr "Seçilen hesabı kaldır" 129 | 130 | #: calcleaner/data/ui/accounts-manage-dialog.glade:146 131 | msgid "Edit selected account..." 132 | msgstr "Seçilen hesapları düzenle..." 133 | 134 | #: calcleaner/main_window.py:117 135 | msgid "Calendar" 136 | msgstr "Takvim" 137 | 138 | #: calcleaner/main_window.py:138 139 | msgid "Events" 140 | msgstr "Olaylar" 141 | 142 | #: calcleaner/main_window.py:149 143 | msgid "Purge" 144 | msgstr "Temizle" 145 | 146 | #: calcleaner/main_window.py:158 147 | msgid "Cleaning" 148 | msgstr "Temizleniyor" 149 | 150 | #: calcleaner/about_dialog.py:17 151 | msgid "A simple graphical tool to purge old events from CalDAV calendars" 152 | msgstr "" 153 | "Eski olayları CalDAV takvimlerinden temizlemek için basit bir grafik araç" 154 | 155 | #: calcleaner/about_dialog.py:31 156 | msgid "translator-credits" 157 | msgstr "Sabri Ünal " 158 | 159 | #: calcleaner/application.py:98 160 | msgid "An error occured..." 161 | msgstr "Bir hata oluştu..." 162 | 163 | #: calcleaner/application.py:102 164 | msgid "" 165 | "Unable to connect to the server: the SSL certificate is invalid.\n" 166 | "\n" 167 | "🞄 Check that there is no error in the CalDAV server URL\n" 168 | "🞄 If you are using a self-signed certificate, disable the SSL verification " 169 | "in the parameters of the account" 170 | msgstr "" 171 | "Sunucuya bağlanamadı: SSL sertifikası geçersiz.\n" 172 | "\n" 173 | "🞄 CalDAV sunucu URL'sinde hata olmadığını kontrol edin\n" 174 | "🞄 Kendinden imzalı bir sertifika kullanıyorsanız hesabın parametrelerinde " 175 | "SSL doğrulamasını devre dışı bırakın" 176 | 177 | #: calcleaner/application.py:109 178 | msgid "" 179 | "Unable to connect to the server.\n" 180 | "\n" 181 | "🞄 Check that there is no error in the CalDAV server URL\n" 182 | "🞄 Check that the server is currently available\n" 183 | "🞄 Check you are connected to the internet" 184 | msgstr "" 185 | "Sunucuya bağlanamadı.\n" 186 | "\n" 187 | "🞄 CalDAV sunucusu URL'sinde hata olmadığını kontrol edin\n" 188 | "🞄 Sunucunun şu anda kullanılabilir olup olmadığını kontrol edin\n" 189 | "🞄 İnternete bağlı olup olmadığınızı kontrol edin" 190 | 191 | #: calcleaner/application.py:116 192 | msgid "" 193 | "You are not authorized to access this resource.\n" 194 | "\n" 195 | "🞄 Check your login and password\n" 196 | "🞄 Check you are allowed to access the server" 197 | msgstr "" 198 | "Bu kaynağa erişim yetkiniz yok.\n" 199 | "\n" 200 | "🞄 Kullanıcı adınızı ve parolanızı kontrol edin\n" 201 | "🞄 Sunucuya erişmenize izin verildiğini kontrol edin" 202 | 203 | #: calcleaner/application.py:122 204 | msgid "" 205 | "Unable to read calendars.\n" 206 | "\n" 207 | "🞄 Check that there is no error in the CalDAV server URL" 208 | msgstr "" 209 | "Takvimler okunamadı.\n" 210 | "\n" 211 | "🞄 CalDAV sunucu URL'sinde hata olmadığını kontrol edin" 212 | 213 | #: calcleaner/application.py:264 214 | msgid "Skipped" 215 | msgstr "Atlandı" 216 | 217 | #: calcleaner/application.py:284 218 | msgid "Reading..." 219 | msgstr "Okunuyor..." 220 | -------------------------------------------------------------------------------- /noxfile.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | import nox 4 | 5 | 6 | PYTHON_FILES = [ 7 | "calcleaner", 8 | "setup.py", 9 | "noxfile.py", 10 | ] 11 | 12 | 13 | @nox.session(reuse_venv=True) 14 | def lint(session): 15 | session.install("flake8", "black") 16 | session.run("flake8", *PYTHON_FILES) 17 | session.run("black", "--check", "--diff", "--color", *PYTHON_FILES) 18 | 19 | 20 | @nox.session(reuse_venv=True) 21 | def black_fix(session): 22 | session.install("black") 23 | session.run("black", *PYTHON_FILES) 24 | 25 | 26 | # NOTE All Gtk dependencies and introspection files must be installed for this 27 | # to work. 28 | @nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"], reuse_venv=True) 29 | def test(session): 30 | session.install("pytest") 31 | session.install("-e", ".") 32 | session.run( 33 | "pytest", 34 | "--doctest-modules", 35 | "calcleaner", 36 | env={"LANG": "C"}, # Force using the default strings 37 | ) 38 | 39 | 40 | # Requires gettext 41 | @nox.session 42 | def locales_update(session): 43 | # Extract messages in .pot 44 | python_files = [p.as_posix() for p in pathlib.Path("calcleaner/").glob("**/*.py")] 45 | ui_files = [ 46 | p.as_posix() for p in pathlib.Path("calcleaner/data/ui").glob("*.glade") 47 | ] 48 | session.run( 49 | "xgettext", 50 | "--from-code=UTF-8", 51 | "-o", 52 | "locales/messages.pot", 53 | *ui_files, 54 | *python_files, 55 | external=True, 56 | ) 57 | # Updates locales 58 | for po_file in pathlib.Path("locales").glob("*.po"): 59 | session.run( 60 | "msgmerge", 61 | "--update", 62 | "--no-fuzzy-matching", 63 | po_file.as_posix(), 64 | "locales/messages.pot", 65 | external=True, 66 | ) 67 | 68 | 69 | # Requires gettext 70 | @nox.session 71 | def locales_compile(session): 72 | LOCAL_DIR = pathlib.Path("calcleaner/data/locales") 73 | for po_file in pathlib.Path("locales").glob("*.po"): 74 | output_file = ( 75 | LOCAL_DIR 76 | / po_file.name[: -len(po_file.suffix)] 77 | / "LC_MESSAGES" 78 | / "org.flozz.calcleaner.mo" 79 | ) 80 | print(output_file.as_posix()) 81 | output_file.parent.mkdir(parents=True, exist_ok=True) 82 | session.run( 83 | "msgfmt", 84 | po_file.as_posix(), 85 | "-o", 86 | output_file.as_posix(), 87 | external=True, 88 | ) 89 | 90 | 91 | # Requires inkscape 92 | @nox.session(reuse_venv=True) 93 | def gen_icons(session): 94 | session.install("yoga") 95 | icons = [] 96 | for size in [32, 64, 128, 256]: 97 | output_icon = "./calcleaner/data/images/calcleaner_%i.png" % size 98 | session.run( 99 | "inkscape", 100 | "--export-area-page", 101 | "--export-filename=%s" % output_icon, 102 | "--export-width=%i" % size, 103 | "--export-height=%i" % size, 104 | "./calcleaner/data/images/calcleaner.svg", 105 | external=True, 106 | ) 107 | session.run( 108 | "python", 109 | "-m", 110 | "yoga", 111 | "image", 112 | "--png-slow-optimization", 113 | output_icon, 114 | output_icon, 115 | external=True, 116 | ) 117 | icons.append(output_icon) 118 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flozz/calcleaner/964c47d9075e656b02f924f5c7a8d12fb01f8b19/screenshot.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: UTF-8 3 | 4 | import os 5 | 6 | from setuptools import setup, find_packages 7 | 8 | 9 | long_description = "" 10 | if os.path.isfile("README.rst"): 11 | long_description = open("README.rst", "r", encoding="UTF-8").read() 12 | 13 | 14 | setup( 15 | name="calcleaner", 16 | version="1.1.3", 17 | description="A simple graphical tool to purge old events from CalDAV calendars", 18 | url="https://calcleaner.flozz.org/", 19 | project_urls={ 20 | "Source Code": "https://github.com/flozz/calcleaner", 21 | "Changelog": "https://github.com/flozz/calcleaner#changelog", 22 | "Issues": "https://github.com/flozz/calcleaner/issues", 23 | "Chat": "https://discord.gg/P77sWhuSs4", 24 | "Donate": "https://github.com/flozz/calcleaner#supporting-this-project", 25 | }, 26 | license="GPLv3", 27 | long_description=long_description, 28 | keywords="calendar caldav event cleaner purge prune", 29 | author="Fabien LOISON", 30 | packages=find_packages(), 31 | include_package_data=True, 32 | install_requires=[ 33 | "caldav>=0.9.1", 34 | "PyGObject>=3.26", 35 | ], 36 | extras_require={ 37 | "dev": [ 38 | "nox", 39 | "flake8", 40 | "black", 41 | "pytest", 42 | ] 43 | }, 44 | entry_points={ 45 | "console_scripts": [ 46 | "calcleaner = calcleaner.__main__:main", 47 | ] 48 | }, 49 | ) 50 | --------------------------------------------------------------------------------