2020-11-04 10:37:10 +01:00
# ical2csv w/sorted events by start date
2019-10-30 18:02:12 +01:00
![alt text ](images/ics.png ) → ![alt text ](images/python.png ) → ![alt text ](images/csv.png )
A command line Python script that will read an ics file and write it's contents to a csv file.
## Installation
Download the `ical2csv.py` file.
### Dependencies:
2016-02-04 23:43:59 +01:00
* ***icalendar***
* [**Homepage** ](http://icalendar.readthedocs.org/ )
* [**Code** ](http://github.com/collective/icalendar )
2019-10-30 18:02:12 +01:00
* **Installation**: `pip install icalendar`
* ***Python* 3**
2020-11-04 10:37:10 +01:00
***Note:*** pip may be called pip3 on some systems with both python2 and python3 as options.
## Usage of ical2csv
Call the script and pass in the location of the ics file.
Ex: `python ical2csv.py event.ics`
# ical2txt w/sorted events by start date
Like ical2csv.py, it parses an ics file and writes the output to a text-file. This is more of an agenda style.
## Installation of ical2txt
Download the script or clone the project and get it from there.
### Dependencies for ical2txt
* ***setuptools*** (just in case : pip3 install setuptools)
* ***BeautifulSoup4*** (pip3 install beautifulsoup4)
* ***icalendar*** (pip3 install icalendar)
* [**Homepage** ](http://icalendar.readthedocs.org/ )
* [**Code** ](http://github.com/collective/icalendar )
2021-03-28 22:08:32 +02:00
* ***recurring-ical-events*** (pip3 install recurring-ical-events)
2020-11-04 10:37:10 +01:00
## Usage of ical2txt
2019-10-30 18:02:12 +01:00
Call the script and pass in the location of the ics file.
2020-11-04 10:37:10 +01:00
Ex: `python ical2txt.py event.ics` / `python3 ical2txt.py event.ics`
2019-10-30 18:02:12 +01:00
2021-03-28 21:36:17 +02:00
Note: You can limit output to a certain time period. Useful for week logs and the like:
2021-03-28 22:08:32 +02:00
2021-03-28 21:36:17 +02:00
`./ical2txt.py myexport.ics 20210101 20211231`
2021-03-28 22:08:32 +02:00
2021-03-28 21:36:17 +02:00
`./ical2txt.py myexport.ics 2021-01-01T00:00:00 2021-01-31T23:59:59`
2021-03-28 22:10:49 +02:00
**NEW AS OF 2021-03-28:** Recurring events are now actually processed in ical2txt.py. If no end date is given 5 years from now is chosen.
2021-03-28 22:08:32 +02:00
2019-10-30 18:02:12 +01:00
## Contributing
1. Fork it!
2. Create your feature branch: git checkout -b my-new-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature
5. Submit a pull request 😊
## Credits
2020-11-04 10:37:10 +01:00
Lead Developer - ical2csv - [Erik Cox ](https://github.com/erikcox/ )
2020-11-04 10:40:46 +01:00
2020-11-04 10:37:10 +01:00
Developer - ical2txt - [Martin Møller ](https://github.com/martinm76 )
2019-10-30 18:02:33 +01:00
2019-10-30 18:10:18 +01:00
Python 3 compatibility and improvements - [bozoslivehere ](https://github.com/bozoslivehere/ )
2020-11-04 10:40:46 +01:00
Logic and adjustments to sort events chronologically (Google Calendar doesn't do this in its export) - [Martin Møller ](https://github.com/martinm76 )
2020-11-04 10:37:10 +01:00
Removal of HTML code from events (currently only ical2txt) - [Martin Møller ](https://github.com/martinm76 )
2019-10-30 18:02:12 +01:00
## License
The MIT License (MIT)
Copyright (c) 2019 Erik Cox
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.