Skip to content

Instantly share code, notes, and snippets.

@steve02081504
Last active January 22, 2024 03:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steve02081504/41ffc6b2031275541b39df9288e8c59a to your computer and use it in GitHub Desktop.
Save steve02081504/41ffc6b2031275541b39df9288e8c59a to your computer and use it in GitHub Desktop.
How to use ghost terminal better

圣诞节快乐!🎄

Hi 各位 我是steve
本来我参加这个祭典的时候是打算再写一篇关于ghost terminal的文章来介绍它有多么好用的
不过考虑到 我打开记事本开始写文章时已经离文章发布剩下不到三个小时了谁来救救我 我打算逐渐退出ukagaka的相关开发,我决定把这篇文章改为把我在这个圈子里开发过的一些项目罗列一下
一方面是对于我自己这段时间的总结(包括曾经想做但是最后放弃的事情的列表)
另一方面是希望能让错过某些项目的人能够知道这些项目的存在,好工具永远不嫌多 对吧?
它们都是开源的!

所有人都可以使用!不止开发者!✨

这是一个windows的shell扩展,它可以让你在资源管理器中预览nar作者提供的缩略图,而不需要打开nar文件

曾经想实现的进一步功能:

  • 在没有提供.nar_icon文件夹时解析nar文件中的descript.txt并获取icon
  • 内置于ssp!

这不是我的作品 我只是在此基础上做了一些修改 添加了一些功能

在最新版的discord插件下,支持的ghost可以使用更多的功能来自定义你的discord状态

详细的技术性介绍和预览图请参考去年的圣诞节文章

web相关

jsstp是一个用于在js中使用sstp协议的库
你可以在网页中、electron应用中、nodejs命令行应用中使用它来实现应用和ghost交互,而不需要考虑并重新实现sstp协议的细节
如果你有自己的web页面,追加一些按钮或者其他交互元素让你的ghost和你的网页交互起来或许会是一件很有趣的事情

曾经想实现的进一步功能:

这并不是一个项目,而是一个用于描述ghost的元信息的标准
用于规范化不同web应用对ghost的注册、记录、访问ghost提供的附加信息、解决同名不同版本的ghost在web应用中的冲突问题
遗憾的是目前来说这个标准并没有被广泛支持

ghost开发相关通用工具

这是一个用于在命令行中运行的ghost开发工具,它可以让你在命令行中以repl的方式调试ghost
如果你在开发功能十分复杂的ghost,并且没有合适的调试工具,那么这个工具可能会对你有所帮助
它使用通用标准与ghost进行交互,因此不论ghost使用的是什么SHIORI都可以使用这个工具
一些快捷键:

  • :历史命令
  • ctrl + ←ctrl + →:快速移动光标
  • tab:自动补全

曾经想实现的进一步功能:

  • 让ghost可以通过某种方法自定义动态的命令行图标
    这个想法因为Windows Terminal不支持命令行程序运行时修改图标而被放弃了

这是一个用于在CI中更新ukagaka镜像的工具,它可以让你集中在对项目本身的开发上,而不需要去记得每次修改了内容后都要手动更新md5文件
Happy hacking!

还在以nar文件格式发布你的ghost吗?这个工具可能会对你有所帮助
如果打开这个exe的电脑有安装ssp,那么它会自动下载并打开ssp进行nar文件的安装
如果没有安装ssp,那么它会自动下载ssp的安装包并提示用户安装ssp,随后再打开ssp进行nar文件的安装
这不但可以让你自定义文件图标,还可以让第一次接触到ukagaka的用户更加方便地安装你的ghost

Yaya-Shiori相关

语法高亮

无论你在使用vscode还是n++进行yaya的开发,我都有准备好的语法高亮文件/插件可以优化你的开发体验!
如果你在使用vscode,那么你可以在vscode的扩展商店中搜索ayaya来安装这个插件 或是点击这里
如果你在使用n++,那么你可以在这里下载适用于亮色和暗色的语法高亮文件

这不是我的作品 我只是在此基础上做了一些修改 添加了一些功能

新版本的tama不但有着更好的性能、多语言支持、命令行参数支持、ghost的自定义支持和事件通知支持,还有数个小bug的修复和更多!
如果你还在使用旧版本的tama,那不妨在这个圣诞节试试新版本!

这是一个用于在CI中检查yayaShiori是否正常启动的工具,它可以让你集中在对项目本身的开发上,而不需要去记得每次修改了内容后都要重载ghost或插件之类的东西来确保语法没有错误
它也可以用于在自动的nar构建流程中进行最后的检查,确保你的ghost或插件在发布时没有任何问题
Happy hacking!

Translated by deepl, proofread by @Zichqec, thanks

Merry Christmas! 🎄

Hi everyone, it's steve.
I was going to participate in this festival by writing another article about ghost terminal and how great it is.
However, considering that I opened my notepad and started writing the article less than three hours before it was due to be released someone help me I'm going to be phasing out of ukagaka related development, I've decided to change this article to a list of some of the projects I've worked on in the community.
Partly, it's a summary of what I've been up to (including a list of things I wanted to do but gave up on).
Partly, it's to let people who have missed out on some of these projects know that they exist, because you can never have too many good tools, right?
These are all open source!

Everyone can use them! Not just developers! ✨

This is a windows shell extension that allows you to preview thumbnails provided by nar authors in explorer, without opening the nar file!

Further functionality that was once wanted:

  • Parsing descript.txt in nar files and getting the icon when the .nar_icon folder is not provided
  • To be built into ssp!

This isn't my work, I just made some modifications to it and added some features.

With the latest version of the Discord Plugin, supported ghosts can use more features to customize your discord state!

Please refer to last year's Christmas post for a detailed technical description and preview images.

web related

jsstp is a library for using the sstp protocol in js!
You can use it in web pages, electron apps, and nodejs command line apps, to enable apps to interact with ghosts without having to think about and re-implement the details of the sstp protocol!
If you have your own web page, it might be interesting to add some buttons or other interactive elements to make your ghost interact with your web page.

Further functionality that was once wanted:

This is not a project, but a standard for describing the meta-information of ghosts.
It is used to standardize the registration of ghosts in different web applications, to record and access additional information provided by ghosts, and to resolve conflicts between different versions of ghosts with the same name in web applications.
Unfortunately, this standard is not widely supported at the moment.

Common tools for ghost development

This is a ghost development tool to be run on the command line, which allows you to debug a ghost as a REPL on the command line.
If you are developing a very complex ghost and don't have a proper debugging tool, then this tool may help you.
It uses the Common Criteria to interact with ghosts, so you can use this tool regardless of what SHIORI a ghost is using.
Some shortcuts:

  • and : history commands
  • ctrl + ← and ctrl + →: fast cursor movement
  • tab: auto-completion

Further functionality that was once wanted:

  • Make ghosts customizable with dynamic command line icons somehow.
    This idea was abandoned because Windows Terminal doesn't support changing icons while a command line application is running.

This is a tool for updating ukagaka mirrors in CI, which allows you to focus on the development of the project itself without having to remember to manually update the md5 file every time you make a change.
Happy hacking!

Still distributing your ghost as a nar file? This tool may help you!
If the computer that runs this exe has ssp installed, then it will automatically download the ghost's nar file and open ssp to install it.
If ssp is not installed, then it will automatically download the ssp installer and prompt the user to install ssp, then open ssp to install the nar file.
This not only allows you to customise the file icon, but also makes it easier for first time ukagaka users to install your ghost.

Yaya-Shiori related

Syntax highlighting

Whether you're using vscode or n++ for yaya development, I have syntax highlighting files/plugins ready to optimize your development experience!
If you're using vscode, then you can install this plugin by searching for ayaya in vscode's extension shop or click here.
If you're using n++, then you can download the syntax highlighting files for light and dark colors here.

This isn't my work, I've just made some changes to it and added some features.

The new version of tama not only has better performance, multi-language support, command line parameter support, ghost customization support, and event notification support, but also several minor bug fixes, and much more!
If you're still using an older version of tama, give the new version a try this Christmas!

This is a tool for checking that yaya SHIORI is up and running in CI, which allows you to focus on the development of the project itself without having to remember to reload the ghost or plugin every time you make a change to make sure the syntax is correct.
It can also be used to do a final check in the automated nar build process to make sure that your ghost or plugin has no problems at release time.
Happy hacking!

翻訳:DeepLより。校正は@nikolatによって行われました、ありがとうございます。

メリークリスマス 🎄

皆さんこんにちは、スティーブです。
このお祭りには、ゴースト・ターミナルの素晴らしさについてまた記事を書くつもりで参加するつもりでした。
しかし、ということを考えると、メモ帳を開いて記事を書き始めた時には、投稿まであと3時間を切っていました誰か助けてくれ ukagakaから段階的に離れていくことを考慮し、代わりに私がコミュニティで取り組んだプロジェクトのいくつかを列挙することにした。 一方では、私の近況のまとめでもある(やりたかったけど断念したことのリストも含む)。
一方で、これらのプロジェクトのいくつかを見逃してしまった人たちに、その存在を知ってもらうためでもある。
どれもオープンソースだ!

誰もが使えるんだ! 開発者だけでなく! ✨

これは、nar作者が提供するサムネイルを、narファイルを開かずにエクスプローラで プレビューできるようにするwindowsシェル拡張です!

以前から欲しかった機能がさらに追加されました:

  • .nar_iconフォルダが提供されていない場合、narファイル内のdescript.txtを解析し、アイコンを取得します。
  • sspに組み込まれました!

このプラグインは私の作品ではありません。ただ、それに少し手を加えて、いくつかの機能を追加しただけです。

Discord Pluginの最新版では、サポートされているゴーストは、ディスコードの状態をカスタマイズするために、より多くの機能を使用することができます!

詳しい技術的な説明とプレビュー画像は去年のクリスマスの投稿を参照してください。

Web関連

jsstpはjsでsstpプロトコルを使うためのライブラリです!
ウェブページや電子アプリ、nodejsのコマンドラインアプリでこれを使えば、sstpプロトコルの詳細を考えたり再実装したりすることなく、アプリがghostとやりとりできるようになります!
自分のウェブページを持っているなら、ボタンやその他のインタラクティブな要素を追加して、ゴーストをウェブページと相互作用させるのも面白いかもしれません。

かつて実装したかった機能をさらに実装する:

これはプロジェクトではなく、ghostのメタ情報を記述するための標準です。
これは、異なるウェブアプリケーションによるghostの登録を標準化し、ghostによって提供される追加情報を記録してアクセスし、ウェブアプリケーションで同じ名前の異なるバージョンのghost間の衝突を解決するために使用されます。
残念ながら、この標準は現時点では広くサポートされていません。

ゴースト開発用の一般的なツール

これはコマンドラインで実行するためのゴースト開発ツールで、ゴーストを REPL としてコマンドラインでデバッグできます。
非常に複雑なゴーストを開発していて、適切なデバッグツールを持っていない場合、このツールが役に立つかもしれません。
このツールはゴーストとの対話にCommon Criteriaを使用するので、ゴーストが使用するSHIORIに関係なくこのツールを使用できます。
いくつかのショートカットがあります:

  • : 履歴コマンド
  • ctrl + ←ctrl + →: カーソルの高速移動
  • tab:オートコンプリート

かつて欲しかった機能をさらに追加:

  • 動的なコマンドラインアイコンでゴーストをカスタマイズできるようにする。
    Windowsターミナルはコマンドラインアプリケーションの実行中にアイコンを変更することをサポートしていないため、このアイデアは放棄されました。

ukagaka-mirror-md5-CI-buildは、CIでukagakaミラーを更新するためのツールです。これにより、変更を加えるたびにmd5ファイルを手動で更新することを忘れずに、プロジェクトの開発に集中することができます。
よき開発ライフを!

まだゴーストを nar ファイルとして配布していますか? このツールが役に立つかもしれません!
このexeを開いたコンピュータにsspがインストールされていれば、自動的にsspをダウンロードして開き、narファイルをインストールします。
sspがインストールされていない場合は、自動的にsspインストーラーをダウンロードし、ユーザーにsspをインストールするよう促し、sspを開いてnarファイルをインストールします。
これにより、ファイルアイコンをカスタマイズできるだけでなく、初めてukagakaを使用するユーザーでも簡単にゴーストをインストールできるようになります。

YAYA栞関連

シンタックスハイライト

vscodeまたはn++のどちらを使っているかに関わらず、あなたの開発経験を最適化するためにシンタックスハイライトのファイルやプラグインを用意しています!
もしvscodeを使っているなら、vscode extension shopでayayaを検索するか、ここをクリックしてこのプラグインをインストールしてください。
n++を使用している場合は、ライトカラーとダークカラー用のシンタックスハイライティングファイルをこちらからダウンロードできます。

これは私の作品ではなく、いくつかの変更を加えて機能を追加しただけです。

新バージョンのtamaは、パフォーマンス向上、多言語サポート、コマンドラインパラメーターサポート、ゴーストカスタマイズサポート、イベント通知サポートだけでなく、いくつかの細かいバグフィックスやその他多くの機能があります!
まだ古いバージョンのtamaをお使いの方は、このクリスマスに新バージョンをお試しください!

これはyayaShioriがCIで稼働していることを確認するためのツールです。これにより、変更を加えるたびにゴーストやプラグインをリロードして構文が正しいかどうかを確認するのを忘れてしまうことなく、プロジェクト自体の開発に集中することができます。
また、リリース時にゴーストやプラグインに問題がないことを確認するために、自動化されたnarビルドプロセスで最終チェックを行うのにも使えます。
よき開発ライフを!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment