Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VisiData] come ottenere una tabella (o pi霉 tabelle) da una pagina web, usando solo vd ? #164

Closed
pigreco opened this issue Nov 15, 2020 · 6 comments

Comments

@pigreco
Copy link
Contributor

pigreco commented Nov 15, 2020

Come posso scaricare questa tabella [0] utilizzando solo VisiData ?

image

ho provato cosi e sembra funzionare 馃槢

curl -kL "https://www.tuttitalia.it/regioni/popolazione/" | vd -f html +:table_0::

[0] https://www.tuttitalia.it/regioni/popolazione/

@aborruso aborruso changed the title [VisiData] come ottenere una tabella (o pi霉 tabelle) usando solo vd ? [VisiData] come ottenere una tabella (o pi霉 tabelle) da una pagina web, usando solo vd ? Nov 15, 2020
@aborruso
Copy link
Member

@pigreco 猫 come dici

Qualche nota:

  • -f html per impostare il formato di input;
  • +:table_0:: per scegliere quale tabella, delle tante possibili in una pagina aprire. La 0 猫 la prima. La sintassi completa opzionale 猫 +:<sheet>:<row>:<col>
  • se hai una pagina multitabella e vuoi vedere l'elenco di tutte, basta non indicarne alcuna. Ad esempio
curl -kL "https://en.wikipedia.org/wiki/Olympic_medal" | vd -f html

Questa la issue dove 猫 stato chiesto di introdurre questa modalit脿 saulpw/visidata#214 (comment)

@pigreco
Copy link
Contributor Author

pigreco commented Nov 15, 2020

Osservazione:

questa stringa comando

curl -kL "https://www.tuttitalia.it/regioni/popolazione/" | vd -f html +:table_0::

restituisce, in questo caso:

image

ma basta selezionare i campi in pi霉 e nasconderli.

@pigreco
Copy link
Contributor Author

pigreco commented Nov 15, 2020

@pigreco pigreco closed this as completed Nov 15, 2020
@pigreco
Copy link
Contributor Author

pigreco commented Nov 16, 2020

@aborruso
Copy link
Member

Caro @pigreco ,
l'autore ci ricorda che si pu貌 usare direttamente vd senza passare da curl:

vd "https://www.tuttitalia.it/regioni/popolazione/"  +:table_0::

Appena puoi, modificherei l'articolo, inserendo soltanto questa modalit脿

@pigreco
Copy link
Contributor Author

pigreco commented Nov 16, 2020

@aborruso
allora 猫 ancora pi霉 facile WOW

ricetta modificata!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants