-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
3869 lines (3369 loc) · 123 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2018-12-30 dom 02:44 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Bases para el periodismo de datos</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Adolfo Antón Bravo" />
<meta name="description" content="Algunos apuntes alrededor del periodismo de datos para tomar el control del ordenador."
/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
/*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/styles/readtheorg/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/styles/readtheorg/css/readtheorg.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/styles/lib/js/jquery.stickytableheaders.min.js"></script>
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/styles/readtheorg/js/readtheorg.js"></script>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
displayAlign: "center",
displayIndent: "0em",
"HTML-CSS": { scale: 100,
linebreaks: { automatic: "false" },
webFont: "TeX"
},
SVG: {scale: 100,
linebreaks: { automatic: "false" },
font: "TeX"},
NativeMML: {scale: 100},
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em"
}
});
</script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
</head>
<body>
<div id="content">
<h1 class="title">Bases para el periodismo de datos</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org236958a">Primera sesión</a>
<ul>
<li><a href="#org2650884">whoami</a></li>
<li><a href="#orgfd79c50">Presentación</a>
<ul>
<li><a href="#org896ba39">Introducción al Periodismo de Datos</a></li>
</ul>
</li>
<li><a href="#orgc00be02">Recolección de datos, ejemplo</a></li>
<li><a href="#org5535b1f">Terminal</a>
<ul>
<li><a href="#orgaf69c5a">CLI, GUI y NUI</a></li>
<li><a href="#org72beead">Algo de contexto histórico</a></li>
</ul>
</li>
<li><a href="#orgda4acff">Bienvenida a BASH</a>
<ul>
<li><a href="#orgc5d67bb">Ventajas de la línea de comandos</a></li>
</ul>
</li>
<li><a href="#org194560d">¿Cómo empezamos?</a>
<ul>
<li><a href="#orgaac9ce1">GNU/Linux</a></li>
<li><a href="#org1fcd5b8">MacOSX</a></li>
<li><a href="#org2e808e6">Windows</a></li>
</ul>
</li>
<li><a href="#org703d8ad">Cygwin</a>
<ul>
<li><a href="#org3d4f4b0">Instalación</a></li>
<li><a href="#org594b015">Instalar paquetes</a></li>
<li><a href="#org60ca98f">Algunos paquetes interesantes</a></li>
<li><a href="#org47541ce">apt-cyg</a></li>
<li><a href="#orgba93c34">Cambiar la home de Cygwin</a></li>
<li><a href="#org76018ba">Comandos de Cygwin en la consola de Windows</a></li>
</ul>
</li>
<li><a href="#org3c25741">Configuración de editor por defecto</a></li>
<li><a href="#org7113e52">Algunas utilidades</a>
<ul>
<li><a href="#org44e503d">Interrumpir un comando</a></li>
<li><a href="#orga0b972d">Limpiar la línea</a></li>
<li><a href="#org202f372">Salir de la terminal</a></li>
<li><a href="#orge2b491e">Aliases</a></li>
</ul>
</li>
<li><a href="#orgf31465a">Comandos como explorador de archivos</a>
<ul>
<li><a href="#org1bcbc92">whoami</a></li>
<li><a href="#org4a3a9c5">ls</a></li>
<li><a href="#org29d0d2c">pwd</a></li>
<li><a href="#orge849a5f">touch</a></li>
<li><a href="#orgd95fd14">file</a></li>
<li><a href="#orgc972e51">mkdir</a></li>
<li><a href="#org8219798">cd</a></li>
<li><a href="#org1fe0679">cp</a></li>
<li><a href="#orge6f33eb">mv</a></li>
<li><a href="#orgc8a5b26">env</a></li>
</ul>
</li>
<li><a href="#orgd6e52c6">Miscelánea</a>
<ul>
<li><a href="#org9d70c17">Buscadores</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org66da2de">Segunda sesión</a>
<ul>
<li><a href="#orgcc11618">Repaso de la primera sesión</a></li>
<li><a href="#org92f2262">Operadores de búsqueda</a></li>
<li><a href="#orge3f33c2">Editor de textos</a></li>
<li><a href="#org3d7ccea">Repaso de la instalación de apt-cyg en Cygwin</a></li>
<li><a href="#orgf689bc4">Brew</a></li>
<li><a href="#org4d1dcf9">lynx</a></li>
<li><a href="#orgafdb041">Grupo de Telegram</a></li>
<li><a href="#orgaabe4d0">Símbolos escapados</a></li>
<li><a href="#org8cb7bbf">API de BASH</a></li>
<li><a href="#org8ace59d">Atajos de Bash</a></li>
<li><a href="#orgee3b40b">Comodines</a>
<ul>
<li><a href="#org80a7909"><code>*</code></a></li>
<li><a href="#orgd8364e2"><code>?</code></a></li>
<li><a href="#org56e883b"><code>[]</code></a></li>
</ul>
</li>
<li><a href="#orgf4be080">Proyectos interesantes referenciados</a></li>
<li><a href="#orgc15b82c">Software hablado</a></li>
<li><a href="#org4c1e232">Fun-da-men-tal?</a>
<ul>
<li><a href="#org7826792">How (not) to be a danger to yourself and others using the command line:</a></li>
<li><a href="#org6805070">¿Puede un periodista usar la línea de comandos?</a></li>
<li><a href="#orga1cbb3b">Introducción a la línea de comandos</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org0cacf34">Tercera sesión</a>
<ul>
<li><a href="#org2f92f10">URL y más allá</a></li>
<li><a href="#org013af20">Repaso de atajos</a>
<ul>
<li><a href="#orga92a4b7">Ordenador</a></li>
<li><a href="#org9d73519">Sistema operativo</a></li>
<li><a href="#orgb570926">Aplicaciones</a></li>
<li><a href="#orgb1d6bd1">Navegador</a></li>
<li><a href="#orge62432d">Web</a></li>
</ul>
</li>
<li><a href="#org7444139">Open Refine</a>
<ul>
<li><a href="#org32368ea">Descarga de Open Refine:</a></li>
<li><a href="#org08147ba">Manual de Open Refine:</a></li>
</ul>
</li>
<li><a href="#orga8bec2b">Personalización de la línea de comandos</a></li>
<li><a href="#org72fc565">Análisis de datos</a></li>
<li><a href="#orgb6b12c2">Descarga de archivos</a>
<ul>
<li><a href="#org2e95844">curl</a></li>
<li><a href="#org70f071b">wget</a></li>
<li><a href="#orgce67fe3">lynx</a></li>
</ul>
</li>
<li><a href="#org8e0b032">Exploración de archivos</a>
<ul>
<li><a href="#orgaf3c314">wc</a></li>
<li><a href="#orga7a6a56">file</a></li>
<li><a href="#org6ea125a">du</a></li>
<li><a href="#org179ee3c">head</a></li>
<li><a href="#org82eefe9">Qué es "^M"</a></li>
<li><a href="#orgdbfd970">Codificación del archivo</a></li>
<li><a href="#org753e680">tail</a></li>
<li><a href="#org79435c3">split</a></li>
<li><a href="#org3136354">grep</a></li>
<li><a href="#org3d08c01">sed</a></li>
<li><a href="#orgbb38fed">Cuántas columnas tiene</a></li>
<li><a href="#org740a143">cut</a></li>
</ul>
</li>
<li><a href="#orgfa53d24">Flujo de texto</a>
<ul>
<li><a href="#org118e1ba">sed</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgccd4597">Cuarto día</a>
<ul>
<li><a href="#org8cd8fe0">Dudas</a>
<ul>
<li><a href="#org6601c0e">Conocer distintos tipos de formatos de (intercambio de) datos</a></li>
<li><a href="#org43a29e7">Tipos de datos</a></li>
<li><a href="#org9068892">Conversión de datos: XML, CSV, XLSX</a></li>
<li><a href="#org4b3730b">¿Necesita Open Refine conexión a Internet?</a></li>
<li><a href="#orge04c93d">Selección por fechas en refine y agrupación en Refine</a></li>
<li><a href="#orgabb31f8">Grep es súper útil y lo demás sobra</a></li>
<li><a href="#org2680e85">¿Y no vamos a ver algún programita que haga gráficos?</a></li>
<li><a href="#org49704cc">Gestión paquetes windows</a></li>
</ul>
</li>
<li><a href="#orgeefef65">Github</a></li>
<li><a href="#org3d8a0dc">Hagamos nuestra propia web</a></li>
</ul>
</li>
<li><a href="#orge7a8b40">Quinto día</a>
<ul>
<li><a href="#orgf3a2771">Desorden del día</a></li>
<li><a href="#org3630d59">Repaso de línea de comandos</a>
<ul>
<li><a href="#org2dd8853">seq</a></li>
</ul>
</li>
<li><a href="#orgc723e59">Web scraping</a>
<ul>
<li><a href="#org3064611">ImportHTML()</a></li>
<li><a href="#orgbdf38c1">ImportXML()</a></li>
<li><a href="#org2856db2">XPATH</a></li>
<li><a href="#orgde95773">Más Scraping</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org21796be">Sexto día</a>
<ul>
<li><a href="#org55d80c8">Desorden del día</a></li>
<li><a href="#org868e712">QGIS</a></li>
<li><a href="#org8122474">Repaso Github</a>
<ul>
<li><a href="#org2ceda4e">Cambiar el editor por defecto</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org0cfc07e">Séptimo día</a>
<ul>
<li><a href="#orge98d626">Desorden del día</a></li>
<li><a href="#org2c8a9a2">Repaso general</a>
<ul>
<li><a href="#orgbd966ef">Resaltado de sintaxis en nano</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org079c83b">Extra</a>
<ul>
<li><a href="#orgfeff8dc">Cron y crontab</a>
<ul>
<li><a href="#orgfc6cad4">¿Qué cosas se pueden hacer?</a></li>
<li><a href="#orga3224a4">Para listar las tareas</a></li>
<li><a href="#org5b791b4">Para editar el archivo</a></li>
<li><a href="#org0ff726e">Eliminar el archivo</a></li>
<li><a href="#org128d23f">Sintaxis</a></li>
<li><a href="#orge57ccf5">Una tarea del cron</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgb6847b2">Algunos enlaces desordenados</a></li>
</ul>
</div>
</div>
<div id="outline-container-org236958a" class="outline-2">
<h2 id="org236958a">Primera sesión</h2>
<div class="outline-text-2" id="text-org236958a">
</div>
<div id="outline-container-org2650884" class="outline-3">
<h3 id="org2650884">whoami</h3>
<div class="outline-text-3" id="text-org2650884">
<p>
Soy Adolfo Antón Bravo, doctor en Ciencias de la Información por la Universidad Complutense de Madrid.
He trabajado durante casi diez años como socio de una cooperativa de servicios informáticos con software libre.
Anteriormente trabajé de diseño web, diseño gráfico y periodista en diversos medios.
Me podéis encontrar por:
</p>
<ul class="org-ul">
<li>twitter: <a href="https://twitter.com/adolflow">tw:adolflow</a></li>
<li>github: <a href="https://github.com/flowsta">gh:flowsta</a></li>
<li>gmail: adolflow</li>
<li>web: <a href="https://infotics.es">infotics.es</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgfd79c50" class="outline-3">
<h3 id="orgfd79c50">Presentación</h3>
<div class="outline-text-3" id="text-orgfd79c50">
<p>
El programa del curso es muy ambicioso. Cada una de las partes podría llevarnos todo el curso. No hay
obligación de dar todo, pero sí que es importante que sentemos lo más sólidamente posible unas buenas bases
sobre las que poder aprender de todas esas u otras tecnologías de ahora en adelante y seamos capaces de
acometer todo tipo de proyectos de periodismo de datos, ya sea porque podemos hacerlo, porque podemos
aprenderlo o porque podemos pedir ayuda especializada.
</p>
<p>
Al ser un curso presencial y colectivo, es importante que vayamos a la par, que aprendamos todxs. En este sentido, es muy importante decir en todo momento las dudas que tenemos, los fallos que se producen cuando intentamos hacer algo, no tener miedo a exponer la dificultad, los errores o lo que nos sugiere lo que estamos haciendo. De esta manera, no solo aprenderéis más quien realiza la pregunta sino que aprenderemos todxs, yo incluido.
</p>
</div>
<div id="outline-container-org896ba39" class="outline-4">
<h4 id="org896ba39">Introducción al Periodismo de Datos</h4>
<div class="outline-text-4" id="text-org896ba39">
<p>
Dado que todxs -menos uno- sois periodistas, nos vamos a saltar la introducción al periodismo de datos ya que
creo que es mejor que vayamos al turrón. directamente.
</p>
<p>
La introducción que normalmente realizo –en construcción- la podéis encontrar <a href="https://flowsta.github.io/periodismodatos/">aquí</a>.
</p>
</div>
</div>
</div>
<div id="outline-container-orgc00be02" class="outline-3">
<h3 id="orgc00be02">Recolección de datos, ejemplo</h3>
<div class="outline-text-3" id="text-orgc00be02">
<p>
Empezamos con una recolección de datos de todxs vosotrxs y de vuestras aptitudes para saber/ver varias cosas:
</p>
<ul class="org-ul">
<li>Quiénes sois</li>
<li>Qué estudios tenéis</li>
<li>Dónde habéis estudiado</li>
<li>De dónde venís</li>
</ul>
<p>
En esta recopilación se plantean algunas cuestiones habituales que ocurren cada vez que pensamos en un modelo
de datos.
</p>
<p>
Además, hay algunos datos controvertidos por su caracter personal como:
</p>
<ul class="org-ul">
<li>Edad</li>
<li>Género</li>
</ul>
<p>
El proceso de recolección es una de las fases más importantes del proceso del periodismo de datos.
</p>
<p>
En relación a vuestras aptitudes, sirve para:
</p>
<ul class="org-ul">
<li>Saber cómo os consideráis en relación a algunos saberes importantes para el periodismo de datos.</li>
<li>Orientar las horas del curso.</li>
</ul>
<p>
Al final del curso, haremos otra recogida de datos y veremos cómo os ha ido.
</p>
</div>
</div>
<div id="outline-container-org5535b1f" class="outline-3">
<h3 id="org5535b1f">Terminal</h3>
<div class="outline-text-3" id="text-org5535b1f">
<p>
En este curso vamos a empezar por la terminal. Cuando me refiero a la terminal en realidad me refiero a una
emulación de la terminal que era la interfaz de texto que tenían los ordenadores antes de las interfaces
gráficas.
</p>
<p>
También se le conoce por consola, en cuanto que es una consola –aunque mucha gente lo puede confundir con una
consola de videojuegos– o por línea de comandos, ya que se introducen comandos.
</p>
</div>
<div id="outline-container-orgaf69c5a" class="outline-4">
<h4 id="orgaf69c5a">CLI, GUI y NUI</h4>
<div class="outline-text-4" id="text-orgaf69c5a">
<p>
En la terminal se introducen comandos que ejecutan programas CLI, acrónimo que obedece a <i>Command Line
Interface</i> o <i>interfaz de línea de comandos</i>.
</p>
<p>
En los entornos gráficos o interfaces gráficas hay programas GUI, acrónimom que responde a <i>Graphic User
Interface</i> o <i>intefaz gráfica de usuarix</i>.
</p>
<p>
Pero también hemos trabajado -de hecho lo hacemos todos los días- con interfaces <i>NUI</i> (<i>Natural User
Interface</i> o <i>interfaz natural de usuarix</i>) como pueden ser las pantallas
capacitivas multitáctiles, <i>Kinect</i> –con el movimiento– o <i>Siri</i> o <i>Alexia</i>
–con el reconocimiento de lenguaje natural–.
</p>
</div>
</div>
<div id="outline-container-org72beead" class="outline-4">
<h4 id="org72beead">Algo de contexto histórico</h4>
<div class="outline-text-4" id="text-org72beead">
<p>
Al inicio de los ordenadores, solo había líneas de comandos para
comunicarnos con ellos. Bell Telephone lanzó en 1969 <i>V1</i> sobre <i>UNIX</i>
Timeshare System. UNIX tenía la shell <i>sh</i> que era la única
forma de comunicarse con el ordenador.
</p>
<p>
Así fue hasta 1973, cuando Las <i>GUI</i> fueron desarrollados en el
<i>Centro de Investigación de Xerox en Palo Alto</i> (<i>Palo Alto Research
Center</i>, <i>PARC</i>).
</p>
<p>
Tiempo después, <i>Apple</i> pagó para estudiar la idea, que finalmente se
concreto en su <i>GUI</i>.
</p>
<p>
El MIT desarrolla una GUI para Unix en 1986, X.
</p>
<p>
El sistema XFree86 de Linux se desarrolló en 1996, una implementación
libre del original X, al que homenajea en el nombre.
</p>
</div>
</div>
</div>
<div id="outline-container-orgda4acff" class="outline-3">
<h3 id="orgda4acff">Bienvenida a BASH</h3>
<div class="outline-text-3" id="text-orgda4acff">
<p>
<a href="https://es.wikipedia.org/wiki/Bash">Bash</a> (Bourne-again shell) es a la vez un programa que interpreta órdenes y un lenguaje de programación. Es la
shell POSIX que viene por defecto en la mayoría de las distribuciones.
</p>
<p>
Se trata de un acrónimo recursivo y juego de palabras –una práctica habitual en el movimiento del software libre– que significa
"Shell vuelta a nacer", en un homenaje a uno de los primeros intérpretes de Unix <a href="https://es.wikipedia.org/wiki/Bourne_Shell">Bourne Shell</a>, escrita por
Stephen Bourne en 1978 para Unix v.7 (Bell Labs). Brian Fox escribe Bash para GNU en 1987.
</p>
</div>
<div id="outline-container-orgc5d67bb" class="outline-4">
<h4 id="orgc5d67bb">Ventajas de la línea de comandos</h4>
<div class="outline-text-4" id="text-orgc5d67bb">
<ul class="org-ul">
<li>Ahorras tiempo, muuuuucho tieeeeempo</li>
<li>Te ofrecen una alternativa a las GUI.</li>
<li>Te acercan más a cómo funcionan los sistemas POSIX.</li>
<li>Funcionas con atajos compartidos.</li>
<li>Te preparan para la programación.</li>
<li>Aprendes otra forma de hacer las cosas.</li>
<li>Te empodera.</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-org194560d" class="outline-3">
<h3 id="org194560d">¿Cómo empezamos?</h3>
<div class="outline-text-3" id="text-org194560d">
<p>
Necesitamos un programa que emula la terminal.
</p>
</div>
<div id="outline-container-orgaac9ce1" class="outline-4">
<h4 id="orgaac9ce1">GNU/Linux</h4>
<div class="outline-text-4" id="text-orgaac9ce1">
<p>
Abrimos la terminal. Entiendo que si tienes GNU/Linux, sabes hacer esto, pero si no, basta con buscar terminal
entre los programas que tenemos instalados.
</p>
</div>
</div>
<div id="outline-container-org1fcd5b8" class="outline-4">
<h4 id="org1fcd5b8">MacOSX</h4>
<div class="outline-text-4" id="text-org1fcd5b8">
<p>
Lxs usuarixs de MacOSX lo tienen aparentemente más fácil dado que tienen un programa llamado Terminal
(Utilidades –> Terminal) que es un buen comienzo. En versiones anteriores de MacOSX puede haber problemas o
inconvenientes, ya sea porque no esté activado XCode o porque sea difícil hacerlo.
</p>
</div>
</div>
<div id="outline-container-org2e808e6" class="outline-4">
<h4 id="org2e808e6">Windows</h4>
<div class="outline-text-4" id="text-org2e808e6">
<p>
Aunque versiones modernas –Windows 10– proveé una terminal, lo haremos con un programa llamado Cygwin que
ofrece una completa emulación de terminal POSIX en Windows que a la postre puede resultar incluso más fácil de
usar que la de Mac.
</p>
</div>
</div>
</div>
<div id="outline-container-org703d8ad" class="outline-3">
<h3 id="org703d8ad">Cygwin</h3>
<div class="outline-text-3" id="text-org703d8ad">
<p>
<a href="https://www.cygwin.com/">Cygwin</a> es una emulación de la terminal UNIX en Windows.
</p>
<p>
Aunque este es un paso obligatorio para lxs usuarixs de Windows, el resto debe atender pues se explican
conceptos que nos van a resultar útiles en otros momentos del curso.
</p>
</div>
<div id="outline-container-org3d4f4b0" class="outline-4">
<h4 id="org3d4f4b0">Instalación</h4>
<div class="outline-text-4" id="text-org3d4f4b0">
<p>
Hemos de hacer 4 pasos:
</p>
<ul class="org-ul">
<li>Descarga del programa.</li>
<li>Instalar apt-cyg y con ello el resto de paquetes con los que queremos trabajar.</li>
<li>Instalar <code>nano</code> como editor por defecto en vez de <code>vi</code>.</li>
<li>Cambiar la variable <code>db_home</code> para acceder a la estructura de directorios de Windows.</li>
</ul>
<p>
Salvo la descarga del programa en sí, el orden de las siguientes tareas responde a nuestros intereses. Lo explicamos.
</p>
</div>
</div>
<div id="outline-container-org594b015" class="outline-4">
<h4 id="org594b015">Instalar paquetes</h4>
<div class="outline-text-4" id="text-org594b015">
<p>
La consola viene con un conjunto de paquetes básicos. Para usar más paquetes, en el momento de la instalación
del <code>setup</code>, tenemos que elegir los paquetes.
</p>
<p>
Instalamos <code>nano</code> porque necesitamos un editor de textos en la consola, un editor de textos CLI que nos aporta
velocidad y precisión. Y necesitaremos más.
</p>
<p>
Una vez que lo instalamos, empezamos a utilizar Cywgin. Pero, ¿qué pasa si quermeos otro programa? Que hemos
de cerrar Cywgin y volver a correr el instalador.
</p>
<p>
Podrías pensar que "¿por qué no instalar todos de una sola vez?", porque es una mala práctica, no tiene
sentido y ocuparía muchísimo. Es como si para consultar un libro en una biblioteca tuvieras que descargarte
todos…
</p>
<p>
Para facilitar este proceso utilizaremos apt-cyg, que es un gestor de paquetes –programas– para cygwin.
</p>
</div>
</div>
<div id="outline-container-org60ca98f" class="outline-4">
<h4 id="org60ca98f">Algunos paquetes interesantes</h4>
<div class="outline-text-4" id="text-org60ca98f">
<ul class="org-ul">
<li>nano, editor de texto.</li>
<li>git, para trabajar con git, software de control de versiones.</li>
<li>imagemagick, para manipular imágenes.</li>
<li>emacs, editor de texto.</li>
<li>python, para trabajar con Python.</li>
<li>R, para trabajar con R.</li>
<li>perl, para trabajar con perl.</li>
<li>ruby, para trabajar con ruby.</li>
<li>tesseract, herramienta de reconocimiento óptico de caracteres
(<i>OCR</i>), con los paquetes en inglés y español dado que son los
idiomas más habituales.</li>
<li>grep, para realizar búsquedas en el texto.</li>
<li>pdfgrep: para realizar búsquedas en texto de pdfs.</li>
<li>sgrep, para realizar búsquedas de texto en documentos SGML, XML o
HTML.</li>
<li>awk y gawk, para procesar texto.</li>
<li>sed, para editar flujos de texto.</li>
<li>qpdf, para transformación de PDF</li>
<li>xpdf, para visionar y otras operaciones con pdf</li>
<li>odt2txt, para pasar un odt a txt.</li>
<li>xlsx2csv, para pasar un xlsx a csv.</li>
<li>p7zip, archivar y comprimir datos.</li>
<li>gzip, compresor de datos</li>
<li>unzip, descompresor de datos</li>
<li>zip, compresor de datos</li>
<li>lynx, visor web</li>
<li>links, visor web</li>
<li>curl, transferencia de archivos multiprotocolo</li>
<li>wget, descargar archivos de la web</li>
<li>less, paginador, similar a more</li>
</ul>
</div>
</div>
<div id="outline-container-org47541ce" class="outline-4">
<h4 id="org47541ce">apt-cyg</h4>
<div class="outline-text-4" id="text-org47541ce">
<p>
<a href="https://github.com/transcode-open/apt-cyg">apt-cyg</a> es un gestor de paquetes de Cygwin que funciona en línea de comandos. El nombre proviene de ser como
un <a href="https://wiki.debian.org/Apt">apt</a> para Cygwin. Un APT (<i>Advanced Package Tool</i>) es un conjunto de herramientas para manejar los paquetes
–programas– de los sistemas Debian GNU/Linux. Se ha hecho muy popular su funcionamiento y otros sistemas
operativos lo han imitado porque permite:
</p>
<ul class="org-ul">
<li>Instalar programas.</li>
<li>Desinstalar programas.</li>
<li>Actualizar programas.</li>
<li>Resolver dependencias de los programas de forma automática.</li>
</ul>
<p>
Para instalarlo, tal como cuentan en su página web:
</p>
<pre class="example">
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
</pre>
<p>
Cerramos Cygwin y volvemos a abrirlo.
</p>
<p>
Ahora ya podremos instalar un editor como <code>nano</code> como sigue:
</p>
<pre class="example">
apt-cyg install nano
</pre>
<p>
De su ayuda, vemos el listado de opciones –argumentos– que tiene:
</p>
<dl class="org-dl">
<dt><code>install</code></dt><dd>para instalar paquetes.</dd>
<dt><code>remove</code></dt><dd>para borrar paquetes.</dd>
<dt><code>update</code></dt><dd>descarga una copia de la lista de paquetes del servidor.</dd>
<dt><code>download</code></dt><dd>descarga los paquetes del servidor pero no los instala ni actualiza.</dd>
<dt><code>show</code></dt><dd>muestra información del paquete.</dd>
<dt><code>depends</code></dt><dd>muestra el árbol de dependencia de un paquete.</dd>
<dt><code>rdepends</code></dt><dd>produce un arbol de paquetes que dependen de ese.
Produce a tree of packages that depend on the named package.</dd>
<dt><code>list</code></dt><dd>busca en los paquetes instalados coincidencias con esa expresión regular.</dd>
<dt><code>listall</code></dt><dd>buscará cada paquete en el listado de paquetes por coincidencias con esa expresión regular.</dd>
<dt><code>category</code></dt><dd>muestra todos los paquetes que forman parte de una categoría.</dd>
<dt><code>listfiles</code></dt><dd>lista los archivos que pertenecen a un paquete. Se pueden especificar varios archivos.</dd>
<dt><code>search</code></dt><dd>busca por paquetes descargados propietarios de uno o varios archivos.</dd>
<dt><code>searchall</code></dt><dd>busca en cygwin.com información sobre los paquetes. El objetivo es un archivo y <code>searchall</code> devolverá los paquetes que contengan ese archivo.</dd>
<dt><code>packageof</code></dt><dd>seguido de archivos o instrucciones, localiza paquetes que los contiene.</dd>
</dl>
</div>
</div>
<div id="outline-container-orgba93c34" class="outline-4">
<h4 id="orgba93c34">Cambiar la home de Cygwin</h4>
<div class="outline-text-4" id="text-orgba93c34">
<p>
Por defecto, la home del usuarix de Cygwin es el directorio de
instalación del programa.
</p>
<p>
Para disfrutar de Cygwin y acceder a todo el disco, debemos
<a href="http://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation%0A">modificar</a> la variable <code>db_home</code> en <code>/etc/nsswitch.conf</code> con nuestro editor <code>nano</code>:
</p>
<pre class="example">
nano /etc/nsswitch.conf
</pre>
<p>
Y escribimos:
</p>
<pre class="example">
db_home: windows
</pre>
<p>
O de forma equivalente:
</p>
<pre class="example">
db_home: /%H
</pre>
<p>
Tened en cuenta que en los archivos de configuración, la almohadilla <code>#</code> que aparece al principio de línea
significa que la línea está comentada, es decir, que no la va a leer el programa que quiera leerla para hacer
algo.
</p>
<p>
Así que os pueden quedar varias líneas comentadas, incluso contad lo que habéis hecho en una línea comentada,
para que cuando volváis a este archivo sepáis por qué esta línea es así:
</p>
<pre class="example">
Ahora modifico la línea de la variable db_home
</pre>
<p>
De esta última manera puedes interpretar el esquema y hacer que estén
dentro del subdirectorio <code>cygwin</code>, por ejemplo:
</p>
<pre class="example">
db_home: /%H/cygwin
</pre>
<p>
Si a alguien no le funciona, puede proponer este otro método que proponen en <a href="http://stackoverflow.com/questions/225764/safely-change-home-directory">página</a>:
</p>
<pre class="example">
mkpasswd -l -p "$(cygpath -H)" > /etc/passwd
</pre>
</div>
</div>
<div id="outline-container-org76018ba" class="outline-4">
<h4 id="org76018ba">Comandos de Cygwin en la consola de Windows</h4>
<div class="outline-text-4" id="text-org76018ba">
<p>
Esto sería un plus, no lo vimos pero podría hacerse según este <a href="https://www.howtogeek.com/howto/41382/how-to-use-linux-commands-in-windows-with-cygwin/%0A">blog</a>.
</p>
<p>
En las propiedades del sistema, en la columna izquierda pincha en propiedades de sistema avanzadas para abrir la ventana de propiedades.
</p>
<p>
En la pestaña de avanzados, pincha en las variables de entorno abajo. Busca la variable <code>path</code> y pincha en editar. Al final, añadimos la localización de Cygwin:
</p>
<pre class="example">
;C:\Cygwin\bin
</pre>
<p>
Nótese el punto y coma para separarlo de los valores anteriores.
</p>
<p>
Pincha en OK y cierra la ventana. En el prompt de windows ya puedes ejecutar comandos UNIX.
</p>
</div>
</div>
</div>
<div id="outline-container-org3c25741" class="outline-3">
<h3 id="org3c25741">Configuración de editor por defecto</h3>
<div class="outline-text-3" id="text-org3c25741">
<p>
Cuando editamos un archivo de configuración, por ejemplo de <code>git</code>,
el programa que utiliza por defecto es <code>vi</code>, complicado pero no
imposible (manual en <a href="https://www.cs.colostate.edu/helpdocs/vi.html">inglés</a> y <a href="http://www.dc.fi.udc.es/os/people/afyanez/info-vi/">español</a>).
</p>
<p>
Si os mola el rollo <code>vi</code>, sería mejor instalar <code>vim</code> (<a href="http://www.vim.org/docs.php">manual</a>).
</p>