ics-query 0.1.dev8__py3-none-any.whl → 0.2.0a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ics-query
3
- Version: 0.1.dev8
4
- Summary: Find out what happens in ICS calendar files - query and filter RFC 5545 compatible `.ics` files for events, journals, TODOs and more.
3
+ Version: 0.2.0a0
4
+ Summary: Find out what happens in ICS calendar files - query and filter RFC 5545 compatible .ics files for events, journals, TODOs and more.
5
5
  Project-URL: Homepage, https://github.com/niccokunzmann/ics-query/
6
6
  Project-URL: Repository, https://github.com/niccokunzmann/ics-query/
7
- Project-URL: source_archive, https://github.com/niccokunzmann/ics-query/archive/3f1c4acd60666416eb899f7a0c07a05999d443c3.zip
7
+ Project-URL: source_archive, https://github.com/niccokunzmann/ics-query/archive/c7eeb503fae7da069308a27a37232be96851c3e5.zip
8
8
  Project-URL: Issues, https://github.com/niccokunzmann/ics-query/issues
9
9
  Project-URL: Documentation, https://github.com/niccokunzmann/ics-query/
10
10
  Project-URL: Changelog, https://github.com/niccokunzmann/ics-query/#changelog
@@ -690,12 +690,15 @@ Classifier: Development Status :: 3 - Alpha
690
690
  Classifier: Intended Audience :: Developers
691
691
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
692
692
  Classifier: Operating System :: OS Independent
693
- Classifier: Programming Language :: Python :: 3
693
+ Classifier: Programming Language :: Python :: 3.9
694
+ Classifier: Programming Language :: Python :: 3.10
695
+ Classifier: Programming Language :: Python :: 3.11
696
+ Classifier: Programming Language :: Python :: 3.12
694
697
  Classifier: Topic :: Office/Business :: Scheduling
695
- Requires-Python: >=3.8
698
+ Requires-Python: >=3.9
696
699
  Requires-Dist: click
697
700
  Requires-Dist: icalendar
698
- Requires-Dist: recurring-ical-events
701
+ Requires-Dist: recurring-ical-events<4,>=3.2.0
699
702
  Provides-Extra: test
700
703
  Requires-Dist: pytest; extra == 'test'
701
704
  Description-Content-Type: text/markdown
@@ -713,7 +716,117 @@ You can install this package from the [PyPI](https://pypi.org/project/ics-query/
713
716
  pip install ics-query
714
717
  ```
715
718
 
716
- ## `ics-query at` - occurrences at certain times
719
+ ## Usage
720
+
721
+ See how to use `ics-query`.
722
+
723
+ ### Examples
724
+
725
+ You can easily get a calendar from the web and see what is on.
726
+ In this example, we show which German National Holidays happen in August 2024:
727
+
728
+ ```shell
729
+ $ wget -qO- 'https://www.calendarlabs.com/ical-calendar/ics/46/Germany_Holidays.ics' | ./ics-query at 2024-08 - -
730
+ BEGIN:VEVENT
731
+ SUMMARY:Assumption Day (BY\, SL)
732
+ DTSTART;VALUE=DATE:20240815
733
+ DTEND;VALUE=DATE:20240815
734
+ DTSTAMP:20231013T092513Z
735
+ UID:65290cf9326601697189113@calendarlabs.com
736
+ SEQUENCE:0
737
+ DESCRIPTION:Visit https://calendarlabs.com/holidays/us/the-assumption-of-m
738
+ ary.php to know more about Assumption Day (BY\, SL). \n\n Like us on Faceb
739
+ ook: http://fb.com/calendarlabs to get updates
740
+ LOCATION:Germany
741
+ STATUS:CONFIRMED
742
+ TRANSP:TRANSPARENT
743
+ END:VEVENT
744
+ ```
745
+
746
+ In the following example, we query a calendar file and print the result.
747
+
748
+ ```shell
749
+ $ ics-query at 2019-03-04 one-event.ics -
750
+ BEGIN:VEVENT
751
+ SUMMARY:test1
752
+ DTSTART;TZID=Europe/Berlin:20190304T080000
753
+ DTEND;TZID=Europe/Berlin:20190304T083000
754
+ DTSTAMP:20190303T111937
755
+ UID:UYDQSG9TH4DE0WM3QFL2J
756
+ CREATED:20190303T111937
757
+ LAST-MODIFIED:20190303T111937
758
+ END:VEVENT
759
+ ```
760
+
761
+ We can concatenate calendars and pipe them into `ics-query`.
762
+ In the example below, we get all events that happen right now in two calendars.
763
+
764
+ ```shell
765
+ $ cat calendar1.ics calendar2.ics | ics-query at `date +%Y%m%d%H%M%S` - -
766
+ BEGIN:VEVENT
767
+ ...
768
+ ```
769
+
770
+ ### Events at Certain Times
771
+
772
+ You can query which events happen at certain times:
773
+
774
+ ```shell
775
+ ics-query at <date-time> calendar.ics -
776
+ ```
777
+
778
+ `<date-time>` can be built up: It can be a year, a month, a day, an hour, a minute or a second.
779
+
780
+ Please see the command documentation for more help:
781
+
782
+ ```shell
783
+ ics-query at --help
784
+ ics-query --help
785
+ ```
786
+
787
+ ### Events within a Time Span
788
+
789
+ You can query which events happen between certain times:
790
+
791
+ ```shell
792
+ ics-query between <start> <end> calendar.ics -
793
+ ics-query between <start> <duration> calendar.ics -
794
+ ```
795
+
796
+ Please see the command documentation for more help:
797
+
798
+ ```shell
799
+ ics-query between --help
800
+ ics-query --help
801
+ ```
802
+
803
+ ### Time Span Examples
804
+
805
+ This example returns the events within the next week:
806
+
807
+ ```shell
808
+ ics-query between `date +%Y%m%d` +7d calendar.ics -
809
+ ```
810
+
811
+ This example saves the events from the 1st of May 2024 to the 10th of June in
812
+ events.ics:
813
+
814
+ ```shell
815
+ ics-query between 2024-5-1 2024-6-10 calendar.ics events.ics
816
+ ```
817
+
818
+ In this example, you can check what is happening on New Years Eve 2025 around
819
+ midnight:
820
+
821
+ ```shell
822
+ ics-query between 2025-12-31T21:00 +6h calendar.ics events.ics
823
+ ```
824
+
825
+ ## Vision
826
+
827
+ This section shows where we would like to get to.
828
+
829
+ ### `ics-query at` - occurrences at certain times
717
830
 
718
831
  You can get all **events** that happen at a certain **day**.
719
832
 
@@ -733,33 +846,28 @@ You can get all **TODO**s that happen at in certain **month**.
733
846
  ics-query --components VTODO at 2029-12-24 calendar.ics
734
847
  ```
735
848
 
736
- ## `ics-query at` - time ranges
737
-
738
-
739
- ## `ics-query --output=count` - count occurrences
740
-
849
+ ### `ics-query at` - time ranges
741
850
 
742
- ## `ics-query --output=ics` - use ics as output (default)
851
+ ### `ics-query --output=count` - count occurrences
743
852
 
853
+ ### `ics-query --output=ics` - use ics as output (default)
744
854
 
745
- ## `ics-query --select-index` - reduce output size
855
+ ### `ics-query --select-index` - reduce output size
746
856
 
747
857
  Examples: `0,2,4` `0-10`
748
858
 
749
- ## `ics-query all` - the whole calendar
859
+ ### `ics-query all` - the whole calendar
750
860
 
751
- ## `ics-query between` - time ranges
861
+ ### `ics-query between` - time ranges
752
862
 
753
863
  ```shell
754
864
  ics-query between dt dt
755
865
  ics-query between dt duration
756
866
  ```
757
867
 
758
- ## `ics-query --select-component` - filter for components
759
-
760
-
761
- ## `ics-query --select-uid` - filter by uid
868
+ ### `ics-query --select-component` - filter for components
762
869
 
870
+ ### `ics-query --select-uid` - filter by uid
763
871
 
764
872
  ## How to edit an event
765
873
 
@@ -787,8 +895,102 @@ Examples:
787
895
  - There are x events today
788
896
  - Please write a journal entry!
789
897
 
898
+ ## Version Fixing
899
+
900
+ If you use this library in your code, you may want to make sure that
901
+ updates can be received but they do not break your code.
902
+ The version numbers are handeled this way: `a.b.c` example: `0.1.12`
903
+
904
+ - `c` is changed for each minor bug fix.
905
+ - `b` is changed whenever new features are added.
906
+ - `a` is changed when the interface or major assumptions change that may break your code.
907
+
908
+ So, I recommend to version-fix this library to stay with the same `a`
909
+ while `b` and `c` can change.
910
+
911
+ ## Development
912
+
913
+ This section should set you up for development.
914
+
915
+ ### Testing
916
+
917
+ This project's development is driven by tests.
918
+ Tests assure a consistent interface and less knowledge lost over time.
919
+ If you like to change the code, tests help that nothing breaks in the future.
920
+ They are required in that sense.
921
+ Example code and ics files can be transferred into tests and speed up fixing bugs.
922
+
923
+ You can view the tests in the [test folder](https://github.com/niccokunzmann/ics-query/tree/main/ics_query/tests)
924
+ If you have a calendar ICS file for which this library does not
925
+ generate the desired output, you can add it to the ``test/calendars``
926
+ folder and write tests for what you expect.
927
+ If you like, [open an issue](https://github.com/niccokunzmann/ics-query/issues) first, e.g. to discuss the changes and
928
+ how to go about it.
929
+
930
+ To run the tests, we use `tox`.
931
+ `tox` tests all different Python versions which we want to be compatible to.
932
+
933
+ ```shell
934
+ pip3 install tox
935
+ ```
936
+
937
+ To run all the tests:
938
+
939
+ ```shell
940
+ tox
941
+ ```
942
+
943
+ To run the tests in a specific Python version:
944
+
945
+ ```shell
946
+ tox -e py39
947
+ ```
948
+
949
+ We use ``ruff`` to format the code.
950
+ Run this to format the code and show problems:
951
+
952
+ ```shell
953
+ tox -e ruff
954
+ ```
955
+
956
+ ### New Release
957
+
958
+ To release new versions,
959
+
960
+ 1. edit the Changelog Section
961
+ 2. create a commit and push it
962
+ 3. wait for [GitHub Actions](https://github.com/niccokunzmann/ics-query/actions) to finish the build
963
+ 4. create a tag and push it
964
+
965
+ ```shell
966
+ git tag v0.1.0a
967
+ git push origin v0.1.0a
968
+ ```
969
+
970
+ 5. Notify the issues about their release
971
+
790
972
  ## Changelog
791
973
 
974
+ - v0.2.0a
975
+
976
+ - Add `ics-query first <calendar> <output>` for earliest occurrences
977
+ - Add `ics-query between <span_start> <span_stop> <calendar> <output>` to query time ranges
978
+
979
+ - v0.1.1a
980
+
981
+ - Add `--version`
982
+ - Add `ics-query at <date> <calendar> <output>`
983
+ - Add support for multiple calendars in one input
984
+
985
+ - v0.1.0a
986
+
987
+ - Update Python version compatibility
988
+ - Add development documentation
989
+
792
990
  - v0.0.1a
793
991
 
794
992
  - first version
993
+
994
+ ## Related Work
995
+
996
+ - [icalBuddy](https://hasseg.org/icalBuddy/)
@@ -0,0 +1,30 @@
1
+ ics_query/__init__.py,sha256=YxyZzqxwfA77sBVFjUyUj3_fvR2gL3bs0pkE93prRFY,216
2
+ ics_query/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
3
+ ics_query/_version.py,sha256=uRzu9Kl96sLvzy9j33tEqvTz_UjQeHK61WNjh5la-qA,413
4
+ ics_query/cli.py,sha256=230EXFOKdZYXrJhRlpuqKle30H6DxrVhNTqU5uWF1uk,12372
5
+ ics_query/parse.py,sha256=mq6d1m7ITiEqD901nu54yvnYfY4U71J8_l5c9JdlPZ8,1730
6
+ ics_query/version.py,sha256=LgqmHh_dcmWi9HMxfWJ8OhfmbzWsBTq3h08jIE18pYM,468
7
+ ics_query/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ ics_query/tests/conftest.py,sha256=MGwKXod7sFfepXK0mtvKkR8SaIiI1SZNW_rAhz6aSA0,2258
9
+ ics_query/tests/test_command_line.py,sha256=-XnpYWETEVEc1dJ5_dpd8dqBoMQFz1CyGaSoe_ETq5o,488
10
+ ics_query/tests/test_parse_date.py,sha256=vVOj5bBvYel3euKmuBMy2v-uhpMDnC03OVcjyahhXPE,2100
11
+ ics_query/tests/test_parse_timedelta.py,sha256=wsAdfyagfndkZXX-KfAVDf4Ui2o2hcSu_yoUeyKuSuo,784
12
+ ics_query/tests/runs/at 2019-03-04 multiple-calendars.ics -.run,sha256=Cyeg9DMK6BibiCwkM8nW0ZtULUYSZFIgDvKRlSo_jTw,482
13
+ ics_query/tests/runs/at 2019-03-04 one-event-twice.ics -.run,sha256=hc-0yJhWpnSVzPNB_0_tJfR6dskNMm9xdbHeAhsX1zI,452
14
+ ics_query/tests/runs/at 2019-03-04 one-event.ics -.run,sha256=GVVmVpqzFjQLw2_RuhxnVTpCnwflNqeWbkFZ6u5WXxA,226
15
+ ics_query/tests/runs/at 2019-03-07 multiple-calendars.ics -.run,sha256=ZlLXxPMIai7vvmQTL4NyXJwdCQzoU1scEn_FpjmkkUA,256
16
+ ics_query/tests/runs/between 20240823 4d recurring-work-events.ics -.run,sha256=2_sM7CkSW4SDk6wbwyLURZ8WZm2rT0hgmx1k7O07T3M,574
17
+ ics_query/tests/runs/first empty-calendar.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ ics_query/tests/runs/first empty-file.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ ics_query/tests/runs/first recurring-work-events.ics -.run,sha256=-mGNYgI4vBSkBMMJ0WCYdkg97JpnOJ64rlaqdSKCi2Y,287
20
+ ics_query/tests/runs/calendars/empty-calendar.ics,sha256=78162P3KYUj6Qhbdnjsm3E84jv--_--p5U0h_jovrpw,153
21
+ ics_query/tests/runs/calendars/empty-file.ics,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ ics_query/tests/runs/calendars/multiple-calendars.ics,sha256=lS1Q9eSPpzLs2TRDKUiwF9HmpnJMw8xqjLudA0-KtY4,1516
23
+ ics_query/tests/runs/calendars/one-event-twice.ics,sha256=GZ5wE-U4kjO91N2nIaLsYZpSOLvQTjkoLPI6saMocOM,1450
24
+ ics_query/tests/runs/calendars/one-event.ics,sha256=-uwohttEzg-jsTETNb6tQ5dO9PE3DXzlicwRiXJs1KQ,725
25
+ ics_query/tests/runs/calendars/recurring-work-events.ics,sha256=4ASS_-xZl2pVv1kZ7nDOU9jpkmbo4zJC2KEAgHtpsNU,5115
26
+ ics_query-0.2.0a0.dist-info/METADATA,sha256=XC_fP8LNXU151JQdT-irzijqZO2nKCiFsCqwqGhif1I,49120
27
+ ics_query-0.2.0a0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
28
+ ics_query-0.2.0a0.dist-info/entry_points.txt,sha256=Jq_39vCKVOkNZjL7Wngf_04V_n_QRszLgLT2CbJKiH4,49
29
+ ics_query-0.2.0a0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
30
+ ics_query-0.2.0a0.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- ics_query/__init__.py,sha256=YxyZzqxwfA77sBVFjUyUj3_fvR2gL3bs0pkE93prRFY,216
2
- ics_query/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
3
- ics_query/_version.py,sha256=lI2AbAnFrmlrT0e_rrLW0sxbHP3fZzYfncKr1OGEhdw,419
4
- ics_query/cli.py,sha256=P6eLIH7hgbfwhbJHloilHS9ut_YDjEP_QDabLTf0NQs,2367
5
- ics_query/parse.py,sha256=6bCKtY39jr2NFSsqspVyGn32pwn6bMoEqJMHE26Ap1o,261
6
- ics_query/version.py,sha256=LgqmHh_dcmWi9HMxfWJ8OhfmbzWsBTq3h08jIE18pYM,468
7
- ics_query/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- ics_query/tests/conftest.py,sha256=A6R9pB3emaSo1DAIxyt-5QhWPq8LbsOoWJIRIsku2Zk,2003
9
- ics_query/tests/test_command_line.py,sha256=bIJp2SCVW8MXF_lNZ1ol9A-r9Y_9zjnY2jhdTJET59g,283
10
- ics_query/tests/runs/at 2019-03-04 one-event.ics -.run,sha256=GVVmVpqzFjQLw2_RuhxnVTpCnwflNqeWbkFZ6u5WXxA,226
11
- ics_query/tests/runs/calendars/one-event.ics,sha256=-uwohttEzg-jsTETNb6tQ5dO9PE3DXzlicwRiXJs1KQ,725
12
- ics_query-0.1.dev8.dist-info/METADATA,sha256=5jVr-o3Elo_hWgEjN-t3GFB5fAd65JSyw23Tp2JvBZc,43902
13
- ics_query-0.1.dev8.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
14
- ics_query-0.1.dev8.dist-info/entry_points.txt,sha256=Jq_39vCKVOkNZjL7Wngf_04V_n_QRszLgLT2CbJKiH4,49
15
- ics_query-0.1.dev8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
16
- ics_query-0.1.dev8.dist-info/RECORD,,