SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
Fewer cables

  Find out about hardware, so ware, protocols,
    digital video broadcasting, video formats,
computer architectures, Perl modules and more as
the speaker undertakes the project of a lifetime in
           his living room: fewer cables.
                    Léon Brocard


               YAPC::Europe
Me


 Léon Brocard
 French, live in London
 Like food
 Like the colour orange
 Founded Amsterdam.pm, Bath.pm, Croydon.pm
 Leader of London.pm
 Started YAPC::Europe
 Perl hacker
distributions on the CPAN

Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Catalyst-Plugin-CookiedSession,
Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod,
CPAN-Metadata-RDF, CPAN-Mini-Webserver, CPAN-Unpack, Crypt-Skip32-Base32Crockford,
Crypt-Skip32-Base64URLSafe, Dackup, Data-Page, Data-UUID-Base64URLSafe,
DateTime-Stringify, Devel-ebug, Devel-ebug-HTTP, Devel-Profit, Email-Send-Gandi,
Email-Send-Gmail, File-Copy-Reliable, Fir, Games-GuessWord, Git-PurePerl, GraphViz,
Haul, HTML-Fraction, HTML-TagCloud, HTTP-Server-Simple-Kwiki, Image-Imlib2,
Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap,
Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, Kasago, Language-Functional,
LWP-ConnCache-MaxKeepAliveRequests, Mac-EyeTV, MealMaster, Messaging-Courier,
Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3,
Net-Amazon-SimpleQueue, Net-Cassandra, Net-DPAP-Client, Net-FTP-Throttle, Net-LastFM,
Net-Mosso-CloudFiles, Net-MythTV, Net-MythWeb, Net-OpenDHT, Net-Stomp, Net-VNC,
Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2,
Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Packages, Parse-CPAN-Ratings,
Perl-Metric-Basic, PPIx-IndexOffsets, PPIx-LineToSub, Search-Mousse,
String-Koremutake, Template-Plugin-Page, Template-Stash-Strict,
Term-ProgressBar-Quiet, Test-Expect, Tie-GHash, Tree-Ternary_XS, TV-Anytime,
WWW-Gazetteer, WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed,
WWW-Search-Google
e TV as computer

“ e growth of personal computers is happening so
rapidly that the future open-architecture television is
the PC, period. e set-top box will be a
credit-card-size insert that turns your PC into an
electronic gateway for cable, telephone, or satellite. In
other words, there is no TV-set industry in the future.
It is nothing more or less than a computer industry:
displays lled with tons of memory and processing
power.”
e bit radiation business



“ e key to the future of television is to stop thinking
about television as television. TV bene ts most from
thinking of it in terms of bits. Motion pictures, too,
are just a special case of data broadcast. Bits are bits.”
Anything, anytime, anywhere television


  “If your TV could record every program transmitted,
  you would already have ve times the selectivity
  o ered in the superhighway’s broad-brush style of
  thinking. Say, instead of keeping them all, you have
  your TV agent grab the one or two in which you
  might have interest, for your future viewing at any
  time.”
Dackup

 my $source = Dackup::Target::Filesystem->new(
   prefix => ’/home/acme/important/’ );
 my $dest = Dackup::Target::Filesystem->new(
   prefix => ’/home/acme/backup/’ );

 my $dackup = Dackup->new(
   source      => $source,
   destination => $dest,
   delete      => 0,
   dry_run     => 0,
   verbose     => 1,
   throttle    => ’1Mbps’,
 );
 $dackup->backup;
Dackup targets



  Dackup::Target::Filesystem
  Dackup::Target::SSH
  Dackup::Target::S3
  Dackup::Target::CloudFiles
RTFM

    ere are two main logical elements in a MythTV
 system:
    L     e backend contains the TV capture cards, and
      stores the recorded video. A typical system will
      contain at least one backend
    L     e frontend is connected to your TV screen
      and lets you watch LiveTV and recorded shows.
      It gets its data from the backend
Protocol

  C: 21    ANN Playback tigger 0
  S: 2     OK

  C: 48    QUERY_FILETRANSFER 32[]:[]
           REQUEST_BLOCK[]:[]2048
  S: 4     2048

  C: 63    QUERY_FILETRANSFER 32[]:[]
           SEEK[]:[]0[]:[]0[]:[]0[]:[]
           0[]:[]2048
  S: 7     0[]:[]0
Net::MythTV

 my $mythtv = Net::MythTV->new();
 my @recordings = $mythtv->recordings;
 foreach my $recording (@recordings) {
   my $filename = $recording->title .
     ’ ’ . $recording->start;
   $filename =~ s{[^a-zA-Z0-9]}{_}g;
   $filename .= ’.mpg’;
   $mythtv->download_recording(
     $recording, $filename );
 }
Scraping is not an API

  my $ua = WWW::Mechanize->new;
  $ua->default_header( ’Accept-Language’
     => ’en’ );
  $ua->get(’/mythweb/tv/detail/’
     . "$channel_id/$programme_id");
  $ua->submit_form(
     form_name => ’program_detail’,
     fields    => { record => 1 },
     button    => ’save’,
  );
Date formats

  # Sun, Jun 14, 10:00 PM to 11:00 PM (75 mins)
  my $strptime = DateTime::Format::Strptime->new(
    pattern => ’%Y %a, %b %d, %I:%M %p’,
    locale   => ’en_GB’,
    on_error => ’croak’,
  );

  # programme runs over midnight
  if ( $stop < $start ) {
    $stop->add( days => 1 );
  }
Modern scraping


  my $tree = HTML::TreeBuilder::XPath->new;
  my $html = $response->decoded_content;
  $tree->parse_content( $html );
  my $nodeset =
    $tree->findnodes(’//tr[@class="recorded"]’);
  foreach my $row ( $nodeset->get_nodelist ) {
    next if $row->as_HTML =~ /Still Recording/;
    ...
  );
Net::MythWeb


 my $programme = $mythweb->programme( $channel,
   $start_as_datetime );
 $programme->record;

 my @recordings = $mythweb->recordings;
 foreach my $recording ( @recordings ) {
   $recording->download("recording.mpg");
 }
Success



  “ e project has been a great success, delivered on
  schedule, within budget and with only a little
  threatening to give up and start again from scratch”
  — Andrea

Más contenido relacionado

La actualidad más candente

Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
diego_k
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
clkao
 
Zendcon 2007 Api Design
Zendcon 2007 Api DesignZendcon 2007 Api Design
Zendcon 2007 Api Design
unodelostrece
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Jesse Vincent
 
Barely Legal Xxx Perl Presentation
Barely Legal Xxx Perl PresentationBarely Legal Xxx Perl Presentation
Barely Legal Xxx Perl Presentation
Attila Balazs
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
 

La actualidad más candente (20)

Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
 
Nubilus Perl
Nubilus PerlNubilus Perl
Nubilus Perl
 
FPBrno 2018-05-22: Benchmarking in elixir
FPBrno 2018-05-22: Benchmarking in elixirFPBrno 2018-05-22: Benchmarking in elixir
FPBrno 2018-05-22: Benchmarking in elixir
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
Filesystem abstractions and msg queue sergeev - symfony camp 2018
Filesystem abstractions and msg queue   sergeev - symfony camp 2018Filesystem abstractions and msg queue   sergeev - symfony camp 2018
Filesystem abstractions and msg queue sergeev - symfony camp 2018
 
A Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsA Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP Generators
 
Agile Memcached
Agile MemcachedAgile Memcached
Agile Memcached
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
Zendcon 2007 Api Design
Zendcon 2007 Api DesignZendcon 2007 Api Design
Zendcon 2007 Api Design
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perl
 
Barely Legal Xxx Perl Presentation
Barely Legal Xxx Perl PresentationBarely Legal Xxx Perl Presentation
Barely Legal Xxx Perl Presentation
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Generated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsGenerated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 Generators
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 

Similar a Fewer cables

Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
Jaime Blasco
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
RootedCON
 
Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
Skills Matter
 

Similar a Fewer cables (20)

Ns network simulator
Ns network simulatorNs network simulator
Ns network simulator
 
R-House (LSRC)
R-House (LSRC)R-House (LSRC)
R-House (LSRC)
 
Pycon - Python for ethical hackers
Pycon - Python for ethical hackers Pycon - Python for ethical hackers
Pycon - Python for ethical hackers
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
 
Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
 
Python and Machine Learning
Python and Machine LearningPython and Machine Learning
Python and Machine Learning
 
Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
Parrot Drones Hijacking
Parrot Drones HijackingParrot Drones Hijacking
Parrot Drones Hijacking
 
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Building a DSL with GraalVM (VoxxedDays Luxembourg)Building a DSL with GraalVM (VoxxedDays Luxembourg)
Building a DSL with GraalVM (VoxxedDays Luxembourg)
 
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
 
TinyOS 2.1 Tutorial: Hands-on Session
TinyOS 2.1 Tutorial: Hands-on SessionTinyOS 2.1 Tutorial: Hands-on Session
TinyOS 2.1 Tutorial: Hands-on Session
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018
 
Black Hat Europe 2015 - Time and Position Spoofing with Open Source Projects
Black Hat Europe 2015 - Time and Position Spoofing with Open Source ProjectsBlack Hat Europe 2015 - Time and Position Spoofing with Open Source Projects
Black Hat Europe 2015 - Time and Position Spoofing with Open Source Projects
 
Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)
 
introduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformintroduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraform
 
Memcache as udp traffic reflector
Memcache as udp traffic reflectorMemcache as udp traffic reflector
Memcache as udp traffic reflector
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
 

Más de acme

Más de acme (11)

HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3HTTP/1, HTTP/2 and HTTP/3
HTTP/1, HTTP/2 and HTTP/3
 
Fallacies of distributed computing
Fallacies of distributed computingFallacies of distributed computing
Fallacies of distributed computing
 
What's new in Perl 5.12?
What's new in Perl 5.12?What's new in Perl 5.12?
What's new in Perl 5.12?
 
What's new In Perl?
What's new In Perl?What's new In Perl?
What's new In Perl?
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
Searching CPAN Offline
Searching CPAN OfflineSearching CPAN Offline
Searching CPAN Offline
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked about
 
Living in the cloud
Living in the cloudLiving in the cloud
Living in the cloud
 
Living In The Cloud
Living In The CloudLiving In The Cloud
Living In The Cloud
 
Scaling with memcached
Scaling with memcachedScaling with memcached
Scaling with memcached
 
What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Fewer cables

  • 1. Fewer cables Find out about hardware, so ware, protocols, digital video broadcasting, video formats, computer architectures, Perl modules and more as the speaker undertakes the project of a lifetime in his living room: fewer cables. Léon Brocard YAPC::Europe
  • 2. Me Léon Brocard French, live in London Like food Like the colour orange Founded Amsterdam.pm, Bath.pm, Croydon.pm Leader of London.pm Started YAPC::Europe Perl hacker
  • 3. distributions on the CPAN Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Catalyst-Plugin-CookiedSession, Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod, CPAN-Metadata-RDF, CPAN-Mini-Webserver, CPAN-Unpack, Crypt-Skip32-Base32Crockford, Crypt-Skip32-Base64URLSafe, Dackup, Data-Page, Data-UUID-Base64URLSafe, DateTime-Stringify, Devel-ebug, Devel-ebug-HTTP, Devel-Profit, Email-Send-Gandi, Email-Send-Gmail, File-Copy-Reliable, Fir, Games-GuessWord, Git-PurePerl, GraphViz, Haul, HTML-Fraction, HTML-TagCloud, HTTP-Server-Simple-Kwiki, Image-Imlib2, Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap, Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, Kasago, Language-Functional, LWP-ConnCache-MaxKeepAliveRequests, Mac-EyeTV, MealMaster, Messaging-Courier, Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3, Net-Amazon-SimpleQueue, Net-Cassandra, Net-DPAP-Client, Net-FTP-Throttle, Net-LastFM, Net-Mosso-CloudFiles, Net-MythTV, Net-MythWeb, Net-OpenDHT, Net-Stomp, Net-VNC, Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2, Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Packages, Parse-CPAN-Ratings, Perl-Metric-Basic, PPIx-IndexOffsets, PPIx-LineToSub, Search-Mousse, String-Koremutake, Template-Plugin-Page, Template-Stash-Strict, Term-ProgressBar-Quiet, Test-Expect, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer, WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed, WWW-Search-Google
  • 4.
  • 5. e TV as computer “ e growth of personal computers is happening so rapidly that the future open-architecture television is the PC, period. e set-top box will be a credit-card-size insert that turns your PC into an electronic gateway for cable, telephone, or satellite. In other words, there is no TV-set industry in the future. It is nothing more or less than a computer industry: displays lled with tons of memory and processing power.”
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. e bit radiation business “ e key to the future of television is to stop thinking about television as television. TV bene ts most from thinking of it in terms of bits. Motion pictures, too, are just a special case of data broadcast. Bits are bits.”
  • 11.
  • 12. Anything, anytime, anywhere television “If your TV could record every program transmitted, you would already have ve times the selectivity o ered in the superhighway’s broad-brush style of thinking. Say, instead of keeping them all, you have your TV agent grab the one or two in which you might have interest, for your future viewing at any time.”
  • 13.
  • 14.
  • 15. Dackup my $source = Dackup::Target::Filesystem->new( prefix => ’/home/acme/important/’ ); my $dest = Dackup::Target::Filesystem->new( prefix => ’/home/acme/backup/’ ); my $dackup = Dackup->new( source => $source, destination => $dest, delete => 0, dry_run => 0, verbose => 1, throttle => ’1Mbps’, ); $dackup->backup;
  • 16. Dackup targets Dackup::Target::Filesystem Dackup::Target::SSH Dackup::Target::S3 Dackup::Target::CloudFiles
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. RTFM ere are two main logical elements in a MythTV system: L e backend contains the TV capture cards, and stores the recorded video. A typical system will contain at least one backend L e frontend is connected to your TV screen and lets you watch LiveTV and recorded shows. It gets its data from the backend
  • 24. Protocol C: 21 ANN Playback tigger 0 S: 2 OK C: 48 QUERY_FILETRANSFER 32[]:[] REQUEST_BLOCK[]:[]2048 S: 4 2048 C: 63 QUERY_FILETRANSFER 32[]:[] SEEK[]:[]0[]:[]0[]:[]0[]:[] 0[]:[]2048 S: 7 0[]:[]0
  • 25. Net::MythTV my $mythtv = Net::MythTV->new(); my @recordings = $mythtv->recordings; foreach my $recording (@recordings) { my $filename = $recording->title . ’ ’ . $recording->start; $filename =~ s{[^a-zA-Z0-9]}{_}g; $filename .= ’.mpg’; $mythtv->download_recording( $recording, $filename ); }
  • 26.
  • 27. Scraping is not an API my $ua = WWW::Mechanize->new; $ua->default_header( ’Accept-Language’ => ’en’ ); $ua->get(’/mythweb/tv/detail/’ . "$channel_id/$programme_id"); $ua->submit_form( form_name => ’program_detail’, fields => { record => 1 }, button => ’save’, );
  • 28. Date formats # Sun, Jun 14, 10:00 PM to 11:00 PM (75 mins) my $strptime = DateTime::Format::Strptime->new( pattern => ’%Y %a, %b %d, %I:%M %p’, locale => ’en_GB’, on_error => ’croak’, ); # programme runs over midnight if ( $stop < $start ) { $stop->add( days => 1 ); }
  • 29. Modern scraping my $tree = HTML::TreeBuilder::XPath->new; my $html = $response->decoded_content; $tree->parse_content( $html ); my $nodeset = $tree->findnodes(’//tr[@class="recorded"]’); foreach my $row ( $nodeset->get_nodelist ) { next if $row->as_HTML =~ /Still Recording/; ... );
  • 30. Net::MythWeb my $programme = $mythweb->programme( $channel, $start_as_datetime ); $programme->record; my @recordings = $mythweb->recordings; foreach my $recording ( @recordings ) { $recording->download("recording.mpg"); }
  • 31. Success “ e project has been a great success, delivered on schedule, within budget and with only a little threatening to give up and start again from scratch” — Andrea