{"id":23764021,"url":"https://github.com/anujdhillxn/flipbook","last_synced_at":"2026-03-22T16:30:19.426Z","repository":{"id":181397843,"uuid":"425184717","full_name":"anujdhillxn/flipbook","owner":"anujdhillxn","description":"A language for generating flipbooks using pictures","archived":false,"fork":false,"pushed_at":"2021-11-06T11:34:28.000Z","size":1468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T22:14:28.734Z","etag":null,"topics":["interpreter","parser","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anujdhillxn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-06T07:40:22.000Z","updated_at":"2023-07-15T09:22:30.000Z","dependencies_parsed_at":"2023-07-15T10:52:36.939Z","dependency_job_id":null,"html_url":"https://github.com/anujdhillxn/flipbook","commit_stats":null,"previous_names":["anujdhillxn/flipbook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anujdhillxn%2Fflipbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anujdhillxn%2Fflipbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anujdhillxn%2Fflipbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anujdhillxn%2Fflipbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anujdhillxn","download_url":"https://codeload.github.com/anujdhillxn/flipbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239937696,"owners_count":19721484,"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":["interpreter","parser","python3"],"created_at":"2024-12-31T22:14:30.942Z","updated_at":"2026-03-22T16:30:19.349Z","avatar_url":"https://github.com/anujdhillxn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flipbook\n\nThe repo contains the source code from which converts a collection of images to MP4, PDF or GIF format. I also developed it's standalone executable for Windows which can be downloaded from the link https://drive.google.com/file/d/1jq_tQKaI5vh-QFtaGffVDlOzcrJDAAgZ/view?usp=sharing\n\nThe commands for the language are to be written in a .flp file and executed as follows -\u003e\n`.\\compiler.exe .\\sample.flp`\n\nThe language currently has support for two datatypes\n- `flipbook`\n- `int`\n\nSince performing arithmetic operations with ints require complex binary expression tree parsers, I decided to exclude that functionality. Currently ints cannot be used for any purpose whatsoever and are created only for demonstration purposes.\n\nThe newline characted is used as separators for different statements and any statement starting with # is treated as a comment and ignored by the compiler.\n\nA new flipbook object is created as follows -\u003e\n- `new flipbook fb`\n\nTo set width and height of the window, use -\u003e\n- `set fb width 500`\n- `set fb height 500`\n\nThis creates an empty flipbook.\n\nNow you can add images to the flipbook -\u003e\n- `add file img1.png to fb`\n- `add file img2.png to fb`\n\nYou can also add some parameters such as how many frames you want in transition -\u003e\n- `add file img3.png to fb smoothness 150`\n\nAdding all the files manually can be tiring. So just keep your files in a folder and add the folder together. Maybe you want the files to have increasing frames as they are being added to create a slow down effect in the end.\n- `add folder evolution to fb type linear`\n\nFinally, you can export the flipbook as MP4, GIF or PDF (gifs are a bit slow).\n- `release fb as evolution.gif`\n\nThere are other useful features also\n- Joining one flipbook with another, via command `add reel fb2 to fb1`\n- Changing fps of the output, via command `set fb fps 60`\n\nThis assignment took me roughly 12-13 hours. I spend 1.5-2 hours designing the Flipbook class and its features. Then a large chunk of my time was spent on developing the parser for the language. This involved rejecting multiple ideas which seemed feasible at first but seemed to be taking too much time later. For example, loops. For loops to be workable, a proper integer datatype was also needed so I scrapped that idea. Then last 1-2 hours were used to convert the script into the executable. There were some problems with the newer versions of python apparently.\n\nOverall this was a fun exercise. The last time I tried to make a parser was in my first year in Introductory Computer Science Course COL100 since I am not a CS major.\nIf you have any queries, please feel free to contact me at anuj.dhillon.14@gmail.com.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanujdhillxn%2Fflipbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanujdhillxn%2Fflipbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanujdhillxn%2Fflipbook/lists"}