Giter VIP home page Giter VIP logo

daily-poetry-image's Introduction

daily-poetry-image

每天一句**古诗词,生成 AI 图片 Powered by Bing DALL-E-3.

👉🏽 Live Demo

项目介绍

  • 本项目是基于 Bing Image DALL-E-3 生成的图片,每天一句**古诗词作为 Prompt。
  • GitHub Action 自动触发。
  • 诗词由今日诗词提供 API。
  • 网站使用 Astro 构建。

文章

订阅

你可以使用 RSS 订阅每天的诗词配图:https://daily-poetry-image.vercel.app/rss.xml

如何用 RSS 订阅?

截图

图片列表

图片详情

图片详情

灵感来源

Star History

Star History Chart

License

MIT

daily-poetry-image's People

Contributors

liruifengv avatar mulander-j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

daily-poetry-image's Issues

在给Bing作图前应该添加一些过滤和释义

抓取古诗时应该同时抓取其释义,然后把释义发给New Bing作图避免只理解了一整句诗词中的1个词语。另外,单纯抽象的诗句而非描写实景或实物的应该提前过滤掉。
例如“正雁水夜清,卧虹平帖。”,和“平生多感激,忠义非外奖” 完全就是生成了火星文。

About ParseResult Error

关于乱入图片(https://r.bing.com/rp/xxx)建议追加剔除。

console.log("Parsing result...");
// Use regex to search for src=""
const regex = /src="([^"]*)"/g;
const matches = [...result.matchAll(regex)].map((match) => match[1]);
// Remove Bad Images(https://r.bing.com/rp/xxx)
const safe_image_links = matches.filter(link => !/r.bing.com\/rp/i.test(link))
// Remove size limit
const normal_image_links = safe_image_links.map(link => (link.split("?w=")[0]));
// Remove duplicates
const unique_image_links = [...new Set(normal_image_links)];
// No images
if (unique_image_links.length === 0) {
    throw new Error("error_no_images");
}
return unique_image_links;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.