Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload tasks #95

Closed
CyanMonkey opened this issue Dec 23, 2023 · 4 comments
Closed

Reload tasks #95

CyanMonkey opened this issue Dec 23, 2023 · 4 comments

Comments

@CyanMonkey
Copy link

Hi can you please set the tasks to reload as well when Q is pressed?
I am planning to create a script to insert/delete tasks to the tasks.csv file from my email provider's task folder. So I can effectively sync task lists between my work/home.

P.S. for anyone else this is how I configured my crontab to update calcure
59 18-23 * * * /home/bubbles/.local/bin/setenv.sh "vdirsyncer sync" && tmux send-keys -t email:1.0 Q || export DISPLAY=:0 ; notify-send -u critical -t 0 "pls unlock GPG"

I found that some cron managers don't handle environment variables needed as paths in vdirsyncer and tmux so I created a helper script to set the variables before running the sync. update the env variables as you need as this is just an example

#!/bin/sh
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox"

export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/private/password-store"

[ -z "$1" ] && { echo "please supply a cmd argument";exit; }

exec $1
@anufrievroman
Copy link
Owner

Hi, I think it is the case now, Q reloads both events and tasks. It's not working for you?

@CyanMonkey
Copy link
Author

I was browsing through the source files and I think it is just reloading the tasks from ics files and not csv.
main.py

       if screen.reload_data:
            user_ics_events = event_loader_ics.load()
            user_ics_tasks = task_loader_ics.load()
            screen.reload_data = False

@anufrievroman
Copy link
Owner

Ah, I see, you are right, I missed that you mean .csv files. Okay, I'll make it so that they are updated as well.

anufrievroman added a commit that referenced this issue Dec 23, 2023
@anufrievroman
Copy link
Owner

anufrievroman commented Dec 23, 2023

I implemented it in the current main, you can try to install it and test it as:

pipx install git+https://github.com/anufrievroman/calcure

Or just wait for release 3.1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants