Skip to content

Commit

Permalink
add label shortcuts and other bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromedockes committed Feb 28, 2021
1 parent 016dabb commit 31f2cee
Show file tree
Hide file tree
Showing 38 changed files with 1,349 additions and 593 deletions.
24 changes: 18 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
cmake_minimum_required(VERSION 3.1.0)

project(labelbuddy VERSION 0.0.1 LANGUAGES CXX)
project(labelbuddy VERSION 0.0.3 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# if (MSVC)
# add_compile_options(/W4 /WX)
# else()
# add_compile_options(-Wall -Wextra -pedantic -Werror)
# endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
Expand Down Expand Up @@ -39,13 +45,19 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")

set(CPACK_PACKAGE_NAME "labelbuddy")
set(CPACK_PACKAGE_VERSION "0.0.1")
set(CPACK_PACKAGE_VERSION "0.0.3")
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 1)
set(CPACK_PACKAGE_VERSION_PATCH 3)
set(CPACK_PACKAGE_CHECKSUM "MD5")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "gui tool for annotating documents")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/docs/short-readme.txt")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/jeromedockes/labelbuddy")
if(CMAKE_VERSION VERSION_LESS "3.14.0")
file(READ "${CMAKE_SOURCE_DIR}/docs/Description" DESCR)
string(REGEX REPLACE "\n$" "" CPACK_DEBIAN_PACKAGE_DESCRIPTION "${DESCR}")
else()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GUI tool for annotating documents")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/docs/extended-description")
endif()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")

set(CPACK_SOURCE_GENERATOR "TGZ")
Expand Down Expand Up @@ -86,7 +98,7 @@ set(CPACK_SOURCE_IGNORE_FILES

set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_DEBIAN_PACKAGE_VERSION "0.0.1-1")
set(CPACK_DEBIAN_PACKAGE_VERSION "0.0.3-1")
set(CPACK_DEBIAN_PACKAGE_SECTION "text")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jerome Dockes <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
Expand Down
2 changes: 1 addition & 1 deletion data/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.3
6 changes: 6 additions & 0 deletions docs/Description
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
GUI tool for annotating documents
This is an application for annotating parts of documents with labels.
labelbuddy can be used for Part Of Speech tagging,
Named Entity Recognition,
sentiment analysis and document classification, etc.
It depends on Qt5.
13 changes: 9 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ examples := $(wildcard example_data/*.txt)

all: $(html) $(webhtml) example_data/example_documents.json

%.html: %.adoc
%.html: %.adoc ../data/VERSION.txt
asciidoctor -b xhtml -a lbversion="$$(cat ../data/VERSION.txt)" $<

gh-pages-site/%.html: %.html
mkdir -p gh-pages-site
xsltproc add_nav.xsl $< > $@

documentation.html: README.adoc
documentation.html: README.adoc ../data/VERSION.txt
asciidoctor -b xhtml -a lbversion="$$(cat ../data/VERSION.txt)" $< -o $@

# example_data/documentation.txt: documentation.html
# lynx -dump -nolist -nonumbers -width=79 $< | \
# sed 's/\xe2\x80\x8b//g;/^ *Last updated[-: 0-9]*$$/d' > $@

example_data/documentation.txt: documentation.html
lynx -dump -nolist -nonumbers -width=79 $< | \
sed 's/\xe2\x80\x8b//g;/^ *Last updated[-: 0-9]*$$/d' > $@
pandoc $< -t plain | \
sed '1s/^/\nThis doc is better read with a fixed width font: Preferences > monospace, or Help > documentation for html version\n\n/;s/\xe2\x80\x8b//g;/^ *Last updated[-: 0-9]*$$/d' > $@


example_data/example_documents.json: $(examples) example_data/documentation.txt example_data/make_example_docs.py
python3 example_data/make_example_docs.py
Expand Down
Loading

0 comments on commit 31f2cee

Please sign in to comment.