Compare commits
4 Commits
384052eda0
...
745db6b657
Author | SHA1 | Date |
---|---|---|
|
745db6b657 | |
|
ada7286d92 | |
|
1829f4e732 | |
|
2a0c71fd6e |
|
@ -2,7 +2,7 @@ USING: tools.deploy.config ;
|
|||
H{
|
||||
{ deploy-console? t }
|
||||
{ deploy-io 3 }
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-reflection 5 }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-word-defs? f }
|
||||
{ deploy-threads? t }
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
templates/themes.xml
|
|
@ -45,7 +45,7 @@ link "links"
|
|||
ensure-link-logger [ <repost> dup update-tuple ] with-bbb-db random-callout ;
|
||||
|
||||
: repost? ( url -- link/f )
|
||||
link new swap >>url [ select-tuple ] with-bbb-db ;
|
||||
ensure-link-logger link new swap >>url [ select-tuple ] with-bbb-db ;
|
||||
|
||||
: url-regex ( -- regexp )
|
||||
R/ http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+/i ;
|
||||
|
|
|
@ -46,7 +46,7 @@ mississippis "mississippis"
|
|||
random ;
|
||||
|
||||
: nonstandard-mississippi-duration ( -- duration )
|
||||
.5 1.5 uniform-random-float seconds ;
|
||||
.5 1.75 uniform-random-float seconds ;
|
||||
|
||||
: standard-mississippi-duration ( -- duration )
|
||||
1 seconds ;
|
||||
|
|
|
@ -24,6 +24,7 @@ platzism "platzisms"
|
|||
[ <platzism> insert-tuple ] with-bbb-db ;
|
||||
|
||||
: platzism-exists? ( str -- ? )
|
||||
ensure-platzisms
|
||||
[ >lower "SELECT id FROM platzisms WHERE lower(quote) = '%s'" sprintf sql-query ] with-bbb-db empty? not ;
|
||||
|
||||
: is-platz? ( str -- ? )
|
||||
|
|
|
@ -31,6 +31,10 @@ M: flac-stream-reader dispose stream>> dispose ;
|
|||
dup bytes>> swap [ prepend ] dip swap >>bytes drop
|
||||
] while flac-input-stream get bitstream>> bitstreams:read ;
|
||||
|
||||
: flac-seek ( n -- )
|
||||
[ 8 * flac-input-stream get bitstream>> bitstreams:seek ]
|
||||
[ io:seek-relative flac-input-stream get stream>> io:stream-seek ] bi ;
|
||||
|
||||
: flac-read-sint ( n -- n )
|
||||
! TODO: this isn't rightt
|
||||
dup flac-read-uint dup . dup 1 - neg shift swap shift ;
|
||||
|
|
|
@ -244,4 +244,4 @@ TUPLE: metadata
|
|||
{ seek-table maybe{ seek-table } }
|
||||
{ vorbis-comment maybe{ vorbis-comment } }
|
||||
{ cuesheet maybe{ cuesheet } }
|
||||
{ picture maybe{ picture } } ;
|
||||
{ picture maybe{ sequence } initial: { } } ;
|
||||
|
|
|
@ -111,6 +111,9 @@ ERROR: cuesheet-index-reserved-must-be-zero ;
|
|||
32 flac-read-uint dup 8 * flac-read-uint swap >n-byte-array
|
||||
picture boa ;
|
||||
|
||||
: append-picture ( metadata picture -- metadata )
|
||||
[ dup picture>> ] dip 1array append >>picture ;
|
||||
|
||||
: read-metadata-block ( metadata length type -- metadata )
|
||||
[
|
||||
{
|
||||
|
@ -120,7 +123,7 @@ ERROR: cuesheet-index-reserved-must-be-zero ;
|
|||
{ metadata-seek-table [ read-metadata-block-seek-table >>seek-table ] }
|
||||
{ metadata-vorbis-comment [ read-metadata-block-vorbis-comment >>vorbis-comment ] }
|
||||
{ metadata-cuesheet [ read-metadata-block-cuesheet >>cuesheet ] }
|
||||
{ metadata-picture [ read-metadata-block-picture >>picture ] }
|
||||
{ metadata-picture [ read-metadata-block-picture append-picture ] }
|
||||
} case
|
||||
] with-big-endian ;
|
||||
|
||||
|
@ -136,5 +139,31 @@ ERROR: cuesheet-index-reserved-must-be-zero ;
|
|||
[ read-metadata-block ] dip
|
||||
] loop ;
|
||||
|
||||
: <flac-stream-info> ( filename -- stream-info )
|
||||
[
|
||||
read/assert-flac-magic
|
||||
32 flac-read-uint drop
|
||||
read-metadata-block-stream-info
|
||||
] with-flac-file-reader ;
|
||||
|
||||
: <flac-tags> ( filename -- tags )
|
||||
[
|
||||
read/assert-flac-magic
|
||||
[ read-metadata-block-header [ length>> ] [ type>> metadata-vorbis-comment = ] [ last?>> ] tri or ]
|
||||
[ flac-seek ] until [ read-metadata-block-vorbis-comment ] with-big-endian
|
||||
] with-flac-file-reader ;
|
||||
|
||||
: <flac-pictures> ( filename -- pictures )
|
||||
[
|
||||
read/assert-flac-magic
|
||||
[ read-metadata-block-header dup last?>> not ]
|
||||
[
|
||||
[ length>> ] [ type>> metadata-picture = ] bi
|
||||
[ read-metadata-block-picture ]
|
||||
[ flac-seek f ] if
|
||||
] produce nip sift
|
||||
] with-flac-file-reader ;
|
||||
|
||||
|
||||
: <flac-metadata> ( filename -- metadata )
|
||||
[ read-flac-metadata ] with-flac-file-reader ;
|
||||
|
|
Loading…
Reference in New Issue