{"id":20727666,"url":"https://github.com/cwchentw/objcgic","last_synced_at":"2025-04-23T19:30:44.259Z","repository":{"id":77777946,"uuid":"301000077","full_name":"cwchentw/objcgic","owner":"cwchentw","description":"An Objective-C binding of cgic","archived":false,"fork":false,"pushed_at":"2024-04-11T04:55:01.000Z","size":109,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T02:51:06.491Z","etag":null,"topics":["cgi","cgi-script","gnustep","objective-c","objective-c-library"],"latest_commit_sha":null,"homepage":"","language":"C","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/cwchentw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2020-10-03T23:16:05.000Z","updated_at":"2024-04-11T04:55:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a093ecc5-e622-4d00-a2a8-949cc77b6597","html_url":"https://github.com/cwchentw/objcgic","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/cwchentw%2Fobjcgic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwchentw%2Fobjcgic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwchentw%2Fobjcgic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwchentw%2Fobjcgic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwchentw","download_url":"https://codeload.github.com/cwchentw/objcgic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250499558,"owners_count":21440652,"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":["cgi","cgi-script","gnustep","objective-c","objective-c-library"],"created_at":"2024-11-17T04:33:18.612Z","updated_at":"2025-04-23T19:30:44.229Z","avatar_url":"https://github.com/cwchentw.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# objcgic - An Objective-C binding of cgic\n\n## Warning\n\nobjcgic is still experimental.\n\n## System Requirements\n\n* Clang or GCC with Objective-C support\n* Cocoa or GNUstep\n\nTested against GNUStep on openSUSE Leap 15.2. It should work on MacOS as well.\n\n[cgic](https://github.com/boutell/cgic) itself is not needed because the repo bundles its snapshot.\n\n## Usage\n\nClone the repo:\n\n```\n$ git clone https://github.com/cwchentw/objcgic.git my-cgi-script\n```\n\nChange the working directory to the root of *my-cgi-script*:\n\n```\n$ cd my-cgi-script\n```\n\nImplement your CGI script in `cgiMain` function of [OCGIMain.m](/OCGIMain.m).\n\nCompile the repo:\n\n```\n$ make CGI_PROGRAM=index.cgi\n```\n\nThe default value of **CGI_PROGRAM** is *index.cgi* on non-Windows platforms but *index.exe* on Windows.\n\nIf your GNUstep is located on any location other than */usr/GNUstep*, set the include path and the library path of your local GNUstep:\n\n```\n$ make GNUSTEP_INCLUDE=/path/to/GNUstep/System/Library/Headers GNUSTEP_LIB=/path/to/GNUstep/System/Library/Libraries\n```\n\nThe layout of your local GNUstep may vary. Adjust these variables accordingly.\n\nIf your build command becomes too long, consider to set these variables in [build](/build) and [clean](/clean) and run `make` through these scripts instead.\n\nBecause of the design of cgic, you have to use objcgic on the basis of one CGI script per repo.\n\nIf you want to save your own CGI script, push it remotely to a repo other than this one:\n\n```\n$ git remote set-url origin path/to/remote/git/repo.git\n$ git push\n```\n\n## Update\n\nBackup *OCGIMain.m*, *build*, *clean* and any other modified files. Afterwards, pull this repo again:\n\n```\n$ git pull https://github.com/cwchentw/objcgic.git\n```\n\nGit will merge updated code automatically for you, which should not require any manual intervention. If any conflict bewteen code occurs, fix it by yourself.\n\n## Project Parameters\n\n* `CGI_PROGRAM`: The name of the CGI program, default to *index.cgi*\n* `CGI_ENCODING`: The encoding of the CGI program, default to `NSUTF8StringEncoding`\n* `GNUSTEP_INCLUDE`: The path of GNUstep headers, default to */usr/GNUstep/System/Library/Headers*\n* `GNUSTEP_LIB`: The path of GNUstep libraries, default to */usr/GNUstep/System/Library/Libraries*\n\n## Example\n\nSee [cgi-hello-objcgic](https://github.com/cwchentw/cgi-hello-objcgic).\n\n## API Documentation\n\nPending.\n\n## Note\n\nThe version of [cgic](https://github.com/boutell/cgic) snapshot in this repo is `2.08`.\n\nOriginally, cgic append two lines of newline to the header of a HTTP response. We may use multiple header informations in a response; therefore, we write our own `+status:message:` and `+contentType:` of `OCGIHeader` class. Now, the two messages only render one line of newline to standard output.\n\nFor better compatibility between libobjc and GNUstep, we use the libobjc of GCC on non-Apple platforms.\n\n## Copyright\n\nCopyright (c) 2020-2021, ByteBard. Licensed under MIT, the same license as cgic itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwchentw%2Fobjcgic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwchentw%2Fobjcgic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwchentw%2Fobjcgic/lists"}