-
-
Save OmegaV1105/5c883241bf26ab55e28adf234f7a2f04 to your computer and use it in GitHub Desktop.
这是关于如何将你的ukagaka ghost(或其他什么)托管于github上并实现快速迭代、分支管理、nar自动生成等功能的gist
点此展开
github desktop是github官方的gitUI程序,可以让初学者轻松处理git操作
如果你对自己的代码水平有自信但从未使用过git的UI,不妨来试试
git唯一让人头疼的一点便是自动打开的autocrlf:它会在这项功能打开时自动更改文件的换行符,如果你想自己掌控这一部分或者自己构建md5更新文件,请按以下方法关闭这项功能
点此展开
点击这里来创建repo
随后下载
git本地仓库中的所有内容都在.git
文件夹中!
你可以:
- 移动
.git
文件夹到ghost文件夹下,并relocate本地repo - 或者将ghost文件夹下的所有内容移动到repo文件夹下
将任何含有.git
子文件夹的文件夹拖入github desktop窗口来快捷添加本地repo
你的单个ghost(或插件等其他)文件夹可以同时担起三项工作:运行、开发、作为repo
没必要保留任何副本
点此展开
这个文件控制git将什么文件不包含进repo中
你可以在任何repo中的文件夹里放置这类文件,它们总会对所在的文件夹及其子文件夹起作用
一半来说你只需要忽略存档文件和其他存档性质的文件夹
示例
注意:对任何不在git repo记录中的重要文件做好备份,比如你的存档
这个文件控制ssp等基础软件将什么文件不包含在nar和md5更新文件的制作中
你只能在ghost或shell或其他文件夹的根目录放置这个文件
示例
git的强大之处在于你可以自由选择、合并、回退任何你想要的改动
homeurl相关
点此展开
github的原始文件路径如下
https://raw.githubusercontent.com/<组织\用户名>/<项目名>/<分支名>/<路径>
如
https://raw.githubusercontent.com/Taromati2/stable-mirror/master/Taromati2/
有很多可以加速访问github文件的代理,比如cdn.jsdelivr.net
、raw.githack.com
、raw.fastgit.org
、raw.staticdn.net
详见@Taromati2/mirror-list
害怕忘记更新文件?
害怕提交了让ghost无法正常运行的改动?
使用github actions来一次配置受益终身
点此展开
你可以将github actions理解为在某些特定情况下工作的脚本!
具体的官方文档在这里
这里有两个转为ukagaka设置的github action来让你的开发更加顺畅:
@Taromati2/ukagaka-mirror-md5-CI-build
构建md5文件并push@Taromati2/yaya-CI-check
检查yaya是否正常工作,如果dic出错,那么工作流程失败
https://github.com/Taromati2/stable-mirror/blob/master/.github/workflows/md5-CI-build.yml
创建另一个repo来方便开发!
点此展开
taromati2将ghost的开发和更新源拆分成了两个项目,这样便可以在开发时随心所欲的进行更改而有选择的提交至更新源
最后再由bot进行md5文件的更新!
理所当然的,ghost文件夹在本地仍然只有一个
我想或许你会用到cmd中的mklink /j
来创建一个“文件夹软链接”!
分支是一个强大的功能:保存当前不必要的代码、进行大型追加功能的开发
所有的一切都不必打扰主分支
当你的ghost(或其他)开发进入滚动开发后或许你会疲于构建nar与发布新版本,但这一切都可以交给github actions
点此展开
-
- nar文件只是特定格式的zip文件
-
- github actions是在某些特定情况下工作的“脚本”
-
- 会最基础的命令行脚本编写
构建一组workflow,用于:
- 定期检查构建nar所需内容的更新
- 若有新内容,下载文件并压缩为nar,之后发布
@Taromati2/package-factory:watcher.yml
实现了每日定时的更新检查
@Taromati2/package-factory:auto_release.yml
实现了更新后的nar构建与发布
请随意借鉴
- 为了使得push触发另一个github workflow,你不能使用默认token进行push
任何github repo中一个好的readme.md文件都会给人以不错的观感,badges则可以给人以直接而详细的统计
点此展开
任何github repo的文件夹中(包括子文件夹)若有readme.md
文件,github都会在文件夹内容下方展示md文件内容
若没有md文件,github会查找readme.txt
md文件的好处是可以比txt文档有更多的富文本内容,包括图片、列表、数学公式、流程图、超链接——以及更多
taromati2甚至使用md文件来提供ghost的运行时文档(这里)
任何关于md文件的语法你都可以在这里找到!
https://pandao.github.io/editor.md/
badges是一种特殊的图片,用于在网页或md文件中显示更为丰富的信息
你可以在 https://img.shields.io/ 找到大部分好用的badges!
祝你好运
点此展开
我是steve,你也可以叫我steve02081504、原九、——以及其他什么
随你喜好就好
编程方面的执念是高可读性与高正交
以下的内容只是个人看法/提议
随意看看就好
meta情节之所以能够惊讶到用户是因为角色或演出做到了它们按常理不可以做到的事情:至少需要打破“某一面墙”
比如可以删除其他角色文件的角色、可以得知用户之前存档故事进度的角色
可以感知用户作弊的角色
之类的
但是ukagaka本身就可以做到这些,不是吗?
很多ukagaka本身就可以播放音乐、清空回收站、移动鼠标、修改系统设置
总的来说,虽然我认为meta元素很新颖、很有表现力
但我认为这不是很适用于ukagaka本身
或许对于ukagaka来说从来都没有这样的墙可以打破也说不定
ghost开发者如果追求meta元素的话,不如脚踏实地的完善不同情况下的应答
只有开发者不认为有这一面墙存在,才更容易做出能打破用户心里这一面墙的ukagaka出来
我始终觉得ukagaka仍然有无限可能
如果ukagaka会持续发展下去的话,我想未来可能的发展方向有这些
- 模块化
将处理sakura script的部分分开,做成模块链以方便扩展
将绘制窗口的部分与baseware分开,支持shell和balloon的自定义窗口绘制以让live2d甚至3d的shell成为现实
最终baseware成为一组模块的包管理器和启动器,一切由各式各样的模块进行支持 - 打包历史包袱
模块化的同时将旧规格的内容拆分至某一模块内,方便代码维护和新功能开发 - 跨平台、数据同步
提供一系列协议允许不同的baseware之间共享数据与无缝切换
当然,用户可能需要自己设置同步服务器之类的
不过那都是后话了 - 开源
这是我的个人偏好,仅此而已
我很喜欢风气良好的开源社区
谢谢你看到最后,这一大堆文字里有很多不清不楚的教学以及一个不知天高地厚的家伙的空想
感谢你的耐心
Translated by deepl, I don't have the energy to proofread
This is a gist on how to host your ukagaka ghost (or whatever) on github and enable quick iterations, branch management, nar auto-generation and more
Click here to expand
github desktop is the official github gitUI program that allows beginners to easily handle git operations
If you are confident in your coding skills but have never used git's UI before, give it a try
The only annoying thing about git is that it automatically turns on autocrlf: it automatically changes the newlines in your files when this feature is turned on. If you want to take control of this part or build your own md5 update files, turn it off as follows
click here to expand
click here to create the repo
Then download
Everything in the git local repository is in the .git
folder!
You can.
- move the
.git
folder to the ghost folder and relocate the local repo - Or move everything in the ghost folder to the repo folder
Drag any folder containing a.git
subfolder into the github desktop window to quickly add a local repo
Your single ghost (or other) folder can do three things at once: run, develop, and act as a repo
There is no need to keep any copies
Click here to expand
This file controls what files git will not include in the repo
You can put such files in any folder in the repo, and they will always work for the folder they are in and its subfolders
Half the time you just need to ignore archived files and other archived folders
example
Note: Make a backup of any important files that are not in the git repo record, such as your archives
This file controls what files are not included in the production of nar and md5 update files by base software such as ssp
You can only place this file in the root of a ghost or shell or other folder
example
The power of git is that you can freely select, merge, and roll back any changes you want
Click here to expand
Click on a partial line of a file to uncheck/select
Click on a file to unselect/select the whole file
Uncheck changes to a single file
Cancels all files
Roll back any historical changes
homeurl related
Click here to expand
The path to the original github file is as follows
https://raw.githubusercontent.com/<organization\username>/<project name>/<branch name>/<path>
as
https://raw.githubusercontent.com/Taromati2/stable-mirror/master/Taromati2/
There are a number of proxies that can speed up access to github files, such as cdn.jsdelivr.net
, raw.githack.com
, raw.fastgit.org
, raw.staticdn.net
See @Taromati2/mirror-list
for details
Afraid you'll forget to update your files?
Afraid of committing changes that won't make ghost work?
Use github actions to configure once for life
Click here to expand
You can think of github actions as scripts that work in certain situations!
The specific official documentation is here
Here are two github actions converted to ukagaka settings to make your development smoother.
@Taromati2/ukagaka-mirror-md5-CI-build
Build the md5 file and push@Taromati2/yaya-CI-check
Check that yaya is working properly, if the dic is wrong then the workflow fails
https://github.com/Taromati2/stable-mirror/blob/master/.github/workflows/md5-CI-build.yml
Create another repo to facilitate development!
Click here to expand
taromati2 splits the development and update repositories of ghost into two projects, so that changes can be made as you go along while developing and optionally committed to the update repository
Finally, the md5 file is updated by bot!
As a matter of course, there is still only one ghost folder locally
I thought you might want to use mklink /j
in cmd to create a folder soft link
!
Branches are a powerful feature: saving current unnecessary code, developing large additions
All without having to disturb the main branch
Click here to expand
If you don't understand what a branch is, think of it as a "parallel world"
Changes between branches don't affect each other until you merge the two branches
Create a new branch based on an existing branch
Click on the branch name to switch branches
Merge branches
When your ghost (or other) development goes into rolling development you may get tired of building nar and releasing new versions, but this can all be left to github actions
Click here to expand
-
- nar files are just zip files in a particular format
-
- github actions are "scripts" that work in certain situations
-
- know the basics of command line scripting
Build a set of workflow for.
- periodically check for updates to the content needed to build the nar
- If new content is available, download the file and compress it into a nar, then publish it
@Taromati2/package-factory:watcher.yml
Implemented a regular daily update check
@Taromati2/package-factory:auto_release.yml
implements updated nar builds and releases
Please feel free to borrow from
- In order for a push to trigger another github workflow, you cannot use the default token for a push
A good readme.md file in any github repo will give a good look and feel, and badges will give straightforward and detailed statistics
Click here to expand
If there is a readme.md
file in any github repo folder (including subfolders), github will display the contents of the md file below the contents of the folder
If there is no md file, github will look for readme.txt
.
The advantage of md files is that they can have more rich text content than txt documents, including images, lists, mathematical formulas, flowcharts, hyperlinks - and much more!
taromati2 even uses md files to provide ghost's runtime documentation (here)
Any syntax for md files you can find here!
https://pandao.github.io/editor.md/
badges are special images that are used to display richer information in web pages or md files
You can find most of the good badges at https://img.shields.io/!
Good luck!
A good tag helps others to find and identify what your repo is for
So make sure you set this up
Click here to expand
I'm steve, you can also call me steve02081504, Original Nine, - and whatever else
Whatever you like.
Programming obsessions are high readability and high orthogonality
The following is just a personal opinion/proposal
Feel free to look at it
The reason why meta plots can surprise users is because the characters or shows do something they can't normally do: they need to break "a wall" at least
For example, characters that can delete other characters' files, characters that can learn the progress of a user's previously archived story
characters that can sense when a user is cheating
and so on
But ukagaka itself can do all that, can't it?
Many ukagaka themselves can play music, empty the recycle bin, move the mouse, change system settings
Overall, while I think the meta element is innovative and expressive
I don't think it's very applicable to ukagaka per se
Perhaps there has never been such a wall for ukagaka to break down.
If ghost developers are looking for meta elements, they might as well get down to business and refine their responses to different situations.
It's easier to make ukagaka that breaks the wall in the user's mind if the developer doesn't think that wall exists
I've always felt that ukagaka still has endless possibilities
If ukagaka is going to continue to evolve, I think there are some possible directions for the future
- Modularity
Separate the parts that deal with sakura script and make a chain of modules to make it easier to expand
Separate the window drawing part from baseware and support custom window drawing for shell and balloon to make live2d or even 3d shells a reality
Eventually baseware becomes a package manager and launcher for a set of modules, all supported by a variety of modules - Packing historical baggage
Modularity and splitting of old specifications into a single module for easy code maintenance and new feature development - Cross-platform, data synchronisation
Provides a range of protocols to allow data sharing and seamless switching between different baseware
Of course, users may need to set up their own synchronisation servers and so on
But that's all for later - Open Source
This is my personal preference, that's all
I really like open source communities that have a good ethos
Thank you for reading the end, it's a lot of unclear teaching and the pipe dream of a guy who doesn't know any better
Thanks for your patience
翻訳:DeepLより。校正する気力がない…。
これは、Github上で伺かゴースト(または何か)をホストし、イテレーション(アジャイル開発?)、ブランチ管理、NAR自動生成などを可能にする方法についてのgistです。
ここをクリックして展開
github desktop は、初心者が簡単にgitの操作を行えるgithub公式のgitUIプログラムです。
コーディングには自信があるけど、gitのUIは使ったことがないという方は、一度試してみてください!
gitで唯一厄介なのは、autocrlfが自動でオンになることです。この機能がオンになっていると、ファイル内の改行コードが自動的に変更されます。もしこの部分を調節したい、或いは自分でmd5アップデートファイルを作りたい場合は、次のようにしてこれをオフにします。
ここをクリックして展開
ここをクリックして展開
ここをクリックでrepoを作成。
次にダウンロードします。
git ローカルリポジトリのすべては .git
フォルダにあります!
.git
フォルダをゴーストフォルダに移動して、ローカルリポジトリを再配置します。- または、ghostフォルダー内のすべてをrepoフォルダーに移動します。
.git
サブフォルダを含む任意のフォルダを github デスクトップウィンドウにドラッグして、ローカルリポジトリを素早く追加できます。
単一のゴースト(または他の)フォルダは、同時に3つのことを行うことができます:run、develop、act、そしてrepoとして機能します。
コピーする必要はありません。
ここをクリックして展開
このファイルは、git がどのファイルをrepoに含めないかを制御します。
このようなファイルは、レポ内のどのフォルダに置いても、そのフォルダとそのサブフォルダで常に機能します。
アーカイブされたファイルや他のアーカイブされたフォルダを無視する必要がある場合が半分あります。
例
注意:アーカイブなど、git リポジトリに記録されていない重要なファイルはバックアップをとっておくこと。
このファイルは、sspなどのベースソフトがnarやmd5の更新ファイルを作成する際に、どのようなファイルを含めないかを制御するファイルです。
ゴーストやシェルなどのフォルダのルートにのみ置くことができます。
例
gitの威力は、好きな変更を自由に選択し、マージし、ロールバックできることです。
ここをクリックして展開
ファイルの部分行をクリックするとチェックが選択/非選択される。
ファイルをクリックすると、ファイル全体が選択/非選択される。
homeurl関連
ここをクリックして展開
元のgithubファイルのパスは以下の通りです。
https://raw.githubusercontent.com/<組織名>/<プロジェクト名>/<ブランチ名>/<パス>
のようになります。
例: https://raw.githubusercontent.com/Taromati2/stable-mirror/master/Taromati2/
github のファイルへのアクセスを高速化するプロキシは、cdn.jsdelivr.net
, raw.githack.com
, raw.fastgit.org
, raw.staticdn.net
など多数存在します。
詳細は @Taromati2/mirror-list
を参照してください。
ファイルの更新を忘れてしまうのが心配ですか?
ゴーストが動作しないような変更をコミットするのが怖いですか?
github アクションを使えば、一度設定すればずっと使えます。
ここをクリックして展開
githubアクションは、特定の状況で動作するスクリプトと考えることができます!
具体的な公式ドキュメントはこちら
ここでは、開発をスムーズにするために、githubのアクションを伺かの設定に変換したものを2つ紹介します。
@Taromati2/ukagaka-mirror-md5-CI-build
md5ファイルをビルドしてプッシュする。@Taromati2/yaya-CI-check
yayaが正しく動作しているか確認する。もしdicが間違っていればワークフローは失敗する。
https://github.com/Taromati2/stable-mirror/blob/master/.github/workflows/md5-CI-build.yml
開発を容易にするために、別のレポを作成しましょう。
ここをクリックして展開
taromati2はghostの開発リポジトリとアップデートリポジトリを2つのプロジェクトに分割し、開発中に随時変更を加え、オプションでアップデートリポジトリにコミットできるようにします。
最後にmd5ファイルはbotで!
当然のことながら、ローカルにはまだゴーストフォルダが1つしかありません。
cmdで mklink /j
を使ってフォルダーソフトリンクを作ると良いかと思います。
ブランチは強力な機能です。メインブランチを邪魔することなく、現在の不要なコードを保存し、大規模な追加を開発します。
ここをクリックして展開
ブランチが何かわからない場合は、パラレルワールドと考えてください。
ブランチ間の変更は、2つのブランチをマージするまで互いに影響しません。
ゴースト(または他の)開発がローリングデベロップメントになったとき、narのビルドと新しいバージョンのリリースに疲れるかもしれませんが、これはすべてgithubのアクションに任せることができます。
ここをクリックして展開
-
- narファイルは、特定のフォーマットの単なるzipファイルです。
-
- githubのアクションは、特定の状況で動作する「スクリプト」です。
-
- コマンドラインスクリプティングの基本を知っている。
一連のワークフローを構築する。
- narの構築に必要なコンテンツの更新を定期的に確認する。
- 新しいコンテンツがある場合、ファイルをダウンロードし、narに圧縮して、公開する。
@Taromati2/package-factory:watcher.yml
毎日定期的に更新チェックを実施。
@Taromati2/package-factory:auto_release.yml
は、更新されたnarのビルドとリリースを実行します。
上記ファイルはご自由にお使い下さい。
- プッシュが他のgithubワークフローを起動させるためには、プッシュ用のデフォルト・トークンを使用することはできません。
github リポジトリにある優れた readme.md ファイルは良いルック・アンド・フィール(LnF)を与え、バッジはわかりやすく詳細な統計情報を提供します。
ここをクリックして展開
githubのレポフォルダ(サブフォルダも含む)内に readme.md
ファイルがある場合、githubはフォルダの内容の下にmdファイルの内容を表示します。
mdファイルがない場合、githubはreadme.txt
を探します。
md ファイルの利点は、画像、リスト、数式、フローチャート、ハイパーリンクなど、txt ドキュメントよりも豊富なテキストコンテンツを持つことができます。
(その他にもたくさんあります!)
taromati2 は md ファイルを使用して ghost のランタイムドキュメントを提供しています (こちら)。
mdファイルに関するあらゆる文法は、ここにあります!
https://pandao.github.io/editor.md/
バッジは、ウェブページやmdファイルでより豊かな情報を表示するために使用される特別な画像です。
https://img.shields.io/ で、ほとんどの良いバッジが見つかります。
ガンバレ!
良いタグは、他の人があなたのrepoを見つけ、何のためのものかを識別するのに役立ちます。
なので、必ず設定してください。
ここをクリックして展開
私はsteveです、あなたは私をsteve02081504、Original Nine、と呼ぶこともできますし、他の何でも。
好きなものを好きなだけ。
プログラミングへのこだわりは、高い可読性と高い直交性。
以下はあくまで個人的な意見・提案です。
ご自由にご覧ください
メタなプロットがユーザーを驚かせるのは、キャラクターやショーが普段できないことをするからで、少なくとも「壁」を壊す必要があるからです
例えば、他のキャラクターのファイルを削除できるキャラクター、過去にアーカイブしたユーザーのストーリーの進行状況を知ることができるキャラクター
ユーザーが不正をしていることを察知することができるキャラクター
などなど
でも、伺か自身は全部できるんでしょう?
音楽を再生したり、ごみ箱を空にしたり、マウスを動かしたり、システムの設定を変更したり、多くは伺かそのものができます。
全体として、メタ要素は斬新で表現力があると思うのですが、あまり伺かには当てはまらないような気がします。
おそらく、これほどまでに伺かが打破すべき壁があったでしょうか。
ゴーストの開発者がメタ要素を求めるなら、本腰を入れてさまざまな状況への対応力を磨いたほうがいいのではないでしょうか。
開発者が壁の存在を意識しなければ、ユーザーの心の壁を破る伺かを作るのは簡単。
伺かには、まだまだ無限の可能性があると常々感じています。
伺かが今後も進化していくのであれば、いくつかの方向性が考えられると思います。
- モジュール化
サクラスクリプトを扱う部分を分離し、モジュールの連鎖を作り、拡張しやすくする。
ウィンドウ描画部分をベースウェアから分離し、シェルやバルーンのカスタムウィンドウ描画をサポートし、live2dや3dシェルも現実のものとする。
最終的にベースウェアは、様々なモジュールによってサポートされる一連のモジュールのパッケージマネージャとランチャーになります。 - 歴史的なお荷物の梱包
モジュール化し、古い仕様を1つのモジュールに分割することで、コードのメンテナンスと新機能の開発を容易にする。 - クロスプラットフォーム、データ同期
データ共有や異なるベースウェア間のシームレスな切り替えを可能にする様々なプロトコルを提供
もちろん、ユーザー側で同期用サーバーの設置などが必要な場合もある
しかし、それはすべて後の話 - オープンソース
これは私の個人的な好みです。
私は、良い倫理観を持ったオープンソースのコミュニティがとても好きです。
最後までお読みいただきありがとうございました。不明瞭な教えと、よくわからない男の夢物語の数々です。
Thanks for your patience!