Skip to content

Commit

Permalink
Merge pull request #16 from adarshaacharya/dev
Browse files Browse the repository at this point in the history
feat: add fallback for tithi
  • Loading branch information
adarshaacharya authored Mar 12, 2022
2 parents 437fbed + 0eeda1c commit b1aea47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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

0 comments on commit b1aea47

Please sign in to comment.