recentpopularlog in

kme : recommendation   62

Top 4 screen recorders in Linux - http://hackerspace.kinja.com/
1. Record my desktop
2. Kazam
3. Vokoscreen <-- I used this one because it was in the Ubuntu repos (does not make GIFs, though; see https://github.com/dergachev/screengif)
4. Simple Screen Recorder
screenrecording  screencasting  screenshot  linux  video  utility  software  list  recommendation 
october 2017 by kme
Grep and Sed Equivalent for XML Command Line Processing - Stack Overflow - https://stackoverflow.com/
Accepted answer recommends XMLStarlet, but links to this handy tutorial: https://www.ibm.com/developerworks/library/x-starlet/index.html.

Also:
To Joseph Holsten's excellent list, I add the xpath command-line script which comes with Perl library XML::XPath. A great way to extract information from XML files:

xpath -q -e '/entry[@xml:lang="fr"]' *xml
xml  xpath  xslt  cli  commandline  textprocessing  list  recommendation 
october 2017 by kme
xml - How to execute XPath one-liners from shell? - Stack Overflow - https://stackoverflow.com/
What on earth do all these options do?
<code class="language-bash">xmlstarlet sel -T -t -m '//element/@attribute' -v '.' -n filename.xml</code>
Nokogiri. If I write this wrapper I could call the wrapper in the way described above:

<code class="language-ruby">
#!/usr/bin/ruby

require 'nokogiri'

Nokogiri::XML(STDIN).xpath(ARGV[0]).each do |row|
puts row
end
XML::XPath. Would work with this wrapper:

#!/usr/bin/perl

use strict;
use warnings;
use XML::XPath;

my $root = XML::XPath->new(ioref => 'STDIN');
for my $node ($root->find($ARGV[0])->get_nodelist) {
print($node->getData, "\n");
}
</code>


Also:
<code class="language-bash">
xmllint --xpath '//element/@attribute' file.xml
xmlstarlet sel -t -v "//element/@attribute" file.xml
saxon-lint --xpath '//element/@attribute' file.xml
</code>

In Python with lxml:
So to do the same for normal Web content—HTML docs that aren’t necessarily well-formed XML:
<code class="language-bash">
echo "<p>foo<div>bar</div><p>baz" | python -c "from sys import stdin; \
from lxml import html; \
print '\n'.join(html.tostring(node) for node in html.parse(stdin).xpath('//p'))"
</code>

And to instead use html5lib (to ensure you get the same parsing behavior as Web browsers—because like browser parsers, html5lib conforms to the parsing requirements in the HTML spec).
<code class="language-bash">
echo "<p>foo<div>bar</div><p>baz" | python -c "from sys import stdin; \
import html5lib; from lxml import html; \
doc = html5lib.parse(stdin, treebuilder='lxml', namespaceHTMLElements=False); \
print '\n'.join(html.tostring(node) for node in doc.xpath('//p'))
</code>
xpath  xml  xslt  parsing  ruby  textprocessing  webdevel  commandline  cli  oneliner  list  recommendation  samplecode 
october 2017 by kme
Larry Wall: 5 Programming Languages Everyone Should Know - YouTube
* JavaScript
* Java ("the COBOL of the 21st century; heavyweight, verbose, and everyone loves to hate it." "Managers like it because it looks like you're getting things done." "It's kind of like you can eat a one point steak or 100 pounds of shoe leather, and you sort of feel a greater sense of accomplishment after eating the shoe leather.")
* Haskell ("a language for geniuses, by geniuses" ... "if so, then you know you have to hire some really smart people to program in it... Haskell is sort of a modern kind of LISP in that sense."
* C
* Python/Ruby/Perl
programming  language  recommendation  perl  video 
march 2014 by kme

Copy this bookmark:





to read