• Home (current)
  • वर्तमान निदेशक => /bin/
  • सूचना एवं अपलोड
    Info Server
Indian Cyber Force
Folders रचयन्तु सञ्चिकां रचयन्तु RansomWeb लॉगआउट
Current File : //bin/ujguess
#!/usr/bin/perl -w
## ----------------------------------------------------------------------------
#  ujguess
# -----------------------------------------------------------------------------
# Mastering programmed by YAMASHINA Hio
#
# Copyright 2005 YAMASHINA Hio
# -----------------------------------------------------------------------------
# $Id: ujguess 4697 2007-09-14 06:17:00Z pho $
# -----------------------------------------------------------------------------
package Unicode::Japanese::UJGuess;
use strict;
use Unicode::Japanese;
our $VERSION = '0.02';

if( !caller )
{
  __PACKAGE__->do_work(@ARGV);
}

# -----------------------------------------------------------------------------
# main.
#
sub do_work
{
  my $pkg = shift;
  
  my $string;
  my @files;
  my $no_filename;
  
  while(@_)
  {
    my $key = shift;
    if( $key !~ /^-/ )
    {
      push(@files,$key);
      next;
    }elsif( $key eq '--' )
    {
      push(@files,@_);
      last;
    }
    if( $key eq '--no-filename' )
    {
      $no_filename = 1;
      next;
    }elsif( $key eq '--show-filename' )
    {
      $no_filename = 0;
      next;
    }elsif( $key eq '-s' )
    {
      my $value = shift;
      push(@files,[$key,$value]);
      next;
    }elsif( $key =~ /^(-h|--help)$/ )
    {
      print_usage();
      return 1;
    }elsif( $key =~ /^(-V|--version)$/ )
    {
      print_version();
      return 1;
    }else
    {
      die "unkown argument [$key]";
    }
  }
  
  !defined($no_filename) and $no_filename = @files<=1;
  
  Unicode::Japanese->new(); # load stub.
  local($/) = undef;
  if( !@files )
  {
    my $text = <STDIN>;
    $no_filename or print "-:";
    print Unicode::Japanese->getcode($text)."\n";
  }
  foreach my $file (@files)
  {
    my $filename;
    my $text;
    if( ref($file) )
    {
      $filename = join(' ',@$file);
      $text = $file->[1];
    }elsif( $file eq '-' )
    {
      $filename = '-';
      $text = <STDIN>;
    }else
    {
      $filename = $file;
      open(FILE,$file) or die "could not open file [$file] : $!";
      $text = <FILE>;
      close(FILE);
    }
    $no_filename or print "$filename:";
    print Unicode::Japanese->getcode($text)."\n";
  }
  1;
}

# -----------------------------------------------------------------------------
# print_usage();
#
sub print_usage
{
  print "usage: ujguess [options] [files...]\n";
  print "options:\n";
  print "  --no-filename    print only the name of character set\n";
  print "  --show-filename  print both names of the file and character set\n";
  print "  -h|--help        print this message\n";
  print "  -V|--version     print the version of ujguess\n";
}

# -----------------------------------------------------------------------------
# print_version();
#
sub print_version
{
  print "ujguess $VERSION\n";
  print "Unicode::Janaese $Unicode::Japanese::VERSION\n";
}


__END__

=head1 NAME

ujguess -- Guess encoding of given files

=head1 SYNOPSIS

  ujguess [files..]

=head1 VERSION

ujguess 0.02

=head1 DESCRIPTION

B<ujguess> guesses encoding of given files.

=over 4

=item --no-filename

Don't prepend file name to each results.
This is the default behavior if there is just one file to be processed.

=item --show-filename

Prepend file name to each results.
This is the default behavior if there are two or more files to be processed.

=item -h,--help

Print a short help message.

=item -V,--version

Print the version of B<ujguess>.

=back

=head1 SEE ALSO

L<Unicode::Japanese>, 
L<ujconv>

=cut

# -----------------------------------------------------------------------------
# End of File.
# -----------------------------------------------------------------------------
Frontend Submission – Verilere bak
Menu
  • Top 10

Verilere bak

Follow us
  • facebook
  • twitter
Search
Login
Create
Menu

Verilere bak

Login

You are here:

  1. Home
  2. Frontend Submission

Frontend Submission

  • Story

    Mix text with images and embeds

  • Image

    JPG, PNG or GIF

  • Audio

    MP3 or SoundCloud embed, MixCloud, etc.

  • Video

    MP4 or YouTube embed, Vimeo, Dailymotion, etc.

  • Gallery

    A collection of images

  • Embed

    Facebook post, Twitter status, etc.

  • Link

    External site's link

  • Open list

    Everyone can submit new list items and vote up for the best submission

  • Ranked list

    Everyone can vote up for the best list item

  • Classic list

    A list-based article

  • Meme

    Create a funny pic

  • Trivia quiz

    What do you know about ...?

  • Personality quiz

    What type of person are you?

  • Poll

    One or multiple questions about a subject or person

  • Versus

    A poll where each question has two competing answers

  • Hot or Not

    A poll where each question has two opposite answers

Bir yanıt yazın Yanıtı iptal et

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

  • facebook
  • twitter

© 2017 bring the pixel. Remember to change this

  • Home
  • Contact us
Back to Top
Close
  • Top 10
  • Home
  • Animals
  • Funny
  • WOW
  • WTF
  • Features
  • facebook
  • twitter
Create

Log In

Sign In

Forgot password?

Forgot password?

Enter your account data and we will send you a link to reset your password.

Back to Login

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

Accept

Add to Collection

  • Public collection title

  • Private collection title

No Collections

Here you'll find all collections you've created before.

Close
of

Processing files…

Hey Friend!
Before You Go…

Get the best viral stories straight into your inbox before everyone else!

Don't worry, we don't spam

Close

Newsletter

Don’t miss out on new posts!

Don't worry, we don't spam

Close