ics-query 0.0.1a0__py3-none-any.whl → 0.1.dev1__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.
- ics_query/__init__.py +18 -2
- ics_query/__main__.py +15 -0
- ics_query/_version.py +2 -2
- ics_query/cli.py +620 -18
- ics_query/parse.py +78 -4
- ics_query/query.py +78 -0
- ics_query/tests/conftest.py +68 -20
- ics_query/tests/runs/all --tz Singapore one-event.ics -.run +9 -0
- ics_query/tests/runs/all three-events.ics -.run +33 -0
- ics_query/tests/runs/at 2019-03-04 multiple-calendars.ics -.run +20 -0
- ics_query/tests/runs/at 2019-03-04 one-event-twice.ics -.run +18 -0
- ics_query/tests/runs/at 2019-03-07 multiple-calendars.ics -.run +11 -0
- ics_query/tests/runs/at 2024-08-20 Berlin-Los-Angeles.ics -.run +23 -0
- ics_query/tests/runs/between 20240823 4d recurring-work-events.ics -.run +24 -0
- ics_query/tests/runs/calendars/Berlin-Los-Angeles.ics +381 -0
- ics_query/tests/runs/calendars/empty-calendar.ics +7 -0
- ics_query/tests/runs/calendars/empty-file.ics +0 -0
- ics_query/tests/runs/calendars/multiple-calendars.ics +71 -0
- ics_query/tests/runs/calendars/one-event-twice.ics +68 -0
- ics_query/tests/runs/calendars/one-event-without-timezone.ics +14 -0
- ics_query/tests/runs/calendars/recurring-work-events.ics +223 -0
- ics_query/tests/runs/calendars/simple-journal.ics +15 -0
- ics_query/tests/runs/calendars/simple-todo.ics +15 -0
- ics_query/tests/runs/calendars/three-events.ics +37 -0
- ics_query/tests/runs/first -c VJOURNAL -c VEVENT one-event.ics -.run +9 -0
- ics_query/tests/runs/first -c VJOURNAL one-event.ics -.run +0 -0
- ics_query/tests/runs/first -c VJOURNAL simple-journal.ics -.run +12 -0
- ics_query/tests/runs/first -c VTODO -c VJOURNAL simple-todo.ics -.run +10 -0
- ics_query/tests/runs/first -c VTODO simple-todo.ics -.run +10 -0
- ics_query/tests/runs/first empty-calendar.ics -.run +0 -0
- ics_query/tests/runs/first empty-file.ics -.run +0 -0
- ics_query/tests/runs/first recurring-work-events.ics -.run +12 -0
- ics_query/tests/test_command_line.py +62 -0
- ics_query/tests/test_parse_date.py +81 -0
- ics_query/tests/test_parse_timedelta.py +40 -0
- ics_query/version.py +36 -3
- {ics_query-0.0.1a0.dist-info → ics_query-0.1.dev1.dist-info}/METADATA +443 -39
- ics_query-0.1.dev1.dist-info/RECORD +44 -0
- ics_query-0.0.1a0.dist-info/RECORD +0 -16
- {ics_query-0.0.1a0.dist-info → ics_query-0.1.dev1.dist-info}/WHEEL +0 -0
- {ics_query-0.0.1a0.dist-info → ics_query-0.1.dev1.dist-info}/entry_points.txt +0 -0
- {ics_query-0.0.1a0.dist-info → ics_query-0.1.dev1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ics-query
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Find out what happens in ICS calendar files - query and filter RFC 5545 compatible
|
|
3
|
+
Version: 0.1.dev1
|
|
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/
|
|
7
|
+
Project-URL: source_archive, https://github.com/niccokunzmann/ics-query/archive/32d7474b3079da3e7ff40136067b4f68586e7a0e.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,100 +686,502 @@ 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 ::
|
|
689
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
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.
|
|
696
|
-
Requires-Dist: click
|
|
697
|
-
Requires-Dist: icalendar
|
|
698
|
-
Requires-Dist:
|
|
698
|
+
Requires-Python: >=3.9
|
|
699
|
+
Requires-Dist: click==8.1.7
|
|
700
|
+
Requires-Dist: icalendar==6.0.0
|
|
701
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
702
|
+
Requires-Dist: recurring-ical-events==3.3.2
|
|
703
|
+
Requires-Dist: six==1.16.0
|
|
704
|
+
Requires-Dist: tzdata==2024.2
|
|
705
|
+
Requires-Dist: tzlocal==5.2
|
|
706
|
+
Requires-Dist: x-wr-timezone==1.0.1
|
|
699
707
|
Provides-Extra: test
|
|
700
708
|
Requires-Dist: pytest; extra == 'test'
|
|
701
709
|
Description-Content-Type: text/markdown
|
|
702
710
|
|
|
703
711
|
# ics-query
|
|
704
712
|
|
|
713
|
+
[][GitHub Actions]
|
|
714
|
+
[][PyPI]
|
|
715
|
+
[][PyPI]
|
|
716
|
+
[][Open Collective]
|
|
717
|
+
[][Polar]
|
|
718
|
+
|
|
705
719
|
<!-- Change description also in pyproject.toml -->
|
|
706
720
|
Find out what happens in ICS calendar files - query and filter RFC 5545 compatible `.ics` files for events, journals, TODOs and more.
|
|
707
721
|
|
|
708
722
|
## Installation
|
|
709
723
|
|
|
710
|
-
You can install this package from the [PyPI]
|
|
724
|
+
You can install this package from the [PyPI].
|
|
711
725
|
|
|
712
726
|
```shell
|
|
713
727
|
pip install ics-query
|
|
714
728
|
```
|
|
715
729
|
|
|
716
|
-
|
|
730
|
+
For **Windows**, you can download `ics-query.exe` from our [Releases].
|
|
731
|
+
|
|
732
|
+
## Support
|
|
733
|
+
|
|
734
|
+
- Support using [GitHub Sponsors]
|
|
735
|
+
- Fund specific issues using [Polar]
|
|
736
|
+
- Support using [Open Collective]
|
|
737
|
+
- Support using [thanks.dev]
|
|
738
|
+
|
|
739
|
+
We accept donations to sustain our work, once or regular.
|
|
740
|
+
Consider donating money to open-source as everyone benefits.
|
|
741
|
+
|
|
742
|
+
## Supported Features
|
|
743
|
+
|
|
744
|
+
This library is based on
|
|
745
|
+
|
|
746
|
+
- [recurring-ical-events]
|
|
747
|
+
- [icalendar]
|
|
748
|
+
- [x-wr-timezone]
|
|
749
|
+
|
|
750
|
+
[recurring-ical-events]: https://pypi.org/project/recurring-ical-events/
|
|
751
|
+
[icalendar]: https://pypi.org/project/icalendar/
|
|
752
|
+
[x-wr-timezone]: https://pypi.org/project/x-wr-timezone/
|
|
753
|
+
|
|
754
|
+
For a list of supported features and RFC compatibility,
|
|
755
|
+
please refer to their documentation, too.
|
|
756
|
+
|
|
757
|
+
## Usage
|
|
758
|
+
|
|
759
|
+
`ics-query` is a command line tool that aims to make icalendar occurance calculations
|
|
760
|
+
accessible and easy.
|
|
761
|
+
This section walks you though the different functionalities.
|
|
762
|
+
|
|
763
|
+
```shell
|
|
764
|
+
ics-query --help
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
### Examples
|
|
768
|
+
|
|
769
|
+
You can get a calendar from the web and see what is on.
|
|
770
|
+
In this example, we show which German National Holidays happening in August 2024:
|
|
771
|
+
|
|
772
|
+
```shell
|
|
773
|
+
$ wget -qO- 'https://www.calendarlabs.com/ical-calendar/ics/46/Germany_Holidays.ics' | ics-query at 2024-08 - -
|
|
774
|
+
BEGIN:VEVENT
|
|
775
|
+
SUMMARY:Assumption Day (BY\, SL)
|
|
776
|
+
DTSTART;VALUE=DATE:20240815
|
|
777
|
+
DTEND;VALUE=DATE:20240815
|
|
778
|
+
DTSTAMP:20231013T092513Z
|
|
779
|
+
UID:65290cf9326601697189113@calendarlabs.com
|
|
780
|
+
SEQUENCE:0
|
|
781
|
+
DESCRIPTION:Visit https://calendarlabs.com/holidays/us/the-assumption-of-m
|
|
782
|
+
ary.php to know more about Assumption Day (BY\, SL). \n\n Like us on Faceb
|
|
783
|
+
ook: http://fb.com/calendarlabs to get updates
|
|
784
|
+
LOCATION:Germany
|
|
785
|
+
STATUS:CONFIRMED
|
|
786
|
+
TRANSP:TRANSPARENT
|
|
787
|
+
END:VEVENT
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
In the following example, we query a calendar file and print the result.
|
|
791
|
+
|
|
792
|
+
```shell
|
|
793
|
+
$ ics-query at 2019-03-04 one-event.ics -
|
|
794
|
+
BEGIN:VEVENT
|
|
795
|
+
SUMMARY:test1
|
|
796
|
+
DTSTART;TZID=Europe/Berlin:20190304T080000
|
|
797
|
+
DTEND;TZID=Europe/Berlin:20190304T083000
|
|
798
|
+
DTSTAMP:20190303T111937
|
|
799
|
+
UID:UYDQSG9TH4DE0WM3QFL2J
|
|
800
|
+
CREATED:20190303T111937
|
|
801
|
+
LAST-MODIFIED:20190303T111937
|
|
802
|
+
END:VEVENT
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
We can concatenate calendars and pipe them into `ics-query`.
|
|
806
|
+
In the example below, we get all events that happen right now in two calendars.
|
|
807
|
+
|
|
808
|
+
```shell
|
|
809
|
+
$ cat calendar1.ics calendar2.ics | ics-query at `date +%Y%m%d%H%M%S` - -
|
|
810
|
+
BEGIN:VEVENT
|
|
811
|
+
...
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
#### Piping calendars
|
|
815
|
+
|
|
816
|
+
You can pipe one or more calendars into the input.
|
|
817
|
+
|
|
818
|
+
```shell
|
|
819
|
+
cat calendar.ics | ics-query first -
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### Events at Certain Times
|
|
823
|
+
|
|
824
|
+
You can query which events happen at certain times:
|
|
825
|
+
|
|
826
|
+
```shell
|
|
827
|
+
ics-query at TIME calendar.ics -
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
The format of TIME:
|
|
831
|
+
|
|
832
|
+
| TIME | description |
|
|
833
|
+
| ------- | ----------- |
|
|
834
|
+
| `2019` | the whole year 2019 |
|
|
835
|
+
| `2019-08` | August 2019 |
|
|
836
|
+
| `2019-08-12` | 12th of August 2019 |
|
|
837
|
+
| `2019-08-12T17` | 17:00-18:00 at the 12th of August 2019 |
|
|
838
|
+
| `2019-08-12T17:20` | 17:20-17:21 at the 12th of August 2019 |
|
|
839
|
+
| `2019-08-12T17:20:00` | 17:20 at the 12th of August 2019 |
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
Please see the command documentation for more help:
|
|
843
|
+
|
|
844
|
+
```shell
|
|
845
|
+
ics-query at --help
|
|
846
|
+
ics-query --help
|
|
847
|
+
```
|
|
717
848
|
|
|
718
849
|
You can get all **events** that happen at a certain **day**.
|
|
719
850
|
|
|
720
851
|
```shell
|
|
721
|
-
ics-query --components VEVENT
|
|
852
|
+
ics-query at --components VEVENT 2029-12-24 calendar.ics
|
|
722
853
|
```
|
|
723
854
|
|
|
724
855
|
You can get all **events** that happen **today**.
|
|
725
856
|
|
|
726
857
|
```shell
|
|
727
|
-
ics-query --components VEVENT
|
|
858
|
+
ics-query at --components VEVENT `date +%Y-%m-%d` calendar.ics
|
|
728
859
|
```
|
|
729
860
|
|
|
730
|
-
You can get all **TODO**s that happen
|
|
861
|
+
You can get all **TODO**s that happen in a certain **month**.
|
|
731
862
|
|
|
732
863
|
```shell
|
|
733
|
-
ics-query --components VTODO
|
|
864
|
+
ics-query at --components VTODO 2029-12-24 calendar.ics
|
|
734
865
|
```
|
|
735
866
|
|
|
736
|
-
|
|
867
|
+
### Events within a Time Span
|
|
737
868
|
|
|
869
|
+
You can query which events happen between certain times:
|
|
738
870
|
|
|
739
|
-
|
|
871
|
+
```shell
|
|
872
|
+
ics-query between START END calendar.ics -
|
|
873
|
+
ics-query between START DURATION calendar.ics -
|
|
874
|
+
```
|
|
740
875
|
|
|
876
|
+
Please see the command documentation for more help:
|
|
741
877
|
|
|
742
|
-
|
|
878
|
+
```shell
|
|
879
|
+
ics-query between --help
|
|
880
|
+
ics-query --help
|
|
881
|
+
```
|
|
743
882
|
|
|
883
|
+
The format of START and END with examples:
|
|
744
884
|
|
|
745
|
-
|
|
885
|
+
| START or END | Description |
|
|
886
|
+
| ------- | ----------- |
|
|
887
|
+
| `2019` | the whole year 2019 |
|
|
888
|
+
| `2019-08` | August 2019 |
|
|
889
|
+
| `2019-08-12` | 12th of August 2019 |
|
|
890
|
+
| `2019-08-12T17` | 17:00-18:00 at the 12th of August 2019 |
|
|
891
|
+
| `2019-08-12T17:20` | 17:20-17:21 at the 12th of August 2019 |
|
|
892
|
+
| `2019-08-12T17:20:00` | 17:20 at the 12th of August 2019 |
|
|
746
893
|
|
|
747
|
-
|
|
894
|
+
Instead of an absolute time, you can specify a duration after the START.
|
|
895
|
+
The `+` is optional.
|
|
896
|
+
|
|
897
|
+
| DURATION | Description |
|
|
898
|
+
| ------- | ----------- |
|
|
899
|
+
| `+1d` | one more day |
|
|
900
|
+
| `+1h` | one more hour |
|
|
901
|
+
| `+1m` | one more minute |
|
|
902
|
+
| `+1s` | one more second |
|
|
903
|
+
| `+3600s` | one more hour or 3600 seconds |
|
|
904
|
+
| `+5d10h` | five more days and 10 more hours |
|
|
905
|
+
|
|
906
|
+
### Time Span Examples
|
|
907
|
+
|
|
908
|
+
This example returns the occurrences within the **next week**:
|
|
909
|
+
|
|
910
|
+
```shell
|
|
911
|
+
ics-query between `date +%Y%m%d` +7d calendar.ics -
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
This example saves the **events** from the **1st of May 2024 to the 10th of June** in
|
|
915
|
+
events.ics:
|
|
916
|
+
|
|
917
|
+
```shell
|
|
918
|
+
ics-query between --component VEVENT 2024-5-1 2024-6-10 calendar.ics events.ics
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
In this example, you can check what is happening on **New Years Eve 2025** around
|
|
922
|
+
midnight:
|
|
923
|
+
|
|
924
|
+
```shell
|
|
925
|
+
ics-query between 2025-12-31T21:00 +6h calendar.ics events.ics
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
### `ics-query all` - the whole calendar
|
|
929
|
+
|
|
930
|
+
You can get everything that is happening in a calendar but that can be a lot!
|
|
931
|
+
|
|
932
|
+
```shell
|
|
933
|
+
ics-query all calendar.ics
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
### Filtering Components
|
|
937
|
+
|
|
938
|
+
We support different component types: `VEVENT`, `VJOURNAL` and `VTODO`.
|
|
939
|
+
By default, we include all types in the result.
|
|
940
|
+
|
|
941
|
+
You can specify which components you would like to get using the
|
|
942
|
+
`--component` or `-c` parameter.
|
|
943
|
+
|
|
944
|
+
```shell
|
|
945
|
+
-c VEVENT # only events
|
|
946
|
+
-c VTODO # only TODOs
|
|
947
|
+
-c VJOURNAL # only journal entries
|
|
948
|
+
-c VEVENT -c VTODO # only events and journal entries
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
This example returns the first event of a calendar.
|
|
952
|
+
|
|
953
|
+
```shell
|
|
954
|
+
ics-query first -c VEVENT calendar.ics -
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
This option is also available as `ICS_QUERY_COMPONENT` variable.
|
|
958
|
+
|
|
959
|
+
```shell
|
|
960
|
+
export ICS_QUERY_COMPONENT=VEVENT
|
|
961
|
+
# from now on, you will get only events
|
|
962
|
+
ics-query first calendar.ics
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
Please see the command documentation for more help:
|
|
966
|
+
|
|
967
|
+
```shell
|
|
968
|
+
ics-query --help
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
### Timezones
|
|
973
|
+
|
|
974
|
+
You can set the timezone of the query, otherwise the event's local timezone is used and you
|
|
975
|
+
might miss events in your own timezone.
|
|
976
|
+
|
|
977
|
+
The first event at New Year 2000 in the **event's local time**:
|
|
978
|
+
|
|
979
|
+
```shell
|
|
980
|
+
ics-query at 2000-01-01 calendar.ics
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
The first event at New Year 2000 in **your local time**:
|
|
984
|
+
|
|
985
|
+
```shell
|
|
986
|
+
ics-query at --tz=localtime 2000-01-01 calendar.ics
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
The first event at New Year 2000 in **UTC**:
|
|
990
|
+
|
|
991
|
+
```shell
|
|
992
|
+
ics-query at --tz=UTC 2000-01-01 calendar.ics
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
The first event at New Year 2000 in **Berlin time**:
|
|
996
|
+
|
|
997
|
+
```shell
|
|
998
|
+
ics-query at --tz=Europe/Berlin 2000-01-01 calendar.ics
|
|
999
|
+
```
|
|
1000
|
+
|
|
1001
|
+
You can also use the `ICS_QUERY_TZ` variable.
|
|
1002
|
+
|
|
1003
|
+
```shell
|
|
1004
|
+
export ICS_QUERY_TZ=localtime
|
|
1005
|
+
# from now on, we use your local time
|
|
1006
|
+
ics-query at 2000-01-01 calendar.ics
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
For all avaiable timezones see:
|
|
1010
|
+
|
|
1011
|
+
```shell
|
|
1012
|
+
ics-query --available-timezones
|
|
1013
|
+
```
|
|
1014
|
+
|
|
1015
|
+
Please see the command documentation for more help:
|
|
748
1016
|
|
|
749
|
-
|
|
1017
|
+
```shell
|
|
1018
|
+
ics-query --help
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
## Version Fixing
|
|
1022
|
+
|
|
1023
|
+
If you use this library in your code, you may want to make sure that
|
|
1024
|
+
updates can be received but they do not break your code.
|
|
1025
|
+
The version numbers are handeled this way: `a.b.c` example: `0.1.12`
|
|
1026
|
+
|
|
1027
|
+
- `c` is changed for each minor bug fix.
|
|
1028
|
+
- `b` is changed whenever new features are added.
|
|
1029
|
+
- `a` is changed when the interface or major assumptions change that may break your code.
|
|
1030
|
+
|
|
1031
|
+
So, I recommend to version-fix this library to stay with the same `a`
|
|
1032
|
+
while `b` and `c` can change.
|
|
1033
|
+
|
|
1034
|
+
## Development
|
|
1035
|
+
|
|
1036
|
+
This section should set you up for developing `ics-query`.
|
|
1037
|
+
|
|
1038
|
+
### Testing
|
|
1039
|
+
|
|
1040
|
+
This project's development is driven by tests.
|
|
1041
|
+
Tests assure a consistent interface and less knowledge lost over time.
|
|
1042
|
+
If you like to change the code, tests help that nothing breaks in the future.
|
|
1043
|
+
They are required in that sense.
|
|
1044
|
+
Example code and ics files can be transferred into tests and speed up fixing bugs.
|
|
1045
|
+
|
|
1046
|
+
You can view the tests in the [test folder](https://github.com/niccokunzmann/ics-query/tree/main/ics_query/tests)
|
|
1047
|
+
If you have a calendar ICS file for which this library does not
|
|
1048
|
+
generate the desired output, you can add it to the ``test/calendars``
|
|
1049
|
+
folder and write tests for what you expect.
|
|
1050
|
+
If you like, [open an issue](https://github.com/niccokunzmann/ics-query/issues) first, e.g. to discuss the changes and
|
|
1051
|
+
how to go about it.
|
|
1052
|
+
|
|
1053
|
+
To run the tests, we use `tox`.
|
|
1054
|
+
`tox` tests all different Python versions which we want to be compatible to.
|
|
1055
|
+
|
|
1056
|
+
```shell
|
|
1057
|
+
pip3 install tox
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
To run all the tests:
|
|
1061
|
+
|
|
1062
|
+
```shell
|
|
1063
|
+
tox
|
|
1064
|
+
```
|
|
1065
|
+
|
|
1066
|
+
To run the tests in a specific Python version:
|
|
1067
|
+
|
|
1068
|
+
```shell
|
|
1069
|
+
tox -e py39
|
|
1070
|
+
```
|
|
750
1071
|
|
|
751
|
-
|
|
1072
|
+
We use ``ruff`` to format the code.
|
|
1073
|
+
Run this to format the code and show problems:
|
|
752
1074
|
|
|
753
1075
|
```shell
|
|
754
|
-
|
|
755
|
-
ics-query between dt duration
|
|
1076
|
+
tox -e ruff
|
|
756
1077
|
```
|
|
757
1078
|
|
|
758
|
-
|
|
1079
|
+
### New Release
|
|
759
1080
|
|
|
1081
|
+
To release new versions,
|
|
760
1082
|
|
|
761
|
-
|
|
1083
|
+
1. edit the Changelog Section
|
|
1084
|
+
2. create a commit and push it
|
|
1085
|
+
3. wait for [GitHub Actions] to finish the build
|
|
1086
|
+
4. create a tag and push it
|
|
762
1087
|
|
|
1088
|
+
```shell
|
|
1089
|
+
git tag v0.1.0a
|
|
1090
|
+
git push origin v0.1.0a
|
|
1091
|
+
```
|
|
763
1092
|
|
|
764
|
-
|
|
1093
|
+
5. Notify the issues about their release
|
|
1094
|
+
|
|
1095
|
+
## Changelog
|
|
1096
|
+
|
|
1097
|
+
We automatically release the versions that only update dependencies.
|
|
1098
|
+
If the version you installed does not show up here, only the dependencies
|
|
1099
|
+
have been updated.
|
|
1100
|
+
|
|
1101
|
+
- v0.4.1
|
|
1102
|
+
|
|
1103
|
+
- Automatic release with patch level version number increased
|
|
1104
|
+
- Increase patch version instead of minor version for automatic releases
|
|
1105
|
+
|
|
1106
|
+
- v0.3.4
|
|
1107
|
+
|
|
1108
|
+
- Update dependencies
|
|
1109
|
+
- Start automatic release of dependencies increasing the version number
|
|
1110
|
+
|
|
1111
|
+
- v0.3.3b
|
|
1112
|
+
|
|
1113
|
+
- Update dependencies
|
|
1114
|
+
|
|
1115
|
+
- v0.3.2b
|
|
1116
|
+
|
|
1117
|
+
- Fix that `--tz localtime` would use `localtime` as timezone name instead of the local timezone name.
|
|
1118
|
+
- Fix tests on Windows
|
|
1119
|
+
- Add Windows .exe build artifact
|
|
1120
|
+
|
|
1121
|
+
- v0.3.1b
|
|
1122
|
+
|
|
1123
|
+
- Add `--license` option
|
|
1124
|
+
|
|
1125
|
+
- v0.3.0b
|
|
1126
|
+
|
|
1127
|
+
- Add `--tz` timezone parameter
|
|
1128
|
+
- Add `ics-query all` to get all occurrences
|
|
1129
|
+
|
|
1130
|
+
- v0.2.1a
|
|
1131
|
+
|
|
1132
|
+
- Add `--component` to filter component types VEVENT, VJOURNAL and VTODO
|
|
1133
|
+
|
|
1134
|
+
- v0.2.0a
|
|
1135
|
+
|
|
1136
|
+
- Add `ics-query first <calendar> <output>` for earliest occurrences
|
|
1137
|
+
- Add `ics-query between <span_start> <span_stop> <calendar> <output>` to query time ranges
|
|
1138
|
+
|
|
1139
|
+
- v0.1.1a
|
|
1140
|
+
|
|
1141
|
+
- Add `--version`
|
|
1142
|
+
- Add `ics-query at <date> <calendar> <output>`
|
|
1143
|
+
- Add support for multiple calendars in one input
|
|
1144
|
+
|
|
1145
|
+
- v0.1.0a
|
|
1146
|
+
|
|
1147
|
+
- Update Python version compatibility
|
|
1148
|
+
- Add development documentation
|
|
1149
|
+
|
|
1150
|
+
- v0.0.1a
|
|
1151
|
+
|
|
1152
|
+
- first version
|
|
1153
|
+
|
|
1154
|
+
## Related Work
|
|
1155
|
+
|
|
1156
|
+
- [icalBuddy](https://hasseg.org/icalBuddy/)
|
|
1157
|
+
- [Blog Post](https://opencollective.com/open-web-calendar/updates/calendar-calculation-on-the-command-line-ics-query)
|
|
1158
|
+
- [#icsquery on mastodon](https://toot.wales/tags/icsquery)
|
|
1159
|
+
|
|
1160
|
+
## Vision
|
|
1161
|
+
|
|
1162
|
+
This section shows where we would like to get to.
|
|
1163
|
+
|
|
1164
|
+
### `ics-query --select-index` - reduce output size
|
|
1165
|
+
|
|
1166
|
+
Examples: `0,2,4` `0-10`
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
### `ics-query --select-uid` - filter by uid
|
|
1170
|
+
|
|
1171
|
+
### How to edit an event
|
|
765
1172
|
|
|
766
1173
|
To edit a component like an event, you can append it to the calendar and increase the sequence number.
|
|
767
1174
|
|
|
768
1175
|
Example:
|
|
769
1176
|
|
|
770
|
-
1. get the
|
|
1177
|
+
1. get the event `--select-index=0`
|
|
771
1178
|
2. change the summary
|
|
772
1179
|
3. increase sequence number
|
|
773
1180
|
4. add the event to the end of the calendar file
|
|
774
1181
|
5. show that the occurrence has changed
|
|
775
1182
|
|
|
776
|
-
## Piping calendars
|
|
777
|
-
|
|
778
|
-
```shell
|
|
779
|
-
cat calendar.ics | ics-query --output=count --filter-component=VEVENT all > calendar-event-count.int
|
|
780
|
-
```
|
|
781
1183
|
|
|
782
|
-
|
|
1184
|
+
### Notifications
|
|
783
1185
|
|
|
784
1186
|
Examples:
|
|
785
1187
|
|
|
@@ -787,8 +1189,10 @@ Examples:
|
|
|
787
1189
|
- There are x events today
|
|
788
1190
|
- Please write a journal entry!
|
|
789
1191
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1192
|
+
[PyPI]: https://pypi.org/project/ics-query/
|
|
1193
|
+
[GitHub Actions]: https://github.com/niccokunzmann/ics-query/actions
|
|
1194
|
+
[Open Collective]: https://opencollective.com/open-web-calendar/
|
|
1195
|
+
[Polar]: https://polar.sh/niccokunzmann/ics-query
|
|
1196
|
+
[GitHub Sponsors]: https://github.com/sponsors/niccokunzmann
|
|
1197
|
+
[thanks.dev]: https://thanks.dev
|
|
1198
|
+
[Releases]: https://github.com/niccokunzmann/ics-query/releases
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
ics_query/__init__.py,sha256=BBd-FYDFf3jY_ApkMRkivqGti2uMeP4OT6KtgZDixic,917
|
|
2
|
+
ics_query/__main__.py,sha256=1rFDbZZcd6llmQ-X_611jWdrua4HMOnpOclKRvf03Us,737
|
|
3
|
+
ics_query/_version.py,sha256=uLqBlyauSImVR9zc6L9nHYd6kdpU1wTYvz_GwmJ1kVU,419
|
|
4
|
+
ics_query/cli.py,sha256=VPXcSCjtaWZJtSzMsHqLfcTgStnJsoyY9K8Q0VZUs3o,19993
|
|
5
|
+
ics_query/parse.py,sha256=AO2TBoe98exzfzTKsoF5ZAvJOg3hN2qRpP15DAQKZaM,2415
|
|
6
|
+
ics_query/query.py,sha256=9HSSWJ1y7avU6mRDXBQKKTkk9oeG9qEwhr3k0piHbaU,2692
|
|
7
|
+
ics_query/version.py,sha256=GlR3hXBY_p6-SE3WH0_feOgYitLvkgDNHvJAYU4FOCw,1461
|
|
8
|
+
ics_query/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
ics_query/tests/conftest.py,sha256=MmxzXtpXHN3pf8jDmVGXvxcNXfepRwrJ03EF68zRSrY,3668
|
|
10
|
+
ics_query/tests/test_command_line.py,sha256=mB_v-WqjpYRcxtROdi7GfvUGTEHYZ-3Z-sWevp7lFYc,2524
|
|
11
|
+
ics_query/tests/test_parse_date.py,sha256=EGD06AtO_kNDcYEY7vhI9rN45HiZPbRm2LkGZoVW6iw,2785
|
|
12
|
+
ics_query/tests/test_parse_timedelta.py,sha256=EpM013rw-G61wI0hyWjtFOtE7xXo2DNsU3vSIULGZ1k,1469
|
|
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
|
|
15
|
+
ics_query/tests/runs/at 2019-03-04 multiple-calendars.ics -.run,sha256=Cyeg9DMK6BibiCwkM8nW0ZtULUYSZFIgDvKRlSo_jTw,482
|
|
16
|
+
ics_query/tests/runs/at 2019-03-04 one-event-twice.ics -.run,sha256=hc-0yJhWpnSVzPNB_0_tJfR6dskNMm9xdbHeAhsX1zI,452
|
|
17
|
+
ics_query/tests/runs/at 2019-03-04 one-event.ics -.run,sha256=GVVmVpqzFjQLw2_RuhxnVTpCnwflNqeWbkFZ6u5WXxA,226
|
|
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
|
|
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
|
|
26
|
+
ics_query/tests/runs/first empty-calendar.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
ics_query/tests/runs/first empty-file.ics -.run,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
30
|
+
ics_query/tests/runs/calendars/empty-calendar.ics,sha256=78162P3KYUj6Qhbdnjsm3E84jv--_--p5U0h_jovrpw,153
|
|
31
|
+
ics_query/tests/runs/calendars/empty-file.ics,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
+
ics_query/tests/runs/calendars/multiple-calendars.ics,sha256=lS1Q9eSPpzLs2TRDKUiwF9HmpnJMw8xqjLudA0-KtY4,1516
|
|
33
|
+
ics_query/tests/runs/calendars/one-event-twice.ics,sha256=GZ5wE-U4kjO91N2nIaLsYZpSOLvQTjkoLPI6saMocOM,1450
|
|
34
|
+
ics_query/tests/runs/calendars/one-event-without-timezone.ics,sha256=0ZQBHz2RDxUIrub4ZWwcQPpUS_bvdl0GT-kaLDppMlc,282
|
|
35
|
+
ics_query/tests/runs/calendars/one-event.ics,sha256=-uwohttEzg-jsTETNb6tQ5dO9PE3DXzlicwRiXJs1KQ,725
|
|
36
|
+
ics_query/tests/runs/calendars/recurring-work-events.ics,sha256=4ASS_-xZl2pVv1kZ7nDOU9jpkmbo4zJC2KEAgHtpsNU,5115
|
|
37
|
+
ics_query/tests/runs/calendars/simple-journal.ics,sha256=U6_YMQM6EHwPDaszWgJDo-pR4WIqbJx8CRlHg4iu9zA,457
|
|
38
|
+
ics_query/tests/runs/calendars/simple-todo.ics,sha256=l9uHQD4eyiCE8STvd2tj5lAVaBrqUtpF_M8Pv6yf1es,327
|
|
39
|
+
ics_query/tests/runs/calendars/three-events.ics,sha256=YvPfthOzMCR0DQhGR6uj_1Bltgax3uA1ETlkI4JUI08,828
|
|
40
|
+
ics_query-0.1.dev1.dist-info/METADATA,sha256=7kU2iAHenjvMWJrYr9fGowiZyflcV9bKPhM4k8-ibIs,54547
|
|
41
|
+
ics_query-0.1.dev1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
42
|
+
ics_query-0.1.dev1.dist-info/entry_points.txt,sha256=Jq_39vCKVOkNZjL7Wngf_04V_n_QRszLgLT2CbJKiH4,49
|
|
43
|
+
ics_query-0.1.dev1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
44
|
+
ics_query-0.1.dev1.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=TWkFoVO0ZSuDom5EyxVYsWuljp8Ftfe8QsIsZqnVewQ,413
|
|
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.0.1a0.dist-info/METADATA,sha256=n7eFk3kq7iB1Sz9SSveydCYqDtHAb0kgmSkZDoKUlpg,43901
|
|
13
|
-
ics_query-0.0.1a0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
14
|
-
ics_query-0.0.1a0.dist-info/entry_points.txt,sha256=Jq_39vCKVOkNZjL7Wngf_04V_n_QRszLgLT2CbJKiH4,49
|
|
15
|
-
ics_query-0.0.1a0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
16
|
-
ics_query-0.0.1a0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|