Skip to content

Commit

Permalink
Feature/add she bangs (#72)
Browse files Browse the repository at this point in the history
* add she bangs
* up[date to docs
  • Loading branch information
obar1 authored Dec 15, 2023
1 parent 0133966 commit d8a8378
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 27 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ pip install -r requirements.txt
# copy sample yaml conf
cp ./zero_to_one_hundred/tests/resources/map.yaml .
cat map.yaml
export MAP_YAML_PATH=$(pwd)/map.yaml
# tip: add it to .bash_rc etc or some shell script

```

![](ab67dd2b-7c12-4cdf-a7a5-f773c2b67919.png)

```bash
# tip: add it to .bash_rc etc or some shell script
export MAP_YAML_PATH=$(pwd)/map.yaml
python ./main.py help

chmod +x *.py
./main.py help
```

![](50a86373-910b-4a12-85ef-251b6d4f08f0.png)
Expand All @@ -37,13 +38,11 @@ python ./main.py help
- create new section

```bash
export MAP_YAML_PATH='map.yaml'

url=https://cloud.google.com/docs
python ./main.py create_section $url
./main.py create_section $url

url=https://cloud.google.com/help
python ./main.py create_section $url
./main.py create_section $url
#...etc
```

Expand All @@ -55,10 +54,13 @@ python ./main.py create_section $url

### 0th time usage:

> use what you prefer to grab epub/pdf from oreilly
https://github.com/lorenzodifuccia/safaribooks

> just a sample
> ![](a1aef2bb-ce75-4288-8051-512ca8865522.png)

> you can even save pages as you go with
https://chromewebstore.google.com/detail/reader-view/ecabifbgmdmgdllomnfinbmaellmclnh


### 1st time usage:

Expand All @@ -71,18 +73,20 @@ pip install -r requirements.txt
# copy sample yaml conf
cp ./zero_to_one_hundred/tests_sb/resources/map.yaml .
cat map.yaml

export MAP_YAML_PATH=$(pwd)/map.yaml
# tip: add it to .bash_rc etc or some shell script
```

![](a4b09e11-9f1f-4098-a4e2-77d6df85226a.png)

```bash
vim map.yaml
# add your membership details :)
```

export MAP_YAML_PATH='map.yaml' && python ./main_sb.py help

# tip: add it to .bash_rc etc or some shell script
```bash
chmod +x *.py
./main_sb.py help
```

![](63fd79b5-ad41-45fd-a2dc-367f317bcc0c.png)
Expand All @@ -92,12 +96,8 @@ export MAP_YAML_PATH='map.yaml' && python ./main_sb.py help
- create new meta book

```bash
export MAP_YAML_PATH='map.yaml'

url=https://learning.oreilly.com/library/view/hunt-the-pragmatic-programmer/020161622X/
python ./main_sb.py create_meta_book $url


./main_sb.py create_meta_book $url
```

> add your membership details :) and it will work
Expand Down
Binary file removed a1aef2bb-ce75-4288-8051-512ca8865522.png
Binary file not shown.
Binary file modified d05502bb-4b90-422f-9624-568d9f02cd08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""MAIN:
main
"""
#!/usr/bin/env python3
# coding: utf-8


import sys
Expand Down
5 changes: 2 additions & 3 deletions main_sb.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""MAIN:
main
"""
#!/usr/bin/env python3
# coding: utf-8


import sys
Expand Down
2 changes: 1 addition & 1 deletion zero_to_one_hundred/processors/refresh_links_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ def process(self):
try:
s.refresh_links()
except:
logging.warning(f"issue with {s}")
print(f"issue with {s}")
2 changes: 1 addition & 1 deletion zero_to_one_hundred/processors/unsupported_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ def __init__(self, cmd):
self.cmd = cmd

def process(self):
logging.exception(f"Unsupported Processor {self.cmd}")
print(f"Unsupported Processor {self.cmd}")
raise ValueError

0 comments on commit d8a8378

Please sign in to comment.