Giter VIP home page Giter VIP logo

0to100's Introduction

readme

SQ CI
Quality gate Makefile CI

We read training material from the web and learn from it by doing, but how do we keep that a bit organized? I came up with an idea: this small tool. Given a 'url', it creates the entry in a markdown map and a folder and links them; in this way, you can easily jump between different sections inside your preferred ide. As you expand the map with new contents, you build some reference material, keep it local all the time, and searchable all the time on your daily coding.

quick demo

in you want to check this quickly ...

Open in GitHub Codespaces

just open this repo in your GitHub Codespace and run the demo as:

bash demo.sh 0to100

bash demo.sh 0to100_sb

oto100

0 to 100 ... learn anything from webresources (and not)

current commands:

['create_section', 'done_section', 'refresh_map', 'refresh_links', 'help']

tip in create_section you can override the default toc title adding another # hint below the one header created automatically in the section folder ex

# <https§§§www.cloudskillsboost.google§catalog>
> <https://www.cloudskillsboost.google/catalog>

# catalog

tip in refresh_links you can expand links from other sections automatically ex

# <https§§§www.cloudskillsboost.google§catalog>
> <https://www.cloudskillsboost.google/catalog>

https://www.cloudskillsboost.google/doc

expand the last link to point to the section for the doc - handy as anchor tecnique

1st time usage:

# env
python -m venv .venv
. .venv/bin/activate
pip install .

# copy sample yaml conf
cp ./zero_to_one_hundred/tests/resources/map.yaml .
cat map.yaml
export MAP_YAML_PATH=map.yaml
# tip:  add it to .bash_rc etc or some shell script

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

daily usage:

  • create new section
url=https://cloud.google.com/docs
./main.py create_section $url

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

oto100 safari books 🚧

0 to 100 ... learn anything from safari books https://learning.oreilly.com/member/login/

same as above but it can use some external lib to grab epub from oreilly

current commands:

['snatch_book', 'refresh_toc',  'help']

0th time usage:

use what you prefer to grab epub/pdf from oreilly check this https://github.com/lorenzodifuccia/safaribooks or just save as pdf section by section with this https://chromewebstore.google.com/detail/reader-view/ecabifbgmdmgdllomnfinbmaellmclnh

1st time usage:

# env
python -m venv .venv
. .venv/bin/activate
pip install .

# copy sample yaml conf
cp ./zero_to_one_hundred/tests_sb/resources/map.yaml .
cat map.yaml
export MAP_YAML_PATH=map.yaml
# tip:  add it to .bash_rc etc or some shell script

vim map.yaml
# add your membership details :)

add your membership details :) and it will work

ex with mine :)

chmod +x *.py
./main_sb.py help

daily usage:

  • create new meta-book
url=https://learning.oreilly.com/library/view/hunt-the-pragmatic-programmer/020161622X/
./main_sb.py snatch_book $url

and you have a toc.md for free to use as your index (bookmark it)

as I use myself Lorenzo's great utility safaribooks I added some code to convert the downloaded epub contents into a related pdf and split that in chunks so I can easily use it on ipad or better remarkable for studying and later sync back in a repo for hands-on code... they call that learning by doing 🖖🏻

example:

tools

when you start to have a a few 0to100 based folders

gist to sync multiple 0to100 based repos gist venv auto activate for 0to100 folders

online example

  • 0to100

https://github.com/obar1/zero2hero

  • 0to100sb

mostly private contents, sorry but I don't want to get suited :P

https://github.com/obar1/0to100.oreilly

0to100's People

Contributors

fossabot avatar obar1 avatar sperminathor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

fossabot

0to100's Issues

prj repo

  • readme info
  • version
  • CI
  • move scripts part

fix path changelod

from another folder

(base) √ https-learning.oreilly.com.git % create_section https://learning.oreilly.com/library/view/official-google-cloud/9781119618430/
Traceback (most recent call last):
  File "/Users/mamat/git/obar1/https-learning.oreilly.com.git/0to100-latest/zero_to_one_hundred/main.py", line 34, in <module>
    run_main(sys.argv[1:])
  File "/Users/mamat/git/obar1/https-learning.oreilly.com.git/0to100-latest/zero_to_one_hundred/main.py", line 26, in run_main
    get_version()
  File "/Users/mamat/git/obar1/https-learning.oreilly.com.git/0to100-latest/zero_to_one_hundred/main.py", line 17, in get_version
    with open(change_log, mode="r", encoding="UTF-8") as file_change_log:
FileNotFoundError: [Errno 2] No such file or directory: 'changelog.md'

managing done in the toc

  • in each folder if you have .done file it marks in map as done

maybe use this in the map/readme
🔔 :bell: | 🔕 :no_bell:

add option to include header level to map.md

ex
https://raw.githubusercontent.com/obar1/gcloud_0to100/master/https%C2%A7%C2%A7%C2%A7www.cloudskillsboost.google%C2%A7focuses%C2%A73483%C2%A7parent%3Dcatalog/readme.md?

from

image

and

# <https§§§www.cloudskillsboost.google§focuses§3483§parent=catalog>
> <https://www.cloudskillsboost.google/focuses/3483?parent=catalog>

# Google Cloud Storage - Bucket Lock

to

https§§§www.cloudskillsboost.google§focuses§3483§parent=catalog  ⭕ Google Cloud Storage - Bucket Lock

and

# [https§§§www.cloudskillsboost.google§focuses§3483§parent=catalog](https://www.cloudskillsboost.google/focuses/3483?parent=catalog)

# Google Cloud Storage - Bucket Lock

improve setup to use gitignore

  • add folder called test_setup when to put the actual setup and test if all works
  • add gitignore to it with
setup.sh
runme.sh
map.yaml_
0to100-*/
  • update readme to use it in actual setup

add enable option for safari

sometimes we want to skip the atual invocation of that

image

  • add
download_books =True /False

F it continues to pdf split part ...

add report of pdf pages

  • update json with pages
{" isbn " : " 9781292083384 " ,
" url " : " https://learning.oreilly.com/library/view/increase-your-self/9781292083384/ "
"pages_tot":123
"page_curr":123}

done processore

  • add new processor bash runme close_section http://xxx
  • it creates in the related folder a nee .done file so we knoe it's donr
  • in the refresh section this is refrected with an icone 💯 or something like that

add build map

add

  • refresh-sections
    • for each dir with http:// with the http:§§ ... raadme.md related
      • add it to map.md

add puml

add puml

(base) √ ~ % python latest/zero_to_one_hundred/main.py refresh_puml

status icon in the toc

if there is no pdf or
md is just std // make even less < N rows

 :o: here

othw something

 


top | 📔 | :notebook_with_decorative_cover: | 📕 | :closed_book: | top
top | 📖 | :book::open_book: | 📗 | :green_book: | top
top | 📘 | :blue_book: | 📙 | :orange_book: | top


improve support on linux

change the

wget https://raw.githubusercontent.com/obar1/0to100/main/zero_to_one_hundred/tests/resources/map.yaml
  sed -i '' -e "s|./repo|$DIR_TARGET|g" map.yaml
  • it works on linux
  • it usese tee to print orn
  • keep yaml as .org

improve the json handling for extra keys already there

  • improve refresh_)metadata to keep extra new dict keys
python .\main_sb.py refresh_metadata https://learning.oreilly.com/library/view/learn-enough-python/9780138051143

should keep other keys already in jhson and not only the ones calculated

improve setup for poetry

  • update potery to have as dep only pyyam
  • move all the rest to dev dep
  • create a req
  • update the readme to use req.txt to setup env

add meta support

add option in folder I add manually a file and the conent is reported in the summary readme
ex

https://www.cloudskillsboost.google/course_templates/53 related folder
Building Batch Data Pipelines on Google Cloud

has
meta.json

'notes': 'http://google.com'
'meta1': 'abc'

you get in summary readme

  1. Building Batch Data Pipelines on Google Cloud here 💚 🐳 🧱 'notes':'http://google.com' 'meta1': 'abc'

fix iteration on ites

bug with iter

fix

        try:
            res = next(item for item in a if item is not None)
        except StopIteration:
            return ""
        return res

apply precommit

pre-commit run --all-files

# Run a specific hook against all staged files:
pre-commit run black
pre-commit run flake8
pre-commit run isort
pre-commit run pylint

a few improvements

  • print the actual path of the file used for config
  • avoid duplication of help
  • rename createmetabook to snatch_book :)
image

add refresh_links

in each md there are links to http://
when some of them are added as section
replace them with the location of the section ...

Create new sections automatically on top of links

  • add new option to runme create_sections
  • when create_sections it looks for all the links like like
https://www.cloudskillsboost.google/journeys
to
[https://www.cloudskillsboost.google/journeys](/https§§§www.cloudskillsboost.google§journeys/readme.md)

and autmatically invoke create section for each one

workflow is like

  • create_section
  • do md stuff
  • refresh_links
  • create_sections

add local runme

so you can run from different repo and avoid having to touch bashrc etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.