Skip to main content

event parser of kyoto-univ.

Project description

event-parser

イベント情報が載っているウェブページから情報を抽出し、特定のデータ形式に変換するパッケージ。

Usage

install

# 任意のPython3.4以上の環境で構いません
python -m venv .venv
source venv/bin/activate
# plz use setuptools 38 or newer version.
pip install -U setuptools 

pip を利用する場合(主にインストールした後バージョン管理をpipでしたい人向け)

# by pip 
pip install -e .

setuptools を利用する場合(pipを利用しない場合)

# by setuptools
python setup.py install

update や uninstall は各ツールのhelpを見るなどするか, 詳細ドキュメント(下記)を見てください.

run script

parse_event [-h] [--help]

Docs

get_all

from kueventparser.api import get_events
get_events()

eventは指定URLのイベントページから抽出したイベント情報(Event)で、以下の構造になっている。

class Event:
    """イベント情報を含んだclass
    """

    def __init__(self, name:str, url: str, location: str, description: str, date: datetime.date,
                 start: datetime.time,
                 end: datetime.time, **kargs):
        """イニシャライザー
        
        Args:
            name: イベント名
            url: イベント情報のURL
            location: 開催地
            description: 詳細説明文
            date: 開催日
            start: 開始時間
            end: 終了時間
        """

detail

より正確なドキュメント群はsphinxで書かれている.

# /docs/build/html/ にドキュメントが作成される.
cd docs
python make_docs.py

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

kueventparser-2.0.1.tar.gz (9.3 kB view hashes)

Uploaded Source

Supported by

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