This commit is contained in:
2025-05-13 15:53:11 -06:00
parent ee5c5c9d6e
commit 4e7150a353
8 changed files with 4771 additions and 4927 deletions

BIN
assets/google workspace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/logo-light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

23
assets/logo.svg Normal file
View File

@@ -0,0 +1,23 @@
<svg width="409" height="78" viewBox="0 0 409 78" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M62.794 51.02C60.438 51.02 58.1853 50.772 56.036 50.276C53.8867 49.7387 51.9853 48.9327 50.332 47.858C48.6787 46.742 47.3767 45.378 46.426 43.766C45.4753 42.1127 45 40.17 45 37.938C45 37.69 45 37.442 45 37.194C45.0413 36.946 45.062 36.76 45.062 36.636H53.184C53.184 36.7187 53.1633 36.884 53.122 37.132C53.122 37.3387 53.122 37.5247 53.122 37.69C53.122 39.054 53.5147 40.232 54.3 41.224C55.0853 42.1747 56.222 42.9187 57.71 43.456C59.198 43.952 60.9547 44.2 62.98 44.2C64.344 44.2 65.5427 44.1173 66.576 43.952C67.6507 43.7867 68.56 43.5593 69.304 43.27C70.0893 42.9393 70.73 42.5673 71.226 42.154C71.722 41.6993 72.0733 41.2033 72.28 40.666C72.528 40.1287 72.652 39.55 72.652 38.93C72.652 37.7313 72.28 36.7393 71.536 35.954C70.792 35.1687 69.7793 34.5073 68.498 33.97C67.258 33.4327 65.832 32.9573 64.22 32.544C62.6493 32.0893 61.0167 31.6347 59.322 31.18C57.6687 30.7253 56.036 30.188 54.424 29.568C52.8533 28.9067 51.4273 28.1213 50.146 27.212C48.906 26.3027 47.914 25.166 47.17 23.802C46.426 22.3967 46.054 20.7227 46.054 18.78C46.054 16.796 46.4673 15.06 47.294 13.572C48.162 12.084 49.3607 10.8647 50.89 9.914C52.4607 8.922 54.2793 8.19867 56.346 7.744C58.4127 7.248 60.6653 7 63.104 7C65.3773 7 67.506 7.248 69.49 7.744C71.5153 8.19867 73.2927 8.94267 74.822 9.976C76.3513 10.968 77.55 12.2493 78.418 13.82C79.286 15.3493 79.72 17.1887 79.72 19.338V20.082H71.722V19.462C71.722 18.2633 71.35 17.2507 70.606 16.424C69.9033 15.5973 68.8907 14.9567 67.568 14.502C66.2867 14.0473 64.778 13.82 63.042 13.82C61.182 13.82 59.5907 14.006 58.268 14.378C56.9453 14.7087 55.9327 15.2253 55.23 15.928C54.5273 16.5893 54.176 17.416 54.176 18.408C54.176 19.4413 54.548 20.3093 55.292 21.012C56.036 21.7147 57.028 22.314 58.268 22.81C59.5493 23.306 60.9753 23.7607 62.546 24.174C64.158 24.5873 65.7907 25.042 67.444 25.538C69.1387 25.9927 70.7713 26.53 72.342 27.15C73.954 27.77 75.38 28.5553 76.62 29.506C77.9013 30.4153 78.914 31.552 79.658 32.916C80.402 34.28 80.774 35.9127 80.774 37.814C80.774 40.9967 79.9887 43.5593 78.418 45.502C76.8887 47.4447 74.76 48.85 72.032 49.718C69.3453 50.586 66.266 51.02 62.794 51.02Z" fill="#3C3943"/>
<path d="M91.2635 60.616C89.9068 60.616 88.7702 60.506 87.8535 60.286C86.9735 60.1027 86.4052 59.9743 86.1485 59.901V54.731H89.5035C90.4202 54.731 91.2452 54.511 91.9785 54.071C92.7118 53.6677 93.3535 53.1177 93.9035 52.421C94.4535 51.761 94.8568 51.046 95.1135 50.276L83.7835 21.346H91.8685L96.8185 34.711C97.0385 35.3343 97.2768 36.1227 97.5335 37.076C97.8269 37.9927 98.1202 38.9643 98.4135 39.991C98.7069 40.981 98.9452 41.861 99.1285 42.631H99.4035C99.5502 42.1177 99.7152 41.5127 99.8985 40.816C100.082 40.1193 100.265 39.4043 100.449 38.671C100.669 37.9377 100.87 37.241 101.054 36.581C101.274 35.8843 101.457 35.2793 101.604 34.766L105.729 21.346H113.429L103.584 48.901C103.034 50.5143 102.392 52.0177 101.659 53.411C100.962 54.841 100.137 56.0877 99.1835 57.151C98.2302 58.251 97.0935 59.0943 95.7735 59.681C94.4902 60.3043 92.9869 60.616 91.2635 60.616Z" fill="#3C3943"/>
<path d="M128.877 50.936C126.86 50.936 125.045 50.716 123.432 50.276C121.818 49.836 120.443 49.231 119.307 48.461C118.17 47.6543 117.29 46.701 116.667 45.601C116.08 44.501 115.787 43.2543 115.787 41.861C115.787 41.7143 115.787 41.5677 115.787 41.421C115.787 41.2743 115.805 41.1643 115.842 41.091H123.212C123.212 41.1643 123.212 41.2377 123.212 41.311C123.212 41.3843 123.212 41.4577 123.212 41.531C123.248 42.4477 123.542 43.1993 124.092 43.786C124.642 44.336 125.357 44.7393 126.237 44.996C127.153 45.2527 128.107 45.381 129.097 45.381C129.977 45.381 130.82 45.3077 131.627 45.161C132.47 44.9777 133.167 44.666 133.717 44.226C134.303 43.786 134.597 43.2177 134.597 42.521C134.597 41.641 134.23 40.9627 133.497 40.486C132.8 40.0093 131.865 39.6243 130.692 39.331C129.555 39.0377 128.308 38.7077 126.952 38.341C125.705 38.0477 124.458 37.7177 123.212 37.351C121.965 36.9477 120.828 36.4343 119.802 35.811C118.812 35.1877 118.005 34.381 117.382 33.391C116.758 32.3643 116.447 31.081 116.447 29.541C116.447 28.0377 116.777 26.736 117.437 25.636C118.097 24.4993 118.995 23.5643 120.132 22.831C121.305 22.0977 122.662 21.566 124.202 21.236C125.778 20.8693 127.465 20.686 129.262 20.686C130.948 20.686 132.525 20.8693 133.992 21.236C135.458 21.566 136.742 22.0793 137.842 22.776C138.942 23.436 139.803 24.2793 140.427 25.306C141.05 26.296 141.362 27.4143 141.362 28.661C141.362 28.9177 141.362 29.156 141.362 29.376C141.362 29.596 141.343 29.7427 141.307 29.816H133.992V29.376C133.992 28.716 133.79 28.166 133.387 27.726C132.983 27.2493 132.397 26.8827 131.627 26.626C130.893 26.3693 129.995 26.241 128.932 26.241C128.198 26.241 127.52 26.296 126.897 26.406C126.31 26.516 125.797 26.681 125.357 26.901C124.917 27.121 124.568 27.396 124.312 27.726C124.092 28.0193 123.982 28.386 123.982 28.826C123.982 29.4493 124.238 29.9627 124.752 30.366C125.302 30.7327 126.017 31.0443 126.897 31.301C127.777 31.5577 128.748 31.8327 129.812 32.126C131.132 32.4927 132.507 32.8593 133.937 33.226C135.403 33.556 136.76 34.0143 138.007 34.601C139.253 35.1877 140.262 36.031 141.032 37.131C141.802 38.1943 142.187 39.6427 142.187 41.476C142.187 43.236 141.838 44.721 141.142 45.931C140.482 47.141 139.547 48.1127 138.337 48.846C137.127 49.5793 135.715 50.111 134.102 50.441C132.488 50.771 130.747 50.936 128.877 50.936Z" fill="#3C3943"/>
<path d="M156.358 50.936C154.525 50.936 153.04 50.606 151.903 49.946C150.767 49.286 149.941 48.406 149.428 47.306C148.915 46.1693 148.658 44.9227 148.658 43.566V27.231H145.083V21.346H148.933L150.363 13.096H156.303V21.346H161.583V27.231H156.303V42.301C156.303 43.181 156.505 43.8593 156.908 44.336C157.312 44.776 157.972 44.996 158.888 44.996H161.583V50.056C161.143 50.2027 160.63 50.331 160.043 50.441C159.456 50.5877 158.833 50.6977 158.173 50.771C157.513 50.881 156.908 50.936 156.358 50.936Z" fill="#3C3943"/>
<path d="M179.667 50.936C176.477 50.936 173.8 50.4043 171.637 49.341C169.474 48.241 167.842 46.5727 166.742 44.336C165.642 42.0993 165.092 39.2577 165.092 35.811C165.092 32.3277 165.642 29.486 166.742 27.286C167.842 25.0493 169.455 23.3993 171.582 22.336C173.745 21.236 176.385 20.686 179.502 20.686C182.435 20.686 184.91 21.2177 186.927 22.281C188.944 23.3077 190.465 24.921 191.492 27.121C192.519 29.2843 193.032 32.0893 193.032 35.536V37.516H172.847C172.92 39.2027 173.177 40.6327 173.617 41.806C174.094 42.9793 174.809 43.8593 175.762 44.446C176.752 44.996 178.054 45.271 179.667 45.271C180.547 45.271 181.335 45.161 182.032 44.941C182.765 44.721 183.389 44.391 183.902 43.951C184.415 43.511 184.819 42.961 185.112 42.301C185.405 41.641 185.552 40.8893 185.552 40.046H193.032C193.032 41.8793 192.702 43.4743 192.042 44.831C191.382 46.1877 190.465 47.3243 189.292 48.241C188.119 49.121 186.707 49.7993 185.057 50.276C183.444 50.716 181.647 50.936 179.667 50.936ZM172.957 32.676H185.167C185.167 31.576 185.02 30.6227 184.727 29.816C184.47 29.0093 184.104 28.3493 183.627 27.836C183.15 27.3227 182.564 26.956 181.867 26.736C181.207 26.4793 180.455 26.351 179.612 26.351C178.219 26.351 177.045 26.5893 176.092 27.066C175.175 27.506 174.46 28.2027 173.947 29.156C173.47 30.0727 173.14 31.246 172.957 32.676Z" fill="#3C3943"/>
<path d="M198.641 50.276V21.346H204.966L205.571 25.306H205.956C206.579 24.3527 207.313 23.5277 208.156 22.831C209.036 22.1343 210.008 21.6027 211.071 21.236C212.171 20.8693 213.344 20.686 214.591 20.686C216.424 20.686 218.001 21.0527 219.321 21.786C220.678 22.5193 221.723 23.6927 222.456 25.306H222.841C223.464 24.3527 224.216 23.5277 225.096 22.831C225.976 22.1343 226.984 21.6027 228.121 21.236C229.258 20.8693 230.468 20.686 231.751 20.686C233.584 20.686 235.161 21.016 236.481 21.676C237.838 22.336 238.901 23.4177 239.671 24.921C240.441 26.3877 240.826 28.2943 240.826 30.641V50.276H233.181V32.016C233.181 31.0993 233.071 30.3293 232.851 29.706C232.668 29.046 232.393 28.5327 232.026 28.166C231.659 27.7627 231.201 27.4693 230.651 27.286C230.101 27.1027 229.514 27.011 228.891 27.011C227.864 27.011 226.948 27.286 226.141 27.836C225.334 28.386 224.693 29.1377 224.216 30.091C223.776 31.0443 223.556 32.1443 223.556 33.391V50.276H215.911V32.016C215.911 31.0993 215.801 30.3293 215.581 29.706C215.398 29.046 215.123 28.5327 214.756 28.166C214.389 27.7627 213.931 27.4693 213.381 27.286C212.868 27.1027 212.281 27.011 211.621 27.011C210.631 27.011 209.714 27.286 208.871 27.836C208.064 28.386 207.423 29.1377 206.946 30.091C206.506 31.0443 206.286 32.1443 206.286 33.391V50.276H198.641Z" fill="#3C3943"/>
<path d="M255.271 50.936C254.317 50.936 253.291 50.826 252.191 50.606C251.127 50.386 250.119 50.001 249.166 49.451C248.212 48.8643 247.424 48.0393 246.801 46.976C246.214 45.876 245.921 44.4827 245.921 42.796C245.921 40.7793 246.361 39.111 247.241 37.791C248.121 36.471 249.367 35.4443 250.981 34.711C252.631 33.941 254.592 33.4093 256.866 33.116C259.139 32.8227 261.651 32.676 264.401 32.676V30.531C264.401 29.6877 264.254 28.9543 263.961 28.331C263.704 27.7077 263.227 27.2127 262.531 26.846C261.87 26.4793 260.936 26.296 259.726 26.296C258.516 26.296 257.526 26.4427 256.756 26.736C256.022 27.0293 255.491 27.4143 255.161 27.891C254.867 28.331 254.721 28.826 254.721 29.376V30.036H247.296C247.259 29.8527 247.241 29.6877 247.241 29.541C247.241 29.3577 247.241 29.1377 247.241 28.881C247.241 27.1943 247.754 25.746 248.781 24.536C249.807 23.2893 251.256 22.336 253.126 21.676C254.995 21.016 257.177 20.686 259.671 20.686C262.347 20.686 264.584 21.0343 266.381 21.731C268.214 22.4277 269.607 23.4543 270.561 24.811C271.551 26.1677 272.046 27.8727 272.046 29.926V43.071C272.046 43.731 272.229 44.226 272.596 44.556C272.999 44.8493 273.439 44.996 273.916 44.996H275.731V50.001C275.364 50.1843 274.796 50.3677 274.026 50.551C273.256 50.771 272.321 50.881 271.221 50.881C270.157 50.881 269.204 50.716 268.361 50.386C267.554 50.0927 266.876 49.671 266.326 49.121C265.776 48.5343 265.391 47.8377 265.171 47.031H264.786C264.162 47.801 263.392 48.4793 262.476 49.066C261.596 49.6527 260.551 50.111 259.341 50.441C258.167 50.771 256.811 50.936 255.271 50.936ZM257.856 45.161C258.882 45.161 259.799 45.0143 260.606 44.721C261.412 44.391 262.09 43.9693 262.641 43.456C263.191 42.906 263.612 42.246 263.906 41.476C264.236 40.706 264.401 39.881 264.401 39.001V37.406C262.347 37.406 260.514 37.5527 258.901 37.846C257.287 38.1027 256.004 38.561 255.051 39.221C254.134 39.881 253.676 40.7977 253.676 41.971C253.676 42.631 253.84 43.1993 254.171 43.676C254.501 44.1527 254.977 44.5193 255.601 44.776C256.224 45.0327 256.976 45.161 257.856 45.161Z" fill="#3C3943"/>
<path d="M288.165 50.936C286.331 50.936 284.846 50.606 283.71 49.946C282.573 49.286 281.748 48.406 281.235 47.306C280.721 46.1693 280.465 44.9227 280.465 43.566V27.231H276.89V21.346H280.74L282.17 13.096H288.11V21.346H293.39V27.231H288.11V42.301C288.11 43.181 288.311 43.8593 288.715 44.336C289.118 44.776 289.778 44.996 290.695 44.996H293.39V50.056C292.95 50.2027 292.436 50.331 291.85 50.441C291.263 50.5877 290.64 50.6977 289.98 50.771C289.32 50.881 288.715 50.936 288.165 50.936Z" fill="#3C3943"/>
<path d="M298.329 17.111V10.511H305.974V17.111H298.329ZM298.329 50.276V21.346H305.974V50.276H298.329Z" fill="#3C3943"/>
<path d="M325.697 50.936C322.617 50.936 320.032 50.4043 317.942 49.341C315.852 48.241 314.257 46.5727 313.157 44.336C312.093 42.0627 311.562 39.221 311.562 35.811C311.562 32.3277 312.093 29.486 313.157 27.286C314.257 25.0493 315.852 23.381 317.942 22.281C320.068 21.181 322.653 20.631 325.697 20.631C327.677 20.631 329.455 20.8693 331.032 21.346C332.645 21.8227 334.038 22.556 335.212 23.546C336.385 24.536 337.265 25.7643 337.852 27.231C338.475 28.661 338.787 30.366 338.787 32.346H331.142C331.142 31.026 330.94 29.9443 330.537 29.101C330.133 28.2577 329.51 27.616 328.667 27.176C327.86 26.736 326.833 26.516 325.587 26.516C324.12 26.516 322.928 26.846 322.012 27.506C321.095 28.166 320.417 29.1377 319.977 30.421C319.537 31.7043 319.317 33.2993 319.317 35.206V36.471C319.317 38.341 319.537 39.9177 319.977 41.201C320.453 42.4843 321.168 43.456 322.122 44.116C323.075 44.7393 324.322 45.051 325.862 45.051C327.108 45.051 328.135 44.831 328.942 44.391C329.785 43.951 330.427 43.291 330.867 42.411C331.307 41.531 331.527 40.4677 331.527 39.221H338.787C338.787 41.091 338.475 42.7593 337.852 44.226C337.265 45.6927 336.385 46.921 335.212 47.911C334.075 48.901 332.7 49.6527 331.087 50.166C329.473 50.6793 327.677 50.936 325.697 50.936Z" fill="#3C3943"/>
<path d="M386.849 36.972C386.849 41.86 385.306 45.5866 382.221 48.152C379.135 50.7173 374.75 52 369.065 52C363.379 52 358.977 50.7173 355.857 48.152C352.771 45.5866 351.229 41.86 351.229 36.972V15.6H362.721V36.816C362.721 38.8266 363.258 40.4386 364.333 41.652C365.407 42.8306 366.967 43.42 369.013 43.42C371.058 43.42 372.618 42.8133 373.693 41.6C374.802 40.3866 375.357 38.792 375.357 36.816V15.6H386.849V36.972Z" fill="#130E1C"/>
<path d="M372.59 15.6H386.849L386.849 18.1715H372.59V15.6Z" fill="#130E1C"/>
<path d="M393.633 15.5472H407.892V18.1187H393.633V15.5472Z" fill="#130E1C"/>
<path d="M393.633 48.9052H407.892V51.4767H393.633V48.9052Z" fill="#130E1C"/>
<path d="M395.023 15.5472H406.502V51.3953H395.023V15.5472Z" fill="#130E1C"/>
<path d="M11.7145 23.8881L28.3004 4.64729C28.5529 4.39478 28.6406 4.02294 28.6406 3.59798C28.6406 2.95148 28.6564 2.11035 28.6564 2.11035L8.28006 23.8881H11.7145Z" fill="#073826"/>
<path d="M31.2038 27.0217L8.00756 27.0217C7.17913 27.0217 6.63503 26.3712 6.63503 25.5428L6.63521 24.0217L32.655 24.0217L32.655 25.4689C32.655 26.2817 32.2535 27.0217 31.2038 27.0217Z" fill="#073826"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.7701 24.6738C6.52627 24.1393 6.61687 23.5117 7.00192 23.068L26.0212 1.15272C26.5641 0.527058 27.5115 0.460034 28.1372 1.00302C28.7628 1.546 28.8299 2.49338 28.2869 3.11905L11.4227 22.5512L31.1542 22.5512C31.9826 22.5512 32.6542 23.2227 32.6542 24.0512C32.6542 24.8796 31.9826 25.5512 31.1542 25.5512L8.13479 25.5512C7.54733 25.5512 7.01394 25.2082 6.7701 24.6738Z" fill="#3C9071"/>
<path d="M26.915 34.7487L3.71875 34.7487C2.89032 34.7487 2.21875 34.0771 2.21875 33.2487C2.21875 32.8762 2.2191 32.093 2.21906 31.7487L28.3662 31.7487V33.1959C28.3662 34.0087 27.9647 34.7487 26.915 34.7487Z" fill="#073826"/>
<path d="M6.74595 53.9473V56.1395C6.74595 57.0487 7.60685 57.5489 8.19172 57.5489C8.65962 57.5489 9.15258 57.2147 9.34058 57.0476C15.5166 49.7019 27.9145 34.9603 28.0983 34.7598C28.2821 34.5593 28.5007 34.435 28.5146 34.247L26.915 35.2174L26.3407 34.7487L6.74595 53.9473Z" fill="#073826"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.275 31.1033C28.5212 31.6321 28.4384 32.2557 28.0629 32.702L9.38034 54.905C8.84697 55.5389 7.90072 55.6204 7.26684 55.087C6.63296 54.5536 6.55149 53.6074 7.08486 52.9735L23.6926 33.2363L3.71892 33.2363C2.89049 33.2363 2.21892 32.5647 2.21892 31.7363C2.21892 30.9078 2.89049 30.2363 3.71892 30.2363L26.9151 30.2363C27.4985 30.2363 28.0289 30.5744 28.275 31.1033Z" fill="#3C9071"/>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

BIN
invoice-346.pdf Normal file

Binary file not shown.

BIN
invoice.pdf Normal file

Binary file not shown.

View File

@@ -12,6 +12,7 @@
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
"@biomejs/biome": "1.7.0", "@biomejs/biome": "1.7.0",
"@humanfs/node": "^0.16.6",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^20.12.7", "@types/node": "^20.12.7",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
@@ -24,17 +25,16 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-sheriff": "^18.2.0", "eslint-config-sheriff": "^18.2.0",
"eslint-define-config": "^2.1.0", "eslint-define-config": "^2.1.0",
"enquirer": "2.4.1",
"ink": "^5.0.1", "ink": "^5.0.1",
"ky": "^1.2.3", "ky": "^1.2.3",
"lodash-es": "^4.17.21",
"react": "^18.3.1", "react": "^18.3.1",
"tinyrainbow": "^1.1.1", "tinyrainbow": "^1.1.1",
"tsx": "4.7.2", "tsx": "4.7.2",
"typescript": "5.4.5", "typescript": "5.4.5",
"vite": "^5.2.9", "vite": "^5.2.9",
"zod": "^3.22.5" "zod": "^3.22.5",
"zx": "^8.3.0"
}, },
"devDependencies": { "devDependencies": {}
"wretched": "1.0.10-alpha"
}
} }

9558
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

25
src/cli-convert.ts Normal file
View File

@@ -0,0 +1,25 @@
import { hfs } from "@humanfs/node";
import { $ } from "zx";
import ky from "ky";
import { prompt } from "enquirer";
const id = 346;
const invoiceFile = `invoice-${id}.pdf`;
const hourlyRate = 150;
const tableId = "mwzraqmbkwy2e2s";
const baseUrl = `http://ds923plus.local:8980/api/v2/`;
const invoiceRecords = await ky(`${baseUrl}/tables/${tableId}/records`).json<{ list: Array<any>}>();
const choices = invoiceRecords.list.map()
await prompt({ message: "Which Invoice Should be generated?", choices: []})
const timeEntries = await ky(`${baseUrl}/tables/${tableId}/records/${}`).json<{list: Array<any>}>();
const items = timeEntries.list.map(
(x) => `"Time Entry Minutes on ${x["Bill Date"]}"`,
);
const qMinutes = timeEntries.list.map((x) => x.Hours / 60);
console.log("Attempt to create PDF");
const result = await $`invoice generate --id ${id} --logo "assets/google workspace.png" --from "Tim Bendt - Systmatic UI, LLC" --to "Charles Schwartz - Graphite Education" \
--item ${items[0]} --rate ${hourlyRate / 60} --quantity ${qMinutes[0]} \
--note "For debugging purposes." --output "${invoiceFile}"`;
console.log(result);