{"id":24505595,"url":"https://github.com/kamaroly/timetable","last_synced_at":"2025-03-15T08:41:54.834Z","repository":{"id":57004169,"uuid":"194668928","full_name":"kamaroly/timetable","owner":"kamaroly","description":"PHP package for generating time table","archived":false,"fork":false,"pushed_at":"2019-07-11T16:36:52.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T09:49:01.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamaroly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-01T12:31:51.000Z","updated_at":"2019-07-11T16:36:53.000Z","dependencies_parsed_at":"2022-08-21T12:10:50.911Z","dependency_job_id":null,"html_url":"https://github.com/kamaroly/timetable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Ftimetable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Ftimetable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Ftimetable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaroly%2Ftimetable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamaroly","download_url":"https://codeload.github.com/kamaroly/timetable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707298,"owners_count":20334614,"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":[],"created_at":"2025-01-21T23:30:37.188Z","updated_at":"2025-03-15T08:41:54.802Z","avatar_url":"https://github.com/kamaroly.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TimeTable\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Coverage Status][ico-scrutinizer]][link-scrutinizer]\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis package helps you to generate a School time table by providing courses, number of hours and teacher per course. It can be used for other purpose, but initially it was build just for schools\n\n## Structure\n\n```\nbuild/\ndocs/\nconfig/\nsrc/\ntests/\nvendor/\n```\n\n# Requirements\n\n    \u003e= php 7.2\n\n## Install\n\nVia Composer\n\n```bash\n$ composer require kamaro/timetable\n```\n\n# Features\n\n-   Course\n    -   Course Name\n    -   Teacher name\n    -   Maximum Hours per Day\n    -   Maximum Hours per Week.\n-   Timer\n    -   Start Day\n    -   End Day\n    -   Start Hour\n    -   End Hour\n-   TimeTable\n    -   Generate empty Time Table\n    -   Generate TimeTable\n    -   Set break time (TBD)\n    -   set Weekly break days(TBD);\n\n# Usage\n\n```php\n    use Kamaro\\TimeTable\\Course;\n    use Kamaro\\TimeTable\\TimeTable;\n    use Kamaro\\TimeTable\\TimeFrame;\n\n    // Generate fake courses\n    $courses = [];\n    for ($i = 0; $i \u003c 10; ++$i) {\n        $course = new Course();\n        $course-\u003esetCourseName($fake-\u003ename);\n        $course-\u003esetTeacherName($fake-\u003ename);\n        $course-\u003esetMaxHoursPerDay(2);\n        $course-\u003esetMaxHoursPerWeek(10);\n        $courses[] = $course;\n    }\n    // Generate TimeTable\n    $timeTable = (new TimeTable(\n                            new TimeFrame() // TimeFrame\n                        )\n                 )-\u003egetTimeTable($courses);\n\n    echo json_encode($timeTable);\n```\n\nWill output below time table\n\n```js\n{\n  \"monday\": {\n    \"8\": {\n      \"hour\": \"8:00\",\n      \"course\": \"Dr. Keven Spencer MD\",\n      \"teacher\": \"Rita Reynolds\"\n    },\n    \"9\": {\n      \"hour\": \"9:00\",\n      \"course\": \"Dr. Keven Spencer MD\",\n      \"teacher\": \"Rita Reynolds\"\n    },\n    \"10\": {\n      \"hour\": \"10:00\",\n      \"course\": \"Prof. Talon Wuckert DVM\",\n      \"teacher\": \"Melba Hammes\"\n    },\n    \"11\": {\n      \"hour\": \"11:00\",\n      \"course\": \"Prof. Talon Wuckert DVM\",\n      \"teacher\": \"Melba Hammes\"\n    },\n    \"12\": {\n      \"hour\": \"12:00\",\n      \"course\": \"Krystel Veum\",\n      \"teacher\": \"Lily Smitham\"\n    },\n    \"13\": {\n      \"hour\": \"13:00\",\n      \"course\": \"Krystel Veum\",\n      \"teacher\": \"Lily Smitham\"\n    },\n    \"14\": {\n      \"hour\": \"14:00\",\n      \"course\": \"Sarina Flatley II\",\n      \"teacher\": \"Prof. Pasquale Fritsch\"\n    },\n    \"15\": {\n      \"hour\": \"15:00\",\n      \"course\": \"Sarina Flatley II\",\n      \"teacher\": \"Prof. Pasquale Fritsch\"\n    },\n    \"16\": {\n      \"hour\": \"16:00\",\n      \"course\": \"Sandrine Wiegand\",\n      \"teacher\": \"Henriette Kertzmann\"\n    },\n    \"17\": {\n      \"hour\": \"17:00\",\n      \"course\": \"Sandrine Wiegand\",\n      \"teacher\": \"Henriette Kertzmann\"\n    },\n    \"18\": {\n      \"hour\": \"18:00\",\n      \"course\": \"Jimmie Fritsch\",\n      \"teacher\": \"Mrs. Leonora Hill Jr.\"\n    }\n  },\n  \"tuesday\": {\n    \"8\": {\n      \"hour\": \"8:00\",\n      \"course\": \"Dr. Keven Spencer MD\",\n      \"teacher\": \"Rita Reynolds\"\n    },\n    \"9\": {\n      \"hour\": \"9:00\",\n      \"course\": \"Dr. Keven Spencer MD\",\n      \"teacher\": \"Rita Reynolds\"\n    },\n    \"10\": {\n      \"hour\": \"10:00\",\n      \"course\": \"Prof. Talon Wuckert DVM\",\n      \"teacher\": \"Melba Hammes\"\n    },\n    \"11\": {\n      \"hour\": \"11:00\",\n      \"course\": \"Prof. Talon Wuckert DVM\",\n      \"teacher\": \"Melba Hammes\"\n    },\n    \"12\": {\n      \"hour\": \"12:00\",\n      \"course\": \"Krystel Veum\",\n      \"teacher\": \"Lily Smitham\"\n    },\n    \"13\": {\n      \"hour\": \"13:00\",\n      \"course\": \"Krystel Veum\",\n      \"teacher\": \"Lily Smitham\"\n    },\n    \"14\": {\n      \"hour\": \"14:00\",\n      \"course\": \"Sarina Flatley II\",\n      \"teacher\": \"Prof. Pasquale Fritsch\"\n    },\n    \"15\": {\n      \"hour\": \"15:00\",\n      \"course\": \"Sarina Flatley II\",\n      \"teacher\": \"Prof. Pasquale Fritsch\"\n    },\n    \"16\": {\n      \"hour\": \"16:00\",\n      \"course\": \"Sandrine Wiegand\",\n      \"teacher\": \"Henriette Kertzmann\"\n    },\n    \"17\": {\n      \"hour\": \"17:00\",\n      \"course\": \"Sandrine Wiegand\",\n      \"teacher\": \"Henriette Kertzmann\"\n    },\n    \"18\": {\n      \"hour\": \"18:00\",\n      \"course\": \"Jimmie Fritsch\",\n      \"teacher\": \"Mrs. Leonora Hill Jr.\"\n    }\n  }\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Testing\n\n```bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email kamaroly@gmail.com instead of using the issue tracker.\n\n## Credits\n\n-   [KAMARO][link-author]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/Kamaro/TimeTable.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/Kamaro/TimeTable/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/Kamaro/TimeTable.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/Kamaro/TimeTable.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/Kamaro/TimeTable.svg?style=flat-square\n[link-packagist]: https://packagist.org/packages/Kamaro/TimeTable\n[link-travis]: https://travis-ci.org/Kamaro/TimeTable\n[link-scrutinizer]: https://scrutinizer-ci.com/g/Kamaro/TimeTable/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/Kamaro/TimeTable\n[link-downloads]: https://packagist.org/packages/Kamaro/TimeTable\n[link-author]: https://github.com/kamaroly\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaroly%2Ftimetable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamaroly%2Ftimetable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaroly%2Ftimetable/lists"}