Skip to main content

Create a timeline by listing events with multilingual support.

Project description

PyTimeliner

Issues open Last commit License Latest version PyPI Version Downloads

PyTimeliner is a Python package for organizing events and dates in a chronological timeline with multilingual support. This package enables you to add events in various languages and create a well-ordered timeline.

Features

  • Add and display events in different languages
  • Automatically organizes events in chronological order
  • Useful for developers working on event-based projects

Installation

Using setup.py

First, clone the repository and navigate to the project directory. Then, install the package with:

pip install -e .

Using requirements.txt

Alternatively, if you want to install dependencies separately, you can create a requirements.txt file. Install the package dependencies with:

pip install -r requirements.txt

This package uses googletrans for translation support. If you are using requirements.txt, make sure it contains:

googletrans==4.0.0-rc1

Usage

Using PyTimeliner, you can easily add events and display them in a timeline format.

Example Usage

from pytimeliner.timeliner import Timeliner

# English timeline
timeline = Timeliner(language='en')
timeline.add_event("2024-01-01", "New Year")
timeline.add_event("2024-12-25", "Christmas")
timeline.display_timeline()

# Spanish timeline
timeline_es = Timeliner(language='es')
timeline_es.add_event("2024-01-01", "New Year")
timeline_es.add_event("2024-12-25", "Christmas")
timeline_es.display_timeline()

Output

English:

2024-01-01: New Year
2024-12-25: Christmas
Spanish:

2024-01-01: Año Nuevo
2024-12-25: Navidad

Running Tests

To run tests, use the tests folder which contains test files:

python -m unittest discover -s tests

Contributing

If you want to contribute, feel free to open an issue or submit a pull request. All contributions are welcome!

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

pytimeliner-0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytimeliner-0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pytimeliner-0.1.tar.gz.

File metadata

  • Download URL: pytimeliner-0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pytimeliner-0.1.tar.gz
Algorithm Hash digest
SHA256 3e25d8ad7998f9a3952a370e0204dd08cf0d14ddbd45fac113b616f98c1dde57
MD5 d6f8e01ceb824c51e5e1ab2fd3995620
BLAKE2b-256 fd9baad28a27782f29442ffa9b3092633a6aca992eac3250910a254261346070

See more details on using hashes here.

File details

Details for the file pytimeliner-0.1-py3-none-any.whl.

File metadata

  • Download URL: pytimeliner-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pytimeliner-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd5fbd7adf5013ea8a14210a48565f2ed81628c4f34533ec067609858ea88e25
MD5 c248d15f96f934fe9a89c76550faf13e
BLAKE2b-256 215292e30b85d33ac12a57bd8044e7f5ae167e6b80f0462c8ea119ea189a7118

See more details on using hashes here.

Supported by

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