Skip to main content

Gorizont Dacha Bus

Initial State​

Маршрут №100 «Клиффорд – с/о Ростоши 2 »

Клиффорд

7.288.008.359.119.4310.1810.5411.2612.0113.0513.3714.1214.4915.2115.5617.0617.3818.1318.4919.2119.56

Конечная (сады)

|8.18|8.50|9.25|10.01|10.33|11.08|11.44|12.16|12.51|13.55|14.27|15.02|15.39|16.11|16.46|17.56|18.28|19.03|19.39|20.11|20.46|

Перевозчик – ООО «Оренбурггазтранс», телефон диспетчерской 73-20-50

Regex for VS Code​

Just for table view.

Remove a redundant new lines after copy/past from Windows Chrome markdown extension (with scissors icon).

FindReplace
\|\n\n([^\n]+)\n\n\|$1

Given​

Source​

Source Content

Маршрут №110 «Клиффорд – с/о Ростоши 3»                                                   

Рабочие дни

      Клиффорд

8.18

8.50

9.25

10.01

10.33

11.08

11.44

12.16

12.51

13.55

14.27

15.02

15.39

16.11

16.46

17.56

18.28

19.03

19.39

20.11

20.46

Result​

Initial Shell Script​

gorizont.sh
#! /bin/bash

#cat rasp.txt | grep "<p>[0-9].*</p>" | sed -r "s/.*<p>(.*)<\/p>/\1/"

curl -s https://www.orenburg.ru/background/raspisanie_sadovodcheskikh_marshrutov/marshrut_100/ | sed "/Маршрут/d" | grep "\(Клиффорд\|Конечная\|Рабочие\|Выходные\|<p>[0-9].*\)" | sed -r -e "s/.*>([^<]+).*/\1/" | sed 's/^[^[:alnum:]]\+//g' > rasp100.txt

curl -s https://www.orenburg.ru/background/raspisanie_sadovodcheskikh_marshrutov/marshrut_110/ | sed "/Маршрут/d" | grep "\(Клиффорд\|Конечная\|Рабочие\|Выходные\|<p>[0-9].*\)" | sed -r -e "s/.*>([^<]+).*/\1/" | sed 's/^[^[:alnum:]]\+//g' > rasp110.txt

#curl -s https://www.orenburg.ru/background/raspisanie_sadovodcheskikh_marshrutov/marshrut_100/ | grep "\(<p>К\|<p>[0-9].*\)" | sed -r "s/.*<p>(.*)<\/p>/\1/" > rasp100.txt
#curl -s https://www.orenburg.ru/background/raspisanie_sadovodcheskikh_marshrutov/marshrut_110/ | grep "\(<p>К\|<p>[0-9].*\)" | sed -r "s/.*<p>(.*)<\/p>/\1/" > rasp110.txt

Remove all spaces​

see sed remove all but alnum (../shells/commands/sed/sed-remove-all-but-alnum)

Output Table Design​

Клиффорд

100
-
8.18
110 раб110 вых
7.457.45

Сады

100
-
8.18
110 раб110 вых
7.457.45

TODO​

shell script:

  • join two files
    • remove dot
    • sort
  • edit
  • output

jsx:

  • run shell script when page enter
  • gif with condition

other work:

  • create page 297 & 296 buses