Display time or weather forecast in your VK profile status, customized to your preferred format.
You have the following STATUS_FORMAT
environment:
STATUS_FORMAT={time} {emoji} | {forecast}
The service will insert values like that:
5:35 AM 🌠 | -2℃
- Clone the GitHub repo:
git clone https://github.com/theandrunique/vk-dynamic-profile-status.git
- Navigate to the project directory:
cd vk-dynamic-profile-status
- (Recommended) Create a Python virtual environment:
python -m venv venv
- Activate the virtual environment
- For Windows:
.\venv\Scripts\activate
- For Linux and macOS:
source venv/bin/activate
- Install the required Python packages from
requirements.txt
:
pip install -r requirements.txt
- Create and configure a
.env
file by following the example:
TOKEN = your_vk_token
ACCUWEATHER_API_KEY = your_token
CITY = your_city # city for forecast in profile status
STATUS_FORMAT = {time} {emoji} | {forecast} # your format
- Run the service:
python main.py
Note
If you have Docker installed, you can easily set up and run the project without manually installing dependencies.
- First, make sure you have Docker installed.
- Clone the GitHub repo:
git clone https://github.com/theandrunique/vk-dynamic-profile-status.git
- Navigate to the project directory:
cd vk-dynamic-profile-status
- Configure the environments in
docker-compose.yml
environment:
- TOKEN=your_vk_token
- TZ=Europe/Moscow # your time zone
- CITY=your_city # city for forecast in profile status
- ACCUWEATHER_API_KEY=your_token
- STATUS_FORMAT={time} {emoji} | {forecast}
- Start the service using Docker Compose:
docker compose up -d
You're done! Check your profile status to ensure it works.
To stop the Docker container use:
docker compose stop
The service will be updating your status every minute using the format you have specified.
- Insted of parameters in
STATUS_FORMAT
service will replace them with the corresponding values. - If you're not using
forecast
in your profile status you can leaveACCUWEATHER_API_KEY
field empty. - {emoji} is a random emoji based on time of day. You can configure it in
helpers.py
.
time_of_day_emojis = {
TimeOfDay.MORNING : ['🐳'],
TimeOfDay.DAY : ['☀️'],
TimeOfDay.EVENING : ['🌆'],
TimeOfDay.NIGHT : ['🌙', '🌠', '🛌', '🌌', '🪐'],
}
A token must have rights to update the status
This project is licensed under MIT license