{"id":13680813,"url":"https://github.com/science-computing/wartungsplan","last_synced_at":"2025-04-12T16:16:45.321Z","repository":{"id":180664666,"uuid":"645266525","full_name":"science-computing/wartungsplan","owner":"science-computing","description":"A tool to extract events from an ical file by day or day range and perform an action per event like sending an email or opening a ticket","archived":false,"fork":false,"pushed_at":"2024-07-18T09:49:20.000Z","size":98,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T16:16:11.727Z","etag":null,"topics":["administration","eviden","infrastructure","it","otrs","tasks","ticketing-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/science-computing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-25T09:23:35.000Z","updated_at":"2024-07-18T09:47:04.000Z","dependencies_parsed_at":"2024-04-17T12:51:29.816Z","dependency_job_id":"544bbbdf-78a1-43db-aba9-9056ae9d382b","html_url":"https://github.com/science-computing/wartungsplan","commit_stats":null,"previous_names":["science-computing/wartungsplan"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/science-computing%2Fwartungsplan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/science-computing%2Fwartungsplan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/science-computing%2Fwartungsplan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/science-computing%2Fwartungsplan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/science-computing","download_url":"https://codeload.github.com/science-computing/wartungsplan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594190,"owners_count":21130316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["administration","eviden","infrastructure","it","otrs","tasks","ticketing-system"],"created_at":"2024-08-02T13:01:22.301Z","updated_at":"2025-04-12T16:16:45.297Z","avatar_url":"https://github.com/science-computing.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Wartungsplan #\n\nA tool to extract events from an ical file by day or day range and perform an\naction per event like sending an email or opening a ticket.\n\n![wartungsplan](https://github.com/science-computing/wartungsplan/assets/2771054/ee0f788d-7c62-4321-9a78-1dc076aa36fd)\n\n## Requirements\n\n - Python 3.8\n\n## Installation instructions ##\n\n    # prepare the python virtual env\n    python3 -m venv venv\n    # enter the venv\n    source venv/bin/activate\n    # install Wartungsplan\n    pip install wartungsplan\n\n\n## Events from icalendar ##\n\nAn icalendar file stored in local filesystem or localy mounted.\nCan be edited with Thunderbird or even Outlook with an established\nUI with all posible features of the `Recurrence Rule`\n(https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10).\n\nThe first Tuesday every month:\n\n\tRRULE:FREQ=MONTHLY;BYDAY=1TU\n\nThe config file:\n\n    [calendar]\n    #Directory to ics file. Calendar only needs to be readable.\n    calendarfile = /media/shareX/Wartungspläne.ics\n\nThe calendarfile option only allows paths within the file system.\nTo include remote calendars mount a share or download the calendar file. The\ncalendar is not modified so does not have to be synced back.\nSystemd can download e.g. using curl.\nFor type=oneshot ExecStart commands are executed sequentially\nif commands fail the entire unit fails.\n\n\n### Event headers ###\n\n:exclamation:  Save calendar events always as plain text (HTML is evil)\n\nThe calendar events may have in the configuration file defined headers that\nsubstitute the predefined values.\n\n    [headers]\n    # Configure here the available (allowed) headers with their\n    # default value\n    X-Priority = 3\n    X-TicketID =\n    To = tom@peekabooav.de\n    X-Custom-2 = hehehehehe\n    # For OTRS\n    tickettitel = Titel\n    queue = Queueebene1::Queueebene2\n    state = New\n    priority = 1 very low\n\nEvent headers are the first few lines up until an empty line or a line that\ndoes not match \"^[A-Za-z0-9-]*: .*$\".\n\n    To: email@example.com\n\n### Mode of operation ###\n\nYou would create several calendar files according to your need and run them\nregularly using cron or systemd.\n\nThe calendars are split first of all by backend then by partition (the group\nof people you want to give access).\n\n - E-Mail notification\n - Ticketing system\n\nThen for example four calendars for four responsibilities (teams):\n\n - Client machine tasks\n - Server related tasks\n - Network\n - Public facing servers\n - Internal servers\n - Database servers\n\nAnother aproach could be to separate by duration (to run Wartungsplan daily,\nweekly, monthly):\n\n - Tasks to finish the same day\n - That week\n - That month\n\nIf you already have different queues set up in your ticketing system you can\nalso start from there.\n\nBe careful to not have more calendars than events ;-) 60 events per calender is\nnot too much, having to include 12 calenders in Outlook is a disaster, always.\n\nThe calendar files are on the local file system, a network share or otherwise\nsynchronized/transported.\n\n### Microsoft Outlook ###\n\nIt is strongly recommended to explicitly sync the calendar back to its source:\n\n    Send / Receive -\u003e Send all\n\n### A tool to download calendars from Microsoft Exchange\n\n`downloadExchange` and its configuration file `exchange.conf` can be\nused to download a calendar from Microsoft Exchange Server using a functional\naccount that shares calendars with other users.\n\nThe benefit of this solution is the calendars remain inside Microsoft Exchange.\nIf a backup is taken they are part of it, no additional service is needed, and\naccess permissions are handled by Microsoft Exchange.\n\n    $ downloadExchange -h\n    usage: downloadExchange [-h] [-c CONFIG] [-v] [-s START_DATE] [-e END_DATE] [-t]\n    \n    options:\n      -h, --help            show this help message and exit\n      -c CONFIG, --config CONFIG\n                            Absolute or relative path to configuration file.\n      -v, --verbose         More v's more text\n      -s START_DATE, --start-date START_DATE\n                            Start Date e.g. 2023-05-02. Default is todays date\n      -e END_DATE, --end-date END_DATE\n                            End Date e.g. 2023-05-03. Default is start-date + 7 days. (00:00:00 respectively)\n      -t, --test            No Exchange server? Run script on dummy data!\n    \n    $ downloadExchange -s $(date +%Y-%m-%d --date=\"today\") -e $(date +%Y-%m-%d --date=\"+2week\")\n    \n    # depending on the network environment you might need to change or unset\n    $ http_proxy= https_proxy= downloadExchange -s $(date +%Y-%m-%d --date=\"today\") -e $(date +%Y-%m-%d --date=\"+2week\")\n\nThe configuration file can/should contain the following options:\n\n    [exchange]\n    user = MYWINDOMAIN\\functional_account\n    email = functional_account@example.com\n    password = secure_functional_password\n    #calendar = Calendar\n    #host = localhost\n    #outfile = calendar_events.ics\n\n### A scriptable tool to create events ###\n\nPart of the package is a script `addEventToIcal.py` that helps migration from\ne.g. a cronjob oriented way or any repository or list of definition or\nrecurring tasks.\n\nIt reads the event body from STDIN and takes arguments to add events to an\nexisting calendar or create a new one. Since the body is what comes from STDIN\nthe first lines of the input can be headers.\n\n    usage: addEventToIcal [-h] [--start-date START_DATE] [--end-date END_DATE]\n                    [--rrule RRULE] [--start-time START_TIME] [--end-time END_TIME]\n                    [--duration DURATION] --title TITLE calendar_file\n\n    Add events to an iCal file.\n\n    positional arguments:\n      calendar_file         iCal file to add events to\n\n    options:\n      -h, --help            show this help message and exit\n      --start-date START_DATE\n                            Start date in YYYY-MM-DD format. Default is today\n      --end-date END_DATE   End date in YYYY-MM-DD format. Default is none\n      --rrule RRULE         Interval according to rfc5545 e.g. RRULE:FREQ=DAILY\n      --start-time START_TIME\n                            Start time in HH:MM format. Default is 09:00\n      --end-time END_TIME   End time in HH:MM format. Default is 10:00\n      --duration DURATION   HH:MM format. If set replaces --end-time\n      --title TITLE         Event title\n\n#### Rrule ####\n\nA quarterly rule could look the following two ways. The first will run every\nthree months on the 28th, which could be a weekend. The second will take place\nevery twelve weeks on Thursdays. And the third example - every three months on\nthe first Monday:\n\n    FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=28\n    FREQ=WEEKLY;INTERVAL=12;BYDAY=TH\n    FREQ=MONTHLY;INTERVAL=3;BYDAY=1MO\n    FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR\n\n\n## Backends ##\n\n### List ###\n\nLists due events on the terminal.\n\nThe List backend ignores headers.\n\n### Mail ###\n\nSend an email for every event due.\n\nThe config file:\n\n    [mail]\n    server = smtp.example.com\n    port = 465\n    password = kCHvJeUy4Gd2XgsXXYFqUtjk\n    sender = tom_jones@example.com\n    recipient = michael_jackson@example.com\n\n### OTRS ###\n\nFor documentation on how to set up the OTRS side please refer to pyotrs\ndocumentation: \u003chttps://pypi.org/project/PyOTRS/\u003e\n\nInstall optional depenency:\n    pip install wartungsplan[otrs]\n\nThe config file:\n\n    [otrs]\n    server = http://localhost\n    username = restapiuser\n    password = AiX3sheeIyahf8aaQuah2wio\n    queue = Queueebene1::Queueebene2\n    state = New\n    priority = 1 very low\n    footer = Ticket automatically created by Wartungsplan\n\n# Examples\n\n```\n$ Wartungsplan -h\nusage: Wartungsplan [-h] [--config CONFIG] [--ics-calendar ICS_CALENDAR]\n                    [--verbose] [--dry-run] [--logfile LOGFILE]\n                    [--start-date START_DATE] [--end-date END_DATE]\n                    {version,list,send,otrs}\n\npositional arguments:\n  {version,list,send,otrs}\n                        Just print the version or select the desired action.\n\noptions:\n  -h, --help            show this help message and exit\n  --config CONFIG, -c CONFIG\n                        Directory to different config file. Default is\n                        plan.conf in same Folder as plan.py\n  --ics-calendar ICS_CALENDAR, -i ICS_CALENDAR\n                        Path to the ics calendar (Takes precedence over value\n                        in config)\n  --verbose, -v         More v's more text\n  --dry-run, -d         Don't perform any action\n  --logfile LOGFILE, -w LOGFILE\n                        Write log to file\n  --start-date START_DATE, -s START_DATE\n                        Start Date e.g. 2023-05-02. Default is todays date\n  --end-date END_DATE, -e END_DATE\n                        End Date e.g. 2023-05-03. Default is start-date + 1\n                        day. (00:00:00 respectively)\n```\n\n## Contact ##\n\nIn case you want or need to contact us in private because you don't want the\nentire world to know, security related issues ... or to just say \"Hello\":\n\nfelix.bauer@eviden.com\nchristian.habrom@eviden.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscience-computing%2Fwartungsplan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscience-computing%2Fwartungsplan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscience-computing%2Fwartungsplan/lists"}