{"id":13456403,"url":"https://github.com/themsaid/ibis","last_synced_at":"2025-04-13T02:00:16.515Z","repository":{"id":38444899,"uuid":"271550942","full_name":"themsaid/ibis","owner":"themsaid","description":"A PHP tool that helps you write eBooks in markdown and convert to PDF.","archived":false,"fork":false,"pushed_at":"2023-12-04T22:00:59.000Z","size":591,"stargazers_count":1972,"open_issues_count":25,"forks_count":149,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-10-29T15:33:57.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/themsaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-06-11T13:18:25.000Z","updated_at":"2024-10-24T11:07:42.000Z","dependencies_parsed_at":"2024-01-20T18:04:06.873Z","dependency_job_id":null,"html_url":"https://github.com/themsaid/ibis","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themsaid%2Fibis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themsaid%2Fibis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themsaid%2Fibis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themsaid%2Fibis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themsaid","download_url":"https://codeload.github.com/themsaid/ibis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654045,"owners_count":21140235,"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":"2024-07-31T08:01:21.312Z","updated_at":"2025-04-13T02:00:16.495Z","avatar_url":"https://github.com/themsaid.png","language":"PHP","funding_links":[],"categories":["PHP","类库"],"sub_categories":["PDF/条形码"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/themsaid/ibis/master/art/cover.png\" alt=\"Ibis logo\" width=\"480\"\u003e\n    \nArtwork by \u003ca href=\"https://twitter.com/ericlbarnes\"\u003eEric L. Barnes\u003c/a\u003e and \u003ca href=\"https://twitter.com/Caneco\"\u003eCaneco\u003c/a\u003e from \u003ca href=\"https://laravel-news.com/ibis-book-maker\"\u003eLaravel News\u003c/a\u003e ❤️.\n\u003c/p\u003e\n\n---\n\nThis PHP tool helps you write eBooks in markdown. Run `ibis build` and an eBook will be generated with:\n \n1. A cover photo.\n2. Clickable auto-generated table of contents.\n3. Code syntax highlighting.\n4. Available in 2 themes. Light and dark.\n\nIbis was used to create [Laravel Queues in Action](https://learn-laravel-queues.com), an eBook I published in August 2020. [Click here](https://learn-laravel-queues.com/laravel-queues-in-action.zip) for the sample.\n\n## Installation\n\nMake sure you have PHP7.3 or above installed on your system and that your gd extension is enabled in your php.ini file.\n\nFirst, install the composer package globally:\n\n```\ncomposer global require themsaid/ibis\n```\n\nThen, run this command inside an empty directory:\n\n```\nibis init\n```\n\nThis will create the following files and directories:\n\n- /assets\n- /assets/fonts\n- /assets/cover.jpg\n- /assets/theme-light.html\n- /assets/theme-dark.html\n- /content\n- /ibis.php\n\nYou may configure your book by editing the `/ibis.php` configuration file.\n\n## Writing Your eBook\n\nThe `init` command will create sample .md files inside the content folder. You can explore those files to see how you can write your book. This sample content is taken from [Laravel Queues in Action](https://learn-laravel-queues.com). \n\nInside the content directory, you can write multiple `.md` files. Ibis uses the headings to divide the book into parts and chapters:\n\n```\n# Part 1\n\n\u003ch1\u003e tags define the start of a part. A separate PDF page will be generated to print the part title and any content below.\n\n## Chapter 1\n\n\u003ch2\u003e tags define the start of a chapter. A chapter starts on a new page always.\n\n### Starting with Ibis\n\n\u003ch3\u003e tags define different titles inside a chapter.\n``` \n\n### Adding different quotes\n\nThree different types of quotes can be added: `quote`, `warning`, and `notice`.\n\n```md\n\u003e{quote} This is a quote.\n\n\u003e{warning} This is a warning.\n\n\u003e{notice} This is a notice.\n```\n\n### Using images\n\nImages can be stored in the content folder and then brought in like this:\n\n```\n![Screenshot 1](content/screenshot-1.png)\n```\n\n### Adding a cover image\nTo use a cover image, add a `cover.jpg` in the `assets/` directory (or a `cover.html` file if you'd prefer a HTML-based cover page). If you don't want a cover image, delete these files.\n\n\n## Using Fonts\n\nEdit your `/ibis.php` configuration files to define the font files to be loaded from the `/assets/fonts` directory. After that you may use the defined fonts in your themes (`/assets/theme-light.html` \u0026 `/assets/theme-dark.html`).\n\n## Generating PDF eBook\n\n```\nibis build\n```\n\nIbis will parse the files in alphabetical order and store the PDF file in `/export`.\n\nThe default is to generate the PDF using the light theme, to generate a PDF using the dark theme:\n\n```\nibis build dark\n```\n\n## Generating A Sample\n\n```\nibis sample\n\nibis sample dark\n```\n\nThis command will use the generated files from the `ibis build` command to generate samples from your PDF eBook. You can configure which pages to include in the sample by updating the `/ibis.php` file.\n\n## Development\n\nThis project uses PHP CS Fixer with a code standard defined in `.php_cs`.  \n\nTo review code out of style, you can run the fix command as a dry run.  Run the composer script like this:\n\n`composer run csfix-review`\n\nTo fix the source code, run the following composer script:\n\n`composer run csfix`\n\n## Credits\n\n- [Mohamed Said](https://github.com/themsaid)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemsaid%2Fibis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemsaid%2Fibis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemsaid%2Fibis/lists"}