Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
.vscode/*
build/*
dist/*
testenv/*
testenv2/*
build
dist
venv/*
venv35/*
venv36/*
xmas_app/*

*-docker*.zip
*.pyc
*.pyo
*.ico
installer.cfg

YuleLog.egg-info/*

manage.py

yule_log/__pycache__/*
YuleLog.egg-info

yule_log/__pycache__
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#062A69",
"titleBar.activeBackground": "#093A93",
"titleBar.activeForeground": "#F9FBFF"
}
}
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,56 @@
YuleLog
=======
# YuleLog

**Have yourself a Merry Terminal Christmas**

![logo](https://github.com/Duroktar/YuleLog/blob/master/yule_log/screenshot.png)

Overview
--------
## Overview

Yule Log Fireplace with a retro twist!

- Restart the snowfall by pressing enter.

- Press `x` to stop the program.

Tested with Python 2.7 and 3.5 on Linux and Windows.
Comes with a dockerized version for easy install.

- **Made with Asciimatics!**

- **WORKS BEST IN FULL SCREEN**

Installation / Usage
--------------------
## Installation

To install use pip:
If you have docker on linux/mac (recommended):

$ pip install YuleLog
$ git clone https://github.com/Duroktar/YuleLog.git
$ cd YuleLog/
$ cp YuleLog.sh ~/bin/YuleLog

-------

Or install use pip:

$ pip install YuleLog

Or clone the repo:

$ git clone https://github.com/Duroktar/YuleLog.git

$ python setup.py install

Example
> Tested for Python v[2.7, 3.5] on Linux, Mac, and Windows.

-------

Run directly from the command line (thanks to setup.py entry script)
## Usage / Run Program

$ YuleLog

Or as a python module
Run directly from the command line (for docker, pip, and/or manual builds)

$ python -m yule_log
$ YuleLog

If installed with pip or built manually you can also run it as a python module

$ python -m yule_log

Changes
-------
Expand All @@ -56,8 +63,6 @@ Version 0.0.2:
Version 0.0.1:
- First release



Credits & thanks
----------------
- Asciimatics - https://github.com/peterbrittain/asciimatics
Expand Down
4 changes: 0 additions & 4 deletions YuleLog

This file was deleted.

6 changes: 6 additions & 0 deletions YuleLog-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

CONTAINER_NAME=yule_log

docker build -t yule_log-dev --rm -f dockerfile.dev .
docker run -it --name yule_log_app-dev --rm yule_log-dev
14 changes: 14 additions & 0 deletions YuleLog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

CONTAINER_NAME=yule_log
VERSION=0.0.3-docker-2

if [[ $(docker images $CONTAINER_NAME:$VERSION | grep -w "$CONTAINER_NAME") ]]; then
echo "docker-run ..."
docker run -it --name yule_log_app --rm yule_log:$VERSION

else
echo "docker-build ..."
docker build -t yule_log:$VERSION .
docker run -it --name yule_log_app --rm yule_log:$VERSION
fi
2 changes: 0 additions & 2 deletions docker-build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions docker-run.sh

This file was deleted.

23 changes: 23 additions & 0 deletions dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.6-slim

RUN useradd --create-home --shell /bin/bash app_user

RUN apt-get -y update && apt-get install -y zlib1g-dev
RUN apt-get -y update && apt-get install -y libjpeg-dev
RUN apt-get -y update && apt-get install -y gcc

ENV LDFLAGS=-L/usr/lib/x86_64-linux-gnu/

RUN /usr/local/bin/python -m pip install --upgrade pip

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

COPY . .

RUN pip install -e .

USER app_user
CMD [ "YuleLog"]
6 changes: 1 addition & 5 deletions yule_log/fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ def yule_log(screen):
screen_height = screen.height
screen_width = screen.width
log_x = (screen_width // 2) - HALF_LOG_LENGTH
log_y = (screen_height // 2) + HALF_LOG_HEIGHT
if screen_height < 30:
log_y = screen_height // 3
elif screen_height < 48:
log_y = screen_height // 2
log_y = (screen_height) - LOG_HEIGHT

scenes = []

Expand Down