Skip to content

Commit eb2b71d

Browse files
committed
Add license and build workflow, tidy up readme.
1 parent 794493b commit eb2b71d

File tree

5 files changed

+57
-9
lines changed

5 files changed

+57
-9
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: [mattstein]
2+
ko_fi: mattstein
3+
buy_me_a_coffee: mattts

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Create Alfred Workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install Composer dependencies
14+
uses: php-actions/composer@v6
15+
# Store version number without `v`
16+
- name: Write release version
17+
run: |
18+
TAG=${{ github.ref_name }}
19+
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
20+
- name: Build Alfred workflow
21+
id: alfred_builder
22+
uses: com30n/build-alfred-workflow@v1
23+
with:
24+
workflow_dir: .
25+
exclude_patterns: '.git/* .gitignore .github docker_tag Dockerfile-php-build DOCKER_ENV output.log resources/*'
26+
custom_version: "${{ env.VERSION }}"
27+
- name: Create release
28+
id: create_release
29+
uses: softprops/action-gh-release@v2
30+
if: startsWith(github.ref, 'refs/tags/')
31+
with:
32+
token: ${{ secrets.RELEASE_TOKEN }}
33+
files: ${{ steps.alfred_builder.outputs.workflow_file }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
.DS_Store
3+
vendor/

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2024 Matt Stein
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# Alfred Datespan Workflow
22

3-
Use this workflow to get the difference between two dates in Alfred. This relies exclusively on PHP’s [DateInterval](https://www.php.net/manual/en/dateinterval.format.php) method, which is happy to accept a variety of inputs and works pretty well! Examples:
3+
Get human-formatted date/time intervals with Alfred.
44

5-
- `datespan tomorrow`: countdown in hours and minutes
6-
- `datespan 10/10/10`: difference in years, months, days, hours, and minutes—along with total business weeks, weeks, days, hours, and minutes
7-
- `datespan 3/10 to 5/12`: all units above, but the span between zero-hour on each date
5+
## Installation
86

9-
You can use any format that [`strtotime`](https://php.net/manual/en/function.strtotime.php) can parse.
7+
Download the `.alfredworkflow` file from the [latest release](https://github.com/mattstein/alfred-datespan-workflow/releases) and double-click to install.
108

11-
Screenshots with a few more examples [on my blog](http://workingconcept.com/blog/date-span-alfred-workflow).
9+
## Usage
1210

13-
Comments, suggestions, criticisms, and pull requests all welcome!
11+
Use this workflow to get the difference between two dates in Alfred. This relies exclusively on PHP’s [DateInterval](https://www.php.net/manual/en/dateinterval.format.php) method, which is happy to accept a variety of inputs and works pretty well!
1412

15-
## Usage
13+
Examples:
1614

17-
Download or check out this repository, zip up its contents, and change the `.zip` file extension to `.alfredworkflow`. Double-click to install.
15+
- `datespan tomorrow`: countdown in hours and minutes
16+
- `datespan 10/10/10`: difference in years, months, days, hours, and minutes—along with total business weeks, weeks, days, hours, and minutes
17+
- `datespan 3/10 to 5/12`: all units above, but the span between zero-hour on each date
18+
19+
You can use any format that [`strtotime`](https://php.net/manual/en/function.strtotime.php) can parse.

0 commit comments

Comments
 (0)