whiteleaf7 / narou Goto Github PK
View Code? Open in Web Editor NEWNarou.rb - 小説家になろうのダウンローダ&縦書き整形&管理アプリ。Kindle(などの電子書籍端末)でなろうを読む場合に超便利です!
License: Other
Narou.rb - 小説家になろうのダウンローダ&縦書き整形&管理アプリ。Kindle(などの電子書籍端末)でなろうを読む場合に超便利です!
License: Other
narou init
コマンドを再度実行してほしいことを画面に表示するように。
今使っているバージョンを記録する必要がある。
narou diff 15 -l --max 10
indexのサブタイトルもチェックする必要がある
difftool を指定すれば問題なく動くので、優先度は低い
MOBI のヘッダーを弄る需要があるらしい。
EBOK 要素を付け加えたり?
タイトル名は原文を尊重したいが、半角アルファベットは全角にするところはしないと横に倒れて見栄えが良くない。
変換処理をかませるとタイトル自体が変わってしまう可能性が高いので、アルファベット変換処理だけかける?
global setting に invisible な変数で over18 というのを用意する?
Helper.confirm を使えば簡単
http://ncode.syosetu.com/n7225w/
のような作品の場合。
ensureで nil チェックが必要
でっかい鍵カッコに置換する
narou convert ID --verbose
AozoraEpub3とkindlegenの標準出力を全部表示したい
表示が殺風景なので文字に色を付けたいが、Windowsのコンソールは腐ってるので面倒くさい。
gem の win32console というものがあるが、コンパイル環境がないと動かない。
|漢字|(かんじ)
上記記述があった場合、
なろう上では
「漢字|」に対してルビがつくが、Narou.rb だと「|漢字(かんじ)」
となってしまう。
しかしながら、こんな表記はルビの書き方としてありえんので、現状は仕様扱いとする。
Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec,
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']
Even for projects that already specify a license, including a license in your gemspec is a good practice, since it is easily
discoverable there without having to check the readme or for a license file. For example, it is the field that rubygems.org uses to display a gem's license.
For example, there is a License Finder gem to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough
issue that even Bundler now generates gems with a default 'MIT' license.
If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), github has created a license picker tool.
In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :).
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue and let me know. In either case, I'll follow up. Thanks!
p.s. I've written a blog post about this project
p.p.s. Here's a list of the license names I've found and their frequenceis
最新話の感想を書くところへ飛ばすコマンドを作る(Nコード/最新話数/#f_cr にアンカーがある)
コマンド案
どっちもわかりづらい
T/O
send コマンドを Windows 以外に対応した時に対応する
gem の pony 使うと簡単に送信出来る
なろうデベロッパーAPIを使って最新話を取得する
download -f 時の差分用ファイル保存は、現在の仕様では全てのデータが差分として保存されてしまう。
これでは差分として必要ない部分まで保存してしまい、diff -l 時にもリストが長くなりすぎてしまう。
差分ファイル保存時に、ダウンロードしたデータと、保存されているデータを照合し、本当に変更されているかを確認する必要がある。
上記のすべての条件を満たすと、三点リーダーに変換後の……が行頭のままで、スペースが挿入されていない。
AozoraEpub3のテンプレの問題?
ダウンロードした小説を変換するときはほぼ問題はないが、テキストファイルを変換するときに注記が使えなくなるので対応したほうが良い(優先度:中)
C:\Users\sasa\Documents\GitHub\narou>narou send 13 musyoku
C:/Users/sasa/Documents/GitHub/narou/lib/command/send.rb:40:in `get_device': pri
vate method `new' called for Device:Class (NoMethodError)
from C:/Users/sasa/Documents/GitHub/narou/lib/command/send.rb:55:in `exe
cute'
from C:/Users/sasa/Documents/GitHub/narou/lib/commandline.rb:32:in `run'
from C:/Users/sasa/Documents/GitHub/narou/narou.rb:27:in `<top (required
)>'
from C:/Users/sasa/Documents/GitHub/narou/narou.bat:11:in `require_relat
ive'
from C:/Users/sasa/Documents/GitHub/narou/narou.bat:11:in `<main>
AozoraEpub3の仕様として、注記内に挿絵タグがある場合、独立ページとして表示されるべき画像でも注記内のインライン要素として表示されるため、でかい画像ははみ出してしまう。
http://novel.syosetu.org/31576/
→ 作者名じゃなくて原作名が取得されてしまっている(作者名のリンクがないのが怪しい)
narou list -u > list.txtなどとして管理している小説のリストをテキストファイルにリダイレクトして保存しようとしても、実際に保存されるのは IDのリストになっています。
$ narou list > cmd.txt
$ cat cmd.txt
0 1 2 3 4 ....
小説がたまってきたときにリストを一旦ファイルに落として眺めるケースで不便なので、
できればそのままファイルに保存できると嬉しいです。
ダウンロード自体されていない模様。
ダウンロード時に変換してしまうと、バグ等があって変換処理を変更したとしても、再度ダウンロードするまでその変更が反映されない。
→ HTMLのまま保存しておいて変換時に行う
濁点付き文字の対策に、濁点フォント以外に外字画像、縦中横、濁点除去等のオプションを選べるようにしたい
テキスト変換とかで誤字を修正されたまま何も表示しないと気づけない
preset/ncode.syosetu.com/n9669bk/converter.rb
のようにファイルを置いておけば、初期化時に自動でこれをコピーしてくれる。
すでにファイルがあった場合は上書きしない。
narou download が失敗しても終了コードが0なため、コマンドの成功可否がそれからは判断できません。
ダウンロードに成功した数を終了コードとして返すとかしてくれると嬉しいです。
Fiddleに切り替えればいいらしいが、Ruby1.9ではDLと併用する必要があるらしい。
Windows版のみ。エンコーディングで落ちてる
現状目次の更新日(粒度は日単位)で取得しているため、同じ日に2回以上更新されると更新を把握できない。
次の話が投下されるまでの間限定だが、なろうデベロッパーAPIで小説の更新時間を秒単位で取得できるため、これを使用したい。
ただし、latest な更新を全て更新してしまうと、1,2,3話更新→同日に3話最更新された場合、1,2話が無駄な更新をしてしまうため、この場合の対処をどうにかする。
対応させるには画像として90度回転させたフォントを描画し、外字として埋め込むしかない。
現状長編小説のみの対応で短編は未対応。短編のURLを入力したらおかしくなる。
なろうデベロッパーAPIで長編・短編の種別が簡単に習得できるため、それを利用して短編も対応したい。
C:/Users/sasa/Documents/GitHub/narou/lib/helper.rb:56:in `open_directory_by_os_f
iler': undefined method `encode' for nil:NilClass (NoMethodError)
from C:/Users/sasa/Documents/GitHub/narou/lib/command/folder.rb:30:in `b
lock in execute'
from C:/Users/sasa/Documents/GitHub/narou/lib/command/folder.rb:28:in `e
ach'
from C:/Users/sasa/Documents/GitHub/narou/lib/command/folder.rb:28:in `e
xecute'
from C:/Users/sasa/Documents/GitHub/narou/lib/commandline.rb:32:in `run'
from C:/Users/sasa/Documents/GitHub/narou/narou.rb:27:in `<top (required
)>'
from C:/Users/sasa/Documents/GitHub/narou/narou.bat:11:in `require_relat
ive'
from C:/Users/sasa/Documents/GitHub/narou/narou.bat:11:in `<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.