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 1 head "https://github.com/pimutils/vdirsyncer.git", branch: "main" bottle do sha256 cellar: :any_skip_relocation, arm64_tahoe: "18649857c342320430445fb0b665f4964fc60d910754ca5481200b53a8da0a98" sha256 cellar: :any_skip_relocation, arm64_sequoia: "06a93508a034ebd0cc3d5d7ace2162cea7195aa430c0b44b5970f3167d9b370b" sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e605b5da44c7f7c4bf22af6c987266b5160d3523065805a4be07a6c9ced0707" sha256 cellar: :any_skip_relocation, tahoe: "28d40d0b29284835bd3a2f981654bb4f1f08ca99cdd0a25310221527a633114d" sha256 cellar: :any_skip_relocation, sequoia: "9be7605e324f40e1fc9ec940aabe60030152efbf597fcc9cac7a2c0ecb588d50" sha256 cellar: :any_skip_relocation, sonoma: "85aaf2864a32e077111a5b7789f28d46275a88ed4d20d27e2b020e3d1dfb562c" sha256 cellar: :any_skip_relocation, arm64_linux: "8d3d01383b4518a9dae3e0ff9fce674a918e83981619b7306a1fe7adc2c1b38e" sha256 cellar: :any_skip_relocation, x86_64_linux: "16101917c4aa7366cd661ba0257304291e91878ba5d747d36b97c74d4d5f44a9" 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/1c/ce/3b83ebba6b3207a7135e5fcaba49706f8a4b6008153b4e30540c982fae26/aiohttp-3.13.2.tar.gz" sha256 "40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca" 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/1c/43/554c2569b62f49350597348fc3ac70f786e3c32e7f19d266e19817812dd3/urllib3-2.6.0.tar.gz" sha256 "cb9bcef5a4b345d5da5d145dc3e30834f58e8018828cbc724d30b4cb7d4d49f1" 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