{"id":16862152,"url":"https://github.com/maelvls/homebrew-amc","last_synced_at":"2025-03-22T06:31:59.396Z","repository":{"id":43297009,"uuid":"116262319","full_name":"maelvls/homebrew-amc","owner":"maelvls","description":"🍺 Homebrew formula for auto-multiple-choice 📖","archived":false,"fork":false,"pushed_at":"2023-01-16T14:18:11.000Z","size":236,"stargazers_count":36,"open_issues_count":19,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T09:05:07.113Z","etag":null,"topics":["bottle","homebrew","homebrew-formula","homebrew-tap"],"latest_commit_sha":null,"homepage":"https://www.auto-multiple-choice.net/download-macosx.en","language":"Ruby","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/maelvls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["maelvls"]}},"created_at":"2018-01-04T13:18:53.000Z","updated_at":"2025-02-17T14:56:58.000Z","dependencies_parsed_at":"2023-02-10T04:00:57.465Z","dependency_job_id":null,"html_url":"https://github.com/maelvls/homebrew-amc","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maelvls%2Fhomebrew-amc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maelvls%2Fhomebrew-amc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maelvls%2Fhomebrew-amc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maelvls%2Fhomebrew-amc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maelvls","download_url":"https://codeload.github.com/maelvls/homebrew-amc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918499,"owners_count":20531683,"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":["bottle","homebrew","homebrew-formula","homebrew-tap"],"created_at":"2024-10-13T14:34:41.549Z","updated_at":"2025-03-22T06:31:54.958Z","avatar_url":"https://github.com/maelvls.png","language":"Ruby","funding_links":["https://github.com/sponsors/maelvls"],"categories":[],"sub_categories":[],"readme":"# 🍺 Brew formula for auto-multiple-choice 📖\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"420\" alt=\"capture d ecran 2018-10-06 a 11 31 01\" src=\"https://user-images.githubusercontent.com/2195781/46569894-26cddd00-c95c-11e8-9efd-6aa7fa3a6eb8.png\"\u003e\n  \u003cimg width=\"390\" alt=\"capture d ecran 2018-10-06 a 11 23 47\" src=\"https://user-images.githubusercontent.com/2195781/46569889-0867e180-c95c-11e8-98ad-969735cbb76f.png\"\u003e\n\u003c/p\u003e\n\n| Install                                         | Version |\n| ----------------------------------------------- | :-----: |\n| `brew install maelvls/amc/auto-multiple-choice` |  1.5.0  |\n\n|           macOS version           | Support | Prebuilt binaries (bottles) |\n|-----------------------------------|:-------:|:---------------------------:|\n| macOS 12 Monterey (Intel)         |   ✔️    |              ❌              |\n| macOS 12 Monterey (Apple Silicon) |   ✔️    |              ❌              |\n| macOS 11 Big Sur (Intel)          |   ✔️    |             ✔️              |\n| macOS 11 Big Sur (Apple Silicon)  |   ✔️    |              ❌              |\n| macOS 10 catalina (Intel)         |   ✔️    |             ✔️              |\n| linux (x86_64)                    |    ❌    |              ❌              |\n\n- **To run it**: open [terminal](https://www.iterm2.com) and run\n  `auto-multiple-choice`.\n\nThis tap aims to bring AMC ([homepage], [gitlab]) to Homebrew, an alternative to\nMacports ([portfile] for AMC).\n\nThis tap features precompiled binaries (called _bottle_) built and tested daily\nusing GitHub Actions. The bottles are uploaded to GitHub Packages.\n\n[![brew test-bot](https://github.com/maelvls/homebrew-amc/actions/workflows/tests.yml/badge.svg)](https://github.com/maelvls/homebrew-amc/actions/workflows/tests.yml)\n\n[gitlab]: https://gitlab.com/jojo_boulix/auto-multiple-choice\n[homepage]: https://www.auto-multiple-choice.net/index.en\n[portfile]: https://github.com/macports/macports-ports/blob/master/x11/auto-multiple-choice/Portfile\n\n## News\n\n### Dec 4, 2021: M1 support, 1083 installations in 2021!\n\nThe formula finally supports M1 macs! Note that prebuilt bottles (= faster install time) are not available since it would require renting an M1 mac. I have enable GitHub sponsoring for that reason.\n\nAlso I looked at the number of installations and it is surprisingly high! The formula `maelvls/amc/auto-multiple-choice` is #2852 in terms of number of installations\tover the last year for a total of\t1083 installations!!\n\n### June 15, 2021: fixed a regression with GTK, still no support for M1 chip\n\nI introduced a regression in\n[2671b0c](https://github.com/maelvls/homebrew-amc/commit/2671b0cc9aa1da571b2c21bb9838934ace88a1c5)\nwhere I changed `gtk+3` to `gtk+`, which\n[prevented](https://github.com/maelvls/homebrew-amc/issues/56#issuecomment-860571321)\npeople from installing or upgrading the `auto-multiple-choice` formula for\napproximately 24 hours. I fixed it today. My sincerest apologies!\n\nOn the 3rd of June, I announced the support for the M1 chips, and little did I\nknow that the fix I introduced for\n[#55](https://github.com/maelvls/homebrew-amc/issues/55) would only partially\nfix the issue. Since I don't have access to the Apple Silicon hardware, I cannot\nwork out a fix for it.\n\nTo follow the news about this issue you can either subscribe to\n[#55](https://github.com/maelvls/homebrew-amc/issues/55). You can also check out\n[this official\nthread](https://project.auto-multiple-choice.net/boards/3/topics/10487?r=11332)\n(in French).\n\n### June 12, 2021: support for SMTP over StartTLS and bottles are back!\n\nIt is now possible to use SMTP over TLS. Thanks to mimaoffice for\n[reporting](https://github.com/maelvls/homebrew-amc/issues/56) the issue!\n\nI also re-introduced bottles (pre-built binaries) that should lower the\ninstallation and upgrade times from approximately 15 minutes to 60 seconds\ndepending on the internet speed.\n\nTo understand what the `pr-pull` label works, you can take a look at the\nHomebrew post [Homebrew tap with bottles uploaded to GitHub\nReleases](https://brew.sh/2020/11/18/homebrew-tap-with-bottles-uploaded-to-github-releases/).\n\n### June 3, 2021: ~~added support for M1 chips~~, Bintray sunset means slower installations\n\nThanks to the help of MouLam and Nemhome in [#55](https://github.com/maelvls/homebrew-amc/issues/55), we discovered that macOS on M1 chips have a different behaviour with regards to compiling Perl modules (namely, Pango). That has been fixed and you can now install `auto-multiple-choice` on Apple Silicon.\n\nAnother change is the removal of bottles (the pre-built binaries) for amc-pango. Bintray was retired in 2020, meaning that the `amd-pango` bottles that Homebrew was trying to download are gone. That means `amc-pango` will have to be recompiled every time... Not great, but that will do for now. I had to \"vendor\" Pango 1.42.4 because the latest versions of Pango were breaking the annotation mechanism (https://github.com/maelvls/homebrew-amc/issues/33).\n\n### July 3, 2020: ⚠️ I don't have enough time to maintain bottles\n\nTo build bottles (= zipped version of the pre-built auto-multiple-choice formula), I use some\ncontinous integration ([travis][build-status]). The builds have been failing for a while\nnow, and I can't find enough time to fix the while CI system or to move it to Github Actions\nor to Azure Pipelines.\n\nUntil I find some time to make the CI work again (or if someone wants to help), I will remove\nthe bottles entirely. That means that the command `brew install auto-multiple-choice` will take\nlonger to install (~8 minutes instead of 30 seconds with the bottles), but at least it will work\nall the time!\n\n### Nov. 21th, 2019: Annotate \u0026 `Bad symbol syntax`\n\nWhen using the 'annotation' feature, you may get errors like:\n\n```\nBad symbol syntax: 0-1:circle/hex_red at /usr/local/Cellar/auto-multiple-choice/1.4.0_6/lib/AMC/perl/AMC-annotate.pl line 151.\n```\n\nor\n\n```\nNo PDF directory: /Users/mvalais/Projets-QCM/toyP/cr/corrections/pdf at /usr/local/Cellar/auto-multiple-choice/1.4.0_6/lib/AMC/perl/AMC-annotate.pl line 178.\nThe file /Users/mvalais/Projets-QCM/toyP/cr/corrections/pdf does not exist.\n```\n\nIt might be something off in the settings file `~/.AMC.d/cf.default.xml`. Please try to rename\nit and re-open your project.\n\n### Nov. 18th, 2019: Fixed Pango by fixing the version to 1.42.4\n\nThe bug of the '[stacked caracters when\nannotating](https://github.com/maelvls/homebrew-amc/issues/33)' has been fixed\n(see\n[ticket](https://project.auto-multiple-choice.net/boards/4/topics/8855?r=8904#message-8904)).\n\n\u003c!--\n\n```sh\nbrew extract pango --version 1.42.4 maelvls/amc\nbrew extract cairo maelvls/amc\n```\n--\u003e\n\n### Sep. 19th, 2019: Annotations bug and Pango version\n\nPango 1.14.4 introduces a bug that breaks annotations (see [issue](https://github.com/maelvls/homebrew-amc/issues/33)). The text is stacked at the beginning of each PDF:\n\n![](https://user-images.githubusercontent.com/54452098/63615417-4a6d3680-c5b3-11e9-97cc-c153f0ed10d8.png)\n\nWith Pango 1.42.4, annotations should work. ~~Here is the workaround:~~ this\nworkaround isn't needed anymore!\n\n```\nbrew unlink pango\nbrew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb\nbrew switch pango 1.42.4_2\n```\n\n### Aug. 27th, 2019: changed my username to `maelvls`, remove the useless devel version\n\nIf you get the error:\n\n```\nError: Formulae found in multiple taps:\n* maelvalais/amc/auto-multiple-choice-devel\n* maelvls/amc/auto-multiple-choice-devel\n```\n\nTo fix it:\n\n```\nbrew untap maelvalais/amc\nbrew tap maelvls/amc\n```\n\nRegarding `auto-multiple-choice-devel`, it was used in pre-1.4.0 but right now it has\nthe same version as `auto-multiple-choice` and is useless. I removed the installation\ninformation from the readme.\n\n### Jan. 5th, 2019: opencv4 ~~breaks things~~ fixed ✅\n\n`AMC-detect` and `AMC-buildpdf` rely on opencv3. When Homebrew moved to opencv4,\nit broke the dynamic library linkages as well as makfiles (now `-std=c++11` is needed\nand the header path is a bit different).\n\n~~I'll fix that asap.~~ Fixed on Jan. 6th, 2019 with version `1.4.0_1`!\nIf you still have the `1.4.0` version, just `brew upgrade auto-multiple-choice`. You can do\n`brew info auto-multiple-choice` to check the installed version.\n\n### Dec. 30th, 2018: 1.4.0 released 🍾\n\nNote that the `auto-multiple-choice-devel` will have the same version number\nas `auto-multiple-choice` probably for the next few months; I'll update\n`devel` as soon as new tags are created.\n\n### Oct. 4th, 2018: 1.4.0-rc2 and auto-multiple-choice-devel formula\n\nI was kind of frustrated at the fact that using `--devel` was taking a LOT of\ntime, and updating it was thus a pain. I decided to create a real formula\ncalled `auto-multiple-choice-devel` that replaces the use of `--devel`. What's\nnice is that you will get precompiled: way less waiting when installing!!!\n\nTo sum up:\n\n1. **`--devel` won't work anymore**,\n2. instead, use **`brew install auto-multiple-choice-devel`**.\n3. `auto-multiple-choice` and `auto-multiple-choice-devel` cannot be linked at\n   simultanously (obviously).\n\n### July 5th, 2018: 1.4.0-rc1\n\nI updated the `--devel` version with the latest release candidate.\n\n### May 17th, 2018: try the coming 1.4.0-beta version!\n\nYou can enable the development version using:\n\n    brew install maelvls/amc/auto-multiple-choice --devel\n\nIt will install the latest beta available. Note that due to Homebrew limitations,\nbottles cannot be built for devel versions, resulting in a longer installation\ntime (it will need to download and install all the Perl dependencies).\n\n### March 19th, 2018: Scan detection works again!\n\nWe fixed the above bug (see [PR53]). Everything should be back to normal in 1.3.0.2199.\n~~Note that bottles won't be available for a couple of days, but it only means that\nthe installation will be slightly longer in the meantime!~~ done!\n\n[pr53]: https://bitbucket.org/auto-multiple-choice/auto-multiple-choice/pull-requests/53/amc-detect-fix-errors-with-opencv-341-by\n\n### March 15th, 2018: Fixed: ~~OpenCV breaks scan detection~~\n\nHomebrew updated OpenCV from 3.4.0 to 3.4.1. In 3.4.0, the C headers of OpenCV used\nin AMC were fine (athough they have been [deprecated](https://github.com/opencv/opencv/issues/6221)\nfor a long time now) but in 3.4.1 the function `cvLoadImage()` breaks. I'll see if we can move\naway from the C bindings in `AMC-detect.cc` (which is the culprit, see\n[the issue](https://github.com/maelvls/homebrew-amc/issues/4)) but that will take some\ndays and even more time for pushing that upstream.\n\n### March 14th, 2018: build from source until March 17th\n\nHomebrew has a bug that prevents me from creating bottles for a few days. I'll\nre-enable the bottles as soon as brew [releases version 1.5.11](https://github.com/Homebrew/brew/releases).\nUntil then, we must build from source, meaning that many perl packages will be\ndownloaded and built during installation. Sorry for that!\n\n### Febrary 3rd, 2018: brew update thows 'rebase' errors\n\n⚠️ If you get the following error when Homebrew updates: ⚠️\n\n```plain\nRecorded preimage for 'auto-multiple-choice.rb'\nerror: Failed to merge in the changes.\nPatch failed at 0001 amc: use the fork bitbucket.org/maelvalais/auto-multiple-choice\nThe copy of the patch that failed is found in: .git/rebase-apply/patch\n```\n\nSorry for that, I am **really** dumb on this one. I force-pushed homebrew-amc\nin order to revert the 2166 version. This is because I had created a fork\nwith a different version numbering; later, the commits in my fork were merged into\nthe main AMC repo and the version was 2161. `brew audit` would tell me not to\nhave a version number lower than the previous ones... **Solution:**\n\n    git -C $(brew --repo maelvls/amc) reset --hard origin/master\n\n## FAQ\n\n- **Why is the _reduce_ button not working?** This issue is discussed\n  [here][issue-reduce-button]. In short, it is related to the Glade UI toolkit\n  which doesn't seem to be great with the Quartz (macOS) backend of Gtk3. The\n  same issue appears when using Glade itself. Can't fix it from the AMC project\n  itself 😔\n- **How can I uninstall in a clean way?** If you want to go back to Macport's\n  auto-multiple-choice or you want to simply get rid or brew's installation,\n   you can uninstall using `brew uninstall auto-multiple-choice` (see [uninstall-brew]\n  for uninstalling homebrew totally). If anything went wrong (bugs, errors), I would\n  be pleased to see an issue opened on Github (or contact me by email at\n   mael.valais@gmail.com, but I would prefer that an issue is opened 😊).\n- **What are the dependencies?** For the installation, only Xquartz is\n  required. For running it, you need a latex distribution installed.\n  If you already have Mactex or Basic Tex installed (for example\n   the one you installed using `MacTeX.pkg`), you are ready to go!!\n  **You don't need to install a specific Homebrew version of Mactex**.\n  But if you don't have latex installed at all, you can install it using\n  `brew install homebrew/cask/mactex`.\n- **How come there has never been an official formula for Homebrew?** This\n  is mainly because of the complexity of auto-multiple-choice. It has an\n  insane number of Perl dependencies (~70 packages). Perl dependencies are not\n  handled by Homebrew (Macports does handle them), so I have to 'vendor'\n  them (= install them only for auto-multiple-choice, not system-wide).\n  The bad side is that it makes it a _long_ formula (678 loc) that you\n  can compare to the [`ansible.rb`][ansible.rb] formula (557 lines, but for vendoring python\n  packages).\n- **When building from source, why are there so many Perl download/make/make install?**\n  This is because Homebrew is not able to handle Perl dependencies, so I\n  have to vendor each of the dependencies (around 70 of them), which means\n  there are MANY downloads during the build phase if it is built from source.\n- **When running, there is a dylib/dydl error** This is probably because it\n  installed from a bottle and that the bottle was outdated. I run a daily\n  cron script in order to check that the dylib links links are not broken.\n  Two solutions: **1)** try reinstalling with `brew reinstall auto-multiple-choice`, **2)** build from source with `brew install auto-multiple-choice --build-from-source`. If you are still stuck, please\n  run `brew linkage auto-multiple-choice` and submit an issue on Github\n  in order to help me fix it.\n- **How did you do it?** I took the macports [recipe][macports], vendored\n  perl packages and pdftk (also dblatex but it is only used during build).\n  Nothing is installed outside of the Homebrew environment so you don't\n  have to worry with messing your system. The **only prerequisite** is to\n  have Mactex (if you don't have it: `brew install homebrew/cask/mactex`).\n- **Can I use the latest version (--devel, --HEAD) from mercurial?**\n  At first, I had enabled the possibility for compiling using the\n  `--HEAD` flag (so that it compiles using the latest sources from [mercurial]).\n  But because it required latex during the build and that the compilation of\n  the documentation and .sty was extremely cumbersome, I disabled it (allowing me\n  to remove ~100 loc from the formula).\n- **What are the next steps before publishing the formula to\n  homebrew-core?** Two main problems before the maintainers of Homebrew can\n  accept this formula into the core formulas: I rely on a pre-built\n  `pdftk.pkg`. It is not allowed in Homebrew core. A source-code-based\n  [PDFtk formula](https://github.com/spl/homebrew-pdftk) has existed for a\n  while but the maintainer gave up as because of gcj-5 (from gcc@5\n  --with-java) 'hanging' during the build (Macports [fixed\n  gcc5](https://trac.macports.org/ticket/49227) just in order to build\n  PDFtk). This is because PDFtk relies on GCJ which is dead by now. We\n  could replace `pdftk` if we knew a way to scrap filled forms from PDFs.\n\n[mercurial]: https://bitbucket.org/auto-multiple-choice/auto-multiple-choice\n[uninstall-brew]: https://github.com/Homebrew/install\n[ansible.rb]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansible.rb\n[issue-reduce-button]: https://github.com/maelvls/homebrew-amc/issues/18\n\n## Troubleshooting\n\n- **Why are the windows _tabbed_ like in Safari tabs?** because it is\n  using Gtk3, pop-up windows (like _Open project_) are (weirdly) opening\n  as tabbed windows. This is a work-in-progress on the GTK3 side; the\n  workaround is to un-tab the window by dragging out the tab, or disable\n  the [feature](https://support.apple.com/kb/PH25244?locale=en_US)\n  (_System preferences_ -\u003e _Dock_ -\u003e _Prefer tabs when opening\n  documents_).\n- **`automultiplechoice.sty` is not found!** This file cannot be installed\n  to your Mactex distribution during installation as it requires sudo. You\n  must run this after installing:\n\n        sudo auto-multiple-choice latex-link\n\n- **The font _Linux Libertine_ is not found!** Install Libertine using brew:\n\n      brew install homebrew/cask-fonts/font-linux-libertine\n\n  Note that you must **drop the ending 'O'** in your AMC-TXT and tex files.\n  The command to use in tex files is:\n\n      \\setmainfont{Linux Libertine}\n\n  and in amc-tex files:\n\n      Font: Linux Libertine\n\n- **Why is x11 required by default but tex is not?** This is because I am\n  trying to comply to the Homebrew core repository practices in order to\n  (eventually) merge the formula to the core repo. In the core repo, `x11`\n  is accepted as a default dependency (xquartz is installed on their\n  testing/bottling infrastructure). In the contrary, `tex` is not accepted\n  as a default dependency as Mactex is not installed during bottling. So we\n  use the 'dist' tarballs from the Bitbucket's Downloads area which contain\n  already compiled PDFs and documentation.\n\n- **The application craches after closing a warning popup** The error is:\n\n      Gdk:ERROR:gdkeventloop-quartz.c:567:select_thread_collect_poll: assertion failed:\n      (ufds[i].events == current_pollfds[i].events)\n\n  This bug seems to be related to Gtk+3 and Quartz backend used on macOS. I\n  tried to [fix the issue][gtk-craches] but it does not seem easily\n  reproducible so I gave up.\n\n- **Why is there no nice icon nor AutoMultipleChoice.app?** Unfortunately,\n  only deb-related linux distributions can (today) have a real _application_\n  feel with a clickable icon in the application menu. On macOS, it would\n  require to create an .app and sign it (which costs \\$99 per year). This is\n  why we can only run it from the terminal and we don't get a fancy icon\n  in the dock.\n\n## Report issues\n\nYou can create an [issue] if you have any problem, question or if you\nthink the whole idea of a formula that vendors everything is insane.\n\n[issues]: https://github.com/maelvls/homebrew-amc/issues\n[gtk-craches]: https://bitbucket.org/auto-multiple-choice/auto-multiple-choice/pull-requests/43/fix-the-assertion-failed-when-readding-an/diff#comment-53125101\n[macports]: https://github.com/macports/macports-ports/blob/d894802c28bda4045d956f327b3d5af89576bb22/x11/auto-multiple-choice/Portfile\n\n\u003c!--\n### Notes in the Gtk3/window tabbing issue\n\n1. The article about \"Automatic NSWindow Tabbing\" in macOS Sierra:\n   https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/index.html\n2. The GTK issue talking about this: https://bugzilla.gnome.org/show_bug.cgi?id=776602\n3. Also, how Mozilla disabled that: https://bugzilla.mozilla.org/show_bug.cgi?id=1280546\n--\u003e\n\n## Maintainance details: vendoring the ~70 Perl dependencies\n\nI went to \u003chttp://deps.cpantesters.org\u003e and I copy-pasted the tree of dependencies\n(except for 'Core modules') into a Ruby array. For example:\n\n```ruby\n      \"XML::Simple\",\n        \"XML::SAX\",\n          \"XML::NamespaceSupport\",\n          \"XML::SAX::Base\",\n```\n\nI then gather all the ruby array with all dependencies (for example the\nprevious example) into a file `list_of_deps`.\n\nThen I run\n\n    ./list_to_resources.pl \u003c list_of_deps \u003e resources\n\nand I copy everything in `resources` to the formula.\n\nHere is `list_to_resources.pl`:\n\n```perl\n#!/usr/bin/env perl\n# Lines must be of form (spaces and the comma are ignored):\n#     \"XML::Simple\",\nuse MetaCPAN::Client;\nmy $mcpan  = MetaCPAN::Client-\u003enew();\nmy %already_seen = ();\nforeach $line ( \u003cSTDIN\u003e ) {\n    chomp($line);\n    $line =~ s/^.*\"([A-Za-z:0-9]*)\".*$/\\1/;\n    my $package = $mcpan-\u003epackage($line);\n    if (! exists($already_seen{$line})) {\n        $already_seen{$line} = 1;\n        my $url = \"https://cpan.metacpan.org/authors/id/\".$package-\u003efile();\n        chomp(my $sha256 = `curl -sSL $url | sha256sum | cut -d' ' -f1`);\n        print \"resource \\\"$line\\\" do\\n\";\n        print \"  url \\\"\".$url.\"\\\"\\n\";\n        print \"  sha256 \\\"\".$sha256.\"\\\"\\n\";\n        print \"end\\n\";\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaelvls%2Fhomebrew-amc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaelvls%2Fhomebrew-amc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaelvls%2Fhomebrew-amc/lists"}