Skip to content

Commit 816fba1

Browse files
committed
Init
1 parent e6383a9 commit 816fba1

23 files changed

+1828
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.wsjcpp/*
2+
tmp/*
3+
wsjcpp-diff-text
4+
15
# Prerequisites
26
*.d
37

.travis.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
language: cpp
3+
4+
branches:
5+
only:
6+
- master
7+
8+
dist: bionic
9+
10+
addons:
11+
apt:
12+
packages:
13+
- cmake
14+
- make
15+
- g++
16+
- pkg-config
17+
18+
# Build steps
19+
script:
20+
- ./build_simple.sh
21+
- cd unit-tests.wsjcpp
22+
- ./build_simple.sh
23+
- ./unit-tests

CMakeLists.txt

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
3+
project(wsjcpp-diff-text C CXX)
4+
5+
include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)
6+
7+
set(CMAKE_CXX_STANDARD 11)
8+
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-diff-text_SOURCE_DIR})
9+
10+
# include header dirs
11+
list (APPEND WSJCPP_INCLUDE_DIRS "src")
12+
13+
list (APPEND WSJCPP_SOURCES "src/main.cpp")
14+
list (APPEND WSJCPP_SOURCES "src/wsjcpp_diff_text.h")
15+
list (APPEND WSJCPP_SOURCES "src/wsjcpp_diff_text.cpp")
16+
17+
#### BEGIN_WSJCPP_APPEND
18+
#### END_WSJCPP_APPEND
19+
20+
include_directories(${WSJCPP_INCLUDE_DIRS})
21+
22+
add_executable (wsjcpp-diff-text ${WSJCPP_SOURCES})
23+
24+
target_link_libraries(wsjcpp-diff-text ${WSJCPP_LIBRARIES})
25+
26+
install(
27+
TARGETS
28+
wsjcpp-diff-text
29+
RUNTIME DESTINATION
30+
/usr/bin
31+
)
32+

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
# wsjcpp-diff-text
2+
3+
[![Build Status](https://api.travis-ci.com/wsjcpp/wsjcpp-diff-text.svg?branch=master)](https://travis-ci.com/wsjcpp/wsjcpp-diff-text) [![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-diff-text.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-diff-text) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-diff-text.svg)](https://github.com/wsjcpp/wsjcpp-diff-text) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-diff-text.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-diff-text/network/members)
4+
25
Algorithm for like a diff texts
6+
7+
8+
## Install
9+
10+
```
11+
wsjcpp install "https://github.com/wsjcpp/wsjcpp-diff-text:master"
12+
```
13+
14+
## Use
15+
16+

build_simple.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
if [ ! -d tmp ]; then
4+
mkdir -p tmp
5+
fi
6+
7+
cd tmp
8+
cmake ..
9+
make
10+

src.wsjcpp/.gitkeep

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src.wsjcpp/CMakeLists.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Automaticly generated by [email protected]
2+
cmake_minimum_required(VERSION 3.0)
3+
4+
add_definitions(-DWSJCPP_VERSION="v0.1.0")
5+
add_definitions(-DWSJCPP_NAME="wsjcpp-diff-text")
6+
7+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
8+
set(MACOSX TRUE)
9+
endif()
10+
11+
set(CMAKE_CXX_STANDARD 11)
12+
13+
set (WSJCPP_LIBRARIES "")
14+
set (WSJCPP_INCLUDE_DIRS "")
15+
set (WSJCPP_SOURCES "")
16+
17+
find_package(Threads REQUIRED)
18+
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
19+
20+
# wsjcpp-core:v0.1.1
21+
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/wsjcpp_core/")
22+
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
23+
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
24+
25+
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
wsjcpp_version: v0.0.1
2+
cmake_cxx_standard: 11
3+
cmake_minimum_required: 3.0
4+
5+
name: wsjcpp-core
6+
version: v0.1.1
7+
description: Basic Utils for wsjcpp
8+
issues: https://github.com/wsjcpp/wsjcpp-core/issues
9+
repositories:
10+
- type: main
11+
url: "https://github.com/wsjcpp/wsjcpp-core"
12+
keywords:
13+
- c++
14+
- wsjcpp
15+
16+
authors:
17+
- name: Evgenii Sopov
18+
19+
20+
distribution:
21+
- source-file: src/wsjcpp_core.cpp
22+
target-file: wsjcpp_core.cpp
23+
type: "source-code"
24+
- source-file: src/wsjcpp_core.h
25+
target-file: wsjcpp_core.h
26+
type: "source-code" # todo must be header-file
27+
- source-file: "src/wsjcpp_unit_tests.cpp"
28+
target-file: "wsjcpp_unit_tests.cpp"
29+
type: "unit-tests"
30+
- source-file: "src/wsjcpp_unit_tests.h"
31+
target-file: "wsjcpp_unit_tests.h"
32+
type: "unit-tests"
33+
- source-file: "src/wsjcpp_unit_tests_main.cpp"
34+
target-file: "wsjcpp_unit_tests_main.cpp"
35+
type: "unit-tests"
36+
37+
unit-tests:
38+
cases:
39+
- name: CoreNormalizePath
40+
description: Check function normalizePath
41+
- name: CoreUuid
42+
description: Check test generate uuid function
43+
- name: CoreExtractFilename
44+
description: Check function extract filenane from path
45+
- name: "ToUpper"
46+
description: "String to upper"
47+
- name: "CreateUuid"
48+
description: "Test generation uuids"
49+
- name: "GetEnv"
50+
description: "Test getEnv function"
51+
- name: "ToLower"
52+
description: "Test toLower"
53+
- name: "ReplaceAll"
54+
description: "Test replace all"
55+
- name: "DecodeUriComponent"
56+
description: "Check decoding"
57+
- name: "EncodeUriComponent"
58+
description: "Check encoding"
59+
- name: "Uint2HexString"
60+
description: "Test convert unsigned int to hex string"
61+
- name: "Split"
62+
description: "Test split function"
63+
- name: "CreateEmptyFile"
64+
description: "Test create empty file"
65+
- name: "ReadFileToBuffer"
66+
description: "test for readFileToBuffer"
67+
- name: "Join"
68+
description: "Test join function"
69+
- name: "getHumanSizeBytes"
70+
description: "Test function get human size in bytes"

0 commit comments

Comments
 (0)