/dports/www/mediawiki135/mediawiki-1.35.5/includes/specials/ |
H A D | SpecialBookSources.php | 49 $isbn = $isbn ?: $this->getRequest()->getText( 'isbn' ); 50 $isbn = trim( $isbn ); 54 if ( $isbn !== '' ) { 73 $isbn = self::cleanIsbn( $isbn ); 80 $sum += $isbn[$i]; 82 $sum += 3 * $isbn[$i]; 123 * @param string $isbn 131 'default' => $isbn, 151 * @param string $isbn 158 $isbn = self::cleanIsbn( $isbn ); [all …]
|
/dports/www/mediawiki137/mediawiki-1.37.1/includes/specials/ |
H A D | SpecialBookSources.php | 59 $isbn = $isbn ?: $this->getRequest()->getText( 'isbn' ); 60 $isbn = trim( $isbn ); 64 if ( $isbn !== '' ) { 83 $isbn = self::cleanIsbn( $isbn ); 90 $sum += $isbn[$i]; 92 $sum += 3 * $isbn[$i]; 133 * @param string $isbn 141 'default' => $isbn, 161 * @param string $isbn 168 $isbn = self::cleanIsbn( $isbn ); [all …]
|
/dports/www/mediawiki136/mediawiki-1.36.3/includes/specials/ |
H A D | SpecialBookSources.php | 59 $isbn = $isbn ?: $this->getRequest()->getText( 'isbn' ); 60 $isbn = trim( $isbn ); 64 if ( $isbn !== '' ) { 83 $isbn = self::cleanIsbn( $isbn ); 90 $sum += $isbn[$i]; 92 $sum += 3 * $isbn[$i]; 133 * @param string $isbn 141 'default' => $isbn, 161 * @param string $isbn 168 $isbn = self::cleanIsbn( $isbn ); [all …]
|
/dports/devel/tcllib/tcllib-1.20/modules/valtype/ |
H A D | isbn.test | 2 # isbn.test -*- tcl -*- 18 useLocal isbn.tcl valtype::isbn 23 test valtype-isbn-1.0 {isbn validation wrong\#args} -body { 28 test valtype-isbn-1.1 {isbn validation wrong\#args} -body { 35 test valtype-isbn-2.0 {isbn validation failure, bad char} -body { 44 test valtype-isbn-2.1.$n {isbn validation failure, bad length} -body { 54 test valtype-isbn-2.2.$n {isbn validation failure, bad check} -body { 69 test valtype-isbn-3.0 {isbn checkdigit wrong\#args} -body { 74 test valtype-isbn-3.1 {isbn checkdigit wrong\#args} -body { 101 test valtype-isbn-4.$n {isbn validation} -body { [all …]
|
/dports/devel/tcllibc/tcllib-1.20/modules/valtype/ |
H A D | isbn.test | 2 # isbn.test -*- tcl -*- 18 useLocal isbn.tcl valtype::isbn 23 test valtype-isbn-1.0 {isbn validation wrong\#args} -body { 28 test valtype-isbn-1.1 {isbn validation wrong\#args} -body { 35 test valtype-isbn-2.0 {isbn validation failure, bad char} -body { 44 test valtype-isbn-2.1.$n {isbn validation failure, bad length} -body { 54 test valtype-isbn-2.2.$n {isbn validation failure, bad check} -body { 69 test valtype-isbn-3.0 {isbn checkdigit wrong\#args} -body { 74 test valtype-isbn-3.1 {isbn checkdigit wrong\#args} -body { 101 test valtype-isbn-4.$n {isbn validation} -body { [all …]
|
/dports/net/p5-URI/URI-5.10/lib/URI/urn/ |
H A D | isbn.pm | 1 package URI::urn::isbn; # RFC 3187 25 $isbn = undef if $isbn && !$isbn->is_valid; 26 return $isbn; 32 my $isbn = _isbn($nss); 33 $isbn = $isbn->as_string if $isbn; 34 return($nss, $isbn); 37 sub isbn { subroutine 39 my $isbn; 41 return $isbn; 99 return $new unless $nss && $isbn && $nss ne $isbn; [all …]
|
/dports/textproc/pear-Validate_ISPN/Validate_ISPN-0.8.0/Validate/ |
H A D | ISPN.php | 62 public static function isbn($isbn) argument 68 $isbn = strtoupper($isbn); 69 $isbn = str_replace(array('ISBN', '-', ' ', "\t", "\n"), '', $isbn); 71 if (strlen($isbn) == 13) { 73 } elseif (strlen($isbn) == 10) { 95 public static function isbn13($isbn) argument 101 $isbn = strtoupper($isbn); 102 $isbn = str_replace(array('ISBN', '-', ' ', "\t", "\n"), '', $isbn); 133 $isbn = strtoupper($isbn); 134 $isbn = str_replace(array('ISBN', '-', ' ', "\t", "\n"), '', $isbn); [all …]
|
/dports/textproc/py-isbnlib/isbnlib-3.10.9/isbnlib/ |
H A D | _ext.py | 25 return query(isbn, service) if isbn else {} 28 def info(isbn): argument 30 return infogroup(isbn) 47 def doi(isbn): argument 62 data = meta(isbn) 86 def cover(isbn): argument 88 isbn = EAN13(isbn) 89 return gcover(isbn) if isbn else {} 92 def desc(isbn): argument 94 isbn = EAN13(isbn) [all …]
|
H A D | _editions.py | 18 def _fake_provider_any(isbn): argument 29 isbn, 33 return [isbn] # pragma: no cover 37 def _fake_provider_merge(isbn): argument 47 return [isbn] 51 def get_editions(isbn, service): argument 58 eds = list(_ted(isbn)) 60 eds = list(_wiki(isbn)) 64 def editions(isbn, service='merge'): argument 66 isbn = EAN13(isbn) [all …]
|
H A D | _goob.py | 20 def _mapper(isbn, records): argument 25 canonical['ISBN-13'] = u(isbn) 40 raise RecordMappingError(isbn) 45 def _records(isbn, data): argument 52 LOGGER.debug('No data from "goob" for isbn %s', isbn) 57 if u('ISBN_13') in repr(ids) and isbn not in repr( 61 isbn, 67 return _mapper(isbn, recs) 70 def query(isbn): argument 72 data = wquery(SERVICE_URL.format(isbn=isbn), user_agent=UA) [all …]
|
H A D | _infogroup.py | 13 def infogroup(isbn): argument 17 isbn = EAN13(isbn) 18 if not isbn: 19 LOGGER.critical('%s is not a valid ISBN', isbn) 20 raise NotValidISBNError(isbn) 22 prefix = isbn[0:3] + '-' 23 isbn = prefix + isbn[3:] 28 iid = prefix + isbn[ixi:ixf] 35 isbn,
|
H A D | _openl.py | 19 def _mapper(isbn, records): argument 26 canonical['ISBN-13'] = u(isbn) 54 LOGGER.debug('RecordMappingError for %s with data %s', isbn, records) 55 raise RecordMappingError(isbn) 61 def _records(isbn, data): argument 65 records = data['ISBN:%s' % isbn] 68 LOGGER.debug('No data from "openl" for isbn %s', isbn) 72 return _mapper(isbn, records) 75 def query(isbn): argument 77 data = wquery(SERVICE_URL.format(isbn=isbn), user_agent=UA) [all …]
|
/dports/math/py-or-tools/or-tools-9.2/examples/flatzinc/ |
H A D | isbn.fzn | 19 constraint int_eq(isbn[1], 9); 20 constraint int_eq(isbn[2], 7); 21 constraint int_eq(isbn[3], 8); 22 constraint int_eq(isbn[4], 1); 23 constraint int_eq(isbn[5], 5); 24 constraint int_eq(isbn[6], 5); 25 constraint int_eq(isbn[7], 8); 26 constraint int_eq(isbn[8], 6); 27 constraint int_eq(isbn[9], 0); 28 constraint int_eq(isbn[10], 8); [all …]
|
/dports/www/p5-WWW-Scraper-ISBN/WWW-Scraper-ISBN-1.05/lib/WWW/Scraper/ISBN/ |
H A D | Driver.pm | 63 my $isbn = shift || return; 66 return unless(length $isbn == 10 || length $isbn == 13); 68 if(length $isbn == 13) { 76 my $isbn13 = $prefix . $isbn; 78 my @isbn = split(//,$isbn13); 80 while(@isbn) { 81 $hsum += shift @isbn; 82 $lsum += shift @isbn; 102 $digit = $isbn % 10; 119 return 0 if(length $isbn == 13 && $isbn ne $ean); [all …]
|
/dports/devel/py-stdnum/python-stdnum-1.13/tests/ |
H A D | test_isbn.doctest | 25 >>> from stdnum import isbn 56 >>> isbn.to_isbn13('1 85798218 5') 58 >>> isbn.to_isbn13('1857982185') 60 >>> isbn.to_isbn13('1-85798-218-5') 62 >>> isbn.validate(isbn.to_isbn13('1 85798218 5')) 72 >>> isbn.is_valid('12-345678-9') 74 >>> isbn.validate(isbn.to_isbn13('12-345678-9')) 82 >>> isbn.to_isbn10('978 1 85798218 3') 84 >>> isbn.to_isbn10('9781857982183') 92 >>> isbn.to_isbn10('9791843123391') [all …]
|
/dports/devel/py-Faker/Faker-0.8.15/tests/providers/ |
H A D | test_isbn.py | 2 from faker.providers.isbn.en_US import Provider as ISBNProvider 3 from faker.providers.isbn import ISBN10, ISBN13 4 from faker.providers.isbn.rules import RegistrantRule 11 assert isbn.check_digit == '0' 13 assert isbn.check_digit == 'X' 15 assert isbn.check_digit == '9' 19 assert len(isbn.format()) == 10 26 assert isbn.check_digit == '9' 28 assert isbn.check_digit == '0' 30 assert isbn.check_digit == '1' [all …]
|
/dports/misc/p5-Business-ISBN/Business-ISBN-3.006/t/ |
H A D | isbn13.t | 41 isa_ok( $isbn, 'Business::ISBN13' ); 44 #print STDERR Data::Dumper->Dump( [$isbn], [qw($isbn)] ); 66 my $clone = $isbn->as_isbn13; 90 my $clone = $isbn->as_isbn10; 110 isa_ok( $isbn, 'Business::ISBN13' ); 111 is( $isbn->error, BAD_CHECKSUM, 115 $isbn->fix_checksum; 117 ok( $isbn->is_valid, 128 isa_ok( $isbn, 'Business::ISBN13' ); 137 isa_ok( $isbn, 'Business::ISBN13' ); [all …]
|
H A D | step.t | 10 my $isbn; 18 $isbn = $class->new( $isbn_string ); 19 isa_ok( $isbn, $class ); 25 isa_ok( $isbn, $class ); 30 my $isbn_one_more = $isbn->increment; 38 isa_ok( $isbn, $class ); 43 my $isbn_one_less = $isbn->decrement; 51 $isbn->fix_checksum; 52 isa_ok( $isbn, $class ); 62 $isbn->fix_checksum; [all …]
|
H A D | isbn10.t | 37 isa_ok( $isbn, 'Business::ISBN10' ); 49 is( $isbn->as_string([]), $isbn->common_data, "$GOOD_ISBN stringifies correctly"); 54 my $clone = $isbn->as_isbn10; 69 my $clone = $isbn->as_isbn13; 86 isa_ok( $isbn, 'Business::ISBN10' ); 87 is( $isbn->error, BAD_CHECKSUM, 92 $isbn->fix_checksum; 93 ok( $isbn->is_valid, 99 isa_ok( $isbn, 'Business::ISBN10' ); 105 isa_ok( $isbn, 'Business::ISBN10' ); [all …]
|
H A D | albania.t | 16 my $isbn = Business::ISBN->new( $GOOD_ISBN ); 17 isa_ok( $isbn, 'Business::ISBN10' ); 19 ok( defined $isbn->_max_group_code_length, "Data module imported" ); 22 #print STDERR Data::Dumper->Dump( [$isbn], [qw($isbn)] ); 24 is( $isbn->is_valid, Business::ISBN::GOOD_ISBN, "$GOOD_ISBN is valid" ); 26 is( $isbn->group_code, $GROUP_CODE, "$GOOD_ISBN has right group code"); 27 is( $isbn->publisher_code, $PUBLISHER, "$GOOD_ISBN has right publisher"); 28 is( $isbn->group, $GROUP, "$GOOD_ISBN has right group"); 30 is( $isbn->checksum, $CHECKSUM, "$GOOD_ISBN has right checksum" ); 31 is( $isbn->_checksum, $CHECKSUM, "$GOOD_ISBN has right checksum" ); [all …]
|
/dports/deskutils/calibre/calibre-src-5.34.0/src/calibre/ebooks/metadata/ |
H A D | xisbn.py | 31 def purify(self, isbn): argument 34 def fetch_data(self, isbn): argument 38 url = self.QUERY%isbn 57 def get_data(self, isbn): argument 58 isbn = self.purify(isbn) 60 if isbn not in self._map: 71 self._map[isbn] = id_ 75 data = self.get_data(isbn) 82 def get_isbn_pool(self, isbn): argument 83 data = self.get_data(isbn) [all …]
|
/dports/misc/p5-Business-ISBN/Business-ISBN-3.006/t/github/ |
H A D | 3.t | 1 # https://github.com/briandfoy/business--isbn/issues/3 7 my $isbn = Business::ISBN->new( $string ); 9 is( $isbn->publisher_code, undef, 'Publisher code is bad' ); 10 isnt( $isbn->is_valid, Business::ISBN::GOOD_ISBN(), 'Not a good ISBN' ); 12 $isbn->fix_checksum; 14 is( $isbn->publisher_code, undef, 'Publisher code is still bad' ); 21 my $isbn = Business::ISBN->new( $string ); 23 is( $isbn->is_valid_checksum, Business::ISBN::BAD_CHECKSUM() ); 25 is( $isbn->publisher_code, undef, 'Publisher code is bad' ); 28 $isbn->fix_checksum; [all …]
|
/dports/mail/phplist/phplist-3.6.6/public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ |
H A D | IsbnValidatorTest.php | 150 public function testValidIsbn10($isbn) argument 156 $this->validator->validate($isbn, $constraint); 164 public function testInvalidIsbn10($isbn, $code) argument 171 $this->validator->validate($isbn, $constraint); 182 public function testValidIsbn13($isbn) argument 186 $this->validator->validate($isbn, $constraint); 194 public function testInvalidIsbn13($isbn, $code) argument 201 $this->validator->validate($isbn, $constraint); 212 public function testValidIsbnAny($isbn) argument 216 $this->validator->validate($isbn, $constraint); [all …]
|
/dports/finance/prestashop/prestashop/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ |
H A D | IsbnValidatorTest.php | 150 public function testValidIsbn10($isbn) argument 156 $this->validator->validate($isbn, $constraint); 164 public function testInvalidIsbn10($isbn, $code) argument 171 $this->validator->validate($isbn, $constraint); 182 public function testValidIsbn13($isbn) argument 186 $this->validator->validate($isbn, $constraint); 194 public function testInvalidIsbn13($isbn, $code) argument 201 $this->validator->validate($isbn, $constraint); 212 public function testValidIsbnAny($isbn) argument 216 $this->validator->validate($isbn, $constraint); [all …]
|
/dports/www/p5-WWW-Scraper-ISBN/WWW-Scraper-ISBN-1.05/t/ |
H A D | 11convert.t | 9 my %isbn = ( 33 for my $isbn (keys %isbn) { 34 is($driver->convert_to_ean13($isbn), $isbn{$isbn}{ean13} ,".. isbn 13 convert for $isbn"); 35 is($driver->convert_to_isbn10($isbn),$isbn{$isbn}{isbn10},".. isbn 10 convert for $isbn");
|