Skip to content

Commit 41795e0

Browse files
authored
Update README.md
1 parent 59e16b2 commit 41795e0

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
# LC-SyncInAction
22

3-
Why take the effort of copy/pasting manually when you can make use of technology to do it for ya.
3+
Why take the effort of copy/pasting your solution manually when you can make use of technology to do it for ya while you can grind more in Leetcode.
44

55
LC-SyncInAction solves this problem and takes your cookie in his hand to pull and push your Accepted solution everyday.
66

7-
First run will pull all your Accepted solutions from LC ( which will take **1h 46 min to 2h 30 min approx** ) and create those submission in the current repository in the specified directory (root, if not provided )
7+
First run will pull all your Accepted solutions from LC ( which will take **1h 45 min to 2h 30 min approx** ) and create a file of those submission in the current repository in the specified directory (root, if not provided )
88

9-
All the run afterwards will fetch your last 20 Accepted submission everyday at 8AM UTC ( 1:30 IST ) daily.
9+
Every file created using this tool follows this naming convention : <submission_id>_<title_slug_of_problem>
10+
11+
All the run afterwards will won't take long as the first run ( will be completed in few seconds :) ) and will fetch last 20 submissions and this step can be customized according to your preferred timing with the help of [schedule](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events)
1012

1113
### Requirements :
1214

1315
`cookie` value from the request headers https://leetcode.com/<your-username>
1416

15-
This cookie value has to be saved as a repository secret named as `cookieVal` which **has to be** passed as `${{ secrets.cookieVal }}` into action step [you can look here on how to do save a repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
17+
This cookie value has to be saved in repository secret named as `cookieVal` which **has to be** passed as `${{ secrets.cookieVal }}` into action step [you can look here on how to do save a repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
1618

1719
You can also pass location of directory, to option `solution_location` , where would you like to collect all your solutions ( the default is root directory ).
1820

1921
## Usage
2022

21-
Example use case of this action in your WORKFLOWS.
23+
Make a WORKFLOW file under `.github` folder by any name of your choice and start writing github actions.
2224

25+
Example use case of action in your WORKFLOWS.
26+
27+
on:
28+
schedule:
29+
- cron : '0 8 * * *' # your favourable timing
30+
2331
jobs :
2432
build :
2533
run-on : ubuntu-latest
@@ -30,10 +38,18 @@ Example use case of this action in your WORKFLOWS.
3038
with :
3139
cookieVal : ${{ secrets.cookieVal }} # secrets.cookieVal coming from repository secret
3240
solution_location : 'path/to/directory' # if any , default is root '.'
41+
42+
# dependency, to write newly created files to the root directory of the repository.
43+
44+
- name: pushing the changes!!
45+
uses: stefanzweifel/git-auto-commit-action@v4
46+
with:
47+
commit_message: Adding new LC solutions # or anything you want to add.
3348

49+
If you need to look at examples check [.github/WORKFLOWS](https://github.com/ME-ON1/Leetcode-SyncInAction/tree/main/.github/WORKFLOWS) to understand a bit more.
3450

3551
## License
3652

37-
The scripts and documentation in this project are released under the [MIT License]()
53+
The scripts and documentation in this project are released under the [MIT License](https://github.com/ME-ON1/Leetcode-SyncInAction/blob/main/LICENSE)
3854

3955

0 commit comments

Comments
 (0)