タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

最近の作業部屋活動履歴

2023-04-20
2023-03-31
2023-03-30
2021-11-08
2021-11-04
2021-08-27

最近のWikiの更新 (Recent Changes)

変更はまだありません。

Wikiガイド(Guide)

サイドバー (Side Bar)

RemiCatbox

Crystal library and CLI tool for Catbox.moe

Release Files

ダウンロードファイルがありません。

Recent Commits

Rev.日時作者メッセージ RSS
7b5ffbb12023-04-20 16:36:25Remilia ScarletUpdate README
79c7ed162023-03-31 17:51:29Remilia ScarletIgnore shard.lock
3c5ff3d42023-03-30 23:53:39Remilia ScarletUpdate to a newer libremiliacr version. Update copyright...
9124e4d12021-11-08 18:17:33Remilia ScarletCheck that files exist when uploading
fef44e382021-11-04 15:11:13Remilia ScarletPrint resulting URLs just once
11452c4e2021-11-04 15:11:04Remilia ScarletRemove some puts statements
4771d2b02021-08-27 19:51:14Remilia ScarletUpdate readme
786369be2021-08-27 19:35:37Remilia ScarletAdd a note about configuration files
164612b12021-08-27 19:30:38Remilia ScarletInitial import

RemiCatbox

RemiCatbox is a simple API for the Catbox API. It also includes catboxtool, a command line program to access Catbox.

Wanna support Remilia? Buy me a coffee on Ko-Fi, or support me through Liberapay.

Buy Me a Coffee at ko-fi.com Donate using Liberapay

How do I get set up?

You will need Mercurial installed to clone this repository.

You will need Fossil installed to clone some of the dependencies for this repository. You will also need Shards v0.17.1 or later. If you have an earlier version of Shards, you will need to to build the latest version manually.

If you just want to build the command line program, clone this repository locally, then run shards build (or shards build --release for a release build). The binary will be in the bin/ directory.

To use this as a library, clone this repository somewhere on your local machine, then look at Library Usage below.

Library Usage

dependencies:
  remicatbox:
    hg: http://hg.pf.osdn.net/view/y/yu/yukiraven/remicatbox

Command Line Usage

The command line client will upload files/URLs unless you tell it otherwise. To upload local files, call it like this (it will print the URL of the new file if the upload was successful):

catboxtool /path/to/file.png /path/to/other-file.jpg"

You can also specify URLs, or mix and match:

catboxtool /path/to/other-file.jpg http://www.example.com/some-image.png"

To delete a file on Catbox, use --delete and list out the Catbox filenames you wish to delete.

New albums can be created by specifying --album-title together with a set of files/URLs. The album will be called whatever you pass to --album-title. CatboxTool will report the Catbox URLs for the new files, as well as the URL for the new album.

Album management can be done with the --album option. This takes the short code of the album, which is the last part of an album's URL (for example, the short code for https://catbox.moe/c/a91gkg is a91gkg).

Use this for a full list of options:

catboxtool --help

The Configuration File and User Hashes

On Linux, the configuration file is located in the XDG config directory (usually ~/.config/). On Windows, it is in the %APPDATA%\catboxtool directory. In both of these cases, the file is named catboxtool.json. On Macs, it's located in the home directory as a hidden file called .catboxtool.json.

If a user hash is specified in the configuration file, then it is used for all interactions by default. This can be disabled with the --no-user-hash options.

If no configuration file exists, a new one will be created (without a user hash) when this is first run.

Development

Style info

I use a somewhat non-standard style for my code.

  • Keep lines 118 characters or shorter. Obviously sometimes you can't, but please try.
  • Please use pascalCase for variable and method names. Use CamelCase for type names. Use UPPER_SNAKE_CASE for constants.
  • ALWAYS put parentheses around method parameters, except for these methods: puts, pp, p, raise, sleep, spawn, loop, and exit.
  • Always the full do |foo|...end syntax with blocks, except when it's all on one line, then always use { and }.
  • The type name for exceptions end with Error. For example, an exception when running and external program might be called ExternalProgramError.

How do I contribute?

  1. Go to https://osdn.net/users/yukiraven/pf/remicatbox/ and clone the Mercurial repository.
  2. Create a new branch for your feature.
  3. Push locally to the new branch
  4. Create a pull request on OSDN.

Contributors

Links and Licenses

RemiCatbox and catboxtool are under the GNU Affero General Public License version 3.

Latest updated Tickets

チケットはありません

About Chamber Wiki

Welcome to OSDN Wiki system. Here is your chamber Wiki space.

Check Wiki Guide (English) to refer syntax and functions.