从LastFM用户收听的唱片集生成封面拼贴。

lastfm-cg的Python项目详细描述


lastfm_cg:lastfm拼贴生成器

从LastFM用户收听的相册生成封面拼贴。

此实用程序需要一个有效的配置文件,其中包含~/.config/lastfm_cg/config.ini中的lastfm api键(在https://www.last.fm/api获取它们)(请参见config_sample.ini以获取示例)。

它还缓存了由于请求缓存库而请求的图像文件。如果不希望脚本在~/.local/share/lastfm_cg/文件夹中创建sqlite文件,则必须使用-d/--disable_cache标志启动脚本。

还提供了一个Twitter机器人和一个乳齿象帖子。

要求

  • Pylast
  • 努比
  • 枕头
  • 请求
  • 请求缓存
  • 全面质量管理

安装

pip install lastfm_cg

如果您是archlinux用户,可以安装aur包lastfm_cg-git

在virtualenv中安装

git clone https://github.com/dbeley/lastfm_cg
cd lastfm_cg
pipenv install '-e .'

用法

显示帮助和可用选项。

lastfm_cg -h
usage: lastfm_cg [-h] [--debug] [--timeframe TIMEFRAME] [--rows ROWS]
                 [--columns COLUMNS] [--username USERNAME] [-d]

Create lastfm album collage for an user

optional arguments:
  -h, --help            show this help message and exit
  --debug               Display debugging information
  --timeframe TIMEFRAME, -t TIMEFRAME
                        Timeframe (Accepted values : 7day, 1month, 3month,
                        6month, 12month, overall. Default : 7day).
  --rows ROWS, -r ROWS  Number of rows (Maximum value : 31. Default : 5).
  --columns COLUMNS, -c COLUMNS
                        Number of columns (Maximum value : 31. Default :
                        number of rows).
  --username USERNAME, -u USERNAME
                        Usernames to extract (separated by comma)
  -d, --disable_cache   Disable the cache

为用户用户生成过去7天5x5大小的拼贴(默认值)。

lastfm_cg -u USER
lastfm_cg -u USER -t 7day -r 5

为用户用户和大小为3x30的用户2生成所有侦听历史记录的拼贴。

lastfm_cg -u USER,USER2 -t overall -r 3 -c 30
lastfm_cg --username USER,USER2 --timeframe overall --rows 3 --columns 30

样本结果

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何删除列表中的重复项并将列表复制到另一个列表中   Java如何在非UI应用程序中检测tab键按下?   java无法在未调用Looper的线程内创建处理程序。警报对话框线程上的prepare()   java Jaxb将XML转换为ElementNSImpl类型,而不是正确的类型   基于java标记的过滤实现Firestore   我们可以使用Java和Eclipse使用YouTube分析Api吗?   JavaSpring注释在多个选项卡中同时打开多个视图   java Hibernate不使用JBOSS检索数据   矩阵如何从Apache Commons数学Java库中找到伪逆   对象Java打印“null”作为字符串引用!=使无效   java中的图形慢映射   java用户界面:操作栏和上下文操作栏,新趋势   java Infinispan,版本化操作返回不正确的结果   java调整保存在父JFrame中的JInternalFrame的大小,并且该父JFrame使用ComponentMover API注册   java如何防止会话属性在服务器上持久化?   java如何为SpringBoot 2创建自定义嵌入式servlet容器   使用Robolectric进行单元测试时,在片段类内调用getString()时发生java IllegalStateException