GithubHelp home page GithubHelp logo

void001 / ssf2fcitx Goto Github PK

View Code? Open in Web Editor NEW
125.0 4.0 11.0 510 KB

Automagically convert your favorite sogou-pinyin skin to fcitx skin

License: Other

CMake 4.80% C++ 94.45% Shell 0.75%
fcitx skin sogou-pinyin cpp

ssf2fcitx's Introduction

ssf2fcitx

Automagically convert your favorite sogou-pinyin skin to fcitx skin

NOW ONLY support input bar skin translate, the tray and menu bar is not supported yet

Dependencies

  • Qt5core
  • Qt5widgets
  • openssl

Usage

  1. ./ssf2skin -i input.ssf -o output_dir
  2. copy the directory /path/to/save/theme to either $XDG_CONFIG_HOME/fcitx/skin or /usr/share/fcitx/skin
  3. Then you can switch to the theme, enjoy it!

Supported Function

  1. Decrypt ssf archive
  2. Draw the input bar without overlay image
  3. Draw the input bar with overlay image (testing)

Screenshots

The following skins are converted directly from ssf, no any manual modifications

pic

Notice

  • The converter now support many of sogou skin conversion, however there are still a lot we don't support yet.

    • we now don't support vertical layout
    • we now don't support skins with GIFs in it(I don't know whether fcitx support it)
    • We now don't support skins with overlay pictures [ now supported, testing ]
  • The skin converted may have problem with left, right align, sometimes you need to manually adjust it (Just Change the value MarginLeft & MarginRight in skin config file

Acknowlegements

  • kimtoy for providing the ssf extraction process
  • csslayer for giving hints on fcitx skin drawing process

ssf2fcitx's People

Contributors

ducksoft avatar void001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ssf2fcitx's Issues

no -c option

It will ask you to use -c option if the .ssf file is not encrypted, but there is NO such option.

➜ ./ssf2skin -i ./meaqua.ssf
Sorry, but we don't directly support unencrypted archive now
Please unzip the ssf file and use option -c (convert only) and set the input path to the unzipped dir.

➜ ./ssf2skin -c -i ./meaqua/
./ssf2skin: invalid option -- 'c'
Sorry, but we don't directly support unencrypted archive now
Please unzip the ssf file and use option -c (convert only) and set the input path to the unzipped dir.

According to the code, there is no way to covert a existed dir, since it only support i, o, h options.

CLEAN UP CODE!

The toy version is now in "It works!" state.
The code need to be cleaned up.

CLI support

如题:直接在命令行运行程序会炸掉。
问题版本: 33a2fa0

运行环境
 ██████████████████  ████████     ducksoft@duckjaro
 ██████████████████  ████████     OS: Manjaro 18.0.0-rc Illyria
 ██████████████████  ████████     Kernel: x86_64 Linux 4.19.0-1-MANJARO
 ██████████████████  ████████     Uptime: 1h 20m
 ████████            ████████     Packages: 1448
 ████████  ████████  ████████     Shell: bash
 ████████  ████████  ████████     Resolution: 1920x1080
 ████████  ████████  ████████     DE: KDE 5.50.0 / Plasma 5.13.5
 ████████  ████████  ████████     WM: KWin
 ████████  ████████  ████████     WM Theme: Arc Dark
 ████████  ████████  ████████     GTK Theme: Breath [GTK2],  [GTK3]
 ████████  ████████  ████████     Icon Theme: maia
 ████████  ████████  ████████     Font: Noto Sans Regular
 ████████  ████████  ████████     CPU: Intel Core i5-7200U @ 4x 3.1GHz [74.0°C]
                                  GPU: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2) 
                                  RAM: 6621MiB / 7733MiB

问题复现
[ducksoft@duckjaro ~]$ git clone https://github.com/VOID001/ssf2fcitx
正克隆到 'ssf2fcitx'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 47 (delta 24), reused 39 (delta 16), pack-reused 0
展开对象中: 100% (47/47), 完成.
[ducksoft@duckjaro ~]$ mkdir build
[ducksoft@duckjaro ~]$ rmdir build/
[ducksoft@duckjaro ~]$ cd ssf2fcitx/
[ducksoft@duckjaro ssf2fcitx]$ ls
CMakeLists.txt  convert.cpp  main.cpp  README.md  screenshot.png  ssfextract.cpp
[ducksoft@duckjaro ssf2fcitx]$ mkdir build
[ducksoft@duckjaro ssf2fcitx]$ cd build/
[ducksoft@duckjaro build]$ cmake ..
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /bin/pkg-config (found version "1.5.3") 
-- Checking for module 'openssl'
--   Found openssl, version 1.1.1
-- Checking for module 'Qt5Core'
--   Found Qt5Core, version 5.11.2
-- Checking for module 'Qt5Widgets'
--   Found Qt5Widgets, version 5.11.2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ducksoft/ssf2fcitx/build
[ducksoft@duckjaro build]$ make
Scanning dependencies of target ssf2skin
[ 25%] Building CXX object CMakeFiles/ssf2skin.dir/main.cpp.o
[ 50%] Building CXX object CMakeFiles/ssf2skin.dir/ssfextract.cpp.o
[ 75%] Building CXX object CMakeFiles/ssf2skin.dir/convert.cpp.o
[100%] Linking CXX executable ssf2skin
[100%] Built target ssf2skin
[ducksoft@duckjaro build]$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  Makefile  ssf2skin
[ducksoft@duckjaro build]$ ./ssf2skin 
段错误 (核心已转储)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.