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

feat: add fallback for tithi #16

Merged
merged 1 commit into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To develop this CLI locally, make sure you `npm link` it.
# Open the CLI root directory and run.
npm link

# This will link the CLI binary `awais` so that you can execute it.
# This will link the CLI binary `aaja` so that you can execute it.
```

## Directory Structure
Expand Down
8 changes: 3 additions & 5 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const main = () => {

const main = `#top .container12 .column4 .logo`;


const npDate = $(`${main} .date`);
aaja.npDate = npDate.text().trim();

Expand All @@ -67,9 +66,8 @@ const main = () => {
.split(',')
.map((el) => el.trim());


aaja.tithi = tithi;
aaja.events = events ? events.split('/') :"No events found for today";
aaja.tithi = tithi || 'No tithi found.';
aaja.events = events ? events.split('/') : 'No events found for today.';

const time = $(`${main} .time > span:nth-child(1)`);
aaja.time = time.text().trim();
Expand All @@ -81,7 +79,7 @@ const main = () => {
showOutput(aaja);
})
.catch((err) => {
console.log(err)
console.log(err);
if (err) showError();
});
};
Expand Down