ics-query 0.2.0a0__py3-none-any.whl → 0.3.0b0__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.2.0a0
3
+ Version: 0.3.0b0
4
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/c7eeb503fae7da069308a27a37232be96851c3e5.zip
7
+ Project-URL: source_archive, https://github.com/niccokunzmann/ics-query/archive/8a23bc5bc6e89064a99de1e57afdcd94c180181c.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
@@ -686,7 +686,7 @@ License: GNU GENERAL PUBLIC LICENSE
686
686
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
687
687
  License-File: LICENSE
688
688
  Keywords: calendar,command line,icalendar,ics,rfc5545,scheduling
689
- Classifier: Development Status :: 3 - Alpha
689
+ Classifier: Development Status :: 4 - Beta
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
@@ -699,6 +699,7 @@ Requires-Python: >=3.9
699
699
  Requires-Dist: click
700
700
  Requires-Dist: icalendar
701
701
  Requires-Dist: recurring-ical-events<4,>=3.2.0
702
+ Requires-Dist: x-wr-timezone
702
703
  Provides-Extra: test
703
704
  Requires-Dist: pytest; extra == 'test'
704
705
  Description-Content-Type: text/markdown
@@ -767,15 +768,33 @@ BEGIN:VEVENT
767
768
  ...
768
769
  ```
769
770
 
771
+ #### Piping calendars
772
+
773
+ You can pipe one or more calendars into the input.
774
+
775
+ ```shell
776
+ cat calendar.ics | ics-query first -
777
+ ```
778
+
770
779
  ### Events at Certain Times
771
780
 
772
781
  You can query which events happen at certain times:
773
782
 
774
783
  ```shell
775
- ics-query at <date-time> calendar.ics -
784
+ ics-query at TIME calendar.ics -
776
785
  ```
777
786
 
778
- `<date-time>` can be built up: It can be a year, a month, a day, an hour, a minute or a second.
787
+ The format of TIME:
788
+
789
+ | TIME | description |
790
+ | ------- | ----------- |
791
+ | `2019` | the whole year 2019 |
792
+ | `2019-08` | August 2019 |
793
+ | `2019-08-12` | 12th of August 2019 |
794
+ | `2019-08-12T17` | 17:00-18:00 at the 12th of August 2019 |
795
+ | `2019-08-12T17:20` | 17:20-17:21 at the 12th of August 2019 |
796
+ | `2019-08-12T17:20:00` | 17:20 at the 12th of August 2019 |
797
+
779
798
 
780
799
  Please see the command documentation for more help:
781
800
 
@@ -784,13 +803,31 @@ ics-query at --help
784
803
  ics-query --help
785
804
  ```
786
805
 
806
+ You can get all **events** that happen at a certain **day**.
807
+
808
+ ```shell
809
+ ics-query at --components VEVENT 2029-12-24 calendar.ics
810
+ ```
811
+
812
+ You can get all **events** that happen **today**.
813
+
814
+ ```shell
815
+ ics-query at --components VEVENT `date +%Y-%m-%d` calendar.ics
816
+ ```
817
+
818
+ You can get all **TODO**s that happen at in certain **month**.
819
+
820
+ ```shell
821
+ ics-query at --components VTODO 2029-12-24 calendar.ics
822
+ ```
823
+
787
824
  ### Events within a Time Span
788
825
 
789
826
  You can query which events happen between certain times:
790
827
 
791
828
  ```shell
792
- ics-query between <start> <end> calendar.ics -
793
- ics-query between <start> <duration> calendar.ics -
829
+ ics-query between START END calendar.ics -
830
+ ics-query between START DURATION calendar.ics -
794
831
  ```
795
832
 
796
833
  Please see the command documentation for more help:
@@ -800,100 +837,130 @@ ics-query between --help
800
837
  ics-query --help
801
838
  ```
802
839
 
840
+ The format of START and END with examples:
841
+
842
+ | START or END | Description |
843
+ | ------- | ----------- |
844
+ | `2019` | the whole year 2019 |
845
+ | `2019-08` | August 2019 |
846
+ | `2019-08-12` | 12th of August 2019 |
847
+ | `2019-08-12T17` | 17:00-18:00 at the 12th of August 2019 |
848
+ | `2019-08-12T17:20` | 17:20-17:21 at the 12th of August 2019 |
849
+ | `2019-08-12T17:20:00` | 17:20 at the 12th of August 2019 |
850
+
851
+ Instead of an absolute time, you can specify a duration after the START.
852
+ The `+` is optional.
853
+
854
+ | DURATION | Description |
855
+ | ------- | ----------- |
856
+ | `+1d` | one more day |
857
+ | `+1h` | one more hour |
858
+ | `+1m` | one more minute |
859
+ | `+1s` | one more second |
860
+ | `+3600s` | one more hour or 3600 seconds |
861
+ | `+5d10h` | five more days and 10 more hours |
862
+
803
863
  ### Time Span Examples
804
864
 
805
- This example returns the events within the next week:
865
+ This example returns the occurrences within the **next week**:
806
866
 
807
867
  ```shell
808
868
  ics-query between `date +%Y%m%d` +7d calendar.ics -
809
869
  ```
810
870
 
811
- This example saves the events from the 1st of May 2024 to the 10th of June in
871
+ This example saves the **events** from the **1st of May 2024 to the 10th of June** in
812
872
  events.ics:
813
873
 
814
874
  ```shell
815
- ics-query between 2024-5-1 2024-6-10 calendar.ics events.ics
875
+ ics-query between --component VEVENT 2024-5-1 2024-6-10 calendar.ics events.ics
816
876
  ```
817
877
 
818
- In this example, you can check what is happening on New Years Eve 2025 around
878
+ In this example, you can check what is happening on **New Years Eve 2025** around
819
879
  midnight:
820
880
 
821
881
  ```shell
822
882
  ics-query between 2025-12-31T21:00 +6h calendar.ics events.ics
823
883
  ```
824
884
 
825
- ## Vision
826
-
827
- This section shows where we would like to get to.
828
-
829
- ### `ics-query at` - occurrences at certain times
885
+ ### `ics-query all` - the whole calendar
830
886
 
831
- You can get all **events** that happen at a certain **day**.
887
+ You can get everything that is happening in a calendar but that can be a lot!
832
888
 
833
889
  ```shell
834
- ics-query --components VEVENT at 2029-12-24 calendar.ics
890
+ ics-query all calendar.ics
835
891
  ```
836
892
 
837
- You can get all **events** that happen **today**.
893
+ ### Filtering Components
838
894
 
839
- ```shell
840
- ics-query --components VEVENT at `date +%Y-%m-%d` calendar.ics
841
- ```
895
+ We support different component types: VEVENT, VJOURNAL and VTODO.
896
+ By default, we include all types in the result.
842
897
 
843
- You can get all **TODO**s that happen at in certain **month**.
898
+ You can specify which components you would like to get using the
899
+ `--component` or `-c` parameter.
844
900
 
845
901
  ```shell
846
- ics-query --components VTODO at 2029-12-24 calendar.ics
902
+ -c VEVENT # only events
903
+ -c VTODO # only TODOs
904
+ -c VJOURNAL # only journal entries
905
+ -c VEVENT -v VTODO # only events and journal entries
847
906
  ```
848
907
 
849
- ### `ics-query at` - time ranges
908
+ This example returns the first event of a calendar.
850
909
 
851
- ### `ics-query --output=count` - count occurrences
910
+ ```shell
911
+ ics-query first -c VEVENT calendar.ics -
912
+ ```
852
913
 
853
- ### `ics-query --output=ics` - use ics as output (default)
914
+ This is also available as `ICS_QUERY_COMPONENT` variable.
854
915
 
855
- ### `ics-query --select-index` - reduce output size
916
+ ```shell
917
+ export ICS_QUERY_COMPONENT=VEVENT
918
+ # from now on, you will get only events
919
+ ics-query first calendar.ics
920
+ ```
856
921
 
857
- Examples: `0,2,4` `0-10`
922
+ ### Timezones
858
923
 
859
- ### `ics-query all` - the whole calendar
924
+ You can set the timezone of the query, otherwise the event's local timezone is used and you
925
+ might miss events in your own timezone.
860
926
 
861
- ### `ics-query between` - time ranges
927
+ The first event at New Year 2000 in the **event's local time**:
862
928
 
863
929
  ```shell
864
- ics-query between dt dt
865
- ics-query between dt duration
930
+ ics-query at 2000-01-01 calendar.ics
866
931
  ```
867
932
 
868
- ### `ics-query --select-component` - filter for components
933
+ The first event at New Year 2000 in **your local time**:
869
934
 
870
- ### `ics-query --select-uid` - filter by uid
935
+ ```shell
936
+ ics-query at --tz=localtime 2000-01-01 calendar.ics
937
+ ```
871
938
 
872
- ## How to edit an event
939
+ The first event at New Year 2000 in **UTC**:
873
940
 
874
- To edit a component like an event, you can append it to the calendar and increase the sequence number.
941
+ ```shell
942
+ ics-query at --tz=UTC 2000-01-01 calendar.ics
943
+ ```
875
944
 
876
- Example:
945
+ The first event at New Year 2000 in **Berlin time**:
877
946
 
878
- 1. get the first event `--select-index=0` TODO: recurring-ical-events: set recurrence-id, sequence number
879
- 2. change the summary
880
- 3. increase sequence number
881
- 4. add the event to the end of the calendar file
882
- 5. show that the occurrence has changed
947
+ ```shell
948
+ ics-query at --tz=Europe/Berlin 2000-01-01 calendar.ics
949
+ ```
883
950
 
884
- ## Piping calendars
951
+ You can also use the `ICS_QUERY_TZ` variable.
885
952
 
886
953
  ```shell
887
- cat calendar.ics | ics-query --output=count --filter-component=VEVENT all > calendar-event-count.int
954
+ export ICS_QUERY_TZ=localtime
955
+ # from now on, we use your local time
956
+ ics-query at 2000-01-01 calendar.ics
888
957
  ```
889
958
 
890
- ## Notifications
959
+ For all avaiable timezones see:
891
960
 
892
- Examples:
893
-
894
- - There are x todos in the next hour
895
- - There are x events today
896
- - Please write a journal entry!
961
+ ```shell
962
+ ics-query --available-timezones
963
+ ```
897
964
 
898
965
  ## Version Fixing
899
966
 
@@ -971,6 +1038,15 @@ To release new versions,
971
1038
 
972
1039
  ## Changelog
973
1040
 
1041
+ - v0.3.0b
1042
+
1043
+ - Add `--tz` timezone parameter
1044
+ - Add `ics-query all` to get all occurrences
1045
+
1046
+ - v0.2.1a
1047
+
1048
+ - Add `--component` to filter component types VEVENT, VJOURNAL and VTODO
1049
+
974
1050
  - v0.2.0a
975
1051
 
976
1052
  - Add `ics-query first <calendar> <output>` for earliest occurrences
@@ -994,3 +1070,35 @@ To release new versions,
994
1070
  ## Related Work
995
1071
 
996
1072
  - [icalBuddy](https://hasseg.org/icalBuddy/)
1073
+
1074
+ ## Vision
1075
+
1076
+ This section shows where we would like to get to.
1077
+
1078
+ ### `ics-query --select-index` - reduce output size
1079
+
1080
+ Examples: `0,2,4` `0-10`
1081
+
1082
+
1083
+ ### `ics-query --select-uid` - filter by uid
1084
+
1085
+ ### How to edit an event
1086
+
1087
+ To edit a component like an event, you can append it to the calendar and increase the sequence number.
1088
+
1089
+ Example:
1090
+
1091
+ 1. get the event `--select-index=0`
1092
+ 2. change the summary
1093
+ 3. increase sequence number
1094
+ 4. add the event to the end of the calendar file
1095
+ 5. show that the occurrence has changed
1096
+
1097
+
1098
+ ### Notifications
1099
+
1100
+ Examples:
1101
+
1102
+ - There are x todos in the next hour
1103
+ - There are x events today
1104
+ - Please write a journal entry!
@@ -1,30 +1,43 @@
1
- ics_query/__init__.py,sha256=YxyZzqxwfA77sBVFjUyUj3_fvR2gL3bs0pkE93prRFY,216
1
+ ics_query/__init__.py,sha256=CN48ECsXCq2OzZ4Waj1_0j4oTxUUjH5NFfnaYYma7NY,232
2
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
3
+ ics_query/_version.py,sha256=B-4CcxJgND-NHNJ8i5tcgV-dwWIrZ-oQkFxWpPZ9MR8,413
4
+ ics_query/cli.py,sha256=xLZSIrszPAWAseLtapwKxYQ5pUbiKDBrTulu0zErIDc,18175
5
5
  ics_query/parse.py,sha256=mq6d1m7ITiEqD901nu54yvnYfY4U71J8_l5c9JdlPZ8,1730
6
- ics_query/version.py,sha256=LgqmHh_dcmWi9HMxfWJ8OhfmbzWsBTq3h08jIE18pYM,468
6
+ ics_query/query.py,sha256=Y8e_sZygp4bkBznqH20duw-QVWmV_TARzaMANWcwHTg,1717
7
+ ics_query/version.py,sha256=6dSmmmajuyZaNKL8nJBk6jUaebuZaNKO_dsQerNrbo0,828
7
8
  ics_query/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
9
  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_command_line.py,sha256=6JYWqMqm0CmBfBQVBXzTXlbnNoY0-ju4cKNk541jSnI,902
10
11
  ics_query/tests/test_parse_date.py,sha256=vVOj5bBvYel3euKmuBMy2v-uhpMDnC03OVcjyahhXPE,2100
11
12
  ics_query/tests/test_parse_timedelta.py,sha256=wsAdfyagfndkZXX-KfAVDf4Ui2o2hcSu_yoUeyKuSuo,784
13
+ ics_query/tests/runs/all --tz Singapore one-event.ics -.run,sha256=sWF9T4kKzhnZYrgidUX5sgdJ5q95q1gp9vd8X65bIdk,218
14
+ ics_query/tests/runs/all three-events.ics -.run,sha256=gdcQ-LKaM0Bpre06txuoTTk2WYIh4Qe2-v0weO2Ckkc,768
12
15
  ics_query/tests/runs/at 2019-03-04 multiple-calendars.ics -.run,sha256=Cyeg9DMK6BibiCwkM8nW0ZtULUYSZFIgDvKRlSo_jTw,482
13
16
  ics_query/tests/runs/at 2019-03-04 one-event-twice.ics -.run,sha256=hc-0yJhWpnSVzPNB_0_tJfR6dskNMm9xdbHeAhsX1zI,452
14
17
  ics_query/tests/runs/at 2019-03-04 one-event.ics -.run,sha256=GVVmVpqzFjQLw2_RuhxnVTpCnwflNqeWbkFZ6u5WXxA,226
15
18
  ics_query/tests/runs/at 2019-03-07 multiple-calendars.ics -.run,sha256=ZlLXxPMIai7vvmQTL4NyXJwdCQzoU1scEn_FpjmkkUA,256
19
+ ics_query/tests/runs/at 2024-08-20 Berlin-Los-Angeles.ics -.run,sha256=KzQaFp65wntWfEu4fQwr3iH1kE-ooEmslA4UeA9-gkc,643
16
20
  ics_query/tests/runs/between 20240823 4d recurring-work-events.ics -.run,sha256=2_sM7CkSW4SDk6wbwyLURZ8WZm2rT0hgmx1k7O07T3M,574
21
+ ics_query/tests/runs/first -c VJOURNAL -c VEVENT one-event.ics -.run,sha256=GVVmVpqzFjQLw2_RuhxnVTpCnwflNqeWbkFZ6u5WXxA,226
22
+ ics_query/tests/runs/first -c VJOURNAL one-event.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ ics_query/tests/runs/first -c VJOURNAL simple-journal.ics -.run,sha256=Av_N2nsE2sfku6owvJwguQ53699C-GTHV5tWS8j5mZ4,370
24
+ ics_query/tests/runs/first -c VTODO -c VJOURNAL simple-todo.ics -.run,sha256=-mcQWZIxMcIdSMOeHpdzAWDLXseGULNHOoGhy6ca8J0,224
25
+ ics_query/tests/runs/first -c VTODO simple-todo.ics -.run,sha256=-mcQWZIxMcIdSMOeHpdzAWDLXseGULNHOoGhy6ca8J0,224
17
26
  ics_query/tests/runs/first empty-calendar.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
27
  ics_query/tests/runs/first empty-file.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
28
  ics_query/tests/runs/first recurring-work-events.ics -.run,sha256=-mGNYgI4vBSkBMMJ0WCYdkg97JpnOJ64rlaqdSKCi2Y,287
29
+ ics_query/tests/runs/calendars/Berlin-Los-Angeles.ics,sha256=_FFRUurDU_q7G8d8lSvfbCy3y1XvujaclLXei6GrW5U,9107
20
30
  ics_query/tests/runs/calendars/empty-calendar.ics,sha256=78162P3KYUj6Qhbdnjsm3E84jv--_--p5U0h_jovrpw,153
21
31
  ics_query/tests/runs/calendars/empty-file.ics,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
32
  ics_query/tests/runs/calendars/multiple-calendars.ics,sha256=lS1Q9eSPpzLs2TRDKUiwF9HmpnJMw8xqjLudA0-KtY4,1516
23
33
  ics_query/tests/runs/calendars/one-event-twice.ics,sha256=GZ5wE-U4kjO91N2nIaLsYZpSOLvQTjkoLPI6saMocOM,1450
24
34
  ics_query/tests/runs/calendars/one-event.ics,sha256=-uwohttEzg-jsTETNb6tQ5dO9PE3DXzlicwRiXJs1KQ,725
25
35
  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,,
36
+ ics_query/tests/runs/calendars/simple-journal.ics,sha256=U6_YMQM6EHwPDaszWgJDo-pR4WIqbJx8CRlHg4iu9zA,457
37
+ ics_query/tests/runs/calendars/simple-todo.ics,sha256=l9uHQD4eyiCE8STvd2tj5lAVaBrqUtpF_M8Pv6yf1es,327
38
+ ics_query/tests/runs/calendars/three-events.ics,sha256=YvPfthOzMCR0DQhGR6uj_1Bltgax3uA1ETlkI4JUI08,828
39
+ ics_query-0.3.0b0.dist-info/METADATA,sha256=64fCboXNTqb7V0KEzrvbSU1s7axOn5PJn-r4u3xtKfw,51589
40
+ ics_query-0.3.0b0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
41
+ ics_query-0.3.0b0.dist-info/entry_points.txt,sha256=Jq_39vCKVOkNZjL7Wngf_04V_n_QRszLgLT2CbJKiH4,49
42
+ ics_query-0.3.0b0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
43
+ ics_query-0.3.0b0.dist-info/RECORD,,