-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Muhammad Farooq
committed
Apr 3, 2024
1 parent
2ef0ab2
commit 0a18655
Showing
7 changed files
with
3,690 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Node.js Package | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths-ignore: | ||
- "**/*.md" | ||
- ".gitignore" | ||
- ".editorconfig" | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: "Automated Version Bump" | ||
uses: "phips28/gh-action-bump-version@master" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
minor-wording: "add,Adds,new" | ||
major-wording: "MAJOR,cut-major" | ||
patch-wording: | ||
"patch,fixes" # Providing patch-wording will override commits | ||
# defaulting to a patch bump. | ||
rc-wording: "RELEASE,alpha" | ||
tag-prefix: "v" | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# rekhta-downloader-js | ||
Downloader for rekhta books | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<html> | ||
|
||
<head> | ||
<link rel="icon" type="image/png" /> | ||
<title>Rekhta downloader</title> | ||
<script src="./index.js" type="module"></script> | ||
</head> | ||
|
||
<body> | ||
<form id="download-form"> | ||
<input type="text" name="url" placeholder="Enter the url" | ||
value="https://www.rekhta.org/ebooks/bela-mein-mela-gadar-ki-mari-shahzadiyan-rashidul-khairi-ebooks?lang=ur" /> | ||
<input type="submit" value="Download" /> | ||
</form> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import downloadBook from "../src"; | ||
|
||
const form = document.getElementById("download-form"); | ||
form.addEventListener("submit", onFormSubmit); | ||
|
||
function onFormSubmit(e) { | ||
e.preventDefault(); | ||
const url = document.getElementsByName('url')[0].value; | ||
downloadBook(url) | ||
} |
Oops, something went wrong.