https://github.com/deep5050/calendarfusion
A python module to generate fancy markdown calendar
https://github.com/deep5050/calendarfusion
calendar calendar-events calendar-view calendar-widget markdown markdown-calendar markdown-table
Last synced: 4 months ago
JSON representation
A python module to generate fancy markdown calendar
- Host: GitHub
- URL: https://github.com/deep5050/calendarfusion
- Owner: deep5050
- License: mit
- Created: 2023-08-26T06:58:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T14:26:47.000Z (about 2 years ago)
- Last Synced: 2025-06-15T11:07:38.148Z (4 months ago)
- Topics: calendar, calendar-events, calendar-view, calendar-widget, markdown, markdown-calendar, markdown-table
- Language: Python
- Homepage:
- Size: 448 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
Calendar Fusion
A Python module to generate fancy markdown table-based calendar
![]()
![]()
![]()
![]()
![]()
![]()
Explore the docs »
Report Bug
·
Request Feature
![]()
## Table of Contents
* [About the Project](#about-the-project)
* [Installation](#installation)
* [Usage](#usage)
* [Version History](#version-history)
* [Contributing](#contributing)
* [Support](#support)
* [License](#license)
* [Contact](#contact)
* [Related Works](#related-works)## About The Project
Display a Calendar as you like. Add links, styles, emojis, etc.
## Installation
`pip3 install CalendarFusion`
## Documentation
See the [Docs](docs/CalendarFusion.md) here ⬅️
## Example usages
### initialize
```python
from CalendarFusion import CalendarFusion
cf = CalendarFusion.CalendarFusion()
```|Mon|Tue|Wed|Thu|Fri|Sat|Sun|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
||1|2|3|4|5|6|
|7|8|9|10|11|12|13|
|14|15|16|17|18|19|20|
|21|22|23|24|25|26|27|
|28|29|30|31||||```python
cf = CalendarFusion(year=2023,
month=2,
fill_calendar=True,
weekno=True,
start_from_sunday=False,
lang="ja"
)
print(cf.table())
```
|週|月|火|水|木|金|土|日|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|5|30|31|1|2|3|4|5|
|6|6|7|8|9|10|11|12|
|7|13|14|15|16|17|18|19|
|8|20|21|22|23|24|25|26|
|9|27|28|1|2|3|4|5|### `link()`
Add a link to the dates.
```python
entity = {}
entity[date(2023,8,12)] = "https://google.com"
entity[date(2023,8,2)] = "https://bing.com"
entity[date(2023,8,25)] = "https://google.com"
entity[date(2023,8,10)] = "https://google.com"
cf.link(urls=entity)
```|Mon|Tue|Wed|Thu|Fri|Sat|Sun|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
||1|[2](https://bing.com)|3|4|5|6|
|7|8|9|[10](https://google.com)|11|[12](https://google.com)|13|
|14|15|16|17|18|19|20|
|21|22|23|24|[25](https://google.com)|26|27|
|28|29|30|31||||### `style()`
Add formatting styles to the dates.
```python
selected_dates = [date(2023,8,23),
date(2023,8,1),
date(2023,8,27),
date(2023,7,31),
date(2023,8,20),
date(2023,8,7)
]
print(cf.style(style="quote",selected=selected_dates))
```
|Mon|Tue|Wed|Thu|Fri|Sat|Sun|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
||`1`|2|3|4|5|6|
|`7`|8|9|10|11|12|13|
|14|15|16|17|18|19|`20`|
|21|22|`23`|24|25|26|`27`|
|28|29|30|31||||### `selective()`
Selective formatting
```python
selected_dates = [date(2023,8,23),
date(2023,8,1),
date(2023,8,27),
date(2023,7,31),
date(2023,8,20),
date(2023,8,7)
]
print(cf.selective(selected=selected_dates,not_selected_date_text="."))
```
|Sun|Mon|Tue|Wed|Thu|Fri|Sat|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|.|31|1|.|.|.|.|
|.|7|.|.|.|.|.|
|.|.|.|.|.|.|.|
|20|.|.|23|.|.|.|
|27|.|.|.|.|.|.|```python
print(cf.selective(selected=selected_dates,
not_selected_date_text=":red_circle:",
selected_date_text=":green_circle:"
))
```
|Sun|Mon|Tue|Wed|Thu|Fri|Sat|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|:red_circle:|:green_circle:|:green_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|
|:red_circle:|:green_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|
|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|
|:green_circle:|:red_circle:|:red_circle:|:green_circle:|:red_circle:|:red_circle:|:red_circle:|
|:green_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|:red_circle:|## Version History
`v1.0.0` Initial release
## Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch
3. Commit your Changes
4. Push to the Branch
5. Open a Pull Request## Support
All Kinds Of Supports Are Welcome :raised_hands:! The Most Basic Way To Show Your Support Is To Star :star2: The Project, Or To Raise Issues :speech_balloon: You Can Also Support This Project By [**becoming a sponsor on GitHub**](https://github.com/sponsors/deep5050) :clap: Or By Making A [**Paypal**](https://paypal.me/deep5050) Donation :)
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Dipankar Pal - dipankarpal5050@gmail.com
## Related Works
[Radioactive](https://github.com/deep5050/radio-active) : A CLI-based internet radio player
[NaughtyLust](https://github.com/deep5050/NaughtyLust) : Awesome Nautilus Scripts For Linux.
[qikQR](https://github.com/deep5050/qikQR) : Minimal QR Code Generator App Made With Electron.
[cppcheck-action](https://github.com/deep5050/cppcheck-action) : Check Security Flaws In Your C/C++ Codes Right From GitHub Action Workflows.
[autopy-lot](https://github.com/deep5050/autopy-lot) : GitHub Action Setup To Convert Jupyter Notebooks To Python Scripts And Markdowns.
![]()
Happy Coding
![]()