Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么输入date或者datetime无法输出日期、时间呀? #153

Open
arieslee opened this issue Oct 4, 2024 · 7 comments
Open

Comments

@arieslee
Copy link

arieslee commented Oct 4, 2024

配置信息
image
我的电脑是支持lua的,用户文件夹目录下也新建了rime.lua
image
但是,我打date命令的时候什么也不出来
image
image

@bczhc
Copy link

bczhc commented Oct 5, 2024

rime日志里看看吧,应该在%TEMP%\rime.weasel

@arieslee
Copy link
Author

arieslee commented Oct 7, 2024

Log file created at: 2024/10/07 10:33:02
Running on machine: ARIESPC
Running duration (h:mm:ss): 0:00:03
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
W20241007 10:33:02.456974 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\punctuation.custom.yaml'.
W20241007 10:33:02.457890 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\key_bindings.custom.yaml'.
W20241007 10:33:02.464933 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\wubi86_jidian_pinyin.custom.yaml'.
W20241007 10:33:02.466808 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\punctuation.custom.yaml'.
W20241007 10:33:02.467801 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\key_bindings.custom.yaml'.
W20241007 10:33:02.539610 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\pinyin_simp.custom.yaml'.
W20241007 10:33:02.540583 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\punctuation.custom.yaml'.
W20241007 10:33:02.541213 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\key_bindings.custom.yaml'.
W20241007 10:33:02.572657 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\wubi86_jidian_trad_pinyin.custom.yaml'.
W20241007 10:33:02.573955 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\punctuation.custom.yaml'.
W20241007 10:33:02.574922 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\key_bindings.custom.yaml'.
W20241007 10:33:02.642460 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\stroke.custom.yaml'.
W20241007 10:33:02.643362 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\punctuation.custom.yaml'.
W20241007 10:33:02.643884 16996 config_data.cc:69] nonexistent config file 'E:\Rime\UserData\key_bindings.custom.yaml'.

@arieslee
Copy link
Author

arieslee commented Oct 7, 2024

我什么也看不出来

@bczhc
Copy link

bczhc commented Oct 7, 2024

我什么也看不出来

这看不出,得打一下date,看有什么lua报错之类的。日志里

@arieslee
Copy link
Author

arieslee commented Oct 7, 2024

我什么也看不出来

这看不出,得打一下date,看有什么lua报错之类的。日志里

上面的日志就是我输入完date之后的,我总感觉是我的配置文件有问题
这是我的配置文件(wubi86_jidian.schema.yaml),还有,rime.lua和这个配置文件是必须在同一目录下吧?

# Rime schema settings
# encoding: utf-8

schema:
  schema_id: wubi86_jidian
  name: "极点五笔86"
  version: "1.0"
  icon: "wubi86_jidian.ico" # string 方案图标,格式: .ico
  ascii_icon: # string
  author:
    - 创始人 王永民先生
  description: |
    五笔字形 86 极点极爽版,方案由 KyleBing 修改 - 2019年11月08日 10:26
  dependencies:
#    - pinyin_simp

switches:
  - name: ascii_mode
    reset: 0
    states: [中, En]
  - name: zh_trad
    reset: 0 # 初始状态为 0: 简 -> 简 1: 简 -> 繁
    states: [简体, 繁体]
  - name: full_shape
    states: [半角, 全角]
  - name: extended_charset
    states: [常用, 扩展]
  - name: ascii_punct
    states: [。,, .,]

engine:
  processors:
    - ascii_composer
    - recognizer
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor
  segmentors:
    - ascii_segmentor
    - matcher
    - abc_segmentor
    - punct_segmentor
    - fallback_segmentor
  translators:
    - punct_translator
    - reverse_lookup_translator
    - wubi86_jidian_date_translator
    - table_translator
    - lua_translator@*wubi86_jidian_date_translator # 日期、时间、星期
    - history_translator@repeat_last_input # 重复上一次输入,对应下面的 repeat_last_input
  filters:
    - simplifier@tradition
#    - lua_filter@*wubi86_jidian_single_char_first_filter # 单字优先
#    - lua_filter@*wubi86_jidian_single_char_only # 纯单字

# 自动造词功能:参阅: https://github.com/KyleBing/rime-wubi86-jidian#6-%E5%BC%80%E5%90%AF%E8%87%AA%E5%8A%A8%E9%80%A0%E8%AF%8D

speller:
  # max_code_length: 4                    # 四码上屏
  auto_select: false # 四码唯一时,自动上屏
#  auto_clear: max_length                # 空码时自动清空

translator:
  dictionary: wubi86_jidian # 翻译器将调取此字典文件
  enable_charset_filter: true # 开启字符集过滤
  enable_completion: true # 是否显示编码未输入完整的词条

  enable_sentence: true # 句子输入模式
  enable_user_dict: true # 是否开启用户词典(用户词典记录动态字词频,用户词)
  enable_encoder: true

  encode_commit_history: false # 是否对已上屏词自动成词(仅 table_translator 有效)
  preedit_format: # 上屏码自定义
  #    - xform/.+//
  comment_format: # 提示码自定义
    - xform/.+// # 当前默认不提示编码,消除所有候选词后的提示码

# 简入繁出 通过 OpenCC 支持 github地址:https://github.com/BYVoid/OpenCC
# 已集成在输入法程序中,在输入法程序目录的 opencc 目录下
# 输入法程序中使用 OpenCC 简转繁的过程是这样:
# 1. 先从简转繁体
# 2. 如果配置了台湾繁体,就会将上一步生成的繁体进一步处理
# 3. 根据这个文件:https://github.com/BYVoid/OpenCC/blob/master/data/dictionary/TWVariants.txt 把台湾与正常繁体不同的地方转成台湾版本的字,比如 “床”

tradition:
  #  opencc_config: s2t.json  # 简 -> 繁
  opencc_config: s2hk.json # 繁 -> 香港
  #  opencc_config: t2s.json   # 繁 -> 简
  #  opencc_config: t2tw.json  # 繁 -> 台湾
  #  opencc_config: t2hk.json  # 繁 -> 香港
  #  opencc_config: s2tw.json  # 簡 -> 臺灣標準
  #  opencc_config: s2twp.json  # 簡 -> 臺灣片語
  option_name: zh_trad

reverse_lookup:
  dictionary: pinyin_simp # 反查使用的拼音词库
  prefix: "z" # 反查前缀,以它为起点
  suffix: "'" # 反查后缀,以它为结点
  tips: [拼音] # 反查时的提示信息

  preedit_format:
    - xform/([nl])v/$1ü/
    - xform/([nl])ue/$1üe/
    - xform/([jqxy])v/$1u/
punctuator:
  import_preset: default
#  import_preset: symbols
# 开始快捷输入符号功能,前面留两个空格
# 对应需要将下面 recognizer -> patterns 下面的 punct 字段的注释去掉

key_binder:
  import_preset: default

recognizer:
  import_preset: default
  patterns:
    #    punct: "^/([0-9]+[a-z]*|[a-z]+)$" # 注意前方需要有4个空格,跟下面对齐
    reverse_lookup: "^z[a-z]*'?$" # 反查词条的正则

# 重复上一次输入
repeat_last_input:
  input: z
  size: 1
  initial_quality: 1

@bczhc
Copy link

bczhc commented Oct 7, 2024

这仓库下载下直接导入rime用户配置目录中就能用了啊,而且这仓库不需要rime.lua,因为作者使用了另一种导入lua的模式,参阅配方模式的“模式2”。

还有使用的Rime发行版要确保支持lua,不是本地有lua可执行就可以的,是Rime这个程序要编译进了Lua支持。一般Windows现在用的fxliang/weasel

@bczhc
Copy link

bczhc commented Oct 7, 2024

@arieslee 你点ctrl+0,选“极点五笔86”,再试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants