Skip to main content

python-hcalendar is a basic hCalendar parser

Project description

Basic hCalendar Parser
======================

Dependencies
------------
- isodate [http://pypi.python.org/pypi/isodate/]
- Beautiful Soup 4 [http://www.crummy.com/software/BeautifulSoup/]

Installation
-------------
Install the latest version from pypi.python.org:

pip install python-hcalendar

Install the development version by cloning the source from github.com:

pip install git+https://github.com/mback2k/python-hcalendar.git

Basic Example
-------------
The hCalendar class accepts file-like objects and strings, basically anything supported by BeautifulSoup

from hcalendar import hCalendar

html = """<div class="vcalendar"><div class="vevent">
<a class="url" href="http://conferences.oreillynet.com/pub/w/40/program.html">
http://conferences.oreillynet.com/pub/w/40/program.html
</a>
<span class="summary">Web 2.0 Conference</span>:
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
<abbr class="dtend" title="2005-10-07">7</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span>
</div></div>"""

hcal = hCalendar(html)
for cal in hcal:
for event in cal:
print event.url
print event.summary
print event.dtstart
print event.dtend
print event.location

HTML source code taken from [microformats.org](http://microformats.org/wiki/hcalendar). Output will look like this:

http://conferences.oreillynet.com/pub/w/40/program.html
Web 2.0 Conference
2005-10-05 00:00:00
2005-10-07 00:00:00
Argent Hotel, San Francisco, CA

TODO
====
- Implement support for hCard contacts and attendees
- Implement support for geo locations
- Maybe support for other microformats?

License
-------
* Released under MIT License
* Copyright (c) 2012-2016 Marc Hoersken <info@marc-hoersken.de>


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-hcalendar-0.2.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

python_hcalendar-0.2.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file python-hcalendar-0.2.2.tar.gz.

File metadata

  • Download URL: python-hcalendar-0.2.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for python-hcalendar-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d26422436b4985c04f396a75b96a25aa0662bd233c6607cbfaceadfdf9ded990
MD5 bde99a906b231159cdeea9b4633b5634
BLAKE2b-256 643e2c20a7488426703cfe699130c6d81a37d67c00647789ad519d2743e5c551

See more details on using hashes here.

File details

Details for the file python_hcalendar-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: python_hcalendar-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for python_hcalendar-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad262cf799369a7044400e86129cc90bb13ed23fe58cb2d4212cf003fb18efb2
MD5 d825dd56cc1638484185bac40eaecdfd
BLAKE2b-256 09973ae1d82b09e512c761b6fa60865793bf15d51ea5231c94aa0705c910d3d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page