Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/papposilene/action-read
This GitHub action tracks the books you read by saving their metadata to a JSON file. Based on the "read-action" by @katydecorah.
https://github.com/papposilene/action-read
book isbn isbn-10 isbn-13 library
Last synced: about 1 month ago
JSON representation
This GitHub action tracks the books you read by saving their metadata to a JSON file. Based on the "read-action" by @katydecorah.
- Host: GitHub
- URL: https://github.com/papposilene/action-read
- Owner: papposilene
- License: mit
- Created: 2022-03-25T10:44:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T17:00:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-17T12:55:57.582Z (2 months ago)
- Topics: book, isbn, isbn-10, isbn-13, library
- Language: TypeScript
- Homepage: https://papposilene.github.io/action-read/
- Size: 1.39 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# read-action
![.github/workflows/test.yml](https://github.com/papposilene/action-read/workflows/.github/workflows/test.yml/badge.svg?branch=main)
![.github/workflows/action-testing.yml](https://github.com/papposilene/action-read/workflows/.github/workflows/action-testing.yml/badge.svg)
![.github/workflows/action-read.yml](https://github.com/papposilene/action-read/workflows/.github/workflows/action-read.yml/badge.svg)
This Github action is based on the [read-action](https://github.com/katydecorah/read-action) by @katydecorah.
This GitHub action tracks the books that you read by updating a JSON file in your repository. Pair it with
the [iOS Shortcut](shortcut/README.md) to automatically format and open the GitHub issue.Create a new issue with the book's ISBN in the title and a ’book-read’ label. The action will then fetch the book's metadata
using [node-isbn](https://www.npmjs.com/package/node-isbn) and commit the change in your repository, always sorting by
the date you finished the book.## Set up the workflow
To use this action, create a new workflow in `.github/workflows` and modify it as needed:
```yml
on:
issues:
types:
- labeledjobs:
update_library:
runs-on: macOS-latest
name: AddReadBook
# only continue if issue has "book-read" label
if: contains( github.event.issue.labels.*.name, 'book-read')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: AddReadBook
uses: papposilene/[email protected]
- name: Download the book thumbnail
run: curl "${{ env.BookThumb }}" -o "data/img/${{ env.BookThumbOutput }}"
continue-on-error: true
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A && git commit -m "Add ${{ env.BookTitle }} to data/read.json."
git push
- name: Close issue
uses: peter-evans/close-issue@v2
with:
issue-number: "${{ env.IssueNumber }}"
comment: "You read ${{ env.BookTitle }} on ${{env.DateRead}}. What will be your next book?"
```## Action options
- `readFileName`: The file where you want to save your books. Default: `data/read.json`.
- `providers`: Specify the [ISBN providers](https://github.com/palmerabollo/node-isbn#setting-backend-providers) that you want to use, in the order you need them to be invoked. If setting more than one provider, separate each with a comma. Default: `google,openlibrary,worldcat`.
## Create an issue
The title of your issue must start with the ISBN of the book:
```
1234567890
```The action will automatically set the date that you finished the book (`dateFinished`) to today. To specify a different
date that you finished the book, add the date after the ISBN in `YYYY-MM-DD` format.```
1234567890 2020-06-12
```If you add content to the body of the comment, the action will add it as the value of `notes`.