class Vdirsyncer < Formula include Language::Python::Virtualenv desc "Synchronize calendars and contacts" homepage "https://github.com/pimutils/vdirsyncer" url "https://files.pythonhosted.org/packages/2e/f6/94ed82de371cc80784ffe90e0dac8ce9f5d272c01d614415a5e800ffb303/vdirsyncer-0.20.0.tar.gz" sha256 "feb1a533500a95c14fd155733a1056fe359192553d82c07c6ba04fcbfc40b12d" license "BSD-3-Clause" revision 3 head "https://github.com/pimutils/vdirsyncer.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_tahoe: "07ff77e0ac5f505da9b8c654f9b2d971b0ddfc1c0a33009884f565bb22373f43" sha256 cellar: :any_skip_relocation, arm64_sequoia: "9e656ec26dd96ba50fb7b8450fda988fdf041290fce8fbf3cb3f0e8bd9640f28" sha256 cellar: :any_skip_relocation, arm64_sonoma: "129ed73ad799c4280fb751cc5b7f368f42b6e6c6ac7e42925c2591b0456482d1" sha256 cellar: :any_skip_relocation, tahoe: "7ba3d0219248edaa8b458f4b430383314af5f8455dfe7907f3469bc0aa0cfca8" sha256 cellar: :any_skip_relocation, sequoia: "787e9b86eaa8e73e8963fec61f711b9f81f34746d8220d1258876922beb2af2e" sha256 cellar: :any_skip_relocation, sonoma: "fa37b5d3401a8ebe8f27226167b69f7e2a7cc1a188232f83bea1ceb3cca59174" sha256 cellar: :any_skip_relocation, arm64_linux: "4cabd433cf2c58979c471134d3da4600f43dd340af11ccac1809c59303d6f98c" sha256 cellar: :any_skip_relocation, x86_64_linux: "49e60cc5575e18d7c48ef4a3ea7faf8032a244478519d5069b53a4f24f03bd0f" end depends_on "certifi" depends_on "python@3.14" pypi_packages package_name: "vdirsyncer[google]", exclude_packages: "certifi" resource "aiohappyeyeballs" do url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz" sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558" end resource "aiohttp" do url "https://files.pythonhosted.org/packages/50/42/32cf8e7704ceb4481406eb87161349abb46a57fee3f008ba9cb610968646/aiohttp-3.13.3.tar.gz" sha256 "a949eee43d3782f2daae4f4a2819b2cb9b0c5d3b7f7a927067cc84dafdbb9f88" end resource "aiohttp-oauthlib" do url "https://files.pythonhosted.org/packages/ba/0a/cc204fcc311324358252fd38a884b1acae9f9e3936a54b2ce139946daada/aiohttp-oauthlib-0.1.0.tar.gz" sha256 "893cd1a59ddd0c2e4e980e3a544f9710b7c4ffb9e27b4cd038b51fe1d70393b7" end resource "aiosignal" do url "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz" sha256 "f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7" end resource "aiostream" do url "https://files.pythonhosted.org/packages/8b/65/b9b69695702b76a878c9879f2ee80cefce75bc5cb864fc100460bc1c5380/aiostream-0.7.1.tar.gz" sha256 "272aaa0d8f83beb906f5aa9022bb59046bb7a103fa3770f807c31f918595acf6" end resource "attrs" do url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz" sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11" end resource "charset-normalizer" do url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz" sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a" end resource "click" do url "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz" sha256 "12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a" end resource "click-log" do url "https://files.pythonhosted.org/packages/32/32/228be4f971e4bd556c33d52a22682bfe318ffe57a1ddb7a546f347a90260/click-log-0.4.0.tar.gz" sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975" end resource "frozenlist" do url "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz" sha256 "3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad" end resource "idna" do url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" end resource "multidict" do url "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz" sha256 "c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5" end resource "oauthlib" do url "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz" sha256 "0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9" end resource "propcache" do url "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz" sha256 "f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d" end resource "requests" do url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz" sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" end resource "typing-extensions" do url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz" sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466" end resource "urllib3" do url "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz" sha256 "1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed" end resource "yarl" do url "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz" sha256 "bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71" end def install virtualenv_install_with_resources generate_completions_from_executable(bin/"vdirsyncer", shell_parameter_format: :click) end service do run [opt_bin/"vdirsyncer", "-v", "ERROR", "sync"] run_type :interval interval 60 log_path var/"log/vdirsyncer.log" error_log_path var/"log/vdirsyncer.log" working_dir HOMEBREW_PREFIX end test do ENV["LC_ALL"] = "en_US.UTF-8" (testpath/".config/vdirsyncer/config").write <<~INI [general] status_path = "#{testpath}/.vdirsyncer/status/" [pair contacts] a = "contacts_a" b = "contacts_b" collections = ["from a"] [storage contacts_a] type = "filesystem" path = "~/.contacts/a/" fileext = ".vcf" [storage contacts_b] type = "filesystem" path = "~/.contacts/b/" fileext = ".vcf" INI (testpath/".contacts/a/foo/092a1e3b55.vcf").write <<~EOS BEGIN:VCARD VERSION:3.0 EMAIL;TYPE=work:username@example.org FN:User Name Ö φ 風 ض UID:092a1e3b55 N:Name;User END:VCARD EOS (testpath/".contacts/b/foo/").mkpath system bin/"vdirsyncer", "discover" system bin/"vdirsyncer", "sync" assert_match "Ö φ 風 ض", (testpath/".contacts/b/foo/092a1e3b55.vcf").read end end