Move all media to media/

This commit is contained in:
Maybe Waffle 2022-11-01 18:30:52 +04:00
parent c84fa49600
commit 1a56c6fc77
9 changed files with 22 additions and 15 deletions

View file

@ -1,7 +1,7 @@
> [v0.11 -> v0.11.1 migration guide >>](MIGRATION_GUIDE.md#011---0111) > [v0.11 -> v0.11.1 migration guide >>](MIGRATION_GUIDE.md#011---0111)
<div align="center"> <div align="center">
<img src="./ICON.png" width="250"/> <img src="./media/teloxide-logo.png" width="250"/>
<h1><code>teloxide</code></h1> <h1><code>teloxide</code></h1>
<a href="https://docs.rs/teloxide/"> <a href="https://docs.rs/teloxide/">
<img src="https://docs.rs/teloxide/badge.svg"> <img src="https://docs.rs/teloxide/badge.svg">

View file

@ -1,5 +1,5 @@
<div align="center"> <div align="center">
<img src="media/logo.svg" width="250"/> <img src="../../media/teloxide-core-logo.svg" width="250"/>
<h1>teloxide-core</h1> <h1>teloxide-core</h1>
<a href="https://github.com/teloxide/teloxide-core/actions"> <a href="https://github.com/teloxide/teloxide-core/actions">

View file

@ -118,7 +118,7 @@ mod tests {
ChatId(0), ChatId(0),
[ [
InputMedia::Photo( InputMedia::Photo(
InputMediaPhoto::new(InputFile::file("./media/logo.png")) InputMediaPhoto::new(InputFile::file("../../media/teloxide-core-logo.png"))
.caption(CAPTION) .caption(CAPTION)
.parse_mode(ParseMode::MarkdownV2) .parse_mode(ParseMode::MarkdownV2)
.caption_entities(entities()), .caption_entities(entities()),
@ -128,10 +128,12 @@ mod tests {
), ),
InputMedia::Animation( InputMedia::Animation(
InputMediaAnimation::new(InputFile::read( InputMediaAnimation::new(InputFile::read(
File::open("./media/example.gif").await.unwrap(), File::open("../../media/example.gif").await.unwrap(),
)) ))
.thumb(InputFile::read( .thumb(InputFile::read(
File::open("./media/logo.png").await.unwrap(), File::open("../../media/teloxide-core-logo.png")
.await
.unwrap(),
)) ))
.duration(17), .duration(17),
), ),
@ -153,7 +155,7 @@ mod tests {
to_form_ref(&payloads::AddStickerToSet::new( to_form_ref(&payloads::AddStickerToSet::new(
UserId(0), UserId(0),
"name", "name",
InputSticker::Png(InputFile::file("./media/logo.png")), InputSticker::Png(InputFile::file("../../media/teloxide-core-logo.png")),
"✈️⚙️", "✈️⚙️",
)) ))
.unwrap() .unwrap()
@ -163,10 +165,15 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn test_send_animation() { async fn test_send_animation() {
to_form_ref( to_form_ref(
&payloads::SendAnimation::new(ChatId(0), InputFile::file("./media/logo.png")) &payloads::SendAnimation::new(
ChatId(0),
InputFile::file("../../media/teloxide-core-logo.png"),
)
.caption_entities(entities()) .caption_entities(entities())
.thumb(InputFile::read( .thumb(InputFile::read(
File::open("./media/logo.png").await.unwrap(), File::open("../../media/teloxide-core-logo.png")
.await
.unwrap(),
)) ))
.allow_sending_without_reply(true), .allow_sending_without_reply(true),
) )

View file

@ -39,10 +39,10 @@
// [2]: https://github.com/rust-lang/rustfmt/issues/4787 // [2]: https://github.com/rust-lang/rustfmt/issues/4787
// [3]: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643 // [3]: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
#![cfg_attr(feature = "nightly", cfg_attr(feature = "nightly", doc = include_str!("features.md")))] #![cfg_attr(feature = "nightly", cfg_attr(feature = "nightly", doc = include_str!("features.md")))]
// https://github.com/teloxide/teloxide/raw/master/logo.svg doesn't work in html_logo_url, I don't know why. // https://github.com/teloxide/teloxide/raw/master/media/teloxide-logo.svg doesn't work in html_logo_url, I don't know why.
#![doc( #![doc(
html_logo_url = "https://github.com/teloxide/teloxide/raw/master/ICON.png", html_logo_url = "https://github.com/teloxide/teloxide/raw/master/media/teloxide-logo.png",
html_favicon_url = "https://github.com/teloxide/teloxide/raw/master/ICON.png" html_favicon_url = "https://github.com/teloxide/teloxide/raw/master/teloxide-logo.png"
)] )]
// To properly build docs of this crate run // To properly build docs of this crate run
// ```console // ```console

View file

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View file

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB