Compare commits

..

No commits in common. "2aa63901461537f88dc8065acc26151643b4a122" and "7bcbc04b0401280b63e9649bc56ba7fcf0403f22" have entirely different histories.

19 changed files with 316 additions and 377 deletions

12
.gitignore vendored
View File

@ -3,9 +3,9 @@
# Qt Creator files # Qt Creator files
/CMakeLists.txt.user* /CMakeLists.txt.user*
/tdv.cflags /sdtui.cflags
/tdv.cxxflags /sdtui.cxxflags
/tdv.config /sdtui.config
/tdv.files /sdtui.files
/tdv.creator* /sdtui.creator*
/tdv.includes /sdtui.includes

View File

@ -1,15 +1,13 @@
cmake_minimum_required (VERSION 3.0) cmake_minimum_required (VERSION 3.0)
project (tdv VERSION 0.1.0 LANGUAGES C) project (sdtui VERSION 0.1.0 LANGUAGES C)
# Adjust warnings # Moar warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
set (ignores "-Wno-missing-field-initializers -Wno-cast-function-type") set (ignores "-Wno-missing-field-initializers -Wno-cast-function-type")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ${ignores}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ${ignores}")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra") set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra")
endif () endif ()
add_definitions (-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38)
# For custom modules # For custom modules
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
@ -110,7 +108,6 @@ if (WITH_GUI)
message (FATAL_ERROR "GTK+ not found") message (FATAL_ERROR "GTK+ not found")
endif () endif ()
include_directories (${gtk_INCLUDE_DIRS})
link_directories (${gtk_LIBRARY_DIRS}) link_directories (${gtk_LIBRARY_DIRS})
endif () endif ()
@ -201,7 +198,25 @@ configure_file (${PROJECT_SOURCE_DIR}/config.h.in
${PROJECT_BINARY_DIR}/config.h) ${PROJECT_BINARY_DIR}/config.h)
include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
# Icon generation utilities # Primary target source files
set (project_sources
src/${PROJECT_NAME}.c)
set (project_headers
${project_common_headers})
# Build the main executable and link it
add_definitions (-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38)
if (NOT WIN32)
add_executable (${PROJECT_NAME}
${project_sources} ${project_headers} ${project_common_sources})
target_link_libraries (${PROJECT_NAME} ${project_common_libraries}
${Ncursesw_LIBRARIES} termo-static)
if (WITH_X11)
target_link_libraries (${PROJECT_NAME} ${xcb_LIBRARIES})
endif ()
endif (NOT WIN32)
# The same for the alternative GTK+ UI
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.18.0) if (NOT ${CMAKE_VERSION} VERSION_LESS 3.18.0)
set (find_program_REQUIRE REQUIRED) set (find_program_REQUIRE REQUIRED)
endif () endif ()
@ -209,7 +224,7 @@ endif ()
function (icon_to_png svg size output_dir output) function (icon_to_png svg size output_dir output)
set (_dimensions ${size}x${size}) set (_dimensions ${size}x${size})
set (_png_path ${output_dir}/hicolor/${_dimensions}/apps) set (_png_path ${output_dir}/hicolor/${_dimensions}/apps)
set (_png ${_png_path}/${PROJECT_NAME}.png) set (_png ${_png_path}/sdgui.png)
set (${output} ${_png} PARENT_SCOPE) set (${output} ${_png} PARENT_SCOPE)
find_program (rsvg_convert_EXECUTABLE rsvg-convert ${find_program_REQUIRE}) find_program (rsvg_convert_EXECUTABLE rsvg-convert ${find_program_REQUIRE})
@ -229,17 +244,8 @@ function (icon_for_win32 pngs ico)
COMMENT "Generating Windows program icon" VERBATIM) COMMENT "Generating Windows program icon" VERBATIM)
endfunction () endfunction ()
# Build the main executable and link it
set (project_libraries
${project_common_libraries})
set (project_sources
${project_common_sources}
src/${PROJECT_NAME}.c)
set (project_headers
${project_common_headers})
if (WITH_GUI) if (WITH_GUI)
set (icon_svg ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.svg) set (icon_svg ${PROJECT_SOURCE_DIR}/sdgui.svg)
set (icon_base ${PROJECT_BINARY_DIR}/icons) set (icon_base ${PROJECT_BINARY_DIR}/icons)
# The largest size is mainly for an appropriately sized Windows icon # The largest size is mainly for an appropriately sized Windows icon
@ -248,54 +254,40 @@ if (WITH_GUI)
icon_to_png (${icon_svg} ${icon_size} ${icon_base} icon_png) icon_to_png (${icon_svg} ${icon_size} ${icon_base} icon_png)
list (APPEND icon_png_list ${icon_png}) list (APPEND icon_png_list ${icon_png})
endforeach () endforeach ()
add_custom_target (icons ALL DEPENDS ${icon_png_list}) add_custom_target (sdgui-icons ALL DEPENDS ${icon_png_list})
endif ()
if (WIN32) set (sdgui_sources
set (icon_ico ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.ico) src/sdgui.c
src/stardict-view.c
${project_common_sources})
if (WIN32)
set (icon_ico ${PROJECT_BINARY_DIR}/sdgui.ico)
icon_for_win32 ("${icon_png_list}" ${icon_ico}) icon_for_win32 ("${icon_png_list}" ${icon_ico})
set (resource_file ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.rc) set (resource_file ${PROJECT_BINARY_DIR}/sdgui.rc)
list (APPEND project_sources ${resource_file}) list (APPEND sdgui_sources ${resource_file})
add_custom_command (OUTPUT ${resource_file} add_custom_command (OUTPUT ${resource_file}
COMMAND ${CMAKE_COMMAND} -E echo "1 ICON \"${PROJECT_NAME}.ico\"" COMMAND ${CMAKE_COMMAND} -E echo "1 ICON \"sdgui.ico\""
> ${resource_file} VERBATIM) > ${resource_file} VERBATIM)
set_property (SOURCE ${resource_file} set_property (SOURCE ${resource_file}
APPEND PROPERTY OBJECT_DEPENDS ${icon_ico}) APPEND PROPERTY OBJECT_DEPENDS ${icon_ico})
else () endif ()
list (APPEND project_libraries ${Ncursesw_LIBRARIES} termo-static)
list (APPEND project_sources
src/${PROJECT_NAME}-tui.c)
endif ()
if (WITH_X11) add_executable (sdgui WIN32 ${sdgui_sources})
list (APPEND project_libraries ${xcb_LIBRARIES}) target_include_directories (sdgui PUBLIC ${gtk_INCLUDE_DIRS})
target_link_libraries (sdgui ${project_common_libraries} ${gtk_LIBRARIES})
endif () endif ()
if (WITH_GUI)
list (APPEND project_libraries ${gtk_LIBRARIES})
list (APPEND project_sources
src/${PROJECT_NAME}-gui.c
src/stardict-view.c)
add_executable (${PROJECT_NAME} WIN32 ${project_sources} ${project_headers})
else ()
add_executable (${PROJECT_NAME} ${project_sources} ${project_headers})
endif ()
target_link_libraries (${PROJECT_NAME} ${project_libraries})
# Tools # Tools
set (tools tdv-tabfile tdv-add-pronunciation tdv-query-tool tdv-transform) set (tools tabfile add-pronunciation query-tool transform)
foreach (tool ${tools}) foreach (tool ${tools})
add_executable (${tool} EXCLUDE_FROM_ALL add_executable (${tool} EXCLUDE_FROM_ALL
src/${tool}.c ${project_common_sources}) src/${tool}.c ${project_common_sources})
target_link_libraries (${tool} ${project_common_libraries}) target_link_libraries (${tool} ${project_common_libraries})
endforeach () endforeach ()
option (WITH_TOOLS "Build and install some StarDict tools" ${UNIX}) add_custom_target (tools DEPENDS ${tools})
if (WITH_TOOLS)
add_custom_target (tools ALL DEPENDS ${tools})
endif ()
# Example dictionaries # Example dictionaries
file (GLOB dicts_scripts "${PROJECT_SOURCE_DIR}/dicts/*.*") file (GLOB dicts_scripts "${PROJECT_SOURCE_DIR}/dicts/*.*")
@ -318,17 +310,15 @@ if (NOT WIN32)
install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
if (WITH_TOOLS)
install (TARGETS ${tools} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()
if (WITH_GUI) if (WITH_GUI)
install (FILES ${PROJECT_NAME}.svg install (TARGETS sdgui DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES sdgui.svg
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps)
install (DIRECTORY ${PROJECT_BINARY_DIR}/icons install (DIRECTORY ${PROJECT_BINARY_DIR}/icons
DESTINATION ${CMAKE_INSTALL_DATADIR}) DESTINATION ${CMAKE_INSTALL_DATADIR})
install (FILES ${PROJECT_NAME}.desktop install (FILES sdgui.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install (FILES ${PROJECT_NAME}.xml install (FILES sdgui.xml
DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages) DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
endif () endif ()
@ -339,7 +329,7 @@ if (NOT WIN32)
endforeach () endforeach ()
elseif (WITH_GUI) elseif (WITH_GUI)
# This rather crude filter has been mostly copied over from logdiag # This rather crude filter has been mostly copied over from logdiag
install (TARGETS ${PROJECT_NAME} DESTINATION .) install (TARGETS sdgui DESTINATION .)
install (DIRECTORY install (DIRECTORY
${win32_deps_prefix}/bin/ ${win32_deps_prefix}/bin/
DESTINATION . DESTINATION .
@ -387,7 +377,7 @@ if (BUILD_TESTING)
find_program (xmlwf_EXECUTABLE xmlwf) find_program (xmlwf_EXECUTABLE xmlwf)
find_program (xmllint_EXECUTABLE xmllint) find_program (xmllint_EXECUTABLE xmllint)
foreach (xml ${PROJECT_NAME}.xml) foreach (xml sdgui.xml)
if (xmlwf_EXECUTABLE) if (xmlwf_EXECUTABLE)
add_test (test-xmlwf-${xml} ${xmlwf_EXECUTABLE} add_test (test-xmlwf-${xml} ${xmlwf_EXECUTABLE}
${PROJECT_SOURCE_DIR}/${xml}) ${PROJECT_SOURCE_DIR}/${xml})
@ -407,7 +397,7 @@ if (BUILD_TESTING)
endif () endif ()
# CPack # CPack
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Translation dictionary viewer") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "StarDict TUI and GUI")
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch") set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>") set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
@ -423,17 +413,17 @@ set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set (CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set (CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME}") set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME}")
set (CPACK_NSIS_INSTALLED_ICON_NAME ${PROJECT_NAME}.exe) set (CPACK_NSIS_INSTALLED_ICON_NAME sdgui.exe)
set (CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} ${PROJECT_NAME}) set (CPACK_PACKAGE_EXECUTABLES sdgui sdgui)
set (CPACK_NSIS_EXECUTABLES_DIRECTORY .) set (CPACK_NSIS_EXECUTABLES_DIRECTORY .)
set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS [[ set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS [[
WriteRegStr HKCR '.ifo' '' 'tdv.Dictionary' WriteRegStr HKCR '.ifo' '' 'sdgui.Dictionary'
WriteRegStr HKCR 'tdv.Dictionary' '' 'StarDict Dictionary' WriteRegStr HKCR 'sdgui.Dictionary' '' 'StarDict Dictionary'
WriteRegStr HKCR 'tdv.Dictionary\\shell\\open\\command' '' '\"$INSTDIR\\tdv.exe\" \"%1\"' WriteRegStr HKCR 'sdgui.Dictionary\\shell\\open\\command' '' '\"$INSTDIR\\sdgui.exe\" \"%1\"'
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)' System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'
]]) ]])
set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS [[ set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS [[
DeleteRegKey HKCR 'tdv.Dictionary' DeleteRegKey HKCR 'sdgui.Dictionary'
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)' System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'
]]) ]])

View File

@ -1,4 +1,4 @@
Copyright (c) 2013 - 2023, Přemysl Eric Janouch <p@janouch.name> Copyright (c) 2013 - 2022, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted. purpose with or without fee is hereby granted.

View File

@ -1,19 +1,20 @@
Translation dictionary viewer StarDict Terminal and Graphical UI
============================= ==================================
'tdv' aims to provide an easy way of viewing translation as well as other kinds 'sdtui' aims to provide an easy way of viewing translation as well as other
of StarDict dictionaries, and is inspired by the dictionary component kinds of dictionaries in your terminal, and is inspired by the dictionary
of PC Translator. I was unsuccessful in finding any free software of this kind, component of PC Translator. I wasn't successful in finding any free software
and thus decided to write my own. of this kind, GUI or not, and thus decided to write my own.
The project is covered by a permissive license, unlike vast majority of other The project is covered by a permissive license, unlike vast majority of other
similar projects, and can serve as a base for implementing other dictionary similar projects, and can serve as a base for implementing other dictionary
software. software.
image::tdv.png[align="center"] image::sdtui.png[align="center"]
As a recent addition, the program also offers a GTK+ 3 based user interface, As a recent addition, there is now an alternative GTK+ 3 based frontend as well,
whose styling will follow your theme, and may be customized from 'gtk.css'. called 'sdgui'. It shares its dictionary list with 'sdtui', but styling will
follow your theme, and may be customized from 'gtk.css'.
Packages Packages
-------- --------
@ -22,7 +23,7 @@ a package with the latest development version from Archlinux's AUR.
Documentation Documentation
------------- -------------
See the link:docs/tdv.1.adoc[man page] for information about usage. See the link:docs/sdtui.1.adoc[man page] for information about usage.
The rest of this README will concern itself with externalities. The rest of this README will concern itself with externalities.
Building and Running Building and Running
@ -50,16 +51,16 @@ To install the application, you can do either the usual:
Or you can try telling CMake to make a package for you. For Debian it is: Or you can try telling CMake to make a package for you. For Debian it is:
$ cpack -G DEB $ cpack -G DEB
# dpkg -i tdv-*.deb # dpkg -i sdtui-*.deb
Having the program installed, simply run it with a StarDict '.ifo' file as Having the program installed, simply run it with a StarDict '.ifo' file as
an argument. It is, however, preferable to an argument. It is, however, preferable to
link:docs/tdv.1.adoc#_configuration[configure it] to load your dictionaries link:docs/sdtui.1.adoc#_configuration[configure it] to load your dictionaries
automatically. automatically.
Windows Windows
~~~~~~~ ~~~~~~~
With the help of Mingw-w64 and WINE, 'tdv' will successfully cross-compile With the help of Mingw-w64 and WINE, 'sdgui' will successfully cross-compile
for Windows. It isn't particularly usable on that system, if only because for Windows. It isn't particularly usable on that system, if only because
selection watching is a very X11/Wayland-specific feature. Beware that build selection watching is a very X11/Wayland-specific feature. Beware that build
dependencies take up almost a gigabyte of disk space. dependencies take up almost a gigabyte of disk space.
@ -81,16 +82,16 @@ The `make dicts` command will build some examples from freely available sources:
- Czech foreign words (the site's export is broken as of 2022/08, no response) - Czech foreign words (the site's export is broken as of 2022/08, no response)
- Czech WordNet 1.9 PDT (synonyms, hypernyms, hyponyms) - Czech WordNet 1.9 PDT (synonyms, hypernyms, hyponyms)
You can use the included 'tdv-transform' tool to convert already existing You can use the included 'transform' tool to convert already existing StarDict
StarDict dictionaries that are nearly good as they are. Remember that you can dictionaries that are nearly good as they are. Remember that you can change
change the `sametypesequence` of the resulting '.ifo' file to another format, the `sametypesequence` of the resulting '.ifo' file to another format, or run
or run 'dictzip' on '.dict' files to make them compact. 'dictzip' on '.dict' files to make them compact.
https://mega.co.nz/#!axtD0QRK!sbtBgizksyfkPqKvKEgr8GQ11rsWhtqyRgUUV0B7pwg[CZ <--> EN/DE/PL/RU dictionaries] https://mega.co.nz/#!axtD0QRK!sbtBgizksyfkPqKvKEgr8GQ11rsWhtqyRgUUV0B7pwg[CZ <--> EN/DE/PL/RU dictionaries]
Further Development Further Development
------------------- -------------------
While I've been successfully using 'tdv' for many years now, some issues While I've been successfully using 'sdtui' for many years now, some issues
should be addressed before including the software in regular Linux and/or should be addressed before including the software in regular Linux and/or
BSD distributions: BSD distributions:

View File

@ -8,7 +8,6 @@
#define GETTEXT_DIRNAME "${CMAKE_INSTALL_PREFIX}/share/locale" #define GETTEXT_DIRNAME "${CMAKE_INSTALL_PREFIX}/share/locale"
#cmakedefine WITH_X11 #cmakedefine WITH_X11
#cmakedefine WITH_GUI
#cmakedefine HAVE_RESIZETERM #cmakedefine HAVE_RESIZETERM
#endif // ! CONFIG_H #endif // ! CONFIG_H

View File

@ -1,21 +1,21 @@
tdv(1) sdtui(1)
====== ========
:doctype: manpage :doctype: manpage
:manmanual: tdv Manual :manmanual: sdtui Manual
:mansource: tdv {release-version} :mansource: sdtui {release-version}
Name Name
---- ----
tdv - Translation dictionary viewer sdtui - StarDict terminal UI
Synopsis Synopsis
-------- --------
*tdv* [_OPTION_]... [_DICTIONARY_.ifo]... *sdtui* [_OPTION_]... [_DICTIONARY_.ifo]...
Description Description
----------- -----------
*tdv* is a StarDict dictionary viewer, custom-tailored for translation *sdtui* is a StarDict dictionary viewer, custom-tailored for translation
dictionaries, with a simple curses-based terminal UI, and a GTK+ graphical UI. dictionaries, with a simple curses-based terminal UI.
Without any command line arguments, the program expects to find a list of Without any command line arguments, the program expects to find a list of
dictionaries to load on start-up in its configuration file. The _.ifo_ files dictionaries to load on start-up in its configuration file. The _.ifo_ files
@ -32,7 +32,7 @@ Options
Configuration Configuration
------------- -------------
You can start your _tdv.conf_ file with the following snippet: You can start your _sdtui.conf_ file with the following snippet:
[Settings] [Settings]
center-search = true # Ensure visibility of preceding entries? center-search = true # Ensure visibility of preceding entries?
@ -75,16 +75,16 @@ Extensions
---------- ----------
Because the StarDict file format is a bit of a clusterfuck with regard to Because the StarDict file format is a bit of a clusterfuck with regard to
collation of dictionary entries, this software introduces an additional, collation of dictionary entries, this software introduces an additional,
optional "collation" field into the _.ifo_ file. When *tdv* discovers this optional "collation" field into the _.ifo_ file. When *sdtui* discovers this
field while reading a dictionary, it automatically reorders the index according field while reading a dictionary, it automatically reorders the index according
to that locale (e.g., "cs_CZ"). This operation may take a little while, to that locale (e.g., "cs_CZ"). This operation may take a little while,
in the order of seconds. in the order of seconds.
Files Files
----- -----
*tdv* follows the XDG Base Directory Specification. *sdtui* follows the XDG Base Directory Specification.
_~/.config/tdv/tdv.conf_:: _~/.config/sdtui/sdtui.conf_::
The configuration file. The configuration file.
Reporting bugs Reporting bugs

102
po/cs.po
View File

@ -1,95 +1,84 @@
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) 2013 Přemysl Eric Janouch # Copyright (C) 2013 Přemysl Eric Janouch
# This file is distributed under the same license as the tdv package. # This file is distributed under the same license as the sdtui package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tdv 0.1.0\n" "Project-Id-Version: sdtui 0.1.0\n"
"Report-Msgid-Bugs-To: https://git.janouch.name/p/tdv/issues\n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/sdtui/issues\n"
"POT-Creation-Date: 2023-06-11 17:47+0200\n" "POT-Creation-Date: 2021-10-11 21:10+0200\n"
"PO-Revision-Date: 2023-06-11 17:53+0200\n" "PO-Revision-Date: 2016-09-28 16:15+0200\n"
"Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n" "Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"Language: cs\n" "Language: cs\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.3.1\n" "X-Generator: Poedit 1.8.9\n"
#: ../src/tdv-tui.c:572 #: ../src/sdgtk.c:304
msgid "- StarDict GTK+ UI"
msgstr ""
#: ../src/sdtui.c:726
msgid "Cannot load configuration" msgid "Cannot load configuration"
msgstr "Nemohu načíst konfiguraci" msgstr "Nemohu načíst konfiguraci"
#: ../src/tdv.c:77 #: ../src/sdtui.c:2497
msgid "Error" msgid "Error"
msgstr "Chyba" msgstr "Chyba"
#: ../src/tdv-tui.c:592 #: ../src/sdtui.c:745
msgid "Error loading dictionary" msgid "Error loading dictionary"
msgstr "Chyba při načítání slovníku" msgstr "Chyba při načítání slovníku"
#: ../src/tdv.c:60 #: ../src/sdgtk.c:299
msgid "Launch the GUI even when run from a terminal" msgid "FILE..."
msgstr "Spustit GUI i při běhu z terminálu" msgstr ""
#: ../src/tdv-gui.c:467 ../src/tdv-tui.c:597 #: ../src/sdgtk.c:355
msgid "No dictionaries found either in the configuration or on the command line" msgid "Follow selection"
msgstr ""
#: ../src/sdtui.c:750
msgid ""
"No dictionaries found either in the configuration or on the command line"
msgstr "V konfiguraci ani na příkazové řádce nebyly nalezeny žádné slovníky" msgstr "V konfiguraci ani na příkazové řádce nebyly nalezeny žádné slovníky"
#: ../src/tdv-gui.c:367 #: ../src/sdtui.c:2476
msgid "Open dictionary"
msgstr "Otevřít slovník"
#: ../src/tdv.c:55
msgid "Output version information and exit" msgid "Output version information and exit"
msgstr "Vypíše informace o verzi a ukončí se" msgstr "Vypíše informace o verzi a ukončí se"
#: ../src/tdv-tui.c:555 #: ../src/sdtui.c:700
msgid "Search" msgid "Search"
msgstr "Hledat" msgstr "Hledat"
#: ../src/tdv-tui.c:1068 #: ../src/sdtui.c:1114
msgid "Terminal UI for StarDict dictionaries" msgid "Terminal UI for StarDict dictionaries"
msgstr "Terminálové UI pro stardictové slovníky" msgstr "Terminálové UI pro stardictové slovníky"
#: ../src/tdv-tui.c:1071 #: ../src/sdtui.c:1117
msgid "Type to search" msgid "Type to search"
msgstr "Zadejte vyhledávaný výraz" msgstr "Zadejte vyhledávaný výraz"
#: ../src/tdv.c:39 #: ../src/sdgtk.c:289 ../src/sdtui.c:2481
msgid "Warning" msgid "Warning"
msgstr "Varování" msgstr "Varování"
#: ../src/tdv-tui.c:2071 #: ../src/sdtui.c:2095
#, c-format #, c-format
msgid "X11 connection failed (error code %d)" msgid "X11 connection failed (error code %d)"
msgstr "Spojení s X11 selhalo (chybový kód %d)" msgstr ""
#: ../src/tdv-tui.c:2217 #: ../src/sdtui.c:2241
#, c-format #, c-format
msgid "X11 request error (%d, major %d, minor %d)" msgid "X11 request error (%d, major %d, minor %d)"
msgstr "Chyba X11 požadavku (%d, major %d, minor %d)" msgstr ""
#: ../src/tdv.c:67 #: ../src/sdtui.c:2489
msgid "[dictionary.ifo...] - Translation dictionary viewer" msgid "[dictionary.ifo...] - StarDict terminal UI"
msgstr "[slovník.ifo...] - Prohlížeč překladových slovníků" msgstr "[slovník.ifo...] - terminálové UI pro StarDict"
#: ../src/tdv-gui.c:369
msgid "_Cancel"
msgstr "_Storno"
#: ../src/tdv-gui.c:509
msgid "_Follow selection"
msgstr "_Sledovat výběr"
#: ../src/tdv-gui.c:370
msgid "_Open"
msgstr "_Otevřít"
#: ../src/tdv-gui.c:504
msgid "_Open..."
msgstr "_Otevřít..."
#: ../src/stardict.c:850 #: ../src/stardict.c:850
msgid "cannot find .dict file" msgid "cannot find .dict file"
@ -99,19 +88,19 @@ msgstr "nemohu najít .dict soubor"
msgid "cannot find .idx file" msgid "cannot find .idx file"
msgstr "nemohu najít .idx soubor" msgstr "nemohu najít .idx soubor"
#: ../src/tdv-tui.c:258 #: ../src/sdtui.c:320
msgid "error in entry" msgid "error in entry"
msgstr "chyba v záznamu" msgstr "chyba v záznamu"
#: ../src/tdv.c:39 #: ../src/sdgtk.c:289 ../src/sdtui.c:2481
msgid "failed to set the locale" msgid "failed to set the locale"
msgstr "selhalo nastavení locale" msgstr "selhalo nastavení locale"
#: ../src/stardict.c:328 #: ../src/stardict.c:330
msgid "index file size not specified" msgid "index file size not specified"
msgstr "nebyla určena velikost rejstříku" msgstr "nebyla určena velikost rejstříku"
#: ../src/stardict.c:1157 ../src/stardict.c:1182 #: ../src/stardict.c:1153 ../src/stardict.c:1178
msgid "invalid data entry" msgid "invalid data entry"
msgstr "neplatná datová položka" msgstr "neplatná datová položka"
@ -123,7 +112,7 @@ msgstr "neplatné kódování, musí být validní UTF-8"
msgid "invalid header format" msgid "invalid header format"
msgstr "neplatný formát hlavičky" msgstr "neplatný formát hlavičky"
#: ../src/stardict.c:337 #: ../src/stardict.c:339
msgid "invalid index offset bits" msgid "invalid index offset bits"
msgstr "neplatný počet bitů pro offset v rejstříku" msgstr "neplatný počet bitů pro offset v rejstříku"
@ -135,11 +124,11 @@ msgstr "neplatné číslo"
msgid "invalid version" msgid "invalid version"
msgstr "neplatná verze" msgstr "neplatná verze"
#: ../src/stardict.c:316 #: ../src/stardict.c:318
msgid "no book name specified" msgid "no book name specified"
msgstr "nebyl určen název knihy" msgstr "nebyl určen název knihy"
#: ../src/stardict-view.c:96 ../src/tdv-tui.c:340 #: ../src/sdtui.c:415
msgid "no usable field found" msgid "no usable field found"
msgstr "nenalezeno žádné použitelné pole" msgstr "nenalezeno žádné použitelné pole"
@ -147,7 +136,7 @@ msgstr "nenalezeno žádné použitelné pole"
msgid "option format error" msgid "option format error"
msgstr "chyba v zápisu volby" msgstr "chyba v zápisu volby"
#: ../src/tdv.c:77 #: ../src/sdtui.c:2497
msgid "option parsing failed" msgid "option parsing failed"
msgstr "zpracování přepínačů selhalo" msgstr "zpracování přepínačů selhalo"
@ -159,9 +148,6 @@ msgstr "neznámý klíč, ignoruji"
msgid "version not specified" msgid "version not specified"
msgstr "nebyla určena verze" msgstr "nebyla určena verze"
#: ../src/stardict.c:322 #: ../src/stardict.c:324
msgid "word count not specified" msgid "word count not specified"
msgstr "nebyl určen počet slov" msgstr "nebyl určen počet slov"
#~ msgid "FILE..."
#~ msgstr "SOUBOR..."

View File

@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Přemysl Eric Janouch # Copyright (C) YEAR Přemysl Eric Janouch
# This file is distributed under the same license as the tdv package. # This file is distributed under the same license as the sdtui package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tdv 0.1.0\n" "Project-Id-Version: sdtui 0.1.0\n"
"Report-Msgid-Bugs-To: https://git.janouch.name/p/tdv/issues\n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/sdtui/issues\n"
"POT-Creation-Date: 2023-06-11 17:47+0200\n" "POT-Creation-Date: 2021-10-11 21:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,10 +17,85 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../src/stardict-view.c:96 ../src/tdv-tui.c:340 #: ../src/sdgtk.c:289 ../src/sdtui.c:2481
msgid "Warning"
msgstr ""
#: ../src/sdgtk.c:289 ../src/sdtui.c:2481
msgid "failed to set the locale"
msgstr ""
#: ../src/sdgtk.c:299
msgid "FILE..."
msgstr ""
#: ../src/sdgtk.c:304
msgid "- StarDict GTK+ UI"
msgstr ""
#: ../src/sdgtk.c:355
msgid "Follow selection"
msgstr ""
#: ../src/sdtui.c:320
msgid "error in entry"
msgstr ""
#: ../src/sdtui.c:415
msgid "no usable field found" msgid "no usable field found"
msgstr "" msgstr ""
#: ../src/sdtui.c:700
msgid "Search"
msgstr ""
#: ../src/sdtui.c:726
msgid "Cannot load configuration"
msgstr ""
#: ../src/sdtui.c:745
msgid "Error loading dictionary"
msgstr ""
#: ../src/sdtui.c:750
msgid ""
"No dictionaries found either in the configuration or on the command line"
msgstr ""
#: ../src/sdtui.c:1114
msgid "Terminal UI for StarDict dictionaries"
msgstr ""
#: ../src/sdtui.c:1117
msgid "Type to search"
msgstr ""
#: ../src/sdtui.c:2095
#, c-format
msgid "X11 connection failed (error code %d)"
msgstr ""
#: ../src/sdtui.c:2241
#, c-format
msgid "X11 request error (%d, major %d, minor %d)"
msgstr ""
#: ../src/sdtui.c:2476
msgid "Output version information and exit"
msgstr ""
#: ../src/sdtui.c:2489
msgid "[dictionary.ifo...] - StarDict terminal UI"
msgstr ""
#: ../src/sdtui.c:2497
msgid "Error"
msgstr ""
#: ../src/sdtui.c:2497
msgid "option parsing failed"
msgstr ""
#: ../src/stardict.c:89 #: ../src/stardict.c:89
msgid "invalid header format" msgid "invalid header format"
msgstr "" msgstr ""
@ -49,19 +124,19 @@ msgstr ""
msgid "option format error" msgid "option format error"
msgstr "" msgstr ""
#: ../src/stardict.c:316 #: ../src/stardict.c:318
msgid "no book name specified" msgid "no book name specified"
msgstr "" msgstr ""
#: ../src/stardict.c:322 #: ../src/stardict.c:324
msgid "word count not specified" msgid "word count not specified"
msgstr "" msgstr ""
#: ../src/stardict.c:328 #: ../src/stardict.c:330
msgid "index file size not specified" msgid "index file size not specified"
msgstr "" msgstr ""
#: ../src/stardict.c:337 #: ../src/stardict.c:339
msgid "invalid index offset bits" msgid "invalid index offset bits"
msgstr "" msgstr ""
@ -73,93 +148,6 @@ msgstr ""
msgid "cannot find .dict file" msgid "cannot find .dict file"
msgstr "" msgstr ""
#: ../src/stardict.c:1157 ../src/stardict.c:1182 #: ../src/stardict.c:1153 ../src/stardict.c:1178
msgid "invalid data entry" msgid "invalid data entry"
msgstr "" msgstr ""
#: ../src/tdv-gui.c:367
msgid "Open dictionary"
msgstr ""
#: ../src/tdv-gui.c:369
msgid "_Cancel"
msgstr ""
#: ../src/tdv-gui.c:370
msgid "_Open"
msgstr ""
#: ../src/tdv-gui.c:467 ../src/tdv-tui.c:597
msgid ""
"No dictionaries found either in the configuration or on the command line"
msgstr ""
#: ../src/tdv-gui.c:504
msgid "_Open..."
msgstr ""
#: ../src/tdv-gui.c:509
msgid "_Follow selection"
msgstr ""
#: ../src/tdv-tui.c:258
msgid "error in entry"
msgstr ""
#: ../src/tdv-tui.c:555
msgid "Search"
msgstr ""
#: ../src/tdv-tui.c:572
msgid "Cannot load configuration"
msgstr ""
#: ../src/tdv-tui.c:592
msgid "Error loading dictionary"
msgstr ""
#: ../src/tdv-tui.c:1068
msgid "Terminal UI for StarDict dictionaries"
msgstr ""
#: ../src/tdv-tui.c:1071
msgid "Type to search"
msgstr ""
#: ../src/tdv-tui.c:2071
#, c-format
msgid "X11 connection failed (error code %d)"
msgstr ""
#: ../src/tdv-tui.c:2217
#, c-format
msgid "X11 request error (%d, major %d, minor %d)"
msgstr ""
#: ../src/tdv.c:39
msgid "Warning"
msgstr ""
#: ../src/tdv.c:39
msgid "failed to set the locale"
msgstr ""
#: ../src/tdv.c:55
msgid "Output version information and exit"
msgstr ""
#: ../src/tdv.c:60
msgid "Launch the GUI even when run from a terminal"
msgstr ""
#: ../src/tdv.c:67
msgid "[dictionary.ifo...] - Translation dictionary viewer"
msgstr ""
#: ../src/tdv.c:77
msgid "Error"
msgstr ""
#: ../src/tdv.c:77
msgid "option parsing failed"
msgstr ""

View File

@ -1,9 +1,9 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=tdv Name=sdgui
GenericName=Translation dictionary viewer GenericName=StarDict GUI
Icon=tdv Icon=sdgui
Exec=tdv %F Exec=sdgui %F
StartupNotify=true StartupNotify=true
MimeType=application/x-stardict-ifo; MimeType=application/x-stardict-ifo;
Categories=Office;Dictionary;GTK; Categories=Office;Dictionary;GTK;

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -6,7 +6,7 @@
* finalised with an empty line. Newlines are escaped with `\n', * finalised with an empty line. Newlines are escaped with `\n',
* backslashes with `\\'. * backslashes with `\\'.
* *
* So far only the `m', `g`, and `x` fields are supported, as in tdv. * So far only the `m', `g`, and `x` fields are supported, as in sdtui.
* *
* Copyright (c) 2013 - 2021, Přemysl Eric Janouch <p@janouch.name> * Copyright (c) 2013 - 2021, Přemysl Eric Janouch <p@janouch.name>
* *

View File

@ -19,6 +19,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <locale.h>
#include <stdlib.h> #include <stdlib.h>
#include "config.h" #include "config.h"
@ -26,6 +27,9 @@
#include "utils.h" #include "utils.h"
#include "stardict-view.h" #include "stardict-view.h"
#undef PROJECT_NAME
#define PROJECT_NAME "sdgui"
static struct static struct
{ {
GtkWidget *window; ///< Top-level window GtkWidget *window; ///< Top-level window
@ -448,18 +452,42 @@ die_with_dialog (const gchar *message)
} }
int int
gui_main (char *argv[]) main (int argc, char *argv[])
{ {
// Just like with GtkApplication, argv has been parsed by the option group. if (!setlocale (LC_ALL, ""))
gtk_init (NULL, NULL); g_printerr ("%s: %s\n", _("Warning"), _("failed to set the locale"));
bindtextdomain (GETTEXT_PACKAGE, GETTEXT_DIRNAME);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gchar **filenames = NULL;
GOptionEntry option_entries[] =
{
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames,
NULL, N_("[FILE]...")},
{},
};
GError *error = NULL;
gtk_init_with_args (&argc, &argv, N_("- StarDict GTK+ UI"),
option_entries, GETTEXT_PACKAGE, &error);
if (error)
{
g_warning ("%s", error->message);
g_error_free (error);
return 1;
}
gtk_window_set_default_icon_name (PROJECT_NAME); gtk_window_set_default_icon_name (PROJECT_NAME);
GError *error = NULL;
GPtrArray *new_dictionaries = GPtrArray *new_dictionaries =
g_ptr_array_new_with_free_func ((GDestroyNotify) dictionary_destroy); g_ptr_array_new_with_free_func ((GDestroyNotify) dictionary_destroy);
if (argv[0]) if (filenames)
load_from_filenames (new_dictionaries, argv); {
load_from_filenames (new_dictionaries, filenames);
g_strfreev (filenames);
}
else if (!load_from_config (new_dictionaries, &error) && error) else if (!load_from_config (new_dictionaries, &error) && error)
die_with_dialog (error->message); die_with_dialog (error->message);

View File

@ -18,15 +18,16 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <locale.h>
#include <stdarg.h> #include <stdarg.h>
#include <limits.h> #include <limits.h>
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
#include <glib-unix.h> #include <glib-unix.h>
#include <glib/gi18n.h>
#include <gio/gio.h> #include <gio/gio.h>
#include <pango/pango.h> #include <pango/pango.h>
#include <glib/gi18n.h>
#include <unistd.h> #include <unistd.h>
#include <poll.h> #include <poll.h>
@ -2437,10 +2438,53 @@ log_handler (const gchar *domain, GLogLevelFlags level,
} }
int int
tui_main (char *argv[]) main (int argc, char *argv[])
{ {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (glib_check_version (2, 36, 0))
g_type_init ();
G_GNUC_END_IGNORE_DEPRECATIONS
gboolean show_version = FALSE;
GOptionEntry entries[] =
{
{ "version", 0, G_OPTION_FLAG_IN_MAIN,
G_OPTION_ARG_NONE, &show_version,
N_("Output version information and exit"), NULL },
{ NULL }
};
if (!setlocale (LC_ALL, ""))
g_printerr ("%s: %s\n", _("Warning"), _("failed to set the locale"));
bindtextdomain (GETTEXT_PACKAGE, GETTEXT_DIRNAME);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
GError *error = NULL;
GOptionContext *ctx = g_option_context_new
(N_("[dictionary.ifo...] - StarDict terminal UI"));
GOptionGroup *group = g_option_group_new ("", "", "", NULL, NULL);
g_option_group_add_entries (group, entries);
g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, group);
g_option_context_set_translation_domain (ctx, GETTEXT_PACKAGE);
if (!g_option_context_parse (ctx, &argc, &argv, &error))
{
g_printerr ("%s: %s: %s\n", _("Error"), _("option parsing failed"),
error->message);
exit (EXIT_FAILURE);
}
g_option_context_free (ctx);
if (show_version)
{
g_print (PROJECT_NAME " " PROJECT_VERSION "\n");
exit (EXIT_SUCCESS);
}
Application app; Application app;
app_init (&app, argv); app_init (&app, argv + 1);
app_init_terminal (&app); app_init_terminal (&app);
app_redraw (&app); app_redraw (&app);
@ -2484,3 +2528,4 @@ tui_main (char *argv[])
return 0; return 0;
} }

View File

@ -1,98 +0,0 @@
/*
* Translation dictionary viewer
*
* Copyright (c) 2023, Přemysl Eric Janouch <p@janouch.name>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#include "config.h"
#include <glib.h>
#include <glib/gi18n.h>
#ifdef WITH_GUI
#include <gtk/gtk.h>
#endif
#include <locale.h>
#ifndef G_OS_WIN32
#include <unistd.h>
#endif
int tui_main (char *[]);
int gui_main (char *[]);
int
main (int argc, char *argv[])
{
if (!setlocale (LC_ALL, ""))
g_printerr ("%s: %s\n", _("Warning"), _("failed to set the locale"));
bindtextdomain (GETTEXT_PACKAGE, GETTEXT_DIRNAME);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gboolean show_version = FALSE;
#ifdef WITH_GUI
# ifndef G_OS_WIN32
gboolean gui = FALSE;
# endif
#endif
GOptionEntry entries[] =
{
{ "version", 0, G_OPTION_FLAG_IN_MAIN,
G_OPTION_ARG_NONE, &show_version,
N_("Output version information and exit"), NULL },
#ifdef WITH_GUI
# ifndef G_OS_WIN32
{ "gui", 0, G_OPTION_FLAG_IN_MAIN,
G_OPTION_ARG_NONE, &gui,
N_("Launch the GUI even when run from a terminal"), NULL },
# endif
#endif
{ },
};
GOptionContext *ctx = g_option_context_new
(N_("[dictionary.ifo...] - Translation dictionary viewer"));
g_option_context_add_main_entries (ctx, entries, GETTEXT_PACKAGE);
#ifdef WITH_GUI
g_option_context_add_group (ctx, gtk_get_option_group (FALSE));
#endif
g_option_context_set_translation_domain (ctx, GETTEXT_PACKAGE);
GError *error = NULL;
if (!g_option_context_parse (ctx, &argc, &argv, &error))
{
g_printerr ("%s: %s: %s\n", _("Error"), _("option parsing failed"),
error->message);
exit (EXIT_FAILURE);
}
g_option_context_free (ctx);
if (show_version)
{
g_print (PROJECT_NAME " " PROJECT_VERSION "\n");
exit (EXIT_SUCCESS);
}
#ifdef WITH_GUI
# ifndef G_OS_WIN32
if (gui || !isatty (STDIN_FILENO))
# endif
return gui_main (argv + 1);
#endif
#ifndef G_OS_WIN32
return tui_main (argv + 1);
#endif
}

View File

@ -3,7 +3,7 @@
* *
* The external filter needs to process NUL-separated textual entries. * The external filter needs to process NUL-separated textual entries.
* *
* Example: tdv-transform input.ifo output -- perl -p0e s/bullshit/soykaf/g * Example: transform input.ifo output -- perl -p0e s/bullshit/soykaf/g
* *
* Copyright (c) 2020, Přemysl Eric Janouch <p@janouch.name> * Copyright (c) 2020, Přemysl Eric Janouch <p@janouch.name>
* *