diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 18:54:58 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 18:54:58 +0000 |
commit | 73ba3033b42b5fe886db649a72c511229e406b83 (patch) | |
tree | 7b2beb5f98b636f51094c3e0c0e462e897bc4e66 | |
parent | 398913c80aed1a9b46e25a7111873a42412f4901 (diff) |
automatic import of python-tasks
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-tasks.spec | 289 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 291 insertions, 0 deletions
@@ -0,0 +1 @@ +/tasks-2.8.0.tar.gz diff --git a/python-tasks.spec b/python-tasks.spec new file mode 100644 index 0000000..85ccc3f --- /dev/null +++ b/python-tasks.spec @@ -0,0 +1,289 @@ +%global _empty_manifest_terminate_build 0 +Name: python-tasks +Version: 2.8.0 +Release: 1 +Summary: A simple personal task queue to track todo items +License: MIT License +URL: https://github.com/pb-/tasks +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e3/0c/885132ab9b854c90ebc724ef313268fc19fcc7fc0b4e480ce4e5486ca991/tasks-2.8.0.tar.gz +BuildArch: noarch + +Requires: python3-datadispatch + +%description +# Tasks + +Proof of concept for a simple task queue, with a focus on UX and clean internal design. + + + +Tasks can be installed through pip: `pip3 install tasks`, run with `tasks`. + + +## Status for i3 + +Follow these steps to add the output of `status` to your i3 status bar. + +1. Set up a cron job (`crontab -e`) that saves the status every minute. + + ``` + * * * * * /path/to/tasks status > $HOME/.tasks.status + ``` + +2. Configure i3 to use the provided status wrapper (installed alongside the `tasks` command.) + + ``` + ... + status_command tasks-i3status + ... + ``` + + +## Ubiquitous Capture + +It is very useful to have a quick and low-friction way to add new items from anywhere. This can be achieved by combining tasks with a generic dialog tool and your window manager keybindings. + +Example using zenity and i3: + +``` +bindsym $mod+t exec --no-startup-id bash -c "zenity --title 'Add TODO item' --text 'What needs to be done?' --entry --width 450 | xargs tasks addt" +``` + +Note that you will want to use tasks >= 2.7.0 for this since it detects external modification of the state file. + + +## Automatic standup email + +The `standup` command shows (among other things) recently completed items. One use case is to send this list to your phone to have it ready for a daily standup. The repo contains a script (under `scripts`) to send stdin as an email with Mailgun which you can then combine with a cron job as follows. + +``` +API_KEY=... +DOMAIN=... +EMAIL=... +30 9 * * tue,wed,thu,fri /path/to/tasks standup 1 | /path/to/mailgun.sh +30 9 * * mon /path/to/tasks standup 3 | /path/to/mailgun.sh +``` + + +## Development + +To get started, have a look at the todo items for this project. + +``` +make dev_install # one-time setup +make todo +``` + +### Contributing + +Pull requests are welcome. Please do keep in mind that the code is heavily inspired by the [Elm architecture](https://guide.elm-lang.org/architecture/) and consider the following guidelines. + + * Avoid mutation whenever possible, take advantage of [PEP 448](https://www.python.org/dev/peps/pep-0448/) to create updated versions of collections instead. + * Side effects (and only side effects) should be in `main.py`; all other modules should be limited to pure code. + * Avoid classes unless you have a really good reason for them (the code does not have any classes at the moment.) + + + + +%package -n python3-tasks +Summary: A simple personal task queue to track todo items +Provides: python-tasks +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-tasks +# Tasks + +Proof of concept for a simple task queue, with a focus on UX and clean internal design. + + + +Tasks can be installed through pip: `pip3 install tasks`, run with `tasks`. + + +## Status for i3 + +Follow these steps to add the output of `status` to your i3 status bar. + +1. Set up a cron job (`crontab -e`) that saves the status every minute. + + ``` + * * * * * /path/to/tasks status > $HOME/.tasks.status + ``` + +2. Configure i3 to use the provided status wrapper (installed alongside the `tasks` command.) + + ``` + ... + status_command tasks-i3status + ... + ``` + + +## Ubiquitous Capture + +It is very useful to have a quick and low-friction way to add new items from anywhere. This can be achieved by combining tasks with a generic dialog tool and your window manager keybindings. + +Example using zenity and i3: + +``` +bindsym $mod+t exec --no-startup-id bash -c "zenity --title 'Add TODO item' --text 'What needs to be done?' --entry --width 450 | xargs tasks addt" +``` + +Note that you will want to use tasks >= 2.7.0 for this since it detects external modification of the state file. + + +## Automatic standup email + +The `standup` command shows (among other things) recently completed items. One use case is to send this list to your phone to have it ready for a daily standup. The repo contains a script (under `scripts`) to send stdin as an email with Mailgun which you can then combine with a cron job as follows. + +``` +API_KEY=... +DOMAIN=... +EMAIL=... +30 9 * * tue,wed,thu,fri /path/to/tasks standup 1 | /path/to/mailgun.sh +30 9 * * mon /path/to/tasks standup 3 | /path/to/mailgun.sh +``` + + +## Development + +To get started, have a look at the todo items for this project. + +``` +make dev_install # one-time setup +make todo +``` + +### Contributing + +Pull requests are welcome. Please do keep in mind that the code is heavily inspired by the [Elm architecture](https://guide.elm-lang.org/architecture/) and consider the following guidelines. + + * Avoid mutation whenever possible, take advantage of [PEP 448](https://www.python.org/dev/peps/pep-0448/) to create updated versions of collections instead. + * Side effects (and only side effects) should be in `main.py`; all other modules should be limited to pure code. + * Avoid classes unless you have a really good reason for them (the code does not have any classes at the moment.) + + + + +%package help +Summary: Development documents and examples for tasks +Provides: python3-tasks-doc +%description help +# Tasks + +Proof of concept for a simple task queue, with a focus on UX and clean internal design. + + + +Tasks can be installed through pip: `pip3 install tasks`, run with `tasks`. + + +## Status for i3 + +Follow these steps to add the output of `status` to your i3 status bar. + +1. Set up a cron job (`crontab -e`) that saves the status every minute. + + ``` + * * * * * /path/to/tasks status > $HOME/.tasks.status + ``` + +2. Configure i3 to use the provided status wrapper (installed alongside the `tasks` command.) + + ``` + ... + status_command tasks-i3status + ... + ``` + + +## Ubiquitous Capture + +It is very useful to have a quick and low-friction way to add new items from anywhere. This can be achieved by combining tasks with a generic dialog tool and your window manager keybindings. + +Example using zenity and i3: + +``` +bindsym $mod+t exec --no-startup-id bash -c "zenity --title 'Add TODO item' --text 'What needs to be done?' --entry --width 450 | xargs tasks addt" +``` + +Note that you will want to use tasks >= 2.7.0 for this since it detects external modification of the state file. + + +## Automatic standup email + +The `standup` command shows (among other things) recently completed items. One use case is to send this list to your phone to have it ready for a daily standup. The repo contains a script (under `scripts`) to send stdin as an email with Mailgun which you can then combine with a cron job as follows. + +``` +API_KEY=... +DOMAIN=... +EMAIL=... +30 9 * * tue,wed,thu,fri /path/to/tasks standup 1 | /path/to/mailgun.sh +30 9 * * mon /path/to/tasks standup 3 | /path/to/mailgun.sh +``` + + +## Development + +To get started, have a look at the todo items for this project. + +``` +make dev_install # one-time setup +make todo +``` + +### Contributing + +Pull requests are welcome. Please do keep in mind that the code is heavily inspired by the [Elm architecture](https://guide.elm-lang.org/architecture/) and consider the following guidelines. + + * Avoid mutation whenever possible, take advantage of [PEP 448](https://www.python.org/dev/peps/pep-0448/) to create updated versions of collections instead. + * Side effects (and only side effects) should be in `main.py`; all other modules should be limited to pure code. + * Avoid classes unless you have a really good reason for them (the code does not have any classes at the moment.) + + + + +%prep +%autosetup -n tasks-2.8.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-tasks -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.8.0-1 +- Package Spec generated @@ -0,0 +1 @@ +25b8a26f8646aa84ccfcd5d26cb674b8 tasks-2.8.0.tar.gz |